tencent cloud

Feedback

DescribeInstances

Last updated: 2022-08-11 11:01:26

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 50 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: 2018-04-12.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Limit No Integer Size of the instance list. If no value is specified for this parameter, it will be 20 by default. If the specified value is greater than the DescribeInstancesPageLimit configuration item in the specific configuration file etc/conf/component.properties (which is 1,000 by default if the configuration cannot be read), then the configuration item shall prevail.
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 classic 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 classic 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-Replica 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 mode. postpaid: pay-as-you-go; prepaid: monthly subscription
Type No Integer Instance type. 1: legacy Redis Cluster Edition, 2: Redis 2.8 Master-Replica Edition, 3: CKV Master-Replica Edition, 4: CKV Cluster Edition, 5: Redis 2.8 Standalone Edition, 6: Redis 4.0 Master-Replica Edition, 7: Redis 4.0 Cluster Edition, 8: Redis 5.0 Master-Replica Edition, 9: Redis 5.0 Cluster Edition
SearchKeys.N No Array of String Search keywords, which can be instance ID, instance name, or complete IP.
TypeList.N No Array of Integer Internal parameter, which can be ignored.
MonitorVersion No String Internal parameter, which can be ignored.
InstanceTags.N No Array of InstanceTagInfo Filters resources by tag key and value. If this parameter is not specified or is an empty array, resources will not be filtered.
TagKeys.N No Array of String Filters resources by tag key. If this parameter is not specified or is an empty array, resources will not be filtered.

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 Sample request

Input Example

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

Output Example

{
  "Response": {
    "InstanceSet": [
      {
        "RedisShardSize": 1024,
        "RedisShardNum": 3,
        "MonitorVersion": "xx",
        "AutoRenewFlag": 0,
        "InstanceTitle": "xx",
        "ProductType": "xx",
        "PriceId": 13380,
        "Type": 7,
        "Status": 2,
        "Vip6": "xx",
        "VpcId": 0,
        "InstanceNode": [
          {
            "InstanceClusterNode": [
              {
                "Status": 0,
                "Name": "xx",
                "Keys": 0,
                "Storage": 0,
                "StorageSlope": 0.0,
                "QpsSlope": 0.0,
                "Connected": 0,
                "RunId": "xx",
                "DownTime": "xx",
                "Qps": 0,
                "Slots": "xx",
                "CreateTime": "xx",
                "Role": 0
              }
            ],
            "Id": 0
          }
        ],
        "Tags": [
          "xx"
        ],
        "InstanceId": "xx",
        "ClientLimitMax": 0,
        "RegionId": 1,
        "SubStatus": 19,
        "SlaveReadWeight": 0,
        "OfflineTime": "xx",
        "SubnetId": 0,
        "NodeSet": [
          {
            "ZoneName": "xx",
            "NodeType": 0,
            "NodeId": 0,
            "ZoneId": 1
          }
        ],
        "Engine": "xx",
        "SizeUsed": 0.0,
        "InstanceTags": [
          {
            "TagKey": "xx",
            "TagValue": "xx"
          }
        ],
        "ProjectId": 0,
        "Region": "xx",
        "DeadlineTime": "xx",
        "CloseTime": "xx",
        "ZoneId": 100002,
        "PasswordFree": 0,
        "DiskSize": 0,
        "NoAuth": true,
        "Appid": 1251006373,
        "WanIp": "xx",
        "NetLimit": 0,
        "InstanceName": "xx",
        "Createtime": "xx",
        "ClientLimit": 0,
        "UniqVpcId": "xx",
        "DtsStatus": 0,
        "ProjectName": "xx",
        "BillingMode": 0,
        "RemainBandwidthDuration": "xx",
        "ReadOnly": 0,
        "UniqSubnetId": "xx",
        "ClientLimitMin": 0,
        "RedisReplicasNum": 1,
        "Port": 6379,
        "Size": 0.0
      }
    ],
    "TotalCount": 1,
    "RequestId": "xx"
  }
}

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.SystemError Internal system error, which is irrelevant to the business.
FailedOperation.Unknown Invalid data is entered for weekday.
InternalError.DbOperationFailed Internal system error with the database operation, which may be update, insert, select, etc.
InvalidParameter Incorrect 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.
UnsupportedOperation The operation is not supported.
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