tencent cloud

文档反馈

DescribeInstances

最后更新时间:2023-08-23 14:23:02

1. API Description

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

This API is used to query the list of instances.

A maximum of 1000 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-01-07.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Limit No Integer Number of returned results. Default value: 20. Maximum value: 100
Offset No Integer Record offset. Default value: 0
OrderBy No String Sort by field. Valid values:
  • CREATETIME: creation time
  • PERIODENDTIME: expiration time
  • OrderByType No String Sorting order. Valid values:
  • ASC: ascending
  • DESC: descending
  • Filters.N No Array of QueryFilter Filter. If more than one filter exists, the logical relationship between these filters is AND.
    DbType No String Engine type. Currently, MYSQL is supported.
    Status No String Instance status. Valid values:
    creating
    running
    isolating
    isolated
    activating: Removing the instance from isolation
    offlining: Eliminating the instance
    offlined: Instance eliminated
    InstanceIds.N No Array of String Instance ID list

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Number of instances
    InstanceSet Array of CynosdbInstance Instance list
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying the instance list

    This example shows you how to query the list of instances.

    Input Example

    POST / HTTP/1.1
    Host: cynosdb.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeInstances
    <Common request parameters>
    
    {
        "Limit": 0,
        "Offset": 0,
        "OrderBy": "abc",
        "OrderByType": "abc",
        "Filters": [
            {
                "Names": [
                    "abc"
                ],
                "Values": [
                    "abc"
                ],
                "ExactMatch": true,
                "Name": "abc",
                "Operator": "abc"
            }
        ],
        "DbType": "abc",
        "Status": "abc",
        "InstanceIds": [
            "abc"
        ]
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 0,
            "InstanceSet": [
                {
                    "Uin": "abc",
                    "AppId": 0,
                    "ClusterId": "abc",
                    "ClusterName": "abc",
                    "InstanceId": "abc",
                    "InstanceName": "abc",
                    "ProjectId": 0,
                    "Region": "abc",
                    "Zone": "abc",
                    "Status": "abc",
                    "StatusDesc": "abc",
                    "DbType": "abc",
                    "DbVersion": "abc",
                    "Cpu": 0,
                    "Memory": 0,
                    "Storage": 0,
                    "InstanceType": "abc",
                    "InstanceRole": "abc",
                    "UpdateTime": "2020-09-22 00:00:00",
                    "CreateTime": "2020-09-22 00:00:00",
                    "VpcId": "abc",
                    "SubnetId": "abc",
                    "Vip": "abc",
                    "Vport": 0,
                    "PayMode": 0,
                    "PeriodEndTime": "2020-09-22 00:00:00",
                    "DestroyDeadlineText": "abc",
                    "IsolateTime": "2020-09-22 00:00:00",
                    "NetType": 0,
                    "WanDomain": "abc",
                    "WanIP": "abc",
                    "WanPort": 0,
                    "WanStatus": "abc",
                    "DestroyTime": "abc",
                    "CynosVersion": "abc",
                    "ProcessingTask": "abc",
                    "RenewFlag": 0,
                    "MinCpu": 0,
                    "MaxCpu": 0,
                    "ServerlessStatus": "abc",
                    "StorageId": "abc",
                    "StoragePayMode": 0,
                    "PhysicalZone": "abc",
                    "BusinessType": "abc",
                    "Tasks": [
                        {
                            "TaskId": 0,
                            "TaskType": "abc",
                            "TaskStatus": "abc",
                            "ObjectId": "abc",
                            "ObjectType": "abc"
                        }
                    ],
                    "IsFreeze": "abc",
                    "ResourceTags": [
                        {
                            "TagKey": "abc",
                            "TagValue": "abc"
                        }
                    ],
                    "MasterZone": "abc",
                    "SlaveZones": [
                        "abc"
                    ],
                    "InstanceNetInfo": [
                        {
                            "InstanceGroupType": "abc",
                            "InstanceGroupId": "abc",
                            "VpcId": "abc",
                            "SubnetId": "abc",
                            "NetType": 0,
                            "Vip": "abc",
                            "Vport": 0,
                            "WanDomain": "abc",
                            "WanIP": "abc",
                            "WanPort": 0,
                            "WanStatus": "abc"
                        }
                    ]
                }
            ],
            "RequestId": "abc"
        }
    }
    

    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.CamCheckResourceError Failed to get permissions. Please try again later. If the problem persists, please contact customer service.
    FailedOperation.CamSigAndAuthError Authentication failed. Please try again later. If the problem persists, please contact customer service.
    FailedOperation.DatabaseAccessError Failed to access the database. Please try again later. If the problem persists, please contact customer service.
    InternalError.DbOperationFailed Failed to query the database.
    InternalError.InternalHttpServerError An exception occurred while executing the HTTP request.
    InternalError.SystemError Internal system error.
    InternalError.UnknownError Unknown internal error.
    InvalidParameter Parameter error.
    InvalidParameterValue.IllegalOrderBy Invalid sort by field.
    InvalidParameterValue.InvalidParameterValueError Invalid parameter value.
    InvalidParameterValue.ParamBothSetError These two parameters cannot be set at the same time.
    InvalidParameterValue.ParamError Incorrect parameter.
    UnauthorizedOperation.PermissionDenied CAM authentication failed.