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

FieldTypeRequiredDescription
LaunchConfigurationIdstringYesLaunch 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.
ImageIdstringNoImage 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.
InstanceTypesstring[]NoTypes of cvm instances. different instance models specify different resource specifications. supports up to 10 instance models.
InstanceTypesCheckPolicystringNoInstanceType verification policy, which is effective when actual modification is made to InstanceTypes. Valid values include ALL and ANY and the default value is ANY.
LaunchConfigurationNamestringNoDisplay name of the launch configuration, which can contain Chinese characters, letters, numbers, underscores, separators ("-"), and decimal points with a maximum length of 60 bytes.
UserDatastringNoBase64-encoded custom data of up to 16 KB. If you want to clear `UserData`, set it to an empty string.
SecurityGroupIdsstring[]NoSecurity group to which the instance belongs. This parameter can be obtained from the `SecurityGroupId` field in the response of the `DescribeSecurityGroups` API.
InternetAccessibleInternetAccessibleNoInformation of the public network bandwidth configuration.
InstanceChargeTypestringNoInstance billing mode. Valid values:
InstanceChargePrepaidInstanceChargePrepaidNoParameter 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.
InstanceMarketOptionsInstanceMarketOptionsRequestNoMarket-related options for instances, such as parameters related to spot instances.
DiskTypePolicystringNoCloud disk type selection policy. Valid values:
SystemDiskSystemDiskNoInstance system disk configurations
DataDisksDataDisk[]NoConfiguration information of instance data disks.
HostNameSettingsHostNameSettingsNoSpecifies the related settings for the cloud virtual machine HostName (HostName).
InstanceNameSettingsInstanceNameSettingsNoSpecifies the related settings of the cloud virtual machine (cvm) instance name.
EnhancedServiceEnhancedServiceNoSpecifies whether to enable additional services, such as security services and monitoring service.
CamRoleNamestringNoRole name of the CAM role. can be obtained from roleName in the return value from the DescribeRoleList API.
HpcClusterIdstringNoHigh-Performance computing cluster ID. See Converge Cloud HPC Documentation for more details.
IPv6InternetAccessibleIPv6InternetAccessibleNoIPv6 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.
DisasterRecoverGroupIdsstring[]NoPlacement group id. only one can be specified. obtain through the API DescribeDisasterRecoverGroups.
LoginSettingsLoginSettingsNoInstance 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.
InstanceTagsInstanceTag[]NoInstance 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.
ImageFamilystringNoImage family name. this parameter can be obtained by calling the DescribeImages api.
DedicatedClusterIdstringNoCloud Dedicated Cluster (CDC) ID.
MetadataMetadataNoCustom 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.

FieldTypeDescription
RequestIdstringThe 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"
  }
}