tencent cloud

Feedback

DescribeLaunchTemplateVersions

Last updated: 2024-11-27 10:20:11

    1. API Description

    Domain name for API request: cvm.intl.tencentcloudapi.com.

    This API is used to query the information of instance launch template versions.

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

    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 Params. The value used for this API: DescribeLaunchTemplateVersions.
    Version Yes String Common Params. The value used for this API: 2017-03-12.
    Region Yes String Common Params. For more information, please see the list of regions supported by the product.
    LaunchTemplateId Yes String The launch template ID
    LaunchTemplateVersions.N No Array of Integer List of instance launch templates.
    MinVersion No Integer The minimum version number specified, which defaults to 0.
    MaxVersion No Integer The maximum version number specified, which defaults to 30.
    Offset No Integer The offset. Default value: 0. For more information on Offset, see the relevant sections in API Introduction.
    Limit No Integer The number of returned results. Default value: 20. Maximum value: 100. For more information on Limit, see the relevant sections in API Introduction.
    DefaultVersion No Boolean Specify whether to query the default version. This parameter and LaunchTemplateVersions cannot be specified at the same time.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Total number of instance launch templates.
    LaunchTemplateVersionSet Array of LaunchTemplateVersionInfo Set of instance launch template versions.
    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.

    4. Example

    Example1 Querying instance launch template versions

    Input Example

    GET https://cvm.intl.tencentcloudapi.com/?Action=DescribeLaunchTemplateVersions
    &LaunchTemplateId=lt-b8v1kcyq
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "LaunchTemplateVersionSet": [
                {
                    "LaunchTemplateVersion": 1,
                    "LaunchTemplateVersionData": {
                        "VirtualPrivateCloud": {
                            "SubnetId": "subnet-he88kvqu",
                            "AsVpcGateway": false,
                            "Ipv6AddressCount": 0,
                            "VpcId": "vpc-dcteo7jd"
                        },
                        "InstanceCount": 1,
                        "Placement": {
                            "ProjectId": 0,
                            "Zone": "ap-guangzhou-2"
                        },
                        "SystemDisk": {
                            "DiskSize": 50,
                            "DiskType": "CLOUD_PREMIUM"
                        },
                        "ImageId": "img-8toqc6s3",
                        "InstanceChargeType": "POSTPAID_BY_HOUR",
                        "EnhancedService": {
                            "SecurityService": {
                                "Enabled": true
                            },
                            "MonitorService": {
                                "Enabled": true
                            }
                        },
                        "SecurityGroupIds": [
                            "sg-rf6ogz49"
                        ],
                        "InternetAccessible": {
                            "PublicIpAssigned": true,
                            "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                            "InternetMaxBandwidthOut": 100
                        },
                        "InstanceName": "lt_test",
                        "InstanceType": "S1.SMALL2",
                        "DataDisks": [
                            {
                                "Encrypt": false,
                                "DeleteWithInstance": true,
                                "KmsKeyId": "",
                                "DiskSize": 50,
                                "DiskType": "CLOUD_PREMIUM"
                            },
                            {
                                "Encrypt": true,
                                "DeleteWithInstance": true,
                                "KmsKeyId": "",
                                "DiskSize": 60,
                                "DiskType": "CLOUD_PREMIUM"
                            }
                        ]
                    },
                    "CreationTime": "2020-12-17T01:54:31Z",
                    "LaunchTemplateId": "lt-b8v1kcyq",
                    "IsDefaultVersion": true,
                    "LaunchTemplateVersionDescription": "",
                    "CreatedBy": "251009920"
                }
            ],
            "RequestId": "b2da6ace-add1-48dc-ae73-6fc1eed95f1d"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    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 Internal error.
    InternalServerError Internal error.
    InvalidParameter A parameter error occurred.
    InvalidParameterCombination The parameter combination is invalid.
    InvalidParameterValue Incorrect parameter value.
    InvalidParameterValue.LaunchTemplateIdMalformed Incorrect format of instance launch template ID. Please provide a valid instance launch template ID, similar to lt-xxxxxxxx, where x represents a lowercase character or digit.
    InvalidParameterValue.LaunchTemplateIdNotExisted The instance launch template ID does not exist.
    InvalidParameterValue.LaunchTemplateIdVerNotExisted The combination of the template and the version ID does not exist.
    InvalidParameterValue.LaunchTemplateNotFound The instance launch template is not found.
    InvalidParameterValue.LaunchTemplateVersion Invalid instance launch template version number.
    InvalidParameterValue.LimitExceeded The number of parameter values exceeds the limit.
    InvalidParameterValue.NotSupported Unsupported operation.
    MissingParameter Missing parameter.
    UnauthorizedOperation
    UnauthorizedOperation.MFAExpired Unauthorized operation. Make sure Multi-Factor Authentication (MFA) is valid.
    UnauthorizedOperation.MFANotFound Unauthorized operation. Make sure Multi-Factor Authentication (MFA) exists.
    UnknownParameter Unknown parameter error.
    UnsupportedOperation Unsupported operation.