Documentation ¶
Index ¶
- Variables
- type CVMOperator
- func (o *CVMOperator) Create(req *cvm.DescribeInstancesRequest) (*host.HostSet, error)
- func (o *CVMOperator) DescribeDisk(ctx context.Context, r *provider.DescribeRequest) (*disk.Disk, error)
- func (o *CVMOperator) DescribeHost(ctx context.Context, req *provider.DescribeRequest) (*host.Host, error)
- func (o *CVMOperator) DescribeInstanceType() error
- func (o *CVMOperator) DescribeZones() error
- func (o *CVMOperator) InquiryNewPrice(req *cvm.InquiryPriceRunInstancesRequest) error
- func (o *CVMOperator) InquiryRenewPrice(req *cvm.InquiryPriceRenewInstancesRequest) error
- func (o *CVMOperator) PageQueryDisk(req *provider.QueryRequest) pager.Pager
- func (o *CVMOperator) PageQueryEip(req *provider.QueryRequest) pager.Pager
- func (o *CVMOperator) PageQueryHost(req *provider.QueryRequest) pager.Pager
- func (o *CVMOperator) QueryCVM(ctx context.Context, req *cvm.DescribeInstancesRequest) (*host.HostSet, error)
- func (o *CVMOperator) QueryDisk(ctx context.Context, req *cbs.DescribeDisksRequest) (*disk.DiskSet, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CVM_STATUS_MAP = map[string]host.STATUS{ "PENDING": host.STATUS_PENDING, "LAUNCH_FAILED": host.STATUS_CREATE_FAILED, "RUNNING": host.STATUS_RUNNING, "STOPPED": host.STATUS_STOPPED, "STARTING": host.STATUS_STARTING, "SHUTDOWN": host.STATUS_SHUTDOWN, "STOPPING": host.STATUS_STOPPING, "REBOOTING": host.STATUS_REBOOTING, "DELETING": host.STATUS_DELETING, "EXPIRED": host.STATUS_SHUTDOWN, "PROTECTIVELY_ISOLATED": host.STATUS_ERROR, } )
View Source
var ( // UNATTACHED:未挂载 // ATTACHING:挂载中 // ATTACHED:已挂载 // DETACHING:解挂中 // EXPANDING:扩容中 // ROLLBACKING:回滚中 // TORECYCLE:待回收 // DUMPING:拷贝硬盘中 DISK_STATUS_MAP = map[string]disk.STATUS{ "UNATTACHED": disk.STATUS_UNATTACHED, "ATTACHING": disk.STATUS_ATTACHING, "ATTACHED": disk.STATUS_ATTACHED, "DETACHING": disk.STATUS_DETACHING, "EXPANDING": disk.STATUS_EXPANDING, "ROLLBACKING": disk.STATUS_ROLLBACKING, "TORECYCLE": disk.STATUS_RECYCLE, "DUMPING": disk.STATUS_DUMPING, } )
View Source
var ( // `EIP`状态,包含: // CREATING (创建中) // BINDING (绑定中) // BIND (已绑定) // UNBINDING (解绑中) // UNBIND (已解绑) // OFFLINING (释放中) // BIND_ENI (绑定悬空弹性网卡) EIP_STATUS_MAP = map[string]eip.STATUS{ "CREATING": eip.STATUS_PENDING, "BINDING": eip.STATUS_BINDING, "BIND": eip.STATUS_BIND, "UNBINDING": eip.STATUS_UNBINDING, "UNBIND": eip.STATUS_UNBIND, "OFFLINING": eip.STATUS_OFFLINING, } )
Functions ¶
This section is empty.
Types ¶
type CVMOperator ¶
type CVMOperator struct { *resource.AccountGetter // contains filtered or unexported fields }
func NewCVMOperator ¶
func (*CVMOperator) Create ¶
func (o *CVMOperator) Create(req *cvm.DescribeInstancesRequest) (*host.HostSet, error)
func (*CVMOperator) DescribeDisk ¶
func (o *CVMOperator) DescribeDisk(ctx context.Context, r *provider.DescribeRequest) ( *disk.Disk, error)
func (*CVMOperator) DescribeHost ¶
func (o *CVMOperator) DescribeHost(ctx context.Context, req *provider.DescribeRequest) (*host.Host, error)
func (*CVMOperator) DescribeInstanceType ¶
func (o *CVMOperator) DescribeInstanceType() error
查询实例机型列表: https://cloud.tencent.com/document/api/213/15749 实例规格说明文档: https://cloud.tencent.com/document/product/213/11518
func (*CVMOperator) DescribeZones ¶
func (o *CVMOperator) DescribeZones() error
查询可用区列表: https://cloud.tencent.com/document/product/213/15707
func (*CVMOperator) InquiryNewPrice ¶
func (o *CVMOperator) InquiryNewPrice(req *cvm.InquiryPriceRunInstancesRequest) error
创建实例询价 创建实例询价 https://cloud.tencent.com/document/api/213/15726 参考文档: https://console.cloud.tencent.com/api/explorer?Product=cvm&Version=2017-03-12&Action=InquiryPriceRunInstances&SignVersion=
func (*CVMOperator) InquiryRenewPrice ¶
func (o *CVMOperator) InquiryRenewPrice(req *cvm.InquiryPriceRenewInstancesRequest) error
func (*CVMOperator) PageQueryDisk ¶
func (o *CVMOperator) PageQueryDisk(req *provider.QueryRequest) pager.Pager
func (*CVMOperator) PageQueryEip ¶
func (o *CVMOperator) PageQueryEip(req *provider.QueryRequest) pager.Pager
func (*CVMOperator) PageQueryHost ¶
func (o *CVMOperator) PageQueryHost(req *provider.QueryRequest) pager.Pager
func (*CVMOperator) QueryCVM ¶
func (o *CVMOperator) QueryCVM(ctx context.Context, req *cvm.DescribeInstancesRequest) (*host.HostSet, error)
查看实例列表 查看实例列表: https://console.cloud.tencent.com/api/explorer?Product=cvm&Version=2017-03-12&Action=DescribeInstances&SignVersion=
func (*CVMOperator) QueryDisk ¶
func (o *CVMOperator) QueryDisk(ctx context.Context, req *cbs.DescribeDisksRequest) (*disk.DiskSet, error)
查询云硬盘列表 查看实例列表: https://console.cloud.tencent.com/api/explorer?Product=cbs&Version=2017-03-12&Action=DescribeDisks&SignVersion=
Click to show internal directories.
Click to hide internal directories.