cbs

package
v1.81.61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2023 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

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_PREPAID_PERIOD = []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36}
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_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

func DataSourceTencentCloudCbsSnapshotPolicies

func DataSourceTencentCloudCbsSnapshotPolicies() *schema.Resource

func DataSourceTencentCloudCbsSnapshots

func DataSourceTencentCloudCbsSnapshots() *schema.Resource

func DataSourceTencentCloudCbsStorages

func DataSourceTencentCloudCbsStorages() *schema.Resource

func DataSourceTencentCloudCbsStoragesSet

func DataSourceTencentCloudCbsStoragesSet() *schema.Resource

func ResourceTencentCloudCbsDiskBackup

func ResourceTencentCloudCbsDiskBackup() *schema.Resource

func ResourceTencentCloudCbsDiskBackupRollbackOperation

func ResourceTencentCloudCbsDiskBackupRollbackOperation() *schema.Resource

func ResourceTencentCloudCbsSnapshot

func ResourceTencentCloudCbsSnapshot() *schema.Resource

func ResourceTencentCloudCbsSnapshotPolicy

func ResourceTencentCloudCbsSnapshotPolicy() *schema.Resource

func ResourceTencentCloudCbsSnapshotPolicyAttachment

func ResourceTencentCloudCbsSnapshotPolicyAttachment() *schema.Resource

func ResourceTencentCloudCbsSnapshotSharePermission

func ResourceTencentCloudCbsSnapshotSharePermission() *schema.Resource

func ResourceTencentCloudCbsStorage

func ResourceTencentCloudCbsStorage() *schema.Resource

func ResourceTencentCloudCbsStorageAttachment

func ResourceTencentCloudCbsStorageAttachment() *schema.Resource

func ResourceTencentCloudCbsStorageSet

func ResourceTencentCloudCbsStorageSet() *schema.Resource

func ResourceTencentCloudCbsStorageSetAttachment

func ResourceTencentCloudCbsStorageSetAttachment() *schema.Resource

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 (me *CbsService) CreateDiskBackup(ctx context.Context, diskId, diskBackupName string) (diskBackupId string, errRet error)

func (*CbsService) CreateSnapshot

func (me *CbsService) CreateSnapshot(ctx context.Context, diskId, snapshotName string, tags map[string]string) (snapshotId string, errRet error)

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 (me *CbsService) DescribeDiskById(ctx context.Context, diskId string) (disk *cbs.Disk, errRet error)

func (*CbsService) DescribeDiskList

func (me *CbsService) DescribeDiskList(ctx context.Context, diskIds []*string) (disk []*cbs.Disk, errRet error)

func (*CbsService) DescribeDiskSetByIds

func (me *CbsService) DescribeDiskSetByIds(ctx context.Context, diskSetIds string) (disks []*cbs.Disk, errRet error)

func (*CbsService) DescribeDisksByFilter

func (me *CbsService) DescribeDisksByFilter(ctx context.Context, params map[string]interface{}) (disks []*cbs.Disk, errRet error)

func (*CbsService) DescribeDisksInParallelByFilter

func (me *CbsService) DescribeDisksInParallelByFilter(ctx context.Context, params map[string]interface{}) (disks []*cbs.Disk, errRet error)

func (*CbsService) DescribeSnapshotById

func (me *CbsService) DescribeSnapshotById(ctx context.Context, snapshotId string) (snapshot *cbs.Snapshot, errRet error)

func (*CbsService) DescribeSnapshotByIds

func (me *CbsService) DescribeSnapshotByIds(ctx context.Context, snapshotIdsParam []*string) (snapshots []*cbs.Snapshot, errRet error)

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 (me *CbsService) DescribeSnapshotsByFilter(ctx context.Context, params map[string]string) (snapshots []*cbs.Snapshot, errRet error)

func (*CbsService) DetachDisk

func (me *CbsService) DetachDisk(ctx context.Context, diskId, instanceId string) error

func (*CbsService) ModifyDiskAttributes

func (me *CbsService) ModifyDiskAttributes(ctx context.Context, diskId, diskName string, projectId int) error

func (*CbsService) ModifyDiskBackupQuota

func (me *CbsService) ModifyDiskBackupQuota(ctx context.Context, diskId string, diskBackupQuota int) (errRet error)

func (*CbsService) ModifyDiskChargeType

func (me *CbsService) ModifyDiskChargeType(ctx context.Context, storageId string, chargeType string, renewFlag string, period int) error

func (*CbsService) ModifyDisksRenewFlag

func (me *CbsService) ModifyDisksRenewFlag(ctx context.Context, storageId string, renewFlag string) error

func (*CbsService) ModifySnapshotName

func (me *CbsService) ModifySnapshotName(ctx context.Context, snapshotId, snapshotName string) error

func (*CbsService) ModifySnapshotsSharePermission

func (me *CbsService) ModifySnapshotsSharePermission(ctx context.Context, snapshotId, permission string, accountIds []string) (errRet error)

func (*CbsService) ModifyThroughputPerformance

func (me *CbsService) ModifyThroughputPerformance(ctx context.Context, diskId string, throughputPerformance int) error

func (*CbsService) ResizeDisk

func (me *CbsService) ResizeDisk(ctx context.Context, diskId string, diskSize int) error

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 (me *TagService) DeleteTagResourceById(ctx context.Context, tagKey string, tagValue string) (errRet error)

func (*TagService) DeleteTagTagAttachmentById

func (me *TagService) DeleteTagTagAttachmentById(ctx context.Context, tagKey string, resource string) (errRet error)

func (*TagService) DescribeProjectById

func (me *TagService) DescribeProjectById(ctx context.Context, projectId uint64) (project *tag.Project, disable *uint64, errRet error)

func (*TagService) DescribeProjects

func (me *TagService) DescribeProjects(ctx context.Context, param map[string]interface{}) (project []*tag.Project, errRet error)

func (*TagService) DescribeResourceTags

func (me *TagService) DescribeResourceTags(ctx context.Context, serviceType, resourceType, region, resourceId string) (tags map[string]string, err error)

func (*TagService) DescribeTagResourceById

func (me *TagService) DescribeTagResourceById(ctx context.Context, tagKey string, tagValue string) (tagRes *tag.Tag, errRet error)

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

func (me *TagService) ModifyTags(ctx context.Context, resourceName string, replaceTags map[string]string, deleteKeys []string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL