Documentation ¶
Index ¶
- Constants
- Variables
- func DataSourceTencentCloudCbsSnapshotPolicies() *schema.Resource
- func DataSourceTencentCloudCbsSnapshots() *schema.Resource
- func DataSourceTencentCloudCbsStorages() *schema.Resource
- func DataSourceTencentCloudCbsStoragesSet() *schema.Resource
- func ResourceTencentCloudCbsDiskBackup() *schema.Resource
- func ResourceTencentCloudCbsDiskBackupRollbackOperation() *schema.Resource
- func ResourceTencentCloudCbsSnapshot() *schema.Resource
- func ResourceTencentCloudCbsSnapshotPolicy() *schema.Resource
- func ResourceTencentCloudCbsSnapshotPolicyAttachment() *schema.Resource
- func ResourceTencentCloudCbsSnapshotSharePermission() *schema.Resource
- func ResourceTencentCloudCbsStorage() *schema.Resource
- func ResourceTencentCloudCbsStorageAttachment() *schema.Resource
- func ResourceTencentCloudCbsStorageSet() *schema.Resource
- func ResourceTencentCloudCbsStorageSetAttachment() *schema.Resource
- type CbsService
- func (me *CbsService) ApplyDiskBackup(ctx context.Context, diskBackupId, diskId string) (errRet error)
- func (me *CbsService) ApplySnapshot(ctx context.Context, diskId, snapshotId string) error
- func (me *CbsService) AttachDisk(ctx context.Context, diskId, instanceId string) error
- func (me *CbsService) AttachSnapshotPolicy(ctx context.Context, diskId, policyId string) error
- func (me *CbsService) CreateDiskBackup(ctx context.Context, diskId, diskBackupName string) (diskBackupId string, errRet error)
- func (me *CbsService) CreateSnapshot(ctx context.Context, diskId, snapshotName string, tags map[string]string) (snapshotId string, errRet error)
- func (me *CbsService) DeleteCbsDiskBackupById(ctx context.Context, diskBackupId string) (errRet error)
- func (me *CbsService) DeleteDiskById(ctx context.Context, diskId string) error
- func (me *CbsService) DeleteDiskSetByIds(ctx context.Context, diskSetIds string) error
- func (me *CbsService) DeleteSnapshot(ctx context.Context, snapshotId string) error
- func (me *CbsService) DeleteSnapshotPolicy(ctx context.Context, policyId string) error
- func (me *CbsService) DescribeAttachedSnapshotPolicy(ctx context.Context, diskId, policyId string) (policy *cbs.AutoSnapshotPolicy, errRet error)
- func (me *CbsService) DescribeCbsDiskBackupById(ctx context.Context, diskBackupId string) (DiskBackup *cbs.DiskBackup, errRet error)
- func (me *CbsService) DescribeCbsSnapshotSharePermissionById(ctx context.Context, snapshotId string) (snapshotSharePermissions []*cbs.SharePermission, errRet error)
- func (me *CbsService) DescribeDiskById(ctx context.Context, diskId string) (disk *cbs.Disk, errRet error)
- func (me *CbsService) DescribeDiskList(ctx context.Context, diskIds []*string) (disk []*cbs.Disk, errRet error)
- func (me *CbsService) DescribeDiskSetByIds(ctx context.Context, diskSetIds string) (disks []*cbs.Disk, errRet error)
- func (me *CbsService) DescribeDisksByFilter(ctx context.Context, params map[string]interface{}) (disks []*cbs.Disk, errRet error)
- func (me *CbsService) DescribeDisksInParallelByFilter(ctx context.Context, params map[string]interface{}) (disks []*cbs.Disk, errRet error)
- func (me *CbsService) DescribeSnapshotById(ctx context.Context, snapshotId string) (snapshot *cbs.Snapshot, errRet error)
- func (me *CbsService) DescribeSnapshotByIds(ctx context.Context, snapshotIdsParam []*string) (snapshots []*cbs.Snapshot, errRet error)
- func (me *CbsService) DescribeSnapshotPolicy(ctx context.Context, policyId, policyName string) (policies []*cbs.AutoSnapshotPolicy, errRet error)
- func (me *CbsService) DescribeSnapshotPolicyById(ctx context.Context, policyId string) (policy *cbs.AutoSnapshotPolicy, errRet error)
- func (me *CbsService) DescribeSnapshotsByFilter(ctx context.Context, params map[string]string) (snapshots []*cbs.Snapshot, errRet error)
- func (me *CbsService) DetachDisk(ctx context.Context, diskId, instanceId string) error
- func (me *CbsService) ModifyDiskAttributes(ctx context.Context, diskId, diskName string, projectId int) error
- func (me *CbsService) ModifyDiskBackupQuota(ctx context.Context, diskId string, diskBackupQuota int) (errRet error)
- func (me *CbsService) ModifyDiskChargeType(ctx context.Context, storageId string, chargeType string, renewFlag string, ...) error
- func (me *CbsService) ModifyDisksRenewFlag(ctx context.Context, storageId string, renewFlag string) error
- func (me *CbsService) ModifySnapshotName(ctx context.Context, snapshotId, snapshotName string) error
- func (me *CbsService) ModifySnapshotsSharePermission(ctx context.Context, snapshotId, permission string, accountIds []string) (errRet error)
- func (me *CbsService) ModifyThroughputPerformance(ctx context.Context, diskId string, throughputPerformance int) error
- func (me *CbsService) ResizeDisk(ctx context.Context, diskId string, diskSize int) error
- func (me *CbsService) UnattachSnapshotPolicy(ctx context.Context, diskId, policyId string) error
- type TagService
- func (me *TagService) DeleteTagResourceById(ctx context.Context, tagKey string, tagValue string) (errRet error)
- func (me *TagService) DeleteTagTagAttachmentById(ctx context.Context, tagKey string, resource string) (errRet error)
- func (me *TagService) DescribeProjectById(ctx context.Context, projectId uint64) (project *tag.Project, disable *uint64, errRet error)
- func (me *TagService) DescribeProjects(ctx context.Context, param map[string]interface{}) (project []*tag.Project, errRet error)
- func (me *TagService) DescribeResourceTags(ctx context.Context, serviceType, resourceType, region, resourceId string) (tags map[string]string, err error)
- func (me *TagService) DescribeTagResourceById(ctx context.Context, tagKey string, tagValue string) (tagRes *tag.Tag, errRet error)
- func (me *TagService) DescribeTagTagAttachmentById(ctx context.Context, tagKey string, tagValue string, resource string) (resourceTag *tag.ResourceTagMapping, errRet error)
- func (me *TagService) DisableProjectById(ctx context.Context, projectId uint64) (errRet error)
- func (me *TagService) ModifyTags(ctx context.Context, resourceName string, replaceTags map[string]string, ...) error
Constants ¶
View Source
const ( CBS_STORAGE_TYPE_CLOUD_BASIC = "CLOUD_BASIC" CBS_STORAGE_TYPE_CLOUD_PREMIUM = "CLOUD_PREMIUM" CBS_STORAGE_TYPE_CLOUD_SSD = "CLOUD_SSD" CBS_STORAGE_USAGE_SYSTEM_DISK = "SYSTEM_DISK" CBS_STORAGE_USAGE_DATA_DISK = "DATA_DISK" CBS_STORAGE_STATUS_UNATTACHED = "UNATTACHED" CBS_STORAGE_STATUS_ATTACHING = "ATTACHING" CBS_STORAGE_STATUS_ATTACHED = "ATTACHED" CBS_STORAGE_STATUS_EXPANDING = "EXPANDING" CBS_STORAGE_STATUS_ROLLBACKING = "ROLLBACKING" CBS_STORAGE_STATUS_TORECYCLE = "TORECYCLE" CBS_SNAPSHOT_STATUS_NORMAL = "NORMAL" CBS_SNAPSHOT_STATUS_CREATING = "CREATING" )
View Source
const ( CBS_PREPAID_RENEW_FLAG_NOTIFY_NOTIFY_AND_AUTO_RENEW = "NOTIFY_AND_AUTO_RENEW" CBS_PREPAID_RENEW_FLAG_NOTIFY_AND_MANUAL_RENEW = "NOTIFY_AND_MANUAL_RENEW" CBS_PREPAID_RENEW_FLAG_DISABLE_NOTIFY_AND_MANUAL_RENEW = "DISABLE_NOTIFY_AND_MANUAL_RENEW" CBS_CHARGE_TYPE_PREPAID = "PREPAID" CBS_CHARGE_TYPE_POSTPAID = "POSTPAID_BY_HOUR" )
View Source
const ( SNAPSHOT_SHARE_PERMISSION_SHARE = "SHARE" SNAPSHOT_SHARE_PERMISSION_CANCEL = "CANCEL" )
View Source
const ( CVM_CHARGE_TYPE_PREPAID = "PREPAID" CVM_CHARGE_TYPE_POSTPAID = "POSTPAID_BY_HOUR" CVM_CHARGE_TYPE_SPOTPAID = "SPOTPAID" CVM_CHARGE_TYPE_CDHPAID = "CDHPAID" CVM_INTERNET_CHARGE_TYPE_BANDWIDTH_PREPAID = "BANDWIDTH_PREPAID" CVM_INTERNET_CHARGE_TYPE_BANDWIDTH_POSTPAID = "BANDWIDTH_POSTPAID_BY_HOUR" CVM_INTERNET_CHARGE_TYPE_BANDWIDTH_PACKAGE = "BANDWIDTH_PACKAGE" CVM_INTERNET_CHARGE_TYPE_TRAFFIC_POSTPAID = "TRAFFIC_POSTPAID_BY_HOUR" CVM_STATUS_RUNNING = "RUNNING" CVM_STATUS_STOPPED = "STOPPED" CVM_STATUS_SHUTDOWN = "SHUTDOWN" CVM_STATUS_TERMINATING = "TERMINATING" CVM_STATUS_LAUNCH_FAILED = "LAUNCH_FAILED" CVM_LATEST_OPERATION_STATE_OPERATING = "OPERATING" CVM_LATEST_OPERATION_STATE_SUCCESS = "SUCCESS" CVM_LATEST_OPERATION_STATE_FAILED = "FAILED" CVM_PREPAID_RENEW_FLAG_NOTIFY_NOTIFY_AND_AUTO_RENEW = "NOTIFY_AND_AUTO_RENEW" CVM_PREPAID_RENEW_FLAG_NOTIFY_AND_MANUAL_RENEW = "NOTIFY_AND_MANUAL_RENEW" CVM_PREPAID_RENEW_FLAG_DISABLE_NOTIFY_AND_MANUAL_RENEW = "DISABLE_NOTIFY_AND_MANUAL_RENEW" CVM_DISK_TYPE_LOCAL_BASIC = "LOCAL_BASIC" CVM_DISK_TYPE_LOCAL_SSD = "LOCAL_SSD" CVM_DISK_TYPE_CLOUD_BASIC = "CLOUD_BASIC" CVM_DISK_TYPE_CLOUD_SSD = "CLOUD_SSD" CVM_DISK_TYPE_CLOUD_PREMIUM = "CLOUD_PREMIUM" CVM_DISK_TYPE_CLOUD_BSSD = "CLOUD_BSSD" CVM_DISK_TYPE_CLOUD_HSSD = "CLOUD_HSSD" CVM_DISK_TYPE_CLOUD_TSSD = "CLOUD_TSSD" CVM_PLACEMENT_GROUP_TYPE_HOST = "HOST" CVM_PLACEMENT_GROUP_TYPE_SW = "SW" CVM_PLACEMENT_GROUP_TYPE_RACK = "RACK" ZONE_STATE_AVAILABLE = "AVAILABLE" ZONE_STATE_UNAVAILABLE = "UNAVAILABLE" CVM_NOT_FOUND_ERROR = "InvalidInstanceId.NotFound" KEY_PAIR_NOT_SUPPORT_ERROR = "InvalidParameterValue.KeyPairNotSupported" KYE_PAIR_INVALID_ERROR = "InvalidKeyPair" CVM_SPOT_INSTANCE_TYPE_ONE_TIME = "ONE-TIME" CVM_MARKET_TYPE_SPOT = "spot" CVM_IMAGE_LOGIN = "TRUE" CVM_IMAGE_LOGIN_NOT = "FALSE" // @Deprecated use cvm.INVALIDPARAMETERVALUE_ZONENOTSUPPORTED CVM_ZONE_NOT_SUPPORT_ERROR = "InvalidParameterValue.ZoneNotSupported" // @Deprecated use cvm.RESOURCEINSUFFICIENT_CLOUDDISKSOLDOUT instead CVM_CLOUD_DISK_SOLD_OUT_ERROR = "ResourceInsufficient.CloudDiskSoldOut" CVM_STOP_MODE_KEEP_CHARGING = "KEEP_CHARGING" CVM_STOP_MODE_STOP_CHARGING = "STOP_CHARGING" CVM_SELL_STATUS = "SELL" CVM_SOLD_OUT_STATUS = "SOLD_OUT" MIDLINE = "-" UNDERLINE = "_" IMAGE_SHARE_PERMISSION_SHARE = "SHARE" IMAGE_SHARE_PERMISSION_CANCEL = "CANCEL" )
View Source
const DESCRIBE_TAGS_LIMIT = 20
Variables ¶
View Source
var CBS_CHARGE_TYPE = []string{ CBS_CHARGE_TYPE_PREPAID, CBS_CHARGE_TYPE_POSTPAID, }
View Source
var CBS_PREPAID_PERIOD = []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36}
View Source
var CBS_PREPAID_RENEW_FLAG = []string{ CBS_PREPAID_RENEW_FLAG_NOTIFY_NOTIFY_AND_AUTO_RENEW, CBS_PREPAID_RENEW_FLAG_NOTIFY_AND_MANUAL_RENEW, CBS_PREPAID_RENEW_FLAG_DISABLE_NOTIFY_AND_MANUAL_RENEW, }
View Source
var CBS_STORAGE_TYPE = []string{ CBS_STORAGE_TYPE_CLOUD_BASIC, CBS_STORAGE_TYPE_CLOUD_PREMIUM, CBS_STORAGE_TYPE_CLOUD_SSD, }
View Source
var CBS_STORAGE_USAGE = []string{ CBS_STORAGE_USAGE_SYSTEM_DISK, CBS_STORAGE_USAGE_DATA_DISK, }
View Source
var CVM_CHARGE_TYPE = []string{ CVM_CHARGE_TYPE_PREPAID, CVM_CHARGE_TYPE_POSTPAID, CVM_CHARGE_TYPE_SPOTPAID, CVM_CHARGE_TYPE_CDHPAID, }
View Source
var CVM_DISK_TYPE = []string{ CVM_DISK_TYPE_LOCAL_BASIC, CVM_DISK_TYPE_LOCAL_SSD, CVM_DISK_TYPE_CLOUD_BASIC, CVM_DISK_TYPE_CLOUD_SSD, CVM_DISK_TYPE_CLOUD_PREMIUM, CVM_DISK_TYPE_CLOUD_BSSD, CVM_DISK_TYPE_CLOUD_HSSD, CVM_DISK_TYPE_CLOUD_TSSD, }
View Source
var CVM_INTERNET_CHARGE_TYPE = []string{ CVM_INTERNET_CHARGE_TYPE_BANDWIDTH_PREPAID, CVM_INTERNET_CHARGE_TYPE_BANDWIDTH_POSTPAID, CVM_INTERNET_CHARGE_TYPE_BANDWIDTH_PACKAGE, CVM_INTERNET_CHARGE_TYPE_TRAFFIC_POSTPAID, }
View Source
var CVM_PLACEMENT_GROUP_TYPE = []string{ CVM_PLACEMENT_GROUP_TYPE_HOST, CVM_PLACEMENT_GROUP_TYPE_SW, CVM_PLACEMENT_GROUP_TYPE_RACK, }
View Source
var CVM_PREPAID_PERIOD = []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36}
View Source
var CVM_PREPAID_RENEW_FLAG = []string{ CVM_PREPAID_RENEW_FLAG_NOTIFY_NOTIFY_AND_AUTO_RENEW, CVM_PREPAID_RENEW_FLAG_NOTIFY_AND_MANUAL_RENEW, CVM_PREPAID_RENEW_FLAG_DISABLE_NOTIFY_AND_MANUAL_RENEW, }
View Source
var CVM_RETRYABLE_ERROR = []string{
"ClientError.HttpStatusCodeError",
}
Only client error can cvm retry, others will directly returns
View Source
var CVM_SPOT_INSTANCE_TYPE = []string{ CVM_SPOT_INSTANCE_TYPE_ONE_TIME, }
Functions ¶
Types ¶
type CbsService ¶
type CbsService struct {
// contains filtered or unexported fields
}
func NewCbsService ¶
func NewCbsService(client *connectivity.TencentCloudClient) CbsService
func (*CbsService) ApplyDiskBackup ¶
func (me *CbsService) ApplyDiskBackup(ctx context.Context, diskBackupId, diskId string) (errRet error)
func (*CbsService) ApplySnapshot ¶
func (me *CbsService) ApplySnapshot(ctx context.Context, diskId, snapshotId string) error
func (*CbsService) AttachDisk ¶
func (me *CbsService) AttachDisk(ctx context.Context, diskId, instanceId string) error
func (*CbsService) AttachSnapshotPolicy ¶
func (me *CbsService) AttachSnapshotPolicy(ctx context.Context, diskId, policyId string) error
func (*CbsService) CreateDiskBackup ¶
func (*CbsService) CreateSnapshot ¶
func (*CbsService) DeleteCbsDiskBackupById ¶
func (me *CbsService) DeleteCbsDiskBackupById(ctx context.Context, diskBackupId string) (errRet error)
func (*CbsService) DeleteDiskById ¶
func (me *CbsService) DeleteDiskById(ctx context.Context, diskId string) error
func (*CbsService) DeleteDiskSetByIds ¶
func (me *CbsService) DeleteDiskSetByIds(ctx context.Context, diskSetIds string) error
func (*CbsService) DeleteSnapshot ¶
func (me *CbsService) DeleteSnapshot(ctx context.Context, snapshotId string) error
func (*CbsService) DeleteSnapshotPolicy ¶
func (me *CbsService) DeleteSnapshotPolicy(ctx context.Context, policyId string) error
func (*CbsService) DescribeAttachedSnapshotPolicy ¶
func (me *CbsService) DescribeAttachedSnapshotPolicy(ctx context.Context, diskId, policyId string) (policy *cbs.AutoSnapshotPolicy, errRet error)
func (*CbsService) DescribeCbsDiskBackupById ¶
func (me *CbsService) DescribeCbsDiskBackupById(ctx context.Context, diskBackupId string) (DiskBackup *cbs.DiskBackup, errRet error)
func (*CbsService) DescribeCbsSnapshotSharePermissionById ¶
func (me *CbsService) DescribeCbsSnapshotSharePermissionById(ctx context.Context, snapshotId string) (snapshotSharePermissions []*cbs.SharePermission, errRet error)
func (*CbsService) DescribeDiskById ¶
func (*CbsService) DescribeDiskList ¶
func (*CbsService) DescribeDiskSetByIds ¶
func (*CbsService) DescribeDisksByFilter ¶
func (*CbsService) DescribeDisksInParallelByFilter ¶
func (*CbsService) DescribeSnapshotById ¶
func (*CbsService) DescribeSnapshotByIds ¶
func (*CbsService) DescribeSnapshotPolicy ¶
func (me *CbsService) DescribeSnapshotPolicy(ctx context.Context, policyId, policyName string) (policies []*cbs.AutoSnapshotPolicy, errRet error)
func (*CbsService) DescribeSnapshotPolicyById ¶
func (me *CbsService) DescribeSnapshotPolicyById(ctx context.Context, policyId string) (policy *cbs.AutoSnapshotPolicy, errRet error)
func (*CbsService) DescribeSnapshotsByFilter ¶
func (*CbsService) DetachDisk ¶
func (me *CbsService) DetachDisk(ctx context.Context, diskId, instanceId string) error
func (*CbsService) ModifyDiskAttributes ¶
func (*CbsService) ModifyDiskBackupQuota ¶
func (*CbsService) ModifyDiskChargeType ¶
func (*CbsService) ModifyDisksRenewFlag ¶
func (*CbsService) ModifySnapshotName ¶
func (me *CbsService) ModifySnapshotName(ctx context.Context, snapshotId, snapshotName string) error
func (*CbsService) ModifySnapshotsSharePermission ¶
func (*CbsService) ModifyThroughputPerformance ¶
func (*CbsService) ResizeDisk ¶
func (*CbsService) UnattachSnapshotPolicy ¶
func (me *CbsService) UnattachSnapshotPolicy(ctx context.Context, diskId, policyId string) error
type TagService ¶
type TagService struct {
// contains filtered or unexported fields
}
func (*TagService) DeleteTagResourceById ¶
func (*TagService) DeleteTagTagAttachmentById ¶
func (*TagService) DescribeProjectById ¶
func (*TagService) DescribeProjects ¶
func (*TagService) DescribeResourceTags ¶
func (*TagService) DescribeTagResourceById ¶
func (*TagService) DescribeTagTagAttachmentById ¶
func (me *TagService) DescribeTagTagAttachmentById(ctx context.Context, tagKey string, tagValue string, resource string) (resourceTag *tag.ResourceTagMapping, errRet error)
func (*TagService) DisableProjectById ¶
func (me *TagService) DisableProjectById(ctx context.Context, projectId uint64) (errRet error)
func (*TagService) ModifyTags ¶
Source Files ¶
- data_source_tc_cbs_snapshot_policies.go
- data_source_tc_cbs_snapshots.go
- data_source_tc_cbs_storages.go
- data_source_tc_cbs_storages_set.go
- extension_cbs.go
- extension_cvm.go
- extension_tags.go
- resource_tc_cbs_disk_backup.go
- resource_tc_cbs_disk_backup_rollback_operation.go
- resource_tc_cbs_snapshot.go
- resource_tc_cbs_snapshot_policy.go
- resource_tc_cbs_snapshot_policy_attachment.go
- resource_tc_cbs_snapshot_share_permission.go
- resource_tc_cbs_storage.go
- resource_tc_cbs_storage_attachment.go
- resource_tc_cbs_storage_set.go
- resource_tc_cbs_storage_set_attachment.go
- service_tencentcloud_cbs.go
- service_tencentcloud_tag.go
Click to show internal directories.
Click to hide internal directories.