tencent cloud

Cloud Virtual Machine

동향 및 공지
제품 동향
공용 이미지 업데이트 동향
운영 체제 공식 지원 종료 계획
제품 공지
제품 소개
CVM 개요
제품 장점
기본 개념
리전 및 가용존
신규 사용자 가이드
Service Regions and Service Providers
제품 요금
요금 개요
과금 방식
과금 항목
과금 방식 변경 개요
인스턴스 구매
사양 변경 요금 설명
연체 설명
빠른 시작
사용자 정의 Linux 인스턴스 구매
사용자 정의 Windows 인스턴스 구매
사용자 가이드
운영 가이드 개요
사용 제한 개요
인스턴스
스팟 인스턴스
예약 인스턴스
이미지
스토리지
백업 및 복구
네트워크
보안
비밀번호/키
모니터링 및 알람
운영 관리
편리한 기능
서버 마이그레이션
온라인 마이그레이션
마이그레이션 요금
장애 처리
CVM에 로그인할 수 없는 문제 처리 방법
Windows 인스턴스 로그인 관련 장애
Linux 인스턴스 로그인 관련 장애
기타 인스턴스 로그인 관련 장애
인스턴스 실행 장애
Linux 인스턴스 메모리 장애
네트워크 장애
실습 튜토리얼
CVM 선택 제안
환경 구축
웹사이트 구축
애플리케이션 구축
시각화 페이지 구축
로컬 파일을 CVM에 업로드
네트워크 성능 테스트
기타 실습 튜토리얼
API 참조
History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
보안 및 컴플라이언스
Cloud Access Management(CAM)
네트워크
자주 묻는 질문
리전 및 가용존 문제
요금
인스턴스 문제
스토리지 문제
이미지 관련 문제
서버 마이그레이션 관련 문제
네트워크 관련 문제
보안 관련 문제
운영 체제 관련 문제
운영 및 모니터링 관련 문제
CAM 관련 문제
NTP 서비스 관련 문제
적용 시나리오 관련 문제
Agreements
CVM Service Level Agreements
Red Hat Enterprise Linux Image Service Agreement
Public IP Service Level Agreement
용어집

DescribeInstances

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-12-17 11:22:37

1. API Description

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

This API is used to query the details of instances.

  • You can filter the query results with the instance ID, name, or billing method. See Filter for more information.
  • If no parameter is defined, a certain number of instances under the current account will be returned. The number is specified by Limit and is 20 by default.

A maximum of 40 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: 2017-03-12.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley, sa-saopaulo.
InstanceIds.N No Array of String Query by instance ID(s). For example, instance ID: ins-xxxxxxxx. For the specific format, refer to section Ids.N of the API Introduction. You can query up to 100 instances in each request. However, InstanceIds and Filters cannot be specified at the same time.
Filters.N No Array of Filter Filters
  • zone - String - Optional - Filter by the availability zone.
  • project-id - Integer - Optional - Filter by the project ID. You can query the list of created projects by calling DescribeProject or logging in to the CVM console. You can also call AddProject to create projects.
  • host-id - String - Optional - Filter by the CDH instance ID. Format: host-xxxxxxxx.

  • vpc-id - String - Optional - Filter by the VPC ID. Format: vpc-xxxxxxxx.
  • subnet-id - String - Optional - Filter by the subnet ID. Format: subnet-xxxxxxxx.

  • instance-id - String - Optional - Filter by the instance ID. Format: ins-xxxxxxxx.
    security-group-id - String - Optional - Filter by the security group ID. Format: sg-8jlk3f3r.
    instance-name - String - Optional - Filter by the instance name.
    instance-charge-type - String - Optional - Filter by the instance billing method. POSTPAID_BY_HOUR: pay-as-you-go | CDHPAID: You are only billed for CDH instances, not the CVMs running on the CDH instances.
    private-ip-address - String - Optional - Filter by the private IP address of the instance's primary ENI.
    public-ip-address - String - Optional - Filter by the public IP address of the instance's primary ENI, including the IP addresses automatically assigned during the instance creation and the EIPs manually associated after the instance creation.
  • tag-key - String - Optional - Filter by the tag key.

  • tag-value - String - Optional - Filter by the tag value.
  • tag:tag-key - String - Optional - Filter by the tag key-value pair. Replace tag-key with the actual tag keys. See example 2.

  • Each request can have up to 10 Filters and 5 Filters.Values. You cannot specify InstanceIds and Filters at the same time.
    Offset No Integer Offset; default value: 0. For more information on Offset, see the corresponding section in API Introduction.
    Limit No Integer Number of results returned; default value: 20; maximum: 100. For more information on Limit, see the corresponding section in API Introduction.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Number of instances meeting the filtering conditions.
    InstanceSet Array of Instance Detailed instance information.
    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 View Instance List

    This example shows you how to view instance information in Guangzhou Zone 3 or Guangzhou Zone 4 and limit return results to one.

    Input Example

    POST / HTTP/1.1
    Host: cvm.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeInstances
    <Common request parameters>
    
    {
        "Limit": 1,
        "Filters": [
            {
                "Values": [
                    "ap-guangzhou-3",
                    "ap-guangzhou-4"
                ],
                "Name": "zone"
            }
        ],
        "Offset": 0
    }

    Output Example

    {
        "Response": {
            "InstanceSet": [
                {
                    "RenewFlag": "NOTIFY_AND_MANUAL_RENEW",
                    "Uuid": "e85f1388-0422-410d-8e50-bef540e78c18",
                    "InstanceState": "RUNNING",
                    "DisableApiTermination": false,
                    "LatestOperationErrorMsg": "",
                    "DefaultLoginPort": 22,
                    "LicenseType": "TencentCloud",
                    "DefaultLoginUser": "root",
                    "LatestOperationState": "SUCCESS",
                    "LoginSettings": {
                        "KeyIds": [
                            "skey-b4vakk62"
                        ]
                    },
                    "IPv6Addresses": [
                        "2001:0db8:86a3:08d3:1319:8a2e:0370:7344"
                    ],
                    "DedicatedClusterId": "",
                    "RestrictState": "PROTECTIVELY_ISOLATED",
                    "ExpiredTime": "2020-09-22T00:00:00+00:00",
                    "DisasterRecoverGroupId": "",
                    "Memory": 1,
                    "CreatedTime": "2020-09-22T00:00:00+00:00",
                    "CPU": 1,
                    "RdmaIpAddresses": [],
                    "CamRoleName": "",
                    "PublicIpAddresses": [
                        "123.207.11.190"
                    ],
                    "Tags": [
                        {
                            "Key": "myKey",
                            "Value": "myValue"
                        }
                    ],
                    "InstanceId": "ins-xlsyru2j",
                    "ImageId": "img-8toqc6s3",
                    "StopChargingMode": "NOT_APPLICABLE",
                    "InstanceChargeType": "POSTPAID_BY_HOUR",
                    "InstanceType": "S2.SMALL2",
                    "SystemDisk": {
                        "DiskSize": 50,
                        "CdcId": "cdc-xxxxxxxx",
                        "DiskId": "disk-czsodtl1",
                        "DiskType": "CLOUD_SSD"
                    },
                    "Placement": {
                        "HostId": "host-h3m57oik",
                        "ProjectId": 1174660,
                        "HostIds": [],
                        "Zone": "ap-guangzhou-3"
                    },
                    "PrivateIpAddresses": [
                        "172.16.32.78"
                    ],
                    "OsName": "CentOS 7.4 64bit",
                    "SecurityGroupIds": [
                        "sg-p1ezv4wz"
                    ],
                    "InstanceName": "myInstance",
                    "DataDisks": [
                        {
                            "DeleteWithInstance": true,
                            "Encrypt": true,
                            "CdcId": "cdc-xxxxxxxx",
                            "DiskType": "CLOUD_SSD",
                            "ThroughputPerformance": 0,
                            "KmsKeyId": "b29c2f37-9f2d-11ef-8836-5254009ad364",
                            "DiskSize": 50,
                            "DiskId": "disk-bzsodtn1"
                        }
                    ],
                    "IsolatedSource": "NOTISOLATED",
                    "VirtualPrivateCloud": {
                        "SubnetId": "subnet-mv4sn55k",
                        "AsVpcGateway": false,
                        "Ipv6AddressCount": 1,
                        "VpcId": "vpc-m0cnatxj",
                        "PrivateIpAddresses": [
                            "172.16.3.59"
                        ]
                    },
                    "LatestOperationRequestId": "c7de1287-061d-4ace-8caf-6ad8e5a2f29a",
                    "InternetAccessible": {
                        "PublicIpAssigned": true,
                        "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                        "InternetMaxBandwidthOut": 1
                    },
                    "HpcClusterId": "",
                    "LatestOperation": "ResetInstancesType"
                }
            ],
            "TotalCount": 1,
            "RequestId": "d655191e-a39d-43d2-8349-8c3f2bf4b327"
        }
    }

    Example2 Querying the Latest Operation on an Instance

    This example shows you how to query the instance status after initiating StopInstances. You can check that the LatestOperation of the instance is StopInstances and the LatestOperationState is OPERATING using DescribeInstances.

    Input Example

    POST / HTTP/1.1
    Host: cvm.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeInstances
    <Common request parameters>
    
    {
        "Limit": 1,
        "Filters": [
            {
                "Values": [
                    "ap-guangzhou-3",
                    "ap-guangzhou-4"
                ],
                "Name": "zone"
            }
        ],
        "Offset": 0
    }

    Output Example

    {
        "Response": {
            "InstanceSet": [
                {
                    "RenewFlag": "NOTIFY_AND_MANUAL_RENEW",
                    "Uuid": "e85f1388-0422-410d-8e50-bef540e78c18",
                    "InstanceState": "RUNNING",
                    "DisableApiTermination": false,
                    "LatestOperationErrorMsg": "",
                    "DefaultLoginPort": 22,
                    "LicenseType": "TencentCloud",
                    "DefaultLoginUser": "root",
                    "LatestOperationState": "OPERATING",
                    "LoginSettings": {
                        "KeyIds": [
                            "skey-b4vakk62"
                        ]
                    },
                    "IPv6Addresses": [
                        "2001:0db8:86a3:08d3:1319:8a2e:0370:7344"
                    ],
                    "RestrictState": "PROTECTIVELY_ISOLATED",
                    "ExpiredTime": "2020-09-22T00:00:00+00:00",
                    "DisasterRecoverGroupId": "ps-xxxxxxxx",
                    "Memory": 1,
                    "CreatedTime": "2020-09-22T00:00:00+00:00",
                    "CPU": 1,
                    "RdmaIpAddresses": [],
                    "CamRoleName": "",
                    "DedicatedClusterId": "",
                    "PublicIpAddresses": [
                        "123.207.11.190"
                    ],
                    "Tags": [
                        {
                            "Key": "city",
                            "Value": "shenzhen"
                        }
                    ],
                    "InstanceId": "ins-xlsyru2j",
                    "ImageId": "img-8toqc6s3",
                    "StopChargingMode": "NOT_APPLICABLE",
                    "InstanceChargeType": "POSTPAID_BY_HOUR",
                    "InstanceType": "S2.SMALL2",
                    "SystemDisk": {
                        "DiskSize": 50,
                        "CdcId": "cdc-xxxxxxxx",
                        "DiskId": "disk-czsodtl1",
                        "DiskType": "CLOUD_SSD"
                    },
                    "Placement": {
                        "HostId": "host-h3m57oik",
                        "ProjectId": 1174660,
                        "HostIds": [],
                        "Zone": "ap-guangzhou-3"
                    },
                    "PrivateIpAddresses": [
                        "172.16.32.78"
                    ],
                    "OsName": "CentOS 7.4 64bit",
                    "SecurityGroupIds": [
                        "sg-p1ezv4wz"
                    ],
                    "InstanceName": "myInstance",
                    "DataDisks": [
                        {
                            "DeleteWithInstance": true,
                            "Encrypt": true,
                            "CdcId": "cdc-xxxxxxxx",
                            "DiskType": "CLOUD_SSD",
                            "ThroughputPerformance": 0,
                            "KmsKeyId": "b29c2f37-9f2d-11ef-8836-5254009ad364",
                            "DiskSize": 50,
                            "DiskId": "disk-bzsodtn1"
                        }
                    ],
                    "IsolatedSource": "NOTISOLATED",
                    "VirtualPrivateCloud": {
                        "SubnetId": "subnet-mv4sn55k",
                        "AsVpcGateway": false,
                        "Ipv6AddressCount": 1,
                        "VpcId": "vpc-m0cnatxj",
                        "PrivateIpAddresses": [
                            "172.16.3.59"
                        ]
                    },
                    "LatestOperationRequestId": "c7de1287-061d-4ace-8caf-6ad8e5a2f29a",
                    "InternetAccessible": {
                        "PublicIpAssigned": true,
                        "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                        "InternetMaxBandwidthOut": 1
                    },
                    "HpcClusterId": "",
                    "LatestOperation": "StopInstances"
                }
            ],
            "TotalCount": 1,
            "RequestId": "d655191e-a39d-43d2-8349-8c3f2bf4b327"
        }
    }

    Example3 Querying Instances Bound to Tags

    This example shows you how to query instances bound with the tag key-value pair (city:shenzhen).

    Input Example

    POST / HTTP/1.1
    Host: cvm.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeInstances
    <Common request parameters>
    
    {
        "Limit": 1,
        "Filters": [
            {
                "Values": [
                    "shenzhen"
                ],
                "Name": "tag:city"
            }
        ],
        "Offset": 0
    }

    Output Example

    {
        "Response": {
            "InstanceSet": [
                {
                    "RenewFlag": "NOTIFY_AND_MANUAL_RENEW",
                    "Uuid": "68b510db-b4c1-4630-a62b-73d0c7c970f9",
                    "InstanceState": "RUNNING",
                    "DisableApiTermination": false,
                    "LatestOperationErrorMsg": "",
                    "DefaultLoginPort": 22,
                    "LicenseType": "TencentCloud",
                    "DefaultLoginUser": "root",
                    "LatestOperationState": "SUCCESS",
                    "OsName": "CentOS 7.6 64bit",
                    "CreatedTime": "2020-03-10T02:43:51Z",
                    "RestrictState": "NORMAL",
                    "ExpiredTime": "2020-04-10T02:47:36Z",
                    "DisasterRecoverGroupId": "",
                    "Memory": 1,
                    "IPv6Addresses": [
                        "fd76:3600:71e:7800:6:461d:4e8:3add"
                    ],
                    "CPU": 1,
                    "CamRoleName": "",
                    "PublicIpAddresses": [
                        "123.207.11.190"
                    ],
                    "Tags": [
                        {
                            "Key": "city",
                            "Value": "shenzhen"
                        }
                    ],
                    "InstanceId": "ins-9bxebleo",
                    "ImageId": "img-9qabwvbn",
                    "StopChargingMode": "NOT_APPLICABLE",
                    "InstanceChargeType": "PREPAID",
                    "InstanceType": "S1.SMALL1",
                    "SystemDisk": {
                        "DiskSize": 50,
                        "DiskId": "disk-nucurerk",
                        "DiskType": "CLOUD_PREMIUM"
                    },
                    "IsolatedSource": "NOTISOLATED",
                    "Placement": {
                        "ProjectId": 1174660,
                        "Zone": "ap-guangzhou-3"
                    },
                    "PrivateIpAddresses": [
                        "172.16.32.78"
                    ],
                    "LoginSettings": {
                        "KeyIds": [
                            "skey-0lqrhzz1"
                        ]
                    },
                    "SecurityGroupIds": [
                        "sg-p1ezv4wz"
                    ],
                    "DedicatedClusterId": "",
                    "InstanceName": "Test instance",
                    "DataDisks": [],
                    "VirtualPrivateCloud": {
                        "Ipv6AddressCount": 1,
                        "PrivateIpAddresses": [
                            "172.16.3.59"
                        ],
                        "SubnetId": "subnet-a2676p0e",
                        "AsVpcGateway": false,
                        "VpcId": "vpc-g7wzcv7n"
                    },
                    "LatestOperationRequestId": "3554eb5b-1cfa-471a-ae76-dc436c9d43e8",
                    "InternetAccessible": {
                        "InternetMaxBandwidthOut": 1,
                        "InternetChargeType": "BANDWIDTH_PREPAID"
                    },
                    "RdmaIpAddresses": [],
                    "HpcClusterId": "",
                    "LatestOperation": "RenewInstances"
                }
            ],
            "TotalCount": 1,
            "RequestId": "62DDFFC6-FDB5-44F7-20A6-59152E3D129A"
        }
    }

    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
    FailedOperation.IllegalTagKey The tag key contains invalid characters.
    FailedOperation.IllegalTagValue The tag value contains invalid characters.
    FailedOperation.TagKeyReserved The tag key specified in the request is reserved for the system.
    InternalServerError Internal error.
    InvalidFilter Invalid filter.
    InvalidFilterValue.LimitExceeded The value of Filter exceeds the limit.
    InvalidHostId.Malformed Invalid CDH ID. The specified CDH ID has an invalid format. For example, host-1122 has an invalid ID length.
    InvalidInstanceId.Malformed Invalid instance ID. The specified instance ID has an invalid format. For example, ins-1122 has an invalid ID length.
    InvalidParameter A parameter error occurred.
    InvalidParameterValue Incorrect parameter value.
    InvalidParameterValue.IPAddressMalformed Invalid IP format
    InvalidParameterValue.IPv6AddressMalformed Invalid IPv6 address
    InvalidParameterValue.InstanceIdMalformed Invalid instance ID. Please enter a valid ID, such as ins-xxxxxxxx (“x” represents a lower-case letter or a number).
    InvalidParameterValue.InvalidAppIdFormat Invalid AppID
    InvalidParameterValue.InvalidIpFormat Invalid IP address.
    InvalidParameterValue.InvalidTimeFormat Incorrect time format.
    InvalidParameterValue.InvalidVagueName Invalid fuzzy query string
    InvalidParameterValue.LimitExceeded The number of parameter values exceeds the limit.
    InvalidParameterValue.SubnetIdMalformed Invalid subnet ID. Please provide a subnet ID in the format of subnet-xxxxxxxx, where “x” can be a lowercase letter or number.
    InvalidParameterValue.TagKeyNotFound The specified tag does not exist
    InvalidParameterValue.UuidMalformed Invalid UUID.
    InvalidParameterValue.VpcIdMalformed The VPC ID xxx is invalid. Please provide a VPC ID in the format of vpc-xxxxxxxx, where “x” can be a lowercase letter or number.
    InvalidSecurityGroupId.NotFound The specified security group ID does not exist.
    InvalidSgId.Malformed The specified security group ID is in the wrong format. For example, sg-ide32 has an invalid instance ID length.
    InvalidZone.MismatchRegion The specified zone does not exist.
    ResourceNotFound.HpcCluster The HPC cluster does not exist.
    UnauthorizedOperation.InvalidToken Check if the token is valid.
    UnsupportedOperation Unsupported operation.

    도움말 및 지원

    문제 해결에 도움이 되었나요?

    피드백