Documentation ¶
Overview ¶
Package bbc defines the BBC services of BCE. The supported APIs are all defined in sub-package
Index ¶
- Constants
- type Client
- func (c *Client) CreateDeploySet(args *api.CreateDeploySetArgs) (*api.CreateDeploySetResult, error)
- func (c *Client) CreateImageFromInstanceId(args *api.CreateImageArgs) (*api.CreateImageResult, error)
- func (c *Client) CreateInstance(args *api.CreateInstanceArgs) (*api.CreateInstanceResult, error)
- func (c *Client) DeleteDeploySet(deploySetId string) error
- func (c *Client) DeleteImage(imageId string) error
- func (c *Client) GetDeploySet(deploySetId string) (*api.GetDeploySetResult, error)
- func (c *Client) GetFlavorDetail(flavorId string) (*api.GetFlavorDetailResult, error)
- func (c *Client) GetFlavorRaid(flavorId string) (*api.GetFlavorRaidResult, error)
- func (c *Client) GetImageDetail(imageId string) (*api.GetImageDetailResult, error)
- func (c *Client) GetInstanceDetail(instanceId string) (*api.InstanceModel, error)
- func (c *Client) GetOperationLog(args *api.GetOperationLogArgs) (*api.GetOperationLogResult, error)
- func (c *Client) GetVpcSubnet(args *api.GetVpcSubnetArgs) (*api.GetVpcSubnetResult, error)
- func (c *Client) ListDeploySets() (*api.ListDeploySetsResult, error)
- func (c *Client) ListFlavors() (*api.ListFlavorsResult, error)
- func (c *Client) ListImage(args *api.ListImageArgs) (*api.ListImageResult, error)
- func (c *Client) ListInstances(args *api.ListInstanceArgs) (*api.ListInstanceResult, error)
- func (c *Client) ModifyInstanceDesc(instanceId string, args *api.ModifyInstanceDescArgs) error
- func (c *Client) ModifyInstanceName(instanceId string, args *api.ModifyInstanceNameArgs) error
- func (c *Client) ModifyInstancePassword(instanceId string, args *api.ModifyInstancePasswordArgs) error
- func (c *Client) RebootInstance(instanceId string, forceStop bool) error
- func (c *Client) RebuildInstance(instanceId string, isPreserveData bool, args *api.RebuildInstanceArgs) error
- func (c *Client) ReleaseInstance(instanceId string) error
- func (c *Client) StartInstance(instanceId string) error
- func (c *Client) StopInstance(instanceId string, forceStop bool) error
- func (c *Client) UnbindTags(instanceId string, args *api.UnbindTagsArgs) error
Constants ¶
const DEFAULT_SERVICE_DOMAIN = "bbc." + bce.DEFAULT_REGION + ".baidubce.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client of BBC service is a kind of BceClient, so derived from BceClient
func NewClient ¶
NewClient make the BBC service client with default configuration. Use `cli.Config.xxx` to access the config or change it to non-default value.
func (*Client) CreateDeploySet ¶
func (c *Client) CreateDeploySet(args *api.CreateDeploySetArgs) (*api.CreateDeploySetResult, error)
CreateDeploySet - create a deploy set
PARAMS:
- args: the arguments to create a deploy set
RETURNS:
- *api.CreateDeploySetResult: results of creating a deploy set
- error: nil if success otherwise the specific error
func (*Client) CreateImageFromInstanceId ¶
func (c *Client) CreateImageFromInstanceId(args *api.CreateImageArgs) (*api.CreateImageResult, error)
CreateImageFromInstanceId - create image from specified instance
PARAMS:
- args: the arguments to create image
RETURNS:
- *api.CreateImageResult: the result of create Image
- error: nil if success otherwise the specific error
func (*Client) CreateInstance ¶
func (c *Client) CreateInstance(args *api.CreateInstanceArgs) (*api.CreateInstanceResult, error)
CreateInstance - create an instance with the specific parameters
PARAMS:
- args: the arguments to create instance
RETURNS:
- *api.CreateInstanceResult: the result of create Instance, contains new Instance ID
- error: nil if success otherwise the specific error
func (*Client) DeleteDeploySet ¶
DeleteDeploySet - delete a deploy set
PARAMS:
- deploySetId: the id of the deploy set
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) DeleteImage ¶
DeleteImage - delete an image
PARAMS:
- imageId: the specific image ID
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) GetDeploySet ¶
func (c *Client) GetDeploySet(deploySetId string) (*api.GetDeploySetResult, error)
GetDeploySet - get details of the deploy set
PARAMS:
- deploySetId: the id of the deploy set
RETURNS:
- *api.GetDeploySetResult: the detail of the deploy set
- error: nil if success otherwise the specific error
func (*Client) GetFlavorDetail ¶
func (c *Client) GetFlavorDetail(flavorId string) (*api.GetFlavorDetailResult, error)
GetFlavorDetail - get details of the specified flavor
PARAMS:
- flavorId: the id of the flavor
RETURNS:
- *api.GetFlavorDetailResult: the detail of the specified flavor
- error: nil if success otherwise the specific error
func (*Client) GetFlavorRaid ¶
func (c *Client) GetFlavorRaid(flavorId string) (*api.GetFlavorRaidResult, error)
GetFlavorRaid - get the RAID detail and disk size of the specified flavor
PARAMS:
- flavorId: the id of the flavor
RETURNS:
- *api.GetFlavorRaidResult: the detail of the raid of the specified flavor
- error: nil if success otherwise the specific error
func (*Client) GetImageDetail ¶
func (c *Client) GetImageDetail(imageId string) (*api.GetImageDetailResult, error)
GetImageDetail - get an image's detail info
PARAMS:
- imageId: the specific image ID
RETURNS:
- *api.GetImageDetailResult: the result of get image's detail
- error: nil if success otherwise the specific error
func (*Client) GetInstanceDetail ¶
func (c *Client) GetInstanceDetail(instanceId string) (*api.InstanceModel, error)
GetInstanceDetail - get a specific instance detail info
PARAMS:
- instanceId: the specific instance ID
RETURNS:
- *api.GetInstanceDetailResult: the result of get instance detail info
- error: nil if success otherwise the specific error
func (*Client) GetOperationLog ¶
func (c *Client) GetOperationLog(args *api.GetOperationLogArgs) (*api.GetOperationLogResult, error)
GetOperationLog - get operation log
PARAMS:
- args: the arguments to get operation log
RETURNS:
- *api.GetOperationLogResult: results of getting operation log
- error: nil if success otherwise the specific error
func (*Client) GetVpcSubnet ¶
func (c *Client) GetVpcSubnet(args *api.GetVpcSubnetArgs) (*api.GetVpcSubnetResult, error)
GetVpcSubnet - get multi instances vpc and subnet
PARAMS:
- args: the instanceId of bbc instances
RETURNS:
- *api.GetVpcSubnetResult: result of vpc and subnet
- error: nil if success otherwise the specific error
func (*Client) ListDeploySets ¶
func (c *Client) ListDeploySets() (*api.ListDeploySetsResult, error)
ListDeploySets - list all deploy sets
RETURNS:
- *api.ListDeploySetsResult: the result of list all deploy sets
- error: nil if success otherwise the specific error
func (*Client) ListFlavors ¶
func (c *Client) ListFlavors() (*api.ListFlavorsResult, error)
ListFlavors - list all available flavors
RETURNS:
- *api.ListFlavorsResult: the result of list all flavors
- error: nil if success otherwise the specific error
func (*Client) ListImage ¶
func (c *Client) ListImage(args *api.ListImageArgs) (*api.ListImageResult, error)
ListImage - list all images
PARAMS:
- args: the arguments to list all images
RETURNS:
- *api.ListImageResult: the result of list all images
- error: nil if success otherwise the specific error
func (*Client) ListInstances ¶
func (c *Client) ListInstances(args *api.ListInstanceArgs) (*api.ListInstanceResult, error)
ListInstances - list all instance with the specific parameters
PARAMS:
- args: the arguments to list all instance
RETURNS:
- *api.ListInstanceResult: the result of list Instance
- error: nil if success otherwise the specific error
func (*Client) ModifyInstanceDesc ¶
func (c *Client) ModifyInstanceDesc(instanceId string, args *api.ModifyInstanceDescArgs) error
ModifyInstanceDesc - modify an instance's description
PARAMS:
- instanceId: the specific instance ID
- args: the arguments of now instance's description
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) ModifyInstanceName ¶
func (c *Client) ModifyInstanceName(instanceId string, args *api.ModifyInstanceNameArgs) error
ModifyInstanceName - modify an instance's name
PARAMS:
- instanceId: the specific instance ID
- args: the arguments of now instance's name
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) ModifyInstancePassword ¶
func (c *Client) ModifyInstancePassword(instanceId string, args *api.ModifyInstancePasswordArgs) error
ModifyInstancePassword - modify an instance's password
PARAMS:
- instanceId: the specific instance ID
- args: the arguments of now instance's password
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) RebootInstance ¶
RebootInstance - restart an instance
PARAMS:
- instanceId: the specific instance ID
- forceStop: choose to force stop an instance or not
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) RebuildInstance ¶
func (c *Client) RebuildInstance(instanceId string, isPreserveData bool, args *api.RebuildInstanceArgs) error
RebuildInstance - rebuild an instance
PARAMS:
- instanceId: the specific instance ID
- isPreserveData: choose to preserve data or not
- args: the arguments to rebuild an instance
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) ReleaseInstance ¶
ReleaseInstance - release an instance
PARAMS:
- instanceId: the specific instance ID
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) StartInstance ¶
StartInstance - start an instance
PARAMS:
- instanceId: the specific instance ID
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) StopInstance ¶
StopInstance - stop an instance
PARAMS:
- instanceId: the specific instance ID
- forceStop: choose to force stop an instance or not
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UnbindTags ¶
func (c *Client) UnbindTags(instanceId string, args *api.UnbindTagsArgs) error
UnbindTags - unbind an instance tags
PARAMS:
- instanceId: the id of the instance
- args: tags of an instance to unbind
RETURNS:
- error: nil if success otherwise the specific error