tencent cloud

文档反馈

DescribeLaunchConfigurations

最后更新时间:2024-03-20 11:37:56

    1. API Description

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

    This API is used to query the information of launch configurations.

    • You can query the launch configuration details based on information such as launch configuration ID and name. For more information on filters, see Filter.
    • If the parameter is empty, a certain number (specified by Limit and 20 by default) of launch configurations of the current user will be returned.

    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: DescribeLaunchConfigurations.
    Version Yes String Common Params. The value used for this API: 2018-04-19.
    Region No String Common Params. This parameter is not required for this API.
    LaunchConfigurationIds.N No Array of String Queries by one or more launch configuration IDs in the format of asc-ouy1ax38. The maximum quantity per request is 100. This parameter does not support specifying both LaunchConfigurationIds and Filters at the same time.
    Filters.N No Array of Filter Filters
  • launch-configuration-id - String - Required: No - Filter by launch configuration ID.
  • launch-configuration-name - String - Required: No - Filter by launch configuration name.
  • launch-configuration-name - String - Required: No - Fuzzy search by launch configuration name.
  • tag-key - String - Required: No - Filter by the tag key.
  • tag-value - String - Required: No - Filter by the tag value.
  • tag:tag-key - String - Optional - Filter by tag key pair. Use a specific tag key to replace tag-key. See Example 3 for the detailed usage.


  • The maximum number of Filters per request is 10. The upper limit for Filter.Values is 5. This parameter does not support specifying both LaunchConfigurationIds and Filters at the same time.
    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.
    Offset No Integer The offset. Default value: 0. For more information on Offset, see the relevant sections in API Introduction.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Number of eligible launch configurations.
    LaunchConfigurationSet Array of LaunchConfiguration List of launch configuration details.
    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 the list of launch configurations by the launch configuration ID

    Input Example

    POST / HTTP/1.1
    Host: as.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeLaunchConfigurations
    <Common request parameters>
    
    {
        "LaunchConfigurationIds": [
            "asc-g9uwgyvx",
            "asc-fa28v4in"
        ]
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 2,
            "LaunchConfigurationSet": [
                {
                    "ProjectId": 0,
                    "LaunchConfigurationId": "asc-fa28v4in",
                    "VersionNumber": 2,
                    "LaunchConfigurationName": "lc1",
                    "LaunchConfigurationStatus": "NORMAL",
                    "AutoScalingGroupAbstractSet": [],
                    "InstanceType": "S3.MEDIUM4",
                    "InstanceTypes": [
                        "S3.MEDIUM4"
                    ],
                    "LastOperationInstanceTypesCheckPolicy": "ANY",
                    "ImageId": "img-eb30mz89",
                    "InstanceChargeType": "POSTPAID_BY_HOUR",
                    "InstanceMarketOptions": null,
                    "DiskTypePolicy": "ORIGINAL",
                    "SystemDisk": {
                        "DiskType": "CLOUD_PREMIUM",
                        "DiskSize": 50
                    },
                    "DataDisks": [
                        {
                            "DiskType": "CLOUD_PREMIUM",
                            "DiskSize": 10,
                            "SnapshotId": null,
                            "DeleteWithInstance": false,
                            "Encrypt": false,
                            "ThroughputPerformance": null
                        }
                    ],
                    "LoginSettings": {
                        "KeyIds": []
                    },
                    "InternetAccessible": {
                        "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                        "InternetMaxBandwidthOut": 0,
                        "PublicIpAssigned": false,
                        "BandwidthPackageId": null
                    },
                    "SecurityGroupIds": [],
                    "EnhancedService": {
                        "SecurityService": {
                            "Enabled": true
                        },
                        "MonitorService": {
                            "Enabled": true
                        }
                    },
                    "UserData": null,
                    "InstanceTags": [],
                    "CreatedTime": "2022-03-03T02:36:12Z",
                    "UpdatedTime": "2022-03-03T06:49:31Z",
                    "CamRoleName": "",
                    "HostNameSettings": {
                        "HostName": null,
                        "HostNameStyle": null
                    },
                    "InstanceNameSettings": {
                        "InstanceName": "",
                        "InstanceNameStyle": ""
                    },
                    "InstanceChargePrepaid": {
                        "Period": 0,
                        "RenewFlag": ""
                    },
                    "Tags": [],
                    "HpcClusterId": ""
                },
                {
                    "ProjectId": 0,
                    "LaunchConfigurationId": "asc-g9uwgyvx",
                    "VersionNumber": 1,
                    "LaunchConfigurationName": "lc2",
                    "LaunchConfigurationStatus": "NORMAL",
                    "AutoScalingGroupAbstractSet": [],
                    "InstanceType": "S3.MEDIUM4",
                    "InstanceTypes": [
                        "S3.MEDIUM4"
                    ],
                    "LastOperationInstanceTypesCheckPolicy": "ANY",
                    "ImageId": "img-eb30mz89",
                    "InstanceChargeType": "POSTPAID_BY_HOUR",
                    "InstanceMarketOptions": null,
                    "DiskTypePolicy": "ORIGINAL",
                    "SystemDisk": {
                        "DiskType": "CLOUD_PREMIUM",
                        "DiskSize": 50
                    },
                    "DataDisks": [
                        {
                            "DiskType": "CLOUD_PREMIUM",
                            "DiskSize": 40,
                            "SnapshotId": null,
                            "DeleteWithInstance": null,
                            "Encrypt": null,
                            "ThroughputPerformance": null
                        }
                    ],
                    "LoginSettings": {
                        "KeyIds": []
                    },
                    "InternetAccessible": {
                        "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                        "InternetMaxBandwidthOut": 0,
                        "PublicIpAssigned": false,
                        "BandwidthPackageId": null
                    },
                    "SecurityGroupIds": [],
                    "EnhancedService": {
                        "SecurityService": {
                            "Enabled": true
                        },
                        "MonitorService": {
                            "Enabled": true
                        }
                    },
                    "UserData": null,
                    "InstanceTags": [],
                    "CreatedTime": "2022-03-02T02:25:12Z",
                    "UpdatedTime": "2022-03-02T02:25:12Z",
                    "CamRoleName": "",
                    "HostNameSettings": {
                        "HostName": null,
                        "HostNameStyle": null
                    },
                    "InstanceNameSettings": {
                        "InstanceName": "",
                        "InstanceNameStyle": ""
                    },
                    "InstanceChargePrepaid": {
                        "Period": 0,
                        "RenewFlag": ""
                    },
                    "Tags": [],
                    "HpcClusterId": ""
                }
            ],
            "RequestId": "0d4514d4-e277-4f0f-bc85-8b7377a71980"
        }
    }
    

    Example2 Querying launch configurations by using Filters

    Input Example

    POST / HTTP/1.1
    Host: as.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeLaunchConfigurations
    <Common request parameters>
    
    {
        "Filters": [
            {
                "Values": [
                    "asc-fa28v4in"
                ],
                "Name": "launch-configuration-id"
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "LaunchConfigurationSet": [
                {
                    "ProjectId": 0,
                    "LaunchConfigurationId": "asc-fa28v4in",
                    "VersionNumber": 2,
                    "LaunchConfigurationName": "lc1",
                    "LaunchConfigurationStatus": "NORMAL",
                    "AutoScalingGroupAbstractSet": [],
                    "InstanceType": "S3.MEDIUM4",
                    "InstanceTypes": [
                        "S3.MEDIUM4"
                    ],
                    "LastOperationInstanceTypesCheckPolicy": "ANY",
                    "ImageId": "img-eb30mz89",
                    "InstanceChargeType": "POSTPAID_BY_HOUR",
                    "InstanceMarketOptions": null,
                    "DiskTypePolicy": "ORIGINAL",
                    "SystemDisk": {
                        "DiskType": "CLOUD_PREMIUM",
                        "DiskSize": 50
                    },
                    "DataDisks": [
                        {
                            "DiskType": "CLOUD_PREMIUM",
                            "DiskSize": 10,
                            "SnapshotId": null,
                            "DeleteWithInstance": false,
                            "Encrypt": false,
                            "ThroughputPerformance": null
                        }
                    ],
                    "LoginSettings": {
                        "KeyIds": []
                    },
                    "InternetAccessible": {
                        "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                        "InternetMaxBandwidthOut": 0,
                        "PublicIpAssigned": false,
                        "BandwidthPackageId": null
                    },
                    "SecurityGroupIds": [],
                    "EnhancedService": {
                        "SecurityService": {
                            "Enabled": true
                        },
                        "MonitorService": {
                            "Enabled": true
                        }
                    },
                    "UserData": null,
                    "InstanceTags": [],
                    "CreatedTime": "2022-03-03T02:36:12Z",
                    "UpdatedTime": "2022-03-03T06:49:31Z",
                    "CamRoleName": "",
                    "HostNameSettings": {
                        "HostName": null,
                        "HostNameStyle": null
                    },
                    "InstanceNameSettings": {
                        "InstanceName": "",
                        "InstanceNameStyle": ""
                    },
                    "InstanceChargePrepaid": {
                        "Period": 0,
                        "RenewFlag": ""
                    },
                    "HpcClusterId": ""
                }
            ],
            "RequestId": "923dd24c-e492-4bdb-90be-1d3bd4bfe8a5"
        }
    }
    

    Example3 Querying the launch configuration by specifying Tag:Key in Filters

    Input Example

    POST / HTTP/1.1
    Host: as.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeLaunchConfigurations
    <Common request parameters>
    
    {
        "Filters": [
            {
                "Values": [
                    "v2"
                ],
                "Name": "tag:k1"
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "LaunchConfigurationSet": [
                {
                    "ProjectId": 0,
                    "LaunchConfigurationId": "asc-0zri3ck1",
                    "VersionNumber": 1,
                    "LaunchConfigurationName": "test_tag_k1_v2",
                    "LaunchConfigurationStatus": "NORMAL",
                    "AutoScalingGroupAbstractSet": [],
                    "InstanceType": "S5.MEDIUM4",
                    "InstanceTypes": [
                        "S5.MEDIUM4"
                    ],
                    "LastOperationInstanceTypesCheckPolicy": "ANY",
                    "ImageId": "img-eb30mz89",
                    "InstanceChargeType": "POSTPAID_BY_HOUR",
                    "InstanceMarketOptions": null,
                    "DiskTypePolicy": "ORIGINAL",
                    "SystemDisk": {
                        "DiskType": "CLOUD_PREMIUM",
                        "DiskSize": 50
                    },
                    "DataDisks": [
                        {
                            "DiskType": "CLOUD_PREMIUM",
                            "DiskSize": 40,
                            "SnapshotId": null,
                            "DeleteWithInstance": null,
                            "Encrypt": null,
                            "ThroughputPerformance": null
                        }
                    ],
                    "LoginSettings": {
                        "KeyIds": []
                    },
                    "InternetAccessible": {
                        "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                        "InternetMaxBandwidthOut": 0,
                        "PublicIpAssigned": false,
                        "BandwidthPackageId": null
                    },
                    "SecurityGroupIds": [],
                    "EnhancedService": {
                        "SecurityService": {
                            "Enabled": true
                        },
                        "MonitorService": {
                            "Enabled": true
                        }
                    },
                    "UserData": null,
                    "Tags": [
                        {
                            "ResourceType": "launch-configuration",
                            "Key": "k1",
                            "Value": "v2"
                        }
                    ],
                    "InstanceTags": [],
                    "CreatedTime": "2022-07-14T06:37:08Z",
                    "UpdatedTime": "2022-07-14T06:37:08Z",
                    "CamRoleName": "",
                    "HostNameSettings": {
                        "HostName": null,
                        "HostNameStyle": null
                    },
                    "InstanceNameSettings": {
                        "InstanceName": "",
                        "InstanceNameStyle": ""
                    },
                    "InstanceChargePrepaid": {
                        "Period": 0,
                        "RenewFlag": ""
                    },
                    "HpcClusterId": ""
                }
            ],
            "RequestId": "8b8047bb-1372-4208-866e-a18e7b7547e9"
        }
    }
    

    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
    InvalidLaunchConfiguration Invalid launch configuration.
    InvalidLaunchConfigurationId The launch configuration ID is invalid.
    InvalidParameter.ActionNotFound Invalid Action request.
    InvalidParameterConflict The two parameters specified conflict and cannot co-exist.
    InvalidParameterValue.InvalidFilter Invalid filter condition.
    InvalidParameterValue.InvalidLaunchConfigurationId Invalid launch configuration ID.
    InvalidParameterValue.TooLong Too many values.
    InvalidPermission The account does not support this operation.
    LimitExceeded.FilterValuesTooLong Too many values for the specified filter
    UnsupportedOperation Unsupported operation.