All Products
Search
Document Center

Tair:DescribeInstances

Last Updated:Aug 25, 2023

Queries the information about one or more ApsaraDB for Redis instances.

debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

debugging

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
kvstore:DescribeInstancesREAD
  • Redis
    acs:kvstore:{#regionId}:{#accountId}:instance/*
  • Redis
    acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the instance.

Note When you call this operation and specify the Tag parameter, you must also specify this parameter.
cn-hangzhou
InstanceIdsstringNo

The ID of the instance.

Note If you specify multiple instance IDs, separate these IDs with commas (,).
r-bp1zxszhcgatnx****
InstanceStatusstringNo

The state of the instance. Valid values:

  • Normal: The instance is normal.
  • Creating: The instance is being created.
  • Changing: The configurations of the instance are being changed.
  • Inactive: The instance is disabled.
  • Flushing: The instance is being released.
  • Released: The instance is released.
  • Transforming: The billing method of the instance is being changed.
  • Unavailable: The instance is suspended.
  • Error: The instance failed to be created.
  • Migrating: The instance is being migrated.
  • BackupRecovering: The instance is being restored from a backup.
  • MinorVersionUpgrading: The minor version of the instance is being updated.
  • NetworkModifying: The network type of the instance is being changed.
  • SSLModifying: The SSL certificate of the instance is being changed.
  • MajorVersionUpgrading: The major version of the instance is being upgraded. The instance remains accessible during the upgrade.
Note For more information about instance states, see Instance states and impacts.
Normal
ChargeTypestringNo

The billing method of the instance. Valid values:

  • PrePaid: subscription
  • PostPaid: pay-as-you-go
PostPaid
NetworkTypestringNo

The network type of the instance. Valid values:

  • CLASSIC: classic network
  • VPC: Virtual Private Cloud (VPC)
CLASSIC
EngineVersionstringNo

The database engine version of the instance. Valid values: 2.8, 4.0, 5.0, and 6.0.

Enumeration Value:
  • 1.0
  • 2.8
  • 4.0
  • 5.0
  • 6.0
  • 7.0
4.0
InstanceClassstringNo

The instance type of the instance. For more information, see Instance types.

redis.master.small.default
VpcIdstringNo

The ID of the VPC.

vpc-bp1nme44gek34slfc****
VSwitchIdstringNo

The ID of the vSwitch.

vsw-bp1e7clcw529l773d****
PageNumberintegerNo

The number of the page to return. Pages start from page 1. Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page. Maximum value: 50. Default value: 10.

10
InstanceTypestringNo

The database engine of the instance. Valid values:

  • Tair
  • Redis
  • Memcache
Redis
SearchKeystringNo

The keyword used for fuzzy search. The keyword can be based on an instance name or an instance ID.

apitest
ArchitectureTypestringNo

The architecture of the instance. Valid values:

  • cluster: cluster architecture
  • standard: standard architecture
  • rwsplit: read/write splitting architecture
standard
ExpiredstringNo

Specifies whether the instance has expired. Valid values:

  • true: The instance has expired.
  • false: The instance has not expired.
false
ZoneIdstringNo

The zone ID of the instance.

cn-hongkong-b
ResourceGroupIdstringNo

The ID of the resource group to which the instance belongs.

Note You can query resource group IDs by using the ApsaraDB for Redis console or by calling the ListResourceGroups operation. For more information, see View basic information of a resource group.
rg-acfmyiu4ekp****
GlobalInstancebooleanNo

Specifies whether to return the child instances of distributed instances. Valid values:

  • true: Only child instances are returned.
  • false: Child instances are not returned.
true
EditionTypestringNo

The edition of the instance. Valid values:

  • Community: Community Edition
  • Enterprise: Enhance Edition (Tair)
Enterprise
PrivateIpstringNo

The private IP address of the instance.

172.16.49.***
Tagobject []No

The tags of the instance.

KeystringNo

The key of the tag. A tag is a key-value pair.

Note A maximum of five key-value pairs can be specified at a time.
Storage type
ValuestringNo

The value of the tag. A tag is a key-value pair.

Local disk

Response parameters

ParameterTypeDescriptionExample
object

The object.

RequestIdstring

The ID of the request.

1E83311F-0EE4-4922-A3BF-730B312B****
PageNumberinteger

The page number of the returned page.

1
PageSizeinteger

The number of entries returned per page.

30
TotalCountinteger

The total number of instances.

1
Instancesobject []

Details of the instances.

VpcIdstring

The ID of the VPC.

vpc-bp1nme44gek34slfc****
PrivateIpstring

The private IP address of the instance.

Note This parameter is not returned when the instance is deployed in the classic network.
172.16.49.***
Capacitylong

The storage capacity of the instance. Unit: MB.

4096
ReplacateIdstring

The logical ID of the replica instance.

grr-bp11381ebc16****
CreateTimestring

The time when the instance was created.

2018-11-07T08:49:00Z
ConnectionDomainstring

The internal endpoint of the instance.

r-bp1zxszhcgatnx****.redis.rds.aliyuncs.com
IsRdsboolean

Indicates whether the instance is managed by ApsaraDB RDS. Valid values:

  • true: The instance is managed by ApsaraDB RDS.
  • false: The instance is not managed by ApsaraDB RDS.
true
ChargeTypestring

The billing method of the instance. Valid values:

  • PrePaid: subscription
  • PostPaid: pay-as-you-go
PostPaid
ArchitectureTypestring

The architecture of the instance. Default value: NULL. Valid values:

  • cluster: The instance is a cluster instance.
  • standard: The instance is a standard instance.
  • rwsplit: The instance is a read/write splitting instance.
  • NULL: The instance can be a cluster, standard, or read/write splitting instance.
cluster
NetworkTypestring

The network type of the instance. Valid values:

  • CLASSIC: classic network
  • VPC: VPC
CLASSIC
ConnectionModestring

The connection mode of the instance. Valid values:

  • Standard: standard mode
  • Safe: proxy mode
Standard
Portlong

The port number of the instance.

6379
SecondaryZoneIdstring

The ID of the secondary zone.

Note If multiple zones are returned for ZoneId such as cn-hangzhou-MAZ10(h,i), this parameter is ignored.
cn-hangzhou-h
EngineVersionstring

The database engine version of the instance. Valid values: 2.8, 4.0, 5.0, and 6.0.

4.0
PackageTypestring

The plan type of the instance. Valid values:

  • standard: standard plan
  • customized: custom plan
standard
Configstring

The parameter configurations of the instance. For more information, see Modify parameters of an instance.

{\"maxmemory-policy\":\"volatile-lfu\",\"EvictionPolicy\":\"volatile-lru\",\"hash-max-ziplist-entries\":512,\"zset-max-ziplist-entries\":128,\"zset-max-ziplist-value\":64,\"set-max-intset-entries\":512,\"hash-max-ziplist-value\":64,\"#no_loose_disabled-commands\":\"flushall,flushdb\",\"lazyfree-lazy-eviction\":\"yes\"}
Bandwidthlong

The bandwidth of the instance. Unit: Mbit/s.

96
InstanceNamestring

The name of the instance.

apitest
ShardCountinteger

The number of data shards in the instance.

Note This parameter is returned only when the instance is a cluster instance that uses cloud disks.
3
UserNamestring

The username that is used to connect to the instance. By default, the username that is named after the instance ID is returned.

r-bp1zxszhcgatnx****
GlobalInstanceIdstring

The ID of the distributed instance.

Note This parameter is returned only when the instance is a child instance of a distributed instance.
gr-bp14rkqrhac****
QPSlong

The expected maximum queries per second (QPS).

100000
InstanceClassstring

The instance class of the instance.

redis.logic.sharding.2g.2db.0rodb.4proxy.default
DestroyTimestring

The time when the instance was deleted.

2019-04-28T10:03:01Z
InstanceIdstring

The ID of the instance.

r-bp1zxszhcgatnx****
InstanceTypestring

The database engine of the instance. Valid values:

  • Tair
  • Redis
  • Memcache
Redis
HasRenewChangeOrderboolean

Indicates whether your Alibaba Cloud account has pending orders for renewal and configuration change. Valid values:

  • true: Your Alibaba Cloud account has pending orders for renewal and configuration change.
  • false: Your Alibaba Cloud account does not have pending orders for renewal and configuration change.
false
RegionIdstring

The region ID of the instance.

cn-hangzhou
EndTimestring

The time when the subscription instance expires.

2019-06-13T16:00:00Z
VSwitchIdstring

The ID of the vSwitch.

vsw-bp1e7clcw529l773d****
NodeTypestring

The node type. Valid values:

  • double: The instance contains a master node and a replica node.
  • single: The instance contains only a master node. This node type is phrased out.
double
Connectionslong

The maximum number of connections supported by the instance.

20000
ResourceGroupIdstring

The ID of the resource group to which the instance belongs.

rg-acfmyiu4ekp****
ZoneIdstring

The zone ID of the instance.

cn-hangzhou-b
InstanceStatusstring

The state of the instance. Valid values:

  • Normal: The instance is normal.
  • Creating: The instance is being created.
  • Changing: The configurations of the instance are being changed.
  • Inactive: The instance is disabled.
  • Flushing: The instance is being released.
  • Released: The instance is released.
  • Transforming: The billing method of the instance is being changed.
  • Unavailable: The instance is suspended.
  • Error: The instance failed to be created.
  • Migrating: The instance is being migrated.
  • BackupRecovering: The instance is being restored from a backup.
  • MinorVersionUpgrading: The minor version of the instance is being updated.
  • NetworkModifying: The network type of the instance is being changed.
  • SSLModifying: The SSL certificate of the instance is being changed.
  • MajorVersionUpgrading: The major version of the instance is being upgraded. The instance remains accessible during the upgrade.
Normal
CloudTypestring

This parameter is returned only when the instance is in a cloud box.

cloudbox
EditionTypestring

The edition of the instance. Valid values:

  • Community: Community Edition
  • Enterprise: Enhance Edition (Tair)
Enterprise
Tagsobject []

Details of the tags.

Keystring

The key of the tag.

key1
Valuestring

The value of the tag.

value1
ShardClassstring

The shard class for the instance.

redis.shard.small.ce

Examples

Sample success responses

JSONformat

{
  "RequestId": "1E83311F-0EE4-4922-A3BF-730B312B****",
  "PageNumber": 1,
  "PageSize": 30,
  "TotalCount": 1,
  "Instances": {
    "KVStoreInstance": [
      {
        "VpcId": "vpc-bp1nme44gek34slfc****",
        "PrivateIp": "172.16.49.***",
        "Capacity": 4096,
        "ReplacateId": "grr-bp11381ebc16****",
        "CreateTime": "2018-11-07T08:49:00Z",
        "ConnectionDomain": "r-bp1zxszhcgatnx****.redis.rds.aliyuncs.com",
        "IsRds": true,
        "ChargeType": "PostPaid",
        "ArchitectureType": "cluster",
        "NetworkType": "CLASSIC",
        "ConnectionMode": "Standard",
        "Port": 6379,
        "SecondaryZoneId": "cn-hangzhou-h",
        "EngineVersion": "4.0",
        "PackageType": "standard",
        "Config": "{\\\"maxmemory-policy\\\":\\\"volatile-lfu\\\",\\\"EvictionPolicy\\\":\\\"volatile-lru\\\",\\\"hash-max-ziplist-entries\\\":512,\\\"zset-max-ziplist-entries\\\":128,\\\"zset-max-ziplist-value\\\":64,\\\"set-max-intset-entries\\\":512,\\\"hash-max-ziplist-value\\\":64,\\\"#no_loose_disabled-commands\\\":\\\"flushall,flushdb\\\",\\\"lazyfree-lazy-eviction\\\":\\\"yes\\\"}",
        "Bandwidth": 96,
        "InstanceName": "apitest",
        "ShardCount": 3,
        "UserName": "r-bp1zxszhcgatnx****",
        "GlobalInstanceId": "gr-bp14rkqrhac****",
        "QPS": 100000,
        "InstanceClass": "redis.logic.sharding.2g.2db.0rodb.4proxy.default",
        "DestroyTime": "2019-04-28T10:03:01Z",
        "InstanceId": "r-bp1zxszhcgatnx****",
        "InstanceType": "Redis",
        "HasRenewChangeOrder": false,
        "RegionId": "cn-hangzhou",
        "EndTime": "2019-06-13T16:00:00Z",
        "VSwitchId": "vsw-bp1e7clcw529l773d****",
        "NodeType": "double",
        "Connections": 20000,
        "ResourceGroupId": "rg-acfmyiu4ekp****",
        "ZoneId": "cn-hangzhou-b",
        "InstanceStatus": "Normal",
        "CloudType": "cloudbox",
        "EditionType": "Enterprise",
        "Tags": {
          "Tag": [
            {
              "Key": "key1",
              "Value": "value1"
            }
          ]
        },
        "ShardClass": "redis.shard.small.ce"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError message
400InvalidInstanceIds.MalformedThe Specified parameter InstanceIds is not valid.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-04-13The error codes of the API operation change.,The response structure of the API operation changes.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
Output ParametersThe response structure of the API operation changes.
2022-03-07The error codes of the API operation change.,The response structure of the API operation changes.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
Output ParametersThe response structure of the API operation changes.
2022-03-07The error codes of the API operation change.,The response structure of the API operation changes.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
Output ParametersThe response structure of the API operation changes.