DescribeInstances

Last updated: 2019-12-05 19:07:37

PDF

1. API Description

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

This API is used to query the list of Redis instances.

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

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: redis.ap-shanghai-fsi.tencentcloudapi.com

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 parameter. The value used for this API: DescribeInstances
Version Yes String Common parameter. The value used for this API: 2018-04-12
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
Limit No Integer Instance list size. Default value: 20
Offset No Integer Offset, which is an integral multiple of Limit
InstanceId No String Instance ID, such as crs-6ubhgouj
OrderBy No String Enumerated values: projectId, createtime, instancename, type, curDeadline
OrderType No Integer 1: reverse; 0: sequential; reverse by default
VpcIds.N No Array of String Array of VPC IDs such as 47525. The array subscript starts from 0. If this parameter is not passed in, the basic network will be selected by default
SubnetIds.N No Array of String Array of subnet IDs such as 56854. The array subscript starts from 0
ProjectIds.N No Array of Integer Array of project IDs. The array subscript starts from 0
SearchKey No String ID of the instance to be searched for.
InstanceName No String Instance name
UniqVpcIds.N No Array of String Array of VPC IDs such as vpc-sad23jfdfk. The array subscript starts from 0. If this parameter is not passed in, the basic network will be selected by default
UniqSubnetIds.N No Array of String Array of subnet IDs such as subnet-fdj24n34j2. The array subscript starts from 0
RegionIds.N No Array of Integer Region ID, which has already been disused. The corresponding region can be queried through the common parameter Region
Status.N No Array of Integer Instance status. 0: to be initialized; 1: in process; 2: running; -2: isolated; -3: to be deleted
TypeVersion No Integer Type edition. 1: standalone edition; 2: master-slave edition; 3: cluster edition
EngineName No String Engine information: Redis-2.8, Redis-4.0, CKV
AutoRenew.N No Array of Integer Renewal mode. 0: default status (manual renewal); 1: auto-renewal enabled; 2: auto-renewal disabled
BillingMode No String Billing method. postpaid: pay-as-you-go; prepaid: monthly subscription
Type No Integer Instance type. 1: legacy Redis cluster edition; 2: Redis 2.8 master-slave edition; 3: CKV master-slave edition; 4: CKV cluster edition; 5: Redis 2.8 standalone edition; 6: Redis 4.0 master-slave edition; 7: Redis 4.0 cluster edition
SearchKeys.N No Array of String Search keywords, which can be instance ID, instance name, or complete IP

3. Output Parameters

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

4. Example

Example1 Request Sample

Input Example

https://redis.tencentcloudapi.com/?Action=DescribeInstances
&Offset=0&Limit=1
&<Common request parameter>

Output Example

{
  "Response": {
    "InstanceSet": [
      {
        "Appid": 1251006373,
        "AutoRenewFlag": 0,
        "BillingMode": 0,
        "CloseTime": "0000-00-00 00:00:00",
        "Createtime": "0000-00-00 00:00:00",
        "DeadlineTime": "0000-00-00 00:00:00",
        "Engine": "Redis community edition",
        "InstanceId": "crs-7ponppu3",
        "InstanceName": "crs-7ponppu3",
        "InstanceNode": [],
        "InstanceTags": [
          {
            "TagKey": "aaa",
            "TagValue": "111"
          }
        ],
        "InstanceTitle": "Instance running",
        "OfflineTime": "",
        "Port": 6379,
        "PriceId": 13380,
        "ProductType": "Redis 4.0 cluster edition",
        "ProjectId": 0,
        "RedisReplicasNum": 1,
        "RedisShardNum": 3,
        "RedisShardSize": 1024,
        "RegionId": 1,
        "Size": 3072,
        "SizeUsed": 0,
        "SlaveReadWeight": 0,
        "Status": 2,
        "SubStatus": 19,
        "SubnetId": 0,
        "Tags": [],
        "Type": 7,
        "UniqSubnetId": "",
        "UniqVpcId": "",
        "VpcId": 0,
        "WanIp": "10.66.153.160",
        "ZoneId": 100002
      }
    ],
    "RequestId": "e3d683fc-f2ff-43c9-980d-fae7a1166abc",
    "TotalCount": 1
  }
}

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

SDK

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

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError.DbOperationFailed Internal system error with the database operation, which may be update, insert, select, etc.
InvalidParameter Invalid parameter.
InvalidParameter.EmptyParam The parameter is empty.
InvalidParameter.InvalidParameter Invalid service parameter.
InvalidParameter.PermissionDenied The API has no CAM permissions.
UnauthorizedOperation.NoCAMAuthed No CAM permissions.