as — Auto Scaling
as · 2018-04-19
ModifyLaunchConfigurationAttributes
POST
Modify part of a launch configuration's attributes.
Wire call
Converge Cloud is RPC over HTTP. There is one path — / — and the action travels in the X-TC-Action header. The /as/ModifyLaunchConfigurationAttributes path used in the OpenAPI document is a documentation convenience so each action is addressable; it is not a route on the server.
curl
curl -sS https://as.api3.convergecloud.com/ \
-H 'Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<YYYY-MM-DD>/as/tc3_request, SignedHeaders=content-type;host;x-tc-action, Signature=<sig>' \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Host: as.api3.convergecloud.com' \
-H 'X-TC-Action: ModifyLaunchConfigurationAttributes' \
-H 'X-TC-Version: 2018-04-19' \
-H 'X-TC-Timestamp: <unix-seconds>' \
-H 'X-TC-Region: luzon' \
-d '{"LaunchConfigurationId":"<LaunchConfigurationId>"}'Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| LaunchConfigurationId | string | Yes | Launch configuration ID. obtain the launch configuration ID by logging in to the console or calling the api DescribeLaunchConfigurations and retrieving the LaunchConfigurationId from the return information. |
| ImageId | string | No | Image ID in the format of `img-xxx`. There are three types of images: Public images Custom images Shared images You can obtain the image IDs in the CVM console. You can also use the DescribeImages and look for `ImageId` in the response. |
| InstanceTypes | string[] | No | Types of cvm instances. different instance models specify different resource specifications. supports up to 10 instance models. |
| InstanceTypesCheckPolicy | string | No | InstanceType verification policy, which is effective when actual modification is made to InstanceTypes. Valid values include ALL and ANY and the default value is ANY. |
| LaunchConfigurationName | string | No | Display name of the launch configuration, which can contain Chinese characters, letters, numbers, underscores, separators ("-"), and decimal points with a maximum length of 60 bytes. |
| UserData | string | No | Base64-encoded custom data of up to 16 KB. If you want to clear `UserData`, set it to an empty string. |
| SecurityGroupIds | string[] | No | Security group to which the instance belongs. This parameter can be obtained from the `SecurityGroupId` field in the response of the `DescribeSecurityGroups` API. |
| InternetAccessible | InternetAccessible | No | Information of the public network bandwidth configuration. |
| InstanceChargeType | string | No | Instance billing mode. Valid values: |
| InstanceChargePrepaid | InstanceChargePrepaid | No | Parameter setting for the prepaid mode (monthly subscription mode). This parameter can specify the renewal period, whether to set the auto-renewal, and other attributes of the monthly-subscribed instances. |
| InstanceMarketOptions | InstanceMarketOptionsRequest | No | Market-related options for instances, such as parameters related to spot instances. |
| DiskTypePolicy | string | No | Cloud disk type selection policy. Valid values: |
| SystemDisk | SystemDisk | No | Instance system disk configurations |
| DataDisks | DataDisk[] | No | Configuration information of instance data disks. |
| HostNameSettings | HostNameSettings | No | Specifies the related settings for the cloud virtual machine HostName (HostName). |
| InstanceNameSettings | InstanceNameSettings | No | Specifies the related settings of the cloud virtual machine (cvm) instance name. |
| EnhancedService | EnhancedService | No | Specifies whether to enable additional services, such as security services and monitoring service. |
| CamRoleName | string | No | Role name of the CAM role. can be obtained from roleName in the return value from the DescribeRoleList API. |
| HpcClusterId | string | No | High-Performance computing cluster ID. See Converge Cloud HPC Documentation for more details. |
| IPv6InternetAccessible | IPv6InternetAccessible | No | IPv6 public network bandwidth configuration. If the IPv6 address is available in the new instance, public network bandwidth can be allocated to the IPv6 address. This parameter is invalid if `Ipv6AddressCount` of the scaling group associated with the launch configuration is 0. |
| DisasterRecoverGroupIds | string[] | No | Placement group id. only one can be specified. obtain through the API DescribeDisasterRecoverGroups. |
| LoginSettings | LoginSettings | No | Instance login settings, which include passwords, keys, or the original login settings inherited from the image. Please note that specifying new login settings will overwrite the existing ones. For instance, if you previously used a password for login and then use this parameter to switch the login settings to a key, the original password will be removed. |
| InstanceTags | InstanceTag[] | No | 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 | string | No | Image family name. this parameter can be obtained by calling the DescribeImages api. |
| DedicatedClusterId | string | No | Cloud Dedicated Cluster (CDC) ID. |
| Metadata | Metadata | No | Custom metadata. |
Response
Fields are returned inside the Response envelope. Converge Cloud answers HTTP 200 for errors as well as successes, so read Response.Error rather than the status code — and test for the presence of that object, because Code is occasionally the empty string.
| Field | 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. |
Success
{
"Response": {
// action-specific fields,
"RequestId": "…"
}
}Error
{
"Response": {
"Error": { "Code": "…", "Message": "…" },
"RequestId": "…"
}
}Try it
CredentialThe key never leaves this tab — it signs the request here. The signed request goes to /api-relay/as.
Request bodyvalid JSONPOST as.api3.convergecloud.com · ModifyLaunchConfigurationAttributes
What failure looks like
Example error responses for this action. Match on Code.
Recorded error 1
{
"Response": {
"Error": {
"Code": "InvalidLaunchConfigurationId.NotFound",
"Message": "The specified launch configuration id `asc-00000000` is not found."
},
"RequestId": "372cee70-ed9d-c00e-f8f6-523451ee93bf"
}
}