tencent cloud

Feedback

DescribeInstances

Last updated: 2024-11-27 16:20:17

    1. API Description

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

    This API is used to get the information of an instance.

    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: DescribeInstances.
    Version Yes String Common Params. The value used for this API: 2019-07-19.
    Region No String Common Params. This parameter is not required for this API.
    Filters.N No Array of Filter Filter.
    zone String Required: no (Filter) Filter by AZ abbreviation.
    zone-name String Required: no (Filter) Filter by AZ name. Fuzzy match is supported.
    module-id String Required: no (Filter) Filter by module ID.
    instance-id String Required: no (Filter) Filter by instance ID.
    instance-name String Required: no (Filter) Filter by instance name. Fuzzy match is supported.
    ip-address String Required: no (Filter) Filter by the instance's private/public IP.
    instance-uuid string Required: no (Filter) Filter instances by uuid.
    instance-state string Required: no (Filter) Update instances by instance status.
    internet-service-provider String Required: no (Filter) Filter by the ISP of the instance's public IP.
    tag-key String Required: no (Filter) Filter by tag key.
    tag:tag-key String Required: no (Filter) Filter by tag key-value pair. Replace tag-key with the specific tag key.
    instance-family String Required: no (Filter) Filter by model family.
    module-name String Required: no (Filter) Filter by module name. Fuzzy match is supported.
    image-id String Required: no (Filter) Filter by instance image ID.
    vpc-id String Required: no (Filter) Filter by instance VPC ID.
    subnet-id String Required: no (Filter) Filter by instance subnet ID.

    If the Filters parameter is not specified, the information of all relevant instances will be queried.
    Each request can contain up to 5 Filter.Values.
    Offset No Integer Offset. Default value: 0.
    Limit No Integer Number of returned results. Default value: 20 (if the number of query results is greater than or equal to 20). Maximum value: 100.
    OrderByField No String Specified sort by field. Currently, valid values are as follows:
    timestamp: sort by instance creation time.
    Note: you can sort only by creation time currently. More sort criteria may be supported in the future.
    If this parameter is not specified, instances will be sorted by creation time by default.
    OrderDirection No Integer Sorting order. 0: descending; 1: ascending. If this parameter is not specified, it will be descending by default.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Length of the list of the returned instance information.
    InstanceSet Array of Instance List of the returned instance information.
    Note: this field may return null, indicating that no valid values can be obtained.
    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 by vpc-id

    This example shows you how to get the information of an instance based on specified filters.

    Input Example

    https://ecm.intl.tencentcloudapi.com/?Action=DescribeInstances
    &Filters.0.Name=vpc-id
    &Filters.0.Values.0=vpc-ec3mnb4d
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "RequestId": "",
            "InstanceSet": [
                {
                    "DataDiskSize": 0,
                    "RestrictState": "NORMAL",
                    "InstanceId": "ein-bb0ab3pc",
                    "ISP": "CTCC",
                    "SecurityGroupIds": [],
                    "SystemDisk": {
                        "DiskType": "LOCAL_BASIC",
                        "DiskId": "ldisk-91p8tj1p",
                        "DiskSize": 50
                    },
                    "ExpireTime": "2020-09-27 16:13:51",
                    "TagSet": null,
                    "SimpleModule": {
                        "ModuleId": "em-5wrpefy1",
                        "ModuleName": "jiaxuan"
                    },
                    "DataDisks": null,
                    "LatestOperationState": "SUCCESS",
                    "UUID": "3c3e605a-33a0-41ca-9251-5f115a531c3e",
                    "SystemDiskSize": 50,
                    "InstanceTypeConfig": {
                        "Frequency": "2.5 GHz",
                        "InstanceType": "SN3ne.2XLARGE16",
                        "Vcpu": 8,
                        "InstanceFamilyConfig": {
                            "InstanceFamilyName": "Standard SN3ne",
                            "InstanceFamily": "SN3ne"
                        },
                        "InstanceFamilyTypeConfig": {
                            "InstanceFamilyTypeName": "Standard",
                            "InstanceFamilyType": "S"
                        },
                        "CpuModelName": "Intel Xeon Skylake 6133",
                        "Memory": 16,
                        "ExtInfo": ""
                    },
                    "RenewFlag": 0,
                    "VirtualPrivateCloud": {
                        "PrivateIpAddresses": [
                            "10.11.12.6"
                        ],
                        "VpcId": "vpc-95ytv1vr",
                        "AsVpcGateway": false,
                        "SubnetId": "subnet-fua8fff8",
                        "Ipv6AddressCount": 0
                    },
                    "IsolatedTime": "2020-09-27 16:13:51",
                    "InstanceName": "jiaxuan binhai_do not delete 2",
                    "Position": {
                        "ZoneInfo": {
                            "ZoneId": 12000001,
                            "Zone": "ap-bhmini-ecm-1",
                            "ZoneName": "Tencent Binhai Zone"
                        },
                        "Country": {
                            "CountryName": "China",
                            "CountryId": "china"
                        },
                        "Area": {
                            "AreaName": "South China",
                            "AreaId": "china-south"
                        },
                        "Province": {
                            "ProvinceId": "china-south-guangdong",
                            "ProvinceName": "Guangdong"
                        },
                        "City": {
                            "CityName": "Shenzhen",
                            "CityId": "china-south-guangdong-shenzhen"
                        },
                        "RegionInfo": {
                            "RegionId": 0,
                            "Region": "ap-bhmini-ecm",
                            "RegionName": "Tencent Binhai Zone"
                        }
                    },
                    "CreateTime": "2020-09-27 16:13:51",
                    "Image": {
                        "SrcImage": {
                            "InstanceName": "",
                            "InstanceId": "",
                            "ImageOsName": "centos_test",
                            "ImageId": "img-test",
                            "ImageName": "centos",
                            "RegionID": 20,
                            "RegionName": "Shanghai",
                            "ImageType": "",
                            "ImageDescription": "info_test",
                            "Region": "ap-shanghai"
                        },
                        "ImageOsName": "CentOS 7.6 64-bit",
                        "ImageId": "img-9qabwvbn",
                        "Platform": "CentOS",
                        "ImageName": "CentOS 7.6 64-bit",
                        "ImageCreateTime": "",
                        "ImageOwner": 0,
                        "ImageSource": "OFFICIAL",
                        "ImageType": "PUBLIC_IMAGE",
                        "OsType": "linux",
                        "OsVersion": "7.6.0",
                        "ImageState": "NORMAL",
                        "ImageDescription": "CentOS 7.6 64-bit",
                        "Architecture": "x86_64",
                        "ImageSize": 50
                    },
                    "InstanceState": "RUNNING",
                    "Internet": {
                        "InstanceNetworkInfoSet": [
                            {
                                "Primary": true,
                                "NetworkInterfaceId": "eni-m5gnw3tv",
                                "NetworkInterfaceName": "ein-bb0ab3pc Primary ENI",
                                "AddressInfoSet": [
                                    {
                                        "PublicIPAddressInfo": {
                                            "PublicIPAddress": "118.126.126.23",
                                            "ISP": {
                                                "ISPName": "China Telecom",
                                                "ISPId": "CTCC"
                                            },
                                            "MaxBandwidthOut": 25,
                                            "ChargeMode": "BANDWIDTH_PACKAGE",
                                            "MaxBandwidthIn": 0
                                        },
                                        "PrivateIPAddressInfo": {
                                            "PrivateIPAddress": "10.11.12.6"
                                        }
                                    }
                                ]
                            }
                        ],
                        "PrivateIPAddressSet": [
                            {
                                "PrivateIPAddress": "10.11.12.6"
                            }
                        ],
                        "PublicIPAddressSet": [
                            {
                                "PublicIPAddress": "118.126.126.23",
                                "ISP": {
                                    "ISPName": "China Telecom",
                                    "ISPId": "CTCC"
                                },
                                "MaxBandwidthOut": 25,
                                "ChargeMode": "BANDWIDTH_PACKAGE",
                                "MaxBandwidthIn": 0
                            }
                        ]
                    },
                    "NewFlag": 0,
                    "ExpireState": "NORMAL",
                    "PayMode": 0,
                    "LatestOperation": "ResetInstancesPassword"
                },
                {
                    "DataDiskSize": 0,
                    "RestrictState": "NORMAL",
                    "InstanceId": "ein-b6kee4dg",
                    "ISP": "CTCC",
                    "SecurityGroupIds": [],
                    "SystemDisk": {
                        "DiskType": "LOCAL_BASIC",
                        "DiskId": "ldisk-9tvkpn8p",
                        "DiskSize": 50
                    },
                    "ExpireTime": "2020-09-27 16:12:24",
                    "TagSet": null,
                    "SimpleModule": {
                        "ModuleId": "em-xgi6r1hk",
                        "ModuleName": "Video V8-cedricliu"
                    },
                    "DataDisks": null,
                    "LatestOperationState": "SUCCESS",
                    "UUID": "edf97143-b1e3-43d9-b34b-cfcf3fba1820",
                    "SystemDiskSize": 50,
                    "InstanceTypeConfig": {
                        "Frequency": "2.5 GHz",
                        "InstanceType": "SN3ne.4XLARGE32",
                        "Vcpu": 16,
                        "InstanceFamilyConfig": {
                            "InstanceFamilyName": "Standard SN3ne",
                            "InstanceFamily": "SN3ne"
                        },
                        "InstanceFamilyTypeConfig": {
                            "InstanceFamilyTypeName": "Standard",
                            "InstanceFamilyType": "S"
                        },
                        "CpuModelName": "Intel Xeon Skylake 6133",
                        "Memory": 32,
                        "ExtInfo": ""
                    },
                    "RenewFlag": 0,
                    "VirtualPrivateCloud": {
                        "PrivateIpAddresses": [
                            "10.11.12.17"
                        ],
                        "VpcId": "vpc-95ytv1vr",
                        "AsVpcGateway": false,
                        "SubnetId": "subnet-fua8fff8",
                        "Ipv6AddressCount": 0
                    },
                    "IsolatedTime": "2020-09-27 16:12:24",
                    "InstanceName": "jiaxuan binhai server_do not delete 2",
                    "Position": {
                        "ZoneInfo": {
                            "ZoneId": 12000001,
                            "Zone": "ap-bhmini-ecm-1",
                            "ZoneName": "Tencent Binhai Zone"
                        },
                        "Country": {
                            "CountryName": "China",
                            "CountryId": "china"
                        },
                        "Area": {
                            "AreaName": "South China",
                            "AreaId": "china-south"
                        },
                        "Province": {
                            "ProvinceId": "china-south-guangdong",
                            "ProvinceName": "Guangdong"
                        },
                        "City": {
                            "CityName": "Shenzhen",
                            "CityId": "china-south-guangdong-shenzhen"
                        },
                        "RegionInfo": {
                            "RegionId": 0,
                            "Region": "ap-bhmini-ecm",
                            "RegionName": "Tencent Binhai Zone"
                        }
                    },
                    "CreateTime": "2020-09-27 16:12:24",
                    "Image": {
                        "SrcImage": {
                            "InstanceName": "",
                            "InstanceId": "",
                            "ImageOsName": "centos_test",
                            "ImageId": "img-test",
                            "ImageName": "centos",
                            "RegionID": 20,
                            "RegionName": "Shanghai",
                            "ImageType": "",
                            "ImageDescription": "info_test",
                            "Region": "ap-shanghai"
                        },
                        "ImageOsName": "CentOS 7.6 64-bit",
                        "ImageId": "img-9qabwvbn",
                        "Platform": "CentOS",
                        "ImageName": "CentOS 7.6 64-bit",
                        "ImageCreateTime": "",
                        "ImageOwner": 0,
                        "ImageSource": "OFFICIAL",
                        "ImageType": "PUBLIC_IMAGE",
                        "OsType": "linux",
                        "OsVersion": "7.6.0",
                        "ImageState": "NORMAL",
                        "ImageDescription": "CentOS 7.6 64-bit",
                        "Architecture": "x86_64",
                        "ImageSize": 50
                    },
                    "InstanceState": "RUNNING",
                    "Internet": {
                        "InstanceNetworkInfoSet": [
                            {
                                "Primary": true,
                                "NetworkInterfaceId": "eni-mhym6o89",
                                "NetworkInterfaceName": "ein-b6kee4dg Primary ENI",
                                "AddressInfoSet": [
                                    {
                                        "PublicIPAddressInfo": {
                                            "PublicIPAddress": "118.126.126.27",
                                            "ISP": {
                                                "ISPName": "China Telecom",
                                                "ISPId": "CTCC"
                                            },
                                            "MaxBandwidthOut": 105,
                                            "ChargeMode": "BANDWIDTH_PACKAGE",
                                            "MaxBandwidthIn": 0
                                        },
                                        "PrivateIPAddressInfo": {
                                            "PrivateIPAddress": "10.11.12.17"
                                        }
                                    }
                                ]
                            }
                        ],
                        "PrivateIPAddressSet": [
                            {
                                "PrivateIPAddress": "10.11.12.17"
                            }
                        ],
                        "PublicIPAddressSet": [
                            {
                                "PublicIPAddress": "118.126.126.27",
                                "ISP": {
                                    "ISPName": "China Telecom",
                                    "ISPId": "CTCC"
                                },
                                "MaxBandwidthOut": 105,
                                "ChargeMode": "BANDWIDTH_PACKAGE",
                                "MaxBandwidthIn": 0
                            }
                        ]
                    },
                    "NewFlag": 0,
                    "ExpireState": "NORMAL",
                    "PayMode": 0,
                    "LatestOperation": "ResetInstancesPassword"
                },
                {
                    "DataDiskSize": 0,
                    "RestrictState": "NORMAL",
                    "InstanceId": "ein-5uhtyyps",
                    "ISP": "CTCC",
                    "SecurityGroupIds": [],
                    "SystemDisk": {
                        "DiskType": "LOCAL_BASIC",
                        "DiskId": "ldisk-0fqlcnj7",
                        "DiskSize": 50
                    },
                    "ExpireTime": "2020-09-27 16:12:24",
                    "TagSet": null,
                    "SimpleModule": {
                        "ModuleId": "em-xgi6r1hk",
                        "ModuleName": "Video V8-cedricliu"
                    },
                    "DataDisks": null,
                    "LatestOperationState": "SUCCESS",
                    "UUID": "e85e02fb-8efd-4728-a3d7-10cf913ed4e5",
                    "SystemDiskSize": 50,
                    "InstanceTypeConfig": {
                        "Frequency": "2.5 GHz",
                        "InstanceType": "SN3ne.4XLARGE32",
                        "Vcpu": 16,
                        "InstanceFamilyConfig": {
                            "InstanceFamilyName": "Standard SN3ne",
                            "InstanceFamily": "SN3ne"
                        },
                        "InstanceFamilyTypeConfig": {
                            "InstanceFamilyTypeName": "Standard",
                            "InstanceFamilyType": "S"
                        },
                        "CpuModelName": "Intel Xeon Skylake 6133",
                        "Memory": 32,
                        "ExtInfo": ""
                    },
                    "RenewFlag": 0,
                    "VirtualPrivateCloud": {
                        "PrivateIpAddresses": [
                            "10.11.12.4"
                        ],
                        "VpcId": "vpc-95ytv1vr",
                        "AsVpcGateway": false,
                        "SubnetId": "subnet-fua8fff8",
                        "Ipv6AddressCount": 0
                    },
                    "IsolatedTime": "2020-09-27 16:12:24",
                    "InstanceName": "jiaxuan binhai server_do not delete 1",
                    "Position": {
                        "ZoneInfo": {
                            "ZoneId": 12000001,
                            "Zone": "ap-bhmini-ecm-1",
                            "ZoneName": "Tencent Binhai Zone"
                        },
                        "Country": {
                            "CountryName": "China",
                            "CountryId": "china"
                        },
                        "Area": {
                            "AreaName": "South China",
                            "AreaId": "china-south"
                        },
                        "Province": {
                            "ProvinceId": "china-south-guangdong",
                            "ProvinceName": "Guangdong"
                        },
                        "City": {
                            "CityName": "Shenzhen",
                            "CityId": "china-south-guangdong-shenzhen"
                        },
                        "RegionInfo": {
                            "RegionId": 0,
                            "Region": "ap-bhmini-ecm",
                            "RegionName": "Tencent Binhai Zone"
                        }
                    },
                    "CreateTime": "2020-09-27 16:12:24",
                    "Image": {
                        "SrcImage": {
                            "InstanceName": "",
                            "InstanceId": "",
                            "ImageOsName": "centos_test",
                            "ImageId": "img-test",
                            "ImageName": "centos",
                            "RegionID": 20,
                            "RegionName": "Shanghai",
                            "ImageType": "",
                            "ImageDescription": "info_test",
                            "Region": "ap-shanghai"
                        },
                        "ImageOsName": "CentOS 7.6 64-bit",
                        "ImageId": "img-9qabwvbn",
                        "Platform": "CentOS",
                        "ImageName": "CentOS 7.6 64-bit",
                        "ImageCreateTime": "",
                        "ImageOwner": 0,
                        "ImageSource": "OFFICIAL",
                        "ImageType": "PUBLIC_IMAGE",
                        "OsType": "linux",
                        "OsVersion": "7.6.0",
                        "ImageState": "NORMAL",
                        "ImageDescription": "CentOS 7.6 64-bit",
                        "Architecture": "x86_64",
                        "ImageSize": 50
                    },
                    "InstanceState": "RUNNING",
                    "Internet": {
                        "InstanceNetworkInfoSet": [
                            {
                                "Primary": true,
                                "NetworkInterfaceId": "eni-i7nvrvbj",
                                "NetworkInterfaceName": "ein-5uhtyyps Primary ENI",
                                "AddressInfoSet": [
                                    {
                                        "PublicIPAddressInfo": {
                                            "PublicIPAddress": "118.126.126.39",
                                            "ISP": {
                                                "ISPName": "China Telecom",
                                                "ISPId": "CTCC"
                                            },
                                            "MaxBandwidthOut": 105,
                                            "ChargeMode": "BANDWIDTH_PACKAGE",
                                            "MaxBandwidthIn": 0
                                        },
                                        "PrivateIPAddressInfo": {
                                            "PrivateIPAddress": "10.11.12.4"
                                        }
                                    }
                                ]
                            }
                        ],
                        "PrivateIPAddressSet": [
                            {
                                "PrivateIPAddress": "10.11.12.4"
                            }
                        ],
                        "PublicIPAddressSet": [
                            {
                                "PublicIPAddress": "118.126.126.39",
                                "ISP": {
                                    "ISPName": "China Telecom",
                                    "ISPId": "CTCC"
                                },
                                "MaxBandwidthOut": 105,
                                "ChargeMode": "BANDWIDTH_PACKAGE",
                                "MaxBandwidthIn": 0
                            }
                        ]
                    },
                    "NewFlag": 0,
                    "ExpireState": "NORMAL",
                    "PayMode": 0,
                    "LatestOperation": "ResetInstancesPassword"
                }
            ],
            "TotalCount": 12
        }
    }
    

    Example2 通过默认参数获取实例信息

    通过默认参数来获取实例的信息。

    Input Example

    POST / HTTP/1.1
    Host: ecm.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeInstances
    <common request parameters>
    
    {}
    

    Output Example

    {
        "Response": {
            "RequestId": "",
            "InstanceSet": [
                {
                    "DataDiskSize": 0,
                    "RestrictState": "NORMAL",
                    "InstanceId": "ein-bb0ab3pc",
                    "ISP": "CTCC",
                    "SecurityGroupIds": [],
                    "SystemDisk": {
                        "DiskType": "LOCAL_BASIC",
                        "DiskId": "ldisk-91p8tj1p",
                        "DiskSize": 50
                    },
                    "ExpireTime": "2020-09-27 16:13:51",
                    "TagSet": null,
                    "SimpleModule": {
                        "ModuleId": "em-5wrpefy1",
                        "ModuleName": "jiaxuan"
                    },
                    "DataDisks": null,
                    "LatestOperationState": "SUCCESS",
                    "UUID": "3c3e605a-33a0-41ca-9251-5f115a531c3e",
                    "SystemDiskSize": 50,
                    "InstanceTypeConfig": {
                        "Frequency": "2.5 GHz",
                        "GpuModelName": null,
                        "InstanceType": "SN3ne.2XLARGE16",
                        "Vcpu": 8,
                        "Vgpu": null,
                        "InstanceFamilyConfig": {
                            "InstanceFamilyName": "标准型SN3ne",
                            "InstanceFamily": "SN3ne"
                        },
                        "InstanceFamilyTypeConfig": {
                            "InstanceFamilyTypeName": "标准型",
                            "InstanceFamilyType": "S"
                        },
                        "CpuModelName": "Intel Xeon Skylake 6133",
                        "Memory": 16,
                        "ExtInfo": ""
                    },
                    "RenewFlag": 0,
                    "VirtualPrivateCloud": {
                        "PrivateIpAddresses": [
                            "10.11.12.6"
                        ],
                        "VpcId": "vpc-95ytv1vr",
                        "AsVpcGateway": false,
                        "SubnetId": "subnet-fua8fff8",
                        "Ipv6AddressCount": 0
                    },
                    "IsolatedTime": "2020-09-27 16:13:51",
                    "InstanceName": "jiaxuan滨海_勿删2",
                    "Position": {
                        "ZoneInfo": {
                            "ZoneId": 12000001,
                            "Zone": "ap-bhmini-ecm-1",
                            "ZoneName": "腾讯滨海专区"
                        },
                        "Country": {
                            "CountryName": "中国",
                            "CountryId": "china"
                        },
                        "Area": {
                            "AreaName": "华南",
                            "AreaId": "china-south"
                        },
                        "Province": {
                            "ProvinceId": "china-south-guangdong",
                            "ProvinceName": "广东"
                        },
                        "City": {
                            "CityName": "深圳",
                            "CityId": "china-south-guangdong-shenzhen"
                        },
                        "RegionInfo": {
                            "RegionId": 0,
                            "Region": "ap-bhmini-ecm",
                            "RegionName": "腾讯滨海专区"
                        }
                    },
                    "CreateTime": "2020-09-27 16:13:51",
                    "Image": {
                        "SrcImage": {
                            "InstanceName": "",
                            "InstanceId": "",
                            "ImageOsName": "centos_test",
                            "ImageId": "img-test",
                            "ImageName": "centos",
                            "RegionID": 20,
                            "RegionName": "上海",
                            "ImageType": "",
                            "ImageDescription": "info_test",
                            "Region": "ap-shanghai"
                        },
                        "ImageOsName": "CentOS 7.6 64位",
                        "ImageId": "img-9qabwvbn",
                        "Platform": "CentOS",
                        "ImageName": "CentOS 7.6 64位",
                        "ImageCreateTime": "",
                        "ImageOwner": 0,
                        "ImageSource": "OFFICIAL",
                        "ImageType": "PUBLIC_IMAGE",
                        "IsSupportCloudInit": true,
                        "OsType": "linux",
                        "OsVersion": "7.6.0",
                        "ImageState": "NORMAL",
                        "ImageDescription": "CentOS 7.6 64位",
                        "Architecture": "x86_64",
                        "ImageSize": 50,
                        "TaskId": ""
                    },
                    "InstanceState": "RUNNING",
                    "Internet": {
                        "InstanceNetworkInfoSet": [
                            {
                                "Primary": true,
                                "NetworkInterfaceId": "eni-m5gnw3tv",
                                "NetworkInterfaceName": "ein-bb0ab3pc Primary ENI",
                                "AddressInfoSet": [
                                    {
                                        "PublicIPAddressInfo": {
                                            "PublicIPAddress": "118.126.126.23",
                                            "ISP": {
                                                "ISPName": "电信",
                                                "ISPId": "CTCC"
                                            },
                                            "MaxBandwidthOut": 25,
                                            "ChargeMode": "BANDWIDTH_PACKAGE",
                                            "MaxBandwidthIn": 0
                                        },
                                        "PrivateIPAddressInfo": {
                                            "PrivateIPAddress": "10.11.12.6"
                                        }
                                    }
                                ]
                            }
                        ],
                        "PrivateIPAddressSet": [
                            {
                                "PrivateIPAddress": "10.11.12.6"
                            }
                        ],
                        "PublicIPAddressSet": [
                            {
                                "PublicIPAddress": "118.126.126.23",
                                "ISP": {
                                    "ISPName": "电信",
                                    "ISPId": "CTCC"
                                },
                                "MaxBandwidthOut": 25,
                                "ChargeMode": "BANDWIDTH_PACKAGE",
                                "MaxBandwidthIn": 0
                            }
                        ]
                    },
                    "NewFlag": 0,
                    "ExpireState": "NORMAL",
                    "PayMode": 0,
                    "PhysicalPosition": {
                        "PosId": "",
                        "RackId": "",
                        "SwitchId": ""
                    },
                    "LatestOperation": "ResetInstancesPassword"
                },
                {
                    "DataDiskSize": 0,
                    "RestrictState": "NORMAL",
                    "InstanceId": "ein-b6kee4dg",
                    "ISP": "CTCC",
                    "SecurityGroupIds": [],
                    "SystemDisk": {
                        "DiskType": "LOCAL_BASIC",
                        "DiskId": "ldisk-9tvkpn8p",
                        "DiskSize": 50
                    },
                    "ExpireTime": "2020-09-27 16:12:24",
                    "TagSet": null,
                    "SimpleModule": {
                        "ModuleId": "em-xgi6r1hk",
                        "ModuleName": "视频V8-cedricliu"
                    },
                    "DataDisks": null,
                    "LatestOperationState": "SUCCESS",
                    "UUID": "edf97143-b1e3-43d9-b34b-cfcf3fba1820",
                    "SystemDiskSize": 50,
                    "InstanceTypeConfig": {
                        "Frequency": "2.5 GHz",
                        "GpuModelName": null,
                        "InstanceType": "SN3ne.4XLARGE32",
                        "Vcpu": 16,
                        "Vgpu": null,
                        "InstanceFamilyConfig": {
                            "InstanceFamilyName": "标准型SN3ne",
                            "InstanceFamily": "SN3ne"
                        },
                        "InstanceFamilyTypeConfig": {
                            "InstanceFamilyTypeName": "标准型",
                            "InstanceFamilyType": "S"
                        },
                        "CpuModelName": "Intel Xeon Skylake 6133",
                        "Memory": 32,
                        "ExtInfo": ""
                    },
                    "RenewFlag": 0,
                    "VirtualPrivateCloud": {
                        "PrivateIpAddresses": [
                            "10.11.12.17"
                        ],
                        "VpcId": "vpc-95ytv1vr",
                        "AsVpcGateway": false,
                        "SubnetId": "subnet-fua8fff8",
                        "Ipv6AddressCount": 0
                    },
                    "IsolatedTime": "2020-09-27 16:12:24",
                    "InstanceName": "jiaxuan滨海机器_勿删2",
                    "Position": {
                        "ZoneInfo": {
                            "ZoneId": 12000001,
                            "Zone": "ap-bhmini-ecm-1",
                            "ZoneName": "腾讯滨海专区"
                        },
                        "Country": {
                            "CountryName": "中国",
                            "CountryId": "china"
                        },
                        "Area": {
                            "AreaName": "华南",
                            "AreaId": "china-south"
                        },
                        "Province": {
                            "ProvinceId": "china-south-guangdong",
                            "ProvinceName": "广东"
                        },
                        "City": {
                            "CityName": "深圳",
                            "CityId": "china-south-guangdong-shenzhen"
                        },
                        "RegionInfo": {
                            "RegionId": 0,
                            "Region": "ap-bhmini-ecm",
                            "RegionName": "腾讯滨海专区"
                        }
                    },
                    "CreateTime": "2020-09-27 16:12:24",
                    "Image": {
                        "SrcImage": {
                            "InstanceName": "",
                            "InstanceId": "",
                            "ImageOsName": "centos_test",
                            "ImageId": "img-test",
                            "ImageName": "centos",
                            "RegionID": 20,
                            "RegionName": "上海",
                            "ImageType": "",
                            "ImageDescription": "info_test",
                            "Region": "ap-shanghai"
                        },
                        "ImageOsName": "CentOS 7.6 64位",
                        "ImageId": "img-9qabwvbn",
                        "Platform": "CentOS",
                        "ImageName": "CentOS 7.6 64位",
                        "ImageCreateTime": "",
                        "ImageOwner": 0,
                        "ImageSource": "OFFICIAL",
                        "ImageType": "PUBLIC_IMAGE",
                        "IsSupportCloudInit": true,
                        "OsType": "linux",
                        "OsVersion": "7.6.0",
                        "ImageState": "NORMAL",
                        "ImageDescription": "CentOS 7.6 64位",
                        "Architecture": "x86_64",
                        "ImageSize": 50,
                        "TaskId": ""
                    },
                    "InstanceState": "RUNNING",
                    "Internet": {
                        "InstanceNetworkInfoSet": [
                            {
                                "Primary": true,
                                "NetworkInterfaceId": "eni-mhym6o89",
                                "NetworkInterfaceName": "ein-b6kee4dg Primary ENI",
                                "AddressInfoSet": [
                                    {
                                        "PublicIPAddressInfo": {
                                            "PublicIPAddress": "118.126.126.27",
                                            "ISP": {
                                                "ISPName": "电信",
                                                "ISPId": "CTCC"
                                            },
                                            "MaxBandwidthOut": 105,
                                            "ChargeMode": "BANDWIDTH_PACKAGE",
                                            "MaxBandwidthIn": 0
                                        },
                                        "PrivateIPAddressInfo": {
                                            "PrivateIPAddress": "10.11.12.17"
                                        }
                                    }
                                ]
                            }
                        ],
                        "PrivateIPAddressSet": [
                            {
                                "PrivateIPAddress": "10.11.12.17"
                            }
                        ],
                        "PublicIPAddressSet": [
                            {
                                "PublicIPAddress": "118.126.126.27",
                                "ISP": {
                                    "ISPName": "电信",
                                    "ISPId": "CTCC"
                                },
                                "MaxBandwidthOut": 105,
                                "ChargeMode": "BANDWIDTH_PACKAGE",
                                "MaxBandwidthIn": 0
                            }
                        ]
                    },
                    "NewFlag": 0,
                    "ExpireState": "NORMAL",
                    "PayMode": 0,
                    "PhysicalPosition": {
                        "PosId": "",
                        "RackId": "",
                        "SwitchId": ""
                    },
                    "LatestOperation": "ResetInstancesPassword"
                },
                {
                    "DataDiskSize": 0,
                    "RestrictState": "NORMAL",
                    "InstanceId": "ein-5uhtyyps",
                    "ISP": "CTCC",
                    "SecurityGroupIds": [],
                    "SystemDisk": {
                        "DiskType": "LOCAL_BASIC",
                        "DiskId": "ldisk-0fqlcnj7",
                        "DiskSize": 50
                    },
                    "ExpireTime": "2020-09-27 16:12:24",
                    "TagSet": null,
                    "SimpleModule": {
                        "ModuleId": "em-xgi6r1hk",
                        "ModuleName": "视频V8-cedricliu"
                    },
                    "DataDisks": null,
                    "LatestOperationState": "SUCCESS",
                    "UUID": "e85e02fb-8efd-4728-a3d7-10cf913ed4e5",
                    "SystemDiskSize": 50,
                    "InstanceTypeConfig": {
                        "Frequency": "2.5 GHz",
                        "GpuModelName": null,
                        "InstanceType": "SN3ne.4XLARGE32",
                        "Vcpu": 16,
                        "Vgpu": null,
                        "InstanceFamilyConfig": {
                            "InstanceFamilyName": "标准型SN3ne",
                            "InstanceFamily": "SN3ne"
                        },
                        "InstanceFamilyTypeConfig": {
                            "InstanceFamilyTypeName": "标准型",
                            "InstanceFamilyType": "S"
                        },
                        "CpuModelName": "Intel Xeon Skylake 6133",
                        "Memory": 32,
                        "ExtInfo": ""
                    },
                    "RenewFlag": 0,
                    "VirtualPrivateCloud": {
                        "PrivateIpAddresses": [
                            "10.11.12.4"
                        ],
                        "VpcId": "vpc-95ytv1vr",
                        "AsVpcGateway": false,
                        "SubnetId": "subnet-fua8fff8",
                        "Ipv6AddressCount": 0
                    },
                    "IsolatedTime": "2020-09-27 16:12:24",
                    "InstanceName": "jiaxuan滨海机器_勿删1",
                    "Position": {
                        "ZoneInfo": {
                            "ZoneId": 12000001,
                            "Zone": "ap-bhmini-ecm-1",
                            "ZoneName": "腾讯滨海专区"
                        },
                        "Country": {
                            "CountryName": "中国",
                            "CountryId": "china"
                        },
                        "Area": {
                            "AreaName": "华南",
                            "AreaId": "china-south"
                        },
                        "Province": {
                            "ProvinceId": "china-south-guangdong",
                            "ProvinceName": "广东"
                        },
                        "City": {
                            "CityName": "深圳",
                            "CityId": "china-south-guangdong-shenzhen"
                        },
                        "RegionInfo": {
                            "RegionId": 0,
                            "Region": "ap-bhmini-ecm",
                            "RegionName": "腾讯滨海专区"
                        }
                    },
                    "CreateTime": "2020-09-27 16:12:24",
                    "Image": {
                        "SrcImage": {
                            "InstanceName": "",
                            "InstanceId": "",
                            "ImageOsName": "centos_test",
                            "ImageId": "img-test",
                            "ImageName": "centos",
                            "RegionID": 20,
                            "RegionName": "上海",
                            "ImageType": "",
                            "ImageDescription": "info_test",
                            "Region": "ap-shanghai"
                        },
                        "ImageOsName": "CentOS 7.6 64位",
                        "ImageId": "img-9qabwvbn",
                        "Platform": "CentOS",
                        "ImageName": "CentOS 7.6 64位",
                        "ImageCreateTime": "",
                        "ImageOwner": 0,
                        "ImageSource": "OFFICIAL",
                        "ImageType": "PUBLIC_IMAGE",
                        "IsSupportCloudInit": true,
                        "OsType": "linux",
                        "OsVersion": "7.6.0",
                        "ImageState": "NORMAL",
                        "ImageDescription": "CentOS 7.6 64位",
                        "Architecture": "x86_64",
                        "ImageSize": 50,
                        "TaskId": ""
                    },
                    "InstanceState": "RUNNING",
                    "Internet": {
                        "InstanceNetworkInfoSet": [
                            {
                                "Primary": true,
                                "NetworkInterfaceId": "eni-i7nvrvbj",
                                "NetworkInterfaceName": "ein-5uhtyyps Primary ENI",
                                "AddressInfoSet": [
                                    {
                                        "PublicIPAddressInfo": {
                                            "PublicIPAddress": "118.126.126.39",
                                            "ISP": {
                                                "ISPName": "电信",
                                                "ISPId": "CTCC"
                                            },
                                            "MaxBandwidthOut": 105,
                                            "ChargeMode": "BANDWIDTH_PACKAGE",
                                            "MaxBandwidthIn": 0
                                        },
                                        "PrivateIPAddressInfo": {
                                            "PrivateIPAddress": "10.11.12.4"
                                        }
                                    }
                                ]
                            }
                        ],
                        "PrivateIPAddressSet": [
                            {
                                "PrivateIPAddress": "10.11.12.4"
                            }
                        ],
                        "PublicIPAddressSet": [
                            {
                                "PublicIPAddress": "118.126.126.39",
                                "ISP": {
                                    "ISPName": "电信",
                                    "ISPId": "CTCC"
                                },
                                "MaxBandwidthOut": 105,
                                "ChargeMode": "BANDWIDTH_PACKAGE",
                                "MaxBandwidthIn": 0
                            }
                        ]
                    },
                    "NewFlag": 0,
                    "ExpireState": "NORMAL",
                    "PayMode": 0,
                    "PhysicalPosition": {
                        "PosId": "",
                        "RackId": "",
                        "SwitchId": ""
                    },
                    "LatestOperation": "ResetInstancesPassword"
                }
            ],
            "TotalCount": 3
        }
    }
    

    Example3 Querying the two most recent instances by creation time in reverse order

    This example shows you how to get the information of an instance based on specified filters.

    Input Example

    https://ecm.intl.tencentcloudapi.com/?Action=DescribeInstances
    &OrderByField=timestamp
    &OrderDirection=0
    &Limit=2
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "RequestId": "",
            "InstanceSet": [
                {
                    "DataDiskSize": 0,
                    "RestrictState": "NORMAL",
                    "InstanceId": "ein-bb0ab3pc",
                    "ISP": "CTCC",
                    "SecurityGroupIds": [],
                    "SystemDisk": {
                        "DiskType": "LOCAL_BASIC",
                        "DiskId": "ldisk-91p8tj1p",
                        "DiskSize": 50
                    },
                    "ExpireTime": "2020-09-27 16:13:51",
                    "TagSet": null,
                    "SimpleModule": {
                        "ModuleId": "em-5wrpefy1",
                        "ModuleName": "jiaxuan"
                    },
                    "DataDisks": null,
                    "LatestOperationState": "SUCCESS",
                    "UUID": "3c3e605a-33a0-41ca-9251-5f115a531c3e",
                    "SystemDiskSize": 50,
                    "InstanceTypeConfig": {
                        "Frequency": "2.5 GHz",
                        "InstanceType": "SN3ne.2XLARGE16",
                        "Vcpu": 8,
                        "InstanceFamilyConfig": {
                            "InstanceFamilyName": "Standard SN3ne",
                            "InstanceFamily": "SN3ne"
                        },
                        "InstanceFamilyTypeConfig": {
                            "InstanceFamilyTypeName": "Standard",
                            "InstanceFamilyType": "S"
                        },
                        "CpuModelName": "Intel Xeon Skylake 6133",
                        "Memory": 16,
                        "ExtInfo": ""
                    },
                    "RenewFlag": 0,
                    "VirtualPrivateCloud": {
                        "PrivateIpAddresses": [
                            "10.11.12.6"
                        ],
                        "VpcId": "vpc-95ytv1vr",
                        "AsVpcGateway": false,
                        "SubnetId": "subnet-fua8fff8",
                        "Ipv6AddressCount": 0
                    },
                    "IsolatedTime": "2020-09-27 16:13:51",
                    "InstanceName": "jiaxuan binhai_do not delete 2",
                    "Position": {
                        "ZoneInfo": {
                            "ZoneId": 12000001,
                            "Zone": "ap-bhmini-ecm-1",
                            "ZoneName": "Tencent Binhai Zone"
                        },
                        "Country": {
                            "CountryName": "China",
                            "CountryId": "china"
                        },
                        "Area": {
                            "AreaName": "South China",
                            "AreaId": "china-south"
                        },
                        "Province": {
                            "ProvinceId": "china-south-guangdong",
                            "ProvinceName": "Guangdong"
                        },
                        "City": {
                            "CityName": "Shenzhen",
                            "CityId": "china-south-guangdong-shenzhen"
                        },
                        "RegionInfo": {
                            "RegionId": 0,
                            "Region": "ap-bhmini-ecm",
                            "RegionName": "Tencent Binhai Zone"
                        }
                    },
                    "CreateTime": "2020-09-27 16:13:51",
                    "Image": {
                        "SrcImage": {
                            "InstanceName": "",
                            "InstanceId": "",
                            "ImageOsName": "centos_test",
                            "ImageId": "img-test",
                            "ImageName": "centos",
                            "RegionID": 20,
                            "RegionName": "Shanghai",
                            "ImageType": "",
                            "ImageDescription": "info_test",
                            "Region": "ap-shanghai"
                        },
                        "ImageOsName": "CentOS 7.6 64-bit",
                        "ImageId": "img-9qabwvbn",
                        "Platform": "CentOS",
                        "ImageName": "CentOS 7.6 64-bit",
                        "ImageCreateTime": "",
                        "ImageOwner": 0,
                        "ImageSource": "OFFICIAL",
                        "ImageType": "PUBLIC_IMAGE",
                        "OsType": "linux",
                        "OsVersion": "7.6.0",
                        "ImageState": "NORMAL",
                        "ImageDescription": "CentOS 7.6 64-bit",
                        "Architecture": "x86_64",
                        "ImageSize": 50
                    },
                    "InstanceState": "RUNNING",
                    "Internet": {
                        "InstanceNetworkInfoSet": [
                            {
                                "Primary": true,
                                "NetworkInterfaceId": "eni-m5gnw3tv",
                                "NetworkInterfaceName": "ein-bb0ab3pc Primary ENI",
                                "AddressInfoSet": [
                                    {
                                        "PublicIPAddressInfo": {
                                            "PublicIPAddress": "118.126.126.23",
                                            "ISP": {
                                                "ISPName": "China Telecom",
                                                "ISPId": "CTCC"
                                            },
                                            "MaxBandwidthOut": 25,
                                            "ChargeMode": "BANDWIDTH_PACKAGE",
                                            "MaxBandwidthIn": 0
                                        },
                                        "PrivateIPAddressInfo": {
                                            "PrivateIPAddress": "10.11.12.6"
                                        }
                                    }
                                ]
                            }
                        ],
                        "PrivateIPAddressSet": [
                            {
                                "PrivateIPAddress": "10.11.12.6"
                            }
                        ],
                        "PublicIPAddressSet": [
                            {
                                "PublicIPAddress": "118.126.126.23",
                                "ISP": {
                                    "ISPName": "China Telecom",
                                    "ISPId": "CTCC"
                                },
                                "MaxBandwidthOut": 25,
                                "ChargeMode": "BANDWIDTH_PACKAGE",
                                "MaxBandwidthIn": 0
                            }
                        ]
                    },
                    "NewFlag": 0,
                    "ExpireState": "NORMAL",
                    "PayMode": 0,
                    "LatestOperation": "ResetInstancesPassword"
                },
                {
                    "DataDiskSize": 0,
                    "RestrictState": "NORMAL",
                    "InstanceId": "ein-b6kee4dg",
                    "ISP": "CTCC",
                    "SecurityGroupIds": [],
                    "SystemDisk": {
                        "DiskType": "LOCAL_BASIC",
                        "DiskId": "ldisk-9tvkpn8p",
                        "DiskSize": 50
                    },
                    "ExpireTime": "2020-09-27 16:12:24",
                    "TagSet": null,
                    "SimpleModule": {
                        "ModuleId": "em-xgi6r1hk",
                        "ModuleName": "Video V8-cedricliu"
                    },
                    "DataDisks": null,
                    "LatestOperationState": "SUCCESS",
                    "UUID": "edf97143-b1e3-43d9-b34b-cfcf3fba1820",
                    "SystemDiskSize": 50,
                    "InstanceTypeConfig": {
                        "Frequency": "2.5 GHz",
                        "InstanceType": "SN3ne.4XLARGE32",
                        "Vcpu": 16,
                        "InstanceFamilyConfig": {
                            "InstanceFamilyName": "Standard SN3ne",
                            "InstanceFamily": "SN3ne"
                        },
                        "InstanceFamilyTypeConfig": {
                            "InstanceFamilyTypeName": "Standard",
                            "InstanceFamilyType": "S"
                        },
                        "CpuModelName": "Intel Xeon Skylake 6133",
                        "Memory": 32,
                        "ExtInfo": ""
                    },
                    "RenewFlag": 0,
                    "VirtualPrivateCloud": {
                        "PrivateIpAddresses": [
                            "10.11.12.17"
                        ],
                        "VpcId": "vpc-95ytv1vr",
                        "AsVpcGateway": false,
                        "SubnetId": "subnet-fua8fff8",
                        "Ipv6AddressCount": 0
                    },
                    "IsolatedTime": "2020-09-27 16:12:24",
                    "InstanceName": "jiaxuan binhai server_do not delete 2",
                    "Position": {
                        "ZoneInfo": {
                            "ZoneId": 12000001,
                            "Zone": "ap-bhmini-ecm-1",
                            "ZoneName": "Tencent Binhai Zone"
                        },
                        "Country": {
                            "CountryName": "China",
                            "CountryId": "china"
                        },
                        "Area": {
                            "AreaName": "South China",
                            "AreaId": "china-south"
                        },
                        "Province": {
                            "ProvinceId": "china-south-guangdong",
                            "ProvinceName": "Guangdong"
                        },
                        "City": {
                            "CityName": "Shenzhen",
                            "CityId": "china-south-guangdong-shenzhen"
                        },
                        "RegionInfo": {
                            "RegionId": 0,
                            "Region": "ap-bhmini-ecm",
                            "RegionName": "Tencent Binhai Zone"
                        }
                    },
                    "CreateTime": "2020-09-27 16:12:24",
                    "Image": {
                        "SrcImage": {
                            "InstanceName": "",
                            "InstanceId": "",
                            "ImageOsName": "centos_test",
                            "ImageId": "img-test",
                            "ImageName": "centos",
                            "RegionID": 20,
                            "RegionName": "Shanghai",
                            "ImageType": "",
                            "ImageDescription": "info_test",
                            "Region": "ap-shanghai"
                        },
                        "ImageOsName": "CentOS 7.6 64-bit",
                        "ImageId": "img-9qabwvbn",
                        "Platform": "CentOS",
                        "ImageName": "CentOS 7.6 64-bit",
                        "ImageCreateTime": "",
                        "ImageOwner": 0,
                        "ImageSource": "OFFICIAL",
                        "ImageType": "PUBLIC_IMAGE",
                        "OsType": "linux",
                        "OsVersion": "7.6.0",
                        "ImageState": "NORMAL",
                        "ImageDescription": "CentOS 7.6 64-bit",
                        "Architecture": "x86_64",
                        "ImageSize": 50
                    },
                    "InstanceState": "RUNNING",
                    "Internet": {
                        "InstanceNetworkInfoSet": [
                            {
                                "Primary": true,
                                "NetworkInterfaceId": "eni-mhym6o89",
                                "NetworkInterfaceName": "ein-b6kee4dg Primary ENI",
                                "AddressInfoSet": [
                                    {
                                        "PublicIPAddressInfo": {
                                            "PublicIPAddress": "118.126.126.27",
                                            "ISP": {
                                                "ISPName": "China Telecom",
                                                "ISPId": "CTCC"
                                            },
                                            "MaxBandwidthOut": 105,
                                            "ChargeMode": "BANDWIDTH_PACKAGE",
                                            "MaxBandwidthIn": 0
                                        },
                                        "PrivateIPAddressInfo": {
                                            "PrivateIPAddress": "10.11.12.17"
                                        }
                                    }
                                ]
                            }
                        ],
                        "PrivateIPAddressSet": [
                            {
                                "PrivateIPAddress": "10.11.12.17"
                            }
                        ],
                        "PublicIPAddressSet": [
                            {
                                "PublicIPAddress": "118.126.126.27",
                                "ISP": {
                                    "ISPName": "China Telecom",
                                    "ISPId": "CTCC"
                                },
                                "MaxBandwidthOut": 105,
                                "ChargeMode": "BANDWIDTH_PACKAGE",
                                "MaxBandwidthIn": 0
                            }
                        ]
                    },
                    "NewFlag": 0,
                    "ExpireState": "NORMAL",
                    "PayMode": 0,
                    "LatestOperation": "ResetInstancesPassword"
                }
            ],
            "TotalCount": 15
        }
    }
    

    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
    AuthFailure.UnauthorizedOperation Authentication failed.
    FailedOperation.InternalOperationFailure Internal error.
    InvalidParameter.InvalidDataFormat The data format is incorrect.
    InvalidParameterValue.InvaildDescribeInstance Your input is incorrect, or you have no permission for the operation.
    InvalidParameterValue.InvaildPageParam The pagination parameter is invalid.
    InvalidParameterValue.InvalidFilter The filter is invalid.
    InvalidParameterValue.InvalidInstanceID The instance ID is invalid.
    InvalidParameterValue.InvalidOrderByField The sort field is invalid.
    InvalidParameterValue.ParameterValueTooLarge The parameter value exceeds the limit.
    ResourceNotFound.InstanceNotExist The instance is invalid.
    UnauthorizedOperation.ForbiddenOperation You don't have the permission to perform this operation.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support