DescribeInstances

Updated at:

Queries the information of one or more ApsaraDB for Tair (Redis OSS-compatible) database instances.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

kvstore:DescribeInstances

list

DBInstance

acs:kvstore:{#regionId}:{#accountId}:instance/*

DBInstance

acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID of the instance.

Note

When you call this operation, if the Tag parameter is specified, this parameter is required.

cn-hangzhou

InstanceIds

string

No

The IDs of the instances to query.

Note

To specify multiple instance IDs, separate the IDs with commas (,). You can specify up to 30 instance IDs in a single request.

r-bp1zxszhcgatnx****

InstanceStatus

string

No

The instance status. Valid values:

  • Normal: normal

  • Creating: creating

  • Changing: changing

  • Inactive: disabled

  • Flushing: purge

  • Released: released

  • Transforming: transforming

  • Migrating: migrating

  • BackupRecovering: recovering from a backup

  • MinorVersionUpgrading: minor version upgrade in progress

  • NetworkModifying: modifying the network

  • SSLModifying: modifying SSL settings

  • MajorVersionUpgrading: major engine version upgrade in progress. The instance remains accessible.

Note

For more information about instance states and impacts, see Instance states and impacts.

Normal

ChargeType

string

No

The billing method. Valid values:

  • PrePaid: subscription

  • PostPaid: pay-as-you-go

Valid values:

  • PrePaid
  • PostPaid

PostPaid

NetworkType

string

No

The network type. Valid values:

  • CLASSIC: classic network

  • VPC: VPC

Valid values:

  • CLASSIC
  • VPC

CLASSIC

EngineVersion

string

No

The Redis-compatible engine version of the instance. Valid values: 2.8, 4.0, 5.0, 6.0, and 7.0.

Valid values:

  • 1.0
  • 2.8
  • 4.0
  • 5.0
  • 6.0
  • 7.0
  • 8.1

4.0

InstanceClass

string

No

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

redis.master.small.default

VpcId

string

No

The VPC ID.

vpc-bp1nme44gek34slfc****

VSwitchId

string

No

The vSwitch ID.

vsw-bp1e7clcw529l773d****

PageNumber

integer

No

The page number of the instance list. Pages start from 1. Default value: 1.

1

PageSize

integer

No

The number of entries per page. Maximum value: 50. Default value: 30.

30

InstanceType

string

No

The instance type. Valid values:

  • Tair: Tair Enterprise Edition

  • Redis: open-source Redis

  • Memcache

Valid values:

  • Redis
  • Memcache
  • tair_essd
  • tair_scm
  • Tair
  • tair_rdb
  • tair_skv
  • TairAssistant

Redis

SearchKey

string

No

The keyword used for fuzzy search by instance name or instance ID.

apitest

ArchitectureType

string

No

The architecture type. Valid values:

  • cluster: cluster architecture

  • standard: standard architecture

  • rwsplit: read/write splitting architecture

standard

Expired

string

No

The expiration status of the instance. Valid values:

  • true: expired

  • false: not expired

false

ZoneId

string

No

The zone ID.

cn-hongkong-b

ResourceGroupId

string

No

The resource group ID.

Note

You can invoke the ListResourceGroups operation or use the console to obtain the resource group ID list. For related operations, see View the basic information of a resource group.

rg-acfmyiu4ekp****

GlobalInstance

boolean

No

Specifies whether to filter child instances of distributed instances in the returned instance list. Valid values:

  • true: Returns only child instance information.

  • false: Does not return child instance information.

true

EditionType

string

No

The edition type. Valid values:

  • Community: open-source Redis

  • Enterprise: Tair Enterprise Edition

Valid values:

  • Enterprise
  • Community

Enterprise

PrivateIp

string

No

The private IP address.

172.16.49.***

Tag

array<object>

No

The tag information of the instance.

object

No

The tag.

Value

string

No

The tag value, which forms a key-value pair with the tag key.

Development

Key

string

No

The tag key, which forms a key-value pair with the tag value.

Note

You can specify up to 5 tag key-value pairs in a single request.

Storage type

NodeType

string

No

The node type. Valid values:

  • MASTER_SLAVE: high-availability (dual-replica)

  • STAND_ALONE: single-replica

  • double: dual-replica

  • single: single-replica

Note

For cloud-native instances, select MASTER_SLAVE or STAND_ALONE. For classic instances, select double or single.

Valid values:

  • STAND_ALONE
  • MASTER_SLAVE
  • double
  • single

MASTER_SLAVE

Response elements

Element

Type

Description

Example

object

The object.

RequestId

string

The request ID.

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

PageNumber

integer

The page number of the instance list.

1

PageSize

integer

The number of entries per page specified in the request.

30

TotalCount

integer

The total number of instances.

1

Instances

object

KVStoreInstance

array<object>

The collection of instances.

array<object>

The tag.

Connections

integer

The maximum number of connections for the instance.

20000

EndTime

string

The time when the subscription instance expires.

2019-06-13T16:00:00Z

ResourceGroupId

string

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

rg-acfmyiu4ekp****

EditionType

string

The edition of the instance. Valid values:

  • Community: Community Edition.

  • Enterprise: Enterprise Edition.

Enterprise

Config

string

The parameter settings of the instance. For more information, see Parameter settings.

{\"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\"}

Port

integer

The service port of the instance.

Important After the port of the endpoint is modified, this field cannot provide the actual network connectivity of the instance. Use the DescribeDBInstanceNetInfo API operation to query the real-time external network connectivity of the instance.

6379

DestroyTime

string

The time when the instance was destroyed.

2019-04-28T10:03:01Z

GlobalInstanceId

string

The distributed instance ID.

Note

This parameter is returned only when the instance is a child instance of a distributed instance.

gr-bp14rkqrhac****

HasRenewChangeOrder

boolean

Indicates whether a pending renewal and upgrade/downgrade order exists. Valid values:

  • true: Yes.

  • false: No.

false

ShardCount

integer

The number of data nodes in the cluster.

Note

This parameter is returned only for cloud-native clusters or instances with the read/write splitting architecture.

3

ConnectionDomain

string

The internal network connection endpoint of the instance.

Important After the endpoint is modified or a new endpoint is applied for, this field cannot provide the actual network connectivity of the instance. Use the DescribeDBInstanceNetInfo API operation to query the real-time external network connectivity of the instance.

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

SlaveReplicaCount

integer

The number of secondary nodes in the secondary zone.

1

PrivateIp

string

The IP address in the virtual private cloud (VPC).

Note

This parameter is not returned when the network type of the instance is classic network.

172.16.49.***

Capacity

integer

The storage capacity of the instance. Unit: MB.

4096

QPS

integer

The queries per second (QPS).

100000

NetworkType

string

The network type. Valid values:

  • CLASSIC: Classic network.

  • VPC: VPC.

CLASSIC

InstanceStatus

string

The instance status. Valid values:

  • Normal: Normal.

  • Creating: Creating.

  • Changing: Modifying.

  • Inactive: Disabled.

  • Flushing: Purge.

  • Released: Released.

  • Transforming: Transforming.

  • Unavailable: Service stopped.

  • Error: Creation failed.

  • Migrating: Migrating.

  • BackupRecovering: Recovering from backup.

  • MinorVersionUpgrading: Upgrading minor version.

  • NetworkModifying: Modifying network.

  • SSLModifying: Modifying SSL.

  • MajorVersionUpgrading: Undergoing a major engine version upgrade. The instance remains accessible.

Normal

PackageType

string

The package type. Valid values:

  • standard: Standard package.

  • customized: Custom package.

standard

Bandwidth

integer

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

96

InstanceType

string

The instance type. Valid values:

  • Tair: Tair.

  • Redis: Redis.

  • Memcache: Memcache.

Redis

Tags

object

Tag

array<object>

The tag information.

object

The tag.

Value

string

The value of the tag.

value1

Key

string

The key of the tag.

key1

ReplacateId

string

The logical ID of the active geo-redundancy instance.

grr-bp11381ebc16****

ArchitectureType

string

The architecture type. Valid values:

  • cluster: Cluster Edition.

  • standard: Standard Edition.

  • rwsplit: Read/Write Splitting Edition.

  • NULL: All types. This is the default value.

cluster

EngineVersion

string

The Redis-compatible engine version of the instance.

4.0

UserName

string

The username used for connection. By default, a username named after the instance ID is included.

r-bp1zxszhcgatnx****

ZoneId

string

The zone ID.

cn-hangzhou-b

CloudType

string

This parameter is displayed only for CloudBox instances.

cloudbox

InstanceId

string

The ID of the instance.

r-bp1zxszhcgatnx****

ShardClass

string

The specifications of the data shard node. For more information, see Specification query navigation.

Note

The overall performance of a cluster architecture instance is calculated as follows: shard node specifications (ShardClass) × number of shards (ShardCount).

redis.shard.small.ce

CreateTime

string

The time when the instance was created.

2018-11-07T08:49:00Z

VSwitchId

string

The ID of the vSwitch.

vsw-bp1e7clcw529l773d****

ReplicaCount

integer

The number of secondary nodes in the primary zone.

Note

The ReplicaCount and SlaveReplicaCount parameters apply only to cloud-native instances. If the instance uses the cluster architecture, these parameters indicate the number of secondary nodes in the primary and secondary zones for a single shard.

1

ReadOnlyCount

string

The number of read-only nodes in the primary zone.

Note

The ReadOnlyCount and SlaveReadOnlyCount parameters apply only to cloud-native instances with read/write splitting enabled. If the instance uses the cluster architecture, these parameters indicate the number of read-only nodes in the primary and secondary zones for a single shard.

1

InstanceClass

string

The instance specifications.

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

IsRds

boolean

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

  • true: Yes.

  • false: No.

true

SecondaryZoneId

string

The ID of the secondary zone.

Note

If the ZoneId parameter already returns multiple zones, such as "cn-hangzhou-MAZ10(h,i)", this parameter does not return the secondary zone ID.

cn-hangzhou-h

InstanceName

string

The name of the instance.

apitest

SlaveReadOnlyCount

integer

The number of read-only nodes in the secondary zone.

1

VpcId

string

The ID of the virtual private cloud (VPC).

vpc-bp1nme44gek34slfc****

ChargeType

string

The billing method. Valid values:

  • PrePaid: Subscription.

  • PostPaid: Pay-as-you-go.

PostPaid

ComputingType

string

The computing type of the instance. Valid values:

  • Ecs: Cloud-native.

  • Machine: Physical machine.

Ecs

NodeType

string

The node type. Valid values:

  • double: Double replica.

  • single: Single replica (discontinued).

  • MASTER_SLAVE: High-availability (double replica).

  • STAND_ALONE: Single replica.

double

ConnectionMode

string

[Deprecated] The access mode of the instance. Use the DescribeDBInstanceNetInfo operation instead. Valid values:

  • Standard: Standard access mode.

  • Safe: Database proxy mode.

Standard

RegionId

string

The region ID.

cn-hangzhou

WorkspaceId

string

The workspace ID.

zg-ml7n1basm9864w1fd

UsedCount

integer

The used count.

0

QuotaCount

integer

The quota count.

30

Examples

Success response

JSON format

{
  "RequestId": "1E83311F-0EE4-4922-A3BF-730B312B****",
  "PageNumber": 1,
  "PageSize": 30,
  "TotalCount": 1,
  "Instances": {
    "KVStoreInstance": [
      {
        "Connections": 20000,
        "EndTime": "2019-06-13T16:00:00Z",
        "ResourceGroupId": "rg-acfmyiu4ekp****",
        "EditionType": "Enterprise",
        "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\\\"}",
        "Port": 6379,
        "DestroyTime": "2019-04-28T10:03:01Z",
        "GlobalInstanceId": "gr-bp14rkqrhac****",
        "HasRenewChangeOrder": false,
        "ShardCount": 3,
        "ConnectionDomain": "r-bp1zxszhcgatnx****.redis.rds.aliyuncs.com",
        "SlaveReplicaCount": 1,
        "PrivateIp": "172.16.49.***",
        "Capacity": 4096,
        "QPS": 100000,
        "NetworkType": "CLASSIC",
        "InstanceStatus": "Normal",
        "PackageType": "standard",
        "Bandwidth": 96,
        "InstanceType": "Redis",
        "Tags": {
          "Tag": [
            {
              "Value": "value1",
              "Key": "key1"
            }
          ]
        },
        "ReplacateId": "grr-bp11381ebc16****",
        "ArchitectureType": "cluster",
        "EngineVersion": "4.0",
        "UserName": "r-bp1zxszhcgatnx****",
        "ZoneId": "cn-hangzhou-b",
        "CloudType": "cloudbox",
        "InstanceId": "r-bp1zxszhcgatnx****",
        "ShardClass": "redis.shard.small.ce",
        "CreateTime": "2018-11-07T08:49:00Z",
        "VSwitchId": "vsw-bp1e7clcw529l773d****",
        "ReplicaCount": 1,
        "ReadOnlyCount": "1",
        "InstanceClass": "redis.logic.sharding.2g.2db.0rodb.4proxy.default",
        "IsRds": true,
        "SecondaryZoneId": "cn-hangzhou-h",
        "InstanceName": "apitest",
        "SlaveReadOnlyCount": 1,
        "VpcId": "vpc-bp1nme44gek34slfc****",
        "ChargeType": "PostPaid",
        "ComputingType": "Ecs",
        "NodeType": "double",
        "ConnectionMode": "Standard",
        "RegionId": "cn-hangzhou",
        "WorkspaceId": "zg-ml7n1basm9864w1fd",
        "UsedCount": 0,
        "QuotaCount": 30
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidInstanceIds.Malformed The Specified parameter InstanceIds is not valid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.