as

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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SYSTEM_DISK_TYPE_LOCAL_BASIC   = "LOCAL_BASIC"
	SYSTEM_DISK_TYPE_LOCAL_SSD     = "LOCAL_SSD"
	SYSTEM_DISK_TYPE_CLOUD_BASIC   = "CLOUD_BASIC"
	SYSTEM_DISK_TYPE_CLOUD_PREMIUM = "CLOUD_PREMIUM"
	SYSTEM_DISK_TYPE_CLOUD_SSD     = "CLOUD_SSD"
	SYSTEM_DISK_TYPE_CLOUD_HSSD    = "CLOUD_HSSD"
	SYSTEM_DISK_TYPE_CLOUD_BSSD    = "CLOUD_BSSD"
	SYSTEM_DISK_TYPE_CLOUD_TSSD    = "CLOUD_TSSD"
)
View Source
const (
	INTERNET_CHARGE_TYPE_BANDWIDTH_PREPAID          = "BANDWIDTH_PREPAID"
	INTERNET_CHARGE_TYPE_TRAFFIC_POSTPAID_BY_HOUR   = "TRAFFIC_POSTPAID_BY_HOUR"
	INTERNET_CHARGE_TYPE_BANDWIDTH_POSTPAID_BY_HOUR = "BANDWIDTH_POSTPAID_BY_HOUR"
	INTERNET_CHARGE_TYPE_BANDWIDTH_PACKAGE          = "BANDWIDTH_PACKAGE"
)
View Source
const (
	INSTANCE_CHARGE_TYPE_POSTPAID = "POSTPAID_BY_HOUR"
	INSTANCE_CHARGE_TYPE_SPOTPAID = "SPOTPAID"
	INSTANCE_CHARGE_TYPE_PREPAID  = "PREPAID"
)
View Source
const (
	SCALING_GROUP_TERMINATION_POLICY_NEWEST_INSTANCE = "NEWEST_INSTANCE"
	SCALING_GROUP_TERMINATION_POLICY_OLDEST_INSTANCE = "OLDEST_INSTANCE"
)
View Source
const (
	SCALING_GROUP_RETRY_POLICY_IMMEDIATE_RETRY       = "IMMEDIATE_RETRY"
	SCALING_GROUP_RETRY_POLICY_NO_RETRY              = "NO_RETRY"
	SCALING_GROUP_RETRY_POLICY_INCREMENTAL_INTERVALS = "INCREMENTAL_INTERVALS"
)
View Source
const (
	SCALING_DISK_TYPE_POLICY_ORIGINAL  = "ORIGINAL"
	SCALING_DISK_TYPE_POLICY_AUTOMATIC = "AUTOMATIC"
)
View Source
const (
	INSTANCE_NAME_ORIGINAL = "ORIGINAL"
	INSTANCE_NAME_UNIQUE   = "UNIQUE"
)
View Source
const (
	SCALING_GROUP_ADJUSTMENT_TYPE_CHANGE_IN_CAPACITY         = "CHANGE_IN_CAPACITY"
	SCALING_GROUP_ADJUSTMENT_TYPE_EXACT_CAPACITY             = "EXACT_CAPACITY"
	SCALING_GROUP_ADJUSTMENT_TYPE_PERCENT_CHANGE_IN_CAPACITY = "PERCENT_CHANGE_IN_CAPACITY"
)
View Source
const (
	SCALING_GROUP_COMPARISON_OPERATOR_GREATER       = "GREATER_THAN"
	SCALING_GROUP_COMPARISON_OPERATOR_GREATER_EQUAL = "GREATER_THAN_OR_EQUAL_TO"
	SCALING_GROUP_COMPARISON_OPERATOR_LESS          = "LESS_THAN"
	SCALING_GROUP_COMPARISON_OPERATOR_LESS_EQUAL    = "LESS_THAN_OR_EQUAL_TO"
	SCALING_GROUP_COMPARISON_OPERATOR_EQUAL         = "EQUAL_TO"
	SCALING_GROUP_COMPARISON_OPERATOR_NOT_EQUAL     = "NOT_EQUAL_TO"
)
View Source
const (
	SCALING_GROUP_METRIC_NAME_CPU_UTILIZATION = "CPU_UTILIZATION"
	SCALING_GROUP_METRIC_NAME_MEM_UTILIZATION = "MEM_UTILIZATION"
	SCALING_GROUP_METRIC_NAME_LAN_TRAFFIC_OUT = "LAN_TRAFFIC_OUT"
	SCALING_GROUP_METRIC_NAME_LAN_TRAFFIC_IN  = "LAN_TRAFFIC_IN"
	SCALING_GROUP_METRIC_NAME_WAN_TRAFFIC_OUT = "WAN_TRAFFIC_OUT"
	SCALING_GROUP_METRIC_NAME_WAN_TRAFFIC_IN  = "WAN_TRAFFIC_IN"
)
View Source
const (
	SCALING_GROUP_STATISTIC_AVERAGE = "AVERAGE"
	SCALING_GROUP_STATISTIC_MAXIMUM = "MAXIMUM"
	SCALING_GROUP_STATISTIC_MINIMUM = "MINIMUM"
)
View Source
const (
	SCALING_GROUP_NOTIFICATION_TYPE_SCALE_OUT_SUCCESS = "SCALE_OUT_SUCCESSFUL"
	SCALING_GROUP_NOTIFICATION_TYPE_SCALE_OUT_FAILED  = "SCALE_OUT_FAILED"
	SCALING_GROUP_NOTIFICATION_TYPE_SCALE_IN_SUCCESS  = "SCALE_IN_SUCCESSFUL"
	SCALING_GROUP_NOTIFICATION_TYPE_SCALE_IN_FAILED   = "SCALE_IN_FAILED"
	SCALING_GROUP_NOTIFICATION_TYPE_REPLACE_SUCCESS   = "REPLACE_UNHEALTHY_INSTANCE_SUCCESSFUL"
	SCALING_GROUP_NOTIFICATION_TYPE_REPLACE_FAILED    = "REPLACE_UNHEALTHY_INSTANCE_FAILED"
)
View Source
const (
	SCALING_GROUP_ACTIVITY_STATUS_INIT                 = "INIT"
	SCALING_GROUP_ACTIVITY_STATUS_RUNNING              = "RUNNING"
	SCALING_GROUP_ACTIVITY_STATUS_SUCCESSFUL           = "SUCCESSFUL"
	SCALING_GROUP_ACTIVITY_STATUS_PARTIALLY_SUCCESSFUL = "PARTIALLY_SUCCESSFUL"
	SCALING_GROUP_ACTIVITY_STATUS_FAILED               = "FAILED"
	SCALING_GROUP_ACTIVITY_STATUS_CANCELLED            = "CANCELLED"
)
View Source
const (
	AsScheduleNotFound                   = "ResourceNotFound.ScheduledActionNotFound"
	AsScalingGroupInProgress             = "ResourceInUse.ActivityInProgress"
	AsScalingGroupInstanceInGroup        = "ResourceInUse.InstanceInGroup"
	AsScalingGroupNotFound               = "ResourceNotFound.AutoScalingGroupNotFound"
	SCALING_GROUP_IN_ACTIVITY_STATUS     = "IN_ACTIVITY"
	SCALING_GROUP_NOT_IN_ACTIVITY_STATUS = "NOT_IN_ACTIVITY"
)
View Source
const (
	MultiZoneSubnetPolicyPriority = "PRIORITY"
	MultiZoneSubnetPolicyEquality = "EQUALITY"
)
View Source
const (
	SCALING_MODE_CLASSIC         = "CLASSIC_SCALING"
	SCALING_MODE_WAKE_UP_STOPPED = "WAKE_UP_STOPPED_SCALING"
)
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 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 DataSourceTencentCloudAsAdvices

func DataSourceTencentCloudAsAdvices() *schema.Resource

func DataSourceTencentCloudAsInstances

func DataSourceTencentCloudAsInstances() *schema.Resource

func DataSourceTencentCloudAsLastActivity

func DataSourceTencentCloudAsLastActivity() *schema.Resource

func DataSourceTencentCloudAsLimits

func DataSourceTencentCloudAsLimits() *schema.Resource

func DataSourceTencentCloudAsScalingConfigs

func DataSourceTencentCloudAsScalingConfigs() *schema.Resource

func DataSourceTencentCloudAsScalingGroups

func DataSourceTencentCloudAsScalingGroups() *schema.Resource

func DataSourceTencentCloudAsScalingPolicies

func DataSourceTencentCloudAsScalingPolicies() *schema.Resource

func ResourceTencentCloudAsAttachment

func ResourceTencentCloudAsAttachment() *schema.Resource

func ResourceTencentCloudAsCompleteLifecycle

func ResourceTencentCloudAsCompleteLifecycle() *schema.Resource

func ResourceTencentCloudAsExecuteScalingPolicy

func ResourceTencentCloudAsExecuteScalingPolicy() *schema.Resource

func ResourceTencentCloudAsLifecycleHook

func ResourceTencentCloudAsLifecycleHook() *schema.Resource

func ResourceTencentCloudAsNotification

func ResourceTencentCloudAsNotification() *schema.Resource

func ResourceTencentCloudAsProtectInstances

func ResourceTencentCloudAsProtectInstances() *schema.Resource

func ResourceTencentCloudAsRemoveInstances

func ResourceTencentCloudAsRemoveInstances() *schema.Resource

func ResourceTencentCloudAsScaleInInstances

func ResourceTencentCloudAsScaleInInstances() *schema.Resource

func ResourceTencentCloudAsScaleOutInstances

func ResourceTencentCloudAsScaleOutInstances() *schema.Resource

func ResourceTencentCloudAsScalingConfig

func ResourceTencentCloudAsScalingConfig() *schema.Resource

func ResourceTencentCloudAsScalingGroup

func ResourceTencentCloudAsScalingGroup() *schema.Resource

func ResourceTencentCloudAsScalingGroupStatus

func ResourceTencentCloudAsScalingGroupStatus() *schema.Resource

func ResourceTencentCloudAsScalingPolicy

func ResourceTencentCloudAsScalingPolicy() *schema.Resource

func ResourceTencentCloudAsSchedule

func ResourceTencentCloudAsSchedule() *schema.Resource

func ResourceTencentCloudAsStartInstances

func ResourceTencentCloudAsStartInstances() *schema.Resource

func ResourceTencentCloudAsStopInstances

func ResourceTencentCloudAsStopInstances() *schema.Resource

Types

type AsService

type AsService struct {
	// contains filtered or unexported fields
}

func NewAsService

func NewAsService(client *connectivity.TencentCloudClient) AsService

func (*AsService) AttachInstances

func (me *AsService) AttachInstances(ctx context.Context, scalingGroupId string, instanceIds []string) error

func (*AsService) ClearScalingGroupInstance

func (me *AsService) ClearScalingGroupInstance(ctx context.Context, scalingGroupId string) error

set the scaling group desired capacity to 0

func (*AsService) DeleteAsLoadBalancerById

func (me *AsService) DeleteAsLoadBalancerById(ctx context.Context, autoScalingGroupId string) (errRet error)

func (*AsService) DeleteLaunchConfiguration

func (me *AsService) DeleteLaunchConfiguration(ctx context.Context, configurationId string) error

func (*AsService) DeleteLifecycleHook

func (me *AsService) DeleteLifecycleHook(ctx context.Context, lifecycleHookId string) error

func (*AsService) DeleteNotification

func (me *AsService) DeleteNotification(ctx context.Context, notificationId string) error

func (*AsService) DeleteScalingGroup

func (me *AsService) DeleteScalingGroup(ctx context.Context, scalingGroupId string) error

func (*AsService) DeleteScalingPolicy

func (me *AsService) DeleteScalingPolicy(ctx context.Context, scalingPolicyId string) error

func (*AsService) DeleteScheduledAction

func (me *AsService) DeleteScheduledAction(ctx context.Context, scheduledActonId string) error

func (*AsService) DescribeActivityById

func (me *AsService) DescribeActivityById(ctx context.Context, activityId string) (status string, errRet error)

func (*AsService) DescribeAsAdvices

func (me *AsService) DescribeAsAdvices(ctx context.Context, param map[string]interface{}) (advices []*as.AutoScalingAdvice, errRet error)

func (*AsService) DescribeAsInstancesByFilter

func (me *AsService) DescribeAsInstancesByFilter(ctx context.Context, param map[string]interface{}) (instances []*as.Instance, errRet error)

func (*AsService) DescribeAsLastActivity

func (me *AsService) DescribeAsLastActivity(ctx context.Context, param map[string]interface{}) (lastActivity []*as.Activity, errRet error)

func (*AsService) DescribeAsLimits

func (me *AsService) DescribeAsLimits(ctx context.Context) (limits *as.DescribeAccountLimitsResponseParams, errRet error)

func (*AsService) DescribeAsLoadBalancerById

func (me *AsService) DescribeAsLoadBalancerById(ctx context.Context, autoScalingGroupId string) (loadBalancer *as.AutoScalingGroup, errRet error)

func (*AsService) DescribeAutoScalingAttachment

func (me *AsService) DescribeAutoScalingAttachment(ctx context.Context, scalingGroupId string, fully bool) (instanceIds []string, errRet error)

func (*AsService) DescribeAutoScalingGroupByFilter

func (me *AsService) DescribeAutoScalingGroupByFilter(
	ctx context.Context,
	scalingGroupId, configurationId, scalingGroupName string,
	tags map[string]string,
) (scalingGroups []*as.AutoScalingGroup, errRet error)

func (*AsService) DescribeAutoScalingGroupById

func (me *AsService) DescribeAutoScalingGroupById(ctx context.Context, scalingGroupId string) (scalingGroup *as.AutoScalingGroup, has int, errRet error)

func (*AsService) DescribeLaunchConfigurationByFilter

func (me *AsService) DescribeLaunchConfigurationByFilter(ctx context.Context, configurationId, configurationName string) (configs []*as.LaunchConfiguration, errRet error)

func (*AsService) DescribeLaunchConfigurationById

func (me *AsService) DescribeLaunchConfigurationById(ctx context.Context, configurationId string) (config *as.LaunchConfiguration, has int, errRet error)

func (*AsService) DescribeLifecycleHookById

func (me *AsService) DescribeLifecycleHookById(ctx context.Context, lifecycleHookId string) (lifecycleHook *as.LifecycleHook, has int, errRet error)

func (*AsService) DescribeNotificationById

func (me *AsService) DescribeNotificationById(ctx context.Context, notificationId string) (notification *as.AutoScalingNotification, has int, errRet error)

func (*AsService) DescribeScalingPolicyByFilter

func (me *AsService) DescribeScalingPolicyByFilter(ctx context.Context, policyId, policyName, scalingGroupId string) (scalingPolicies []*as.ScalingPolicy, errRet error)

func (*AsService) DescribeScalingPolicyById

func (me *AsService) DescribeScalingPolicyById(ctx context.Context, scalingPolicyId string) (scalingPolicy *as.ScalingPolicy, has int, errRet error)

func (*AsService) DescribeScheduledActionById

func (me *AsService) DescribeScheduledActionById(ctx context.Context, scheduledActionId string) (scheduledAction *as.ScheduledAction, has int, errRet error)

func (*AsService) DetachInstances

func (me *AsService) DetachInstances(ctx context.Context, scalingGroupId string, instanceIds []string) error

func (*AsService) ModifyAutoScalingGroup

func (me *AsService) ModifyAutoScalingGroup(ctx context.Context, request *as.ModifyAutoScalingGroupRequest) (errRet 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