Domain name for API request: as.intl.tencentcloudapi.com.
This API (ModifyLaunchConfigurationAttributes) is used to modify part of a launch configuration's attributes.
This API is used to modify the startup configuration. Existing instances scaled out using this configuration will not change, while newly added instances using this launch configuration will scale out according to the new configuration.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: ModifyLaunchConfigurationAttributes. |
| Version | Yes | String | Common Params. The value used for this API: 2018-04-19. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| LaunchConfigurationId | Yes | String | Launch configuration ID. You can obtain it by logging in to the console or calling the DescribeLaunchConfigurations API, and retrieving LaunchConfigurationId from the returned information. |
| ImageId | No | String | Specify a valid image ID, such as You can obtain an available image ID in the following ways: public images, custom images, and shared images, query the image ID by logging in to the console. For service market images, query the image ID in the cloud market.ImageId field from the returned information. |
| InstanceTypes.N | No | Array of String | Types of CVM instances. Different instance models specify different resource specifications, and a maximum of 10 instance models are supported. |
| InstanceTypesCheckPolicy | No | String | Instance type validation policy, effective during actual modification of InstanceTypes. Valid values include ALL and ANY, default value: ANY. |
| LaunchConfigurationName | No | String | Display name of the launch configuration. The name only supports Chinese, English, numbers, underscores, separator "-", and decimal points. The maximum length cannot exceed 60 bytes. |
| UserData | No | String | The custom data after Base64 encoding should not exceed 16 KB. To clear UserData, assign it an empty string. |
| SecurityGroupIds.N | No | Array of String | Security group to which the instance belongs. You can obtain this parameter by calling the DescribeSecurityGroups API and getting the |
| InternetAccessible | No | InternetAccessible | Public network bandwidth-related information settings. |
| InstanceChargeType | No | String | Instance billing type. Valid values: |
| InstanceChargePrepaid | No | InstanceChargePrepaid | Prepaid mode, that is, parameter settings related to monthly/annual subscription. By specifying this parameter, you can set attributes such as the duration of instance purchase and whether to enable auto-renewal. |
| InstanceMarketOptions | No | InstanceMarketOptionsRequest | Market-related options of the instance, such as bidding instance parameters. |
| DiskTypePolicy | No | String | Cloud disk type selection policy. Value range: |
| SystemDisk | No | SystemDisk | Instance system disk configuration information. |
| DataDisks.N | No | Array of DataDisk | Instance data disk configuration information. |
| HostNameSettings | No | HostNameSettings | Settings for the CVM host name. |
| InstanceNameSettings | No | InstanceNameSettings | Settings related to the CVM instance name (InstanceName). |
| EnhancedService | No | EnhancedService | Enhanced service. This parameter can be used to specify whether to enable services such as cloud security and Cloud Monitor. |
| CamRoleName | No | String | CAM role name, which can be obtained from the roleName in the return value from the DescribeRoleList API. |
| HpcClusterId | No | String | Hyper Computing Cluster ID. This parameter is currently not supported on the international site. |
| IPv6InternetAccessible | No | IPv6InternetAccessible | IPv6 public network bandwidth-related information settings. If the new instance includes an IPv6 address, this parameter can allocate public network bandwidth for the IPv6 address of the new instance. When the Ipv6AddressCount parameter of the scaling group associated with the launch configuration is 0, this parameter will not take effect. |
| DisasterRecoverGroupIds.N | No | Array of String | Placement Group id. Only one can be specified. You can obtain this parameter by calling the DescribeDisasterRecoverGroups API. |
| LoginSettings | No | LoginSettings | Instance login settings, including passwords, keys, or maintaining the image's original login settings. |
| InstanceTags.N | No | Array of InstanceTag | Instance tag list. By specifying this parameter, the instances added through scale-out can be bound to the tag. Up to 10 Tags can be specified. |
| ImageFamily | No | String | Image family name. You can obtain this parameter by calling the DescribeImages API. |
| DedicatedClusterId | No | String | Local exclusive cluster ID. |
| Metadata | No | Metadata | Custom metadata. |
| NetworkInterfaces.N | No | Array of NetworkInterface | Replace the ENI configuration in the launch configuration. Input limits: up to 17 items; must explicitly include and can only contain one PRIMARY. AS does not auto-complete the primary ENI. An explicit empty array is illegal. Field rules match CreateLaunchConfiguration. To clean up, call ClearLaunchConfigurationAttributes with ClearNetworkInterfaces=true. |
| Parameter Name | Type | Description |
|---|---|---|
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to specify the launch configuration asc-291kq6ku and modify the image to img-8toqc6s3, the InstanceType to S2.SMALL1, and the launch configuration name to updated_config.
POST / HTTP/1.1
Host: as.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyLaunchConfigurationAttributes
<Common request parameters>
{
"ImageId": "img-8toqc6s3",
"InstanceTypes": [
"S2.SMALL1"
],
"LaunchConfigurationName": "updated_config",
"LaunchConfigurationId": "asc-291kq6ku"
}
{
"Response": {
"RequestId": "07022dcb-5bba-48f0-a2b0-800ad006d031"
}
}
This example shows you how to specify the launch configuration asc-291kq6ku and modify UserData to a null string.
POST / HTTP/1.1
Host: as.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyLaunchConfigurationAttributes
<Common request parameters>
{
"LaunchConfigurationId": "asc-291kq6ku",
"UserData": ""
}
{
"Response": {
"RequestId": "2c027f22-3a3b-489a-a77a-89c53fc15212"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| InternalError.CalleeError | Exceptions occurred while invoking other services. |
| InvalidParameter.ActionNotFound | Invalid Action request. |
| InvalidParameter.Conflict | Multiple parameters specified conflict and cannot co-exist. |
| InvalidParameter.HostNameUnavailable | The hostname parameter is unavailable to this image. |
| InvalidParameter.InScenario | The parameter is invalid in a specific scenario. |
| InvalidParameter.InvalidCombination | Invalid parameter combination. |
| InvalidParameter.ParameterDeprecated | This parameter has been disused. |
| InvalidParameter.ParameterMustBeDeleted | Some parameters cannot coexist and should be deleted. |
| InvalidParameterCombination.NetworkInterfacesConflict | NetworkInterfaces does not support combined use with basic network, IPv6, or spot instance billing mode. |
| InvalidParameterValue | Wrong parameter value. |
| InvalidParameterValue.AccountNotSupportBandwidthPackageId | The bandwidth package ID is not supported in this account. |
| InvalidParameterValue.CvmConfigurationError | Exception with CVM parameter validation. |
| InvalidParameterValue.HostNameIllegal | Invalid hostname |
| InvalidParameterValue.HostNameWithSuffixTooLong | HostNames with suffixes are too long and exceed the specified upper limit. |
| InvalidParameterValue.IPv6InternetChargeType | The specified IPv6 public network bandwidth billing mode is invalid. |
| InvalidParameterValue.ImageNotFound | The specified image does not exist. |
| InvalidParameterValue.InstanceNameIllegal | Invalid instance name |
| InvalidParameterValue.InstanceNameWithSuffixTooLong | Instance names with suffixes are too long and exceed the specified upper limit. |
| InvalidParameterValue.InstanceTypeNotSupported | The instance type is not supported. |
| InvalidParameterValue.InvalidDisasterRecoverGroupId | The format of the placement group ID is incorrect. |
| InvalidParameterValue.InvalidHpcClusterId | The HPC ID is invalid. |
| InvalidParameterValue.InvalidImageId | Invalid image ID. |
| InvalidParameterValue.InvalidInstanceType | Invalid instance type. |
| InvalidParameterValue.InvalidLaunchConfigurationId | Invalid launch configuration ID. |
| InvalidParameterValue.InvalidSecurityGroupId | Invalid security group ID. |
| InvalidParameterValue.LaunchConfigurationNameDuplicated | The launch configuration name already exists. |
| InvalidParameterValue.LimitExceeded | The value exceeds the limit. |
| InvalidParameterValue.MissingBandwidthPackageId | The bandwidth package ID is required. |
| InvalidParameterValue.NetworkInterfacesInvalid | Invalid Multi-NIC parameter NetworkInterfaces. |
| InvalidParameterValue.NetworkInterfacesLimitExceeded | The number of network interface cards in NetworkInterfaces exceeds the upper limit 17. |
| InvalidParameterValue.NotStringTypeFloat | The value should be a floating point string. |
| InvalidParameterValue.TooLong | Too many values. |
| InvalidParameterValue.TooShort | The value of input parameter is too short. |
| InvalidParameterValue.UserDataFormatError | Incorrect UserData format. |
| InvalidParameterValue.UserDataSizeExceeded | The UserData is too long. |
| MissingParameter | Parameter missing. |
| MissingParameter.InScenario | A parameter is missing in a specific scenario. |
| ResourceNotFound.BandwidthPackageIdNotFound | The specified bandwidth package ID is not found. |
| ResourceNotFound.DisasterRecoverGroupNotFound | The specified placement group ID does not exist. |
| ResourceNotFound.LaunchConfigurationIdNotFound | The specified launch configuration does not exist. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários