CreateLaunchConfiguration

Last updated: 2021-04-12 15:03:48

    1. API Description

    Domain name for API request: as.tencentcloudapi.com.

    This API (CreateLaunchConfiguration) is used to create a launch configuration.

    • A few fields of a launch configuration can be modified through ModifyLaunchConfigurationAttributes. To use a new launch configuration, it is recommended to create it from scratch.

    • You can create up to 20 launch configurations for each project. For more information, see Usage Limits.

    A maximum of 20 requests can be initiated per second for this API.

    Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: as.ap-shanghai-fsi.tencentcloudapi.com

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    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 parameter. The value used for this API: CreateLaunchConfiguration.
    Version Yes String Common parameter. The value used for this API: 2018-04-19.
    Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
    LaunchConfigurationName Yes String 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.
    ImageId Yes String Valid image ID in the format of img-8toqc6s3. There are four types of images:
  • Public images
  • Custom images
  • Shared images
  • Marketplace images

  • You can obtain the available image IDs in the following ways:
  • For public images, custom images, and shared images, log in to the console to query the image IDs; for marketplace images, query the image IDs through Cloud Marketplace.
  • This value can be obtained from the ImageId field in the return value of the DescribeImages API.
  • ProjectId No Integer ID of the project to which the instance belongs. This parameter can be obtained from the projectId field in the returned values of DescribeProject. If this is left empty, default project is used.
    InstanceType No String Instance model. Different instance models specify different resource specifications. The specific value can be obtained by calling the DescribeInstanceTypeConfigs API to get the latest specification table or referring to the descriptions in Instance Types.
    InstanceType and InstanceTypes are mutually exclusive, and one and only one of them must be entered.
    SystemDisk No SystemDisk System disk configuration of the instance. If this parameter is not specified, the default value will be assigned to it.
    DataDisks.N No Array of DataDisk Information of the instance's data disk configuration. If this parameter is not specified, no data disk is purchased by default. Up to 11 data disks can be supported.
    InternetAccessible No InternetAccessible Configuration information of public network bandwidth. If this parameter is not specified, the default public network bandwidth is 0 Mbps.
    LoginSettings No LoginSettings Login settings of the instance. This parameter is used to set the login password and key for the instance, or to keep the original login settings for the image. By default, a random password is generated and sent to the user via the internal message.
    SecurityGroupIds.N No Array of String The security group to which the instance belongs. This parameter can be obtained by calling the SecurityGroupId field in the returned value of DescribeSecurityGroups. If this parameter is not specified, no security group will be bound by default.
    EnhancedService No EnhancedService Enhanced service. This parameter is used to specify whether to enable Cloud Security, Cloud Monitoring and other services. If this parameter is not specified, Cloud Monitoring and Cloud Security will be enabled by default.
    UserData No String Base64-encoded custom data of up to 16 KB.
    InstanceChargeType No String Instance billing mode. CVM instances take POSTPAID_BY_HOUR by default. Valid values:

  • POSTPAID_BY_HOUR: pay-as-you-go hourly

  • SPOTPAID: spot instance
  • InstanceMarketOptions No InstanceMarketOptionsRequest Market-related options of the instance, such as the parameters related to stop instances. If the billing method of instance is specified as bidding, this parameter must be passed in.
    InstanceTypes.N No Array of String List of instance models. Different instance models specify different resource specifications. Up to 10 instance models can be supported.
    InstanceType and InstanceTypes are mutually exclusive, and one and only one of them must be entered.
    InstanceTypesCheckPolicy No