DescribeInstances

更新时间:
复制 MD 格式

Describes one or more Redis-compatible ApsaraDB for Tair 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 ID of the region where the instance is located.

Note

This parameter is required if you specify the Tag parameter.

cn-hangzhou

InstanceIds

string

No

The IDs of the instances to query.

Note

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

r-bp1zxszhcgatnx****

InstanceStatus

string

No

The instance state. Valid values:

  • Normal: The instance is running normally.

  • Creating: The instance is being created.

  • Changing: The configuration of the instance is being changed.

  • Inactive: The instance is disabled.

  • Flushing: The instance is being flushed.

  • Released: The instance has been released.

  • Transforming: The billing method of the instance is being changed.

  • Migrating: The instance is being migrated.

  • BackupRecovering: The instance is being restored from a backup.

  • MinorVersionUpgrading: The instance is undergoing a minor version upgrade.

  • NetworkModifying: The network type of the instance is being changed.

  • SSLModifying: The SSL certificate of the instance is being changed.

  • MajorVersionUpgrading: The instance is undergoing a major version upgrade and is still accessible.

Note

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

Normal

ChargeType

string

No

The billing method of the instance. Valid values:

  • PrePaid: subscription

  • PostPaid: pay-as-you-go

PostPaid

NetworkType

string

No

The network type of the instance. Valid values:

  • CLASSIC: classic network

  • VPC: VPC

CLASSIC

EngineVersion

string

No

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

4.0

InstanceClass

string

No

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

redis.master.small.default

VpcId

string

No

The ID of the VPC.

vpc-bp1nme44gek34slfc****

VSwitchId

string

No

The ID of the vSwitch.

vsw-bp1e7clcw529l773d****

PageNumber

integer

No

The page number. The value must be an integer that is greater than or equal to 1. Default value: 1.

1

PageSize

integer

No

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

30

InstanceType

string

No

The category of the instance. Valid values:

  • Tair: Tair (Enterprise Edition)

  • Redis: Redis (Community Edition)

  • Memcache

Redis

SearchKey

string

No

The keyword for a fuzzy search. The keyword can be an instance ID or an instance name.

apitest

ArchitectureType

string

No

The architecture of the instance. Valid values:

  • cluster: cluster

  • standard: standard

  • rwsplit: read/write splitting

standard

Expired

string

No

Specifies whether to return expired instances. Valid values:

  • true: Returns only expired instances.

  • false: Returns only unexpired instances.

false

ZoneId

string

No

The ID of the zone.

cn-hongkong-b

ResourceGroupId

string

No

The ID of the resource group.

Note

You can call the ListResourceGroups operation or use the Resource Management console to obtain the ID of the resource group. For more information, see View the basic information about a resource group.

rg-acfmyiu4ekp****

GlobalInstance

boolean

No

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

  • true: Returns only child instances.

  • false: Does not return child instances.

true

EditionType

string

No

The edition of the instance. Valid values:

  • Community: Redis (Community Edition)

  • Enterprise: Tair (Enterprise Edition)

Enterprise

PrivateIp

string

No

The private IP address of the instance.

172.16.49.***

Tag

array<object>

No

The tags attached to the instance.

object

No

A key-value pair that represents a tag.

Value

string

No

The value of the tag.

开发

Key

string

No

The key of the tag.

Note

You can specify up to five tags in a single request.

存储类型

NodeType

string

No

The node type of the instance. Valid values:

  • MASTER_SLAVE: high-availability (dual-replica)

  • STAND_ALONE: standalone (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.

MASTER_SLAVE

Response elements

Element

Type

Description

Example

object

The response object.

RequestId

string

The request ID.

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

PageNumber

integer

The page number of the returned page.

1

PageSize

integer

The number of entries per page.

30

TotalCount

integer

The total number of entries that match the query.

1

Instances

object

KVStoreInstance

array<object>

An array of instances.

array<object>

Details of an instance.

Connections

integer

The maximum number of connections to 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 instance edition. 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 This parameter may not be up-to-date after a port change. To obtain the latest connection information, call the DescribeDBInstanceNetInfo operation.

6379

DestroyTime

string

The time when the instance was destroyed.

2019-04-28T10:03:01Z

GlobalInstanceId

string

The ID of the distributed instance.

Note

This parameter is returned only for child instances of a distributed instance.

gr-bp14rkqrhac****

HasRenewChangeOrder

boolean

Indicates whether a pending order for renewal or a configuration change exists. Valid values:

  • true: A pending order exists.

  • false: No pending order exists.

false

ShardCount

integer

The number of data nodes in the instance.

Note

This parameter is returned only for instances in the cloud-native edition that use the cluster or read/write splitting architecture.

3

ConnectionDomain

string

The private connection endpoint of the instance.

Important This endpoint may not be up-to-date after a change. To obtain the latest connection information, call the DescribeDBInstanceNetInfo operation.

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

SlaveReplicaCount

integer

The number of replica nodes in the secondary zone.

1

PrivateIp

string

The private IP address of the instance.

Note

This parameter is not returned for instances that are deployed in the classic network.

172.16.49.***

Capacity

integer

The storage capacity of the instance. Unit: MB.

4096

QPS

integer

The queries per second (QPS) of the instance.

100000

NetworkType

string

The network type of the instance. Valid values:

  • CLASSIC: classic network.

  • VPC: Virtual Private Cloud (VPC).

CLASSIC

InstanceStatus

string

The state of the instance. Valid values:

  • Normal: The instance is running normally.

  • Creating: The instance is being created.

  • Changing: The instance configuration is being changed.

  • Inactive: The instance is disabled.

  • Flushing: The instance is being flushed.

  • Released: The instance is released.

  • Transforming: The billing method of the instance is being changed.

  • Unavailable: The instance is unavailable.

  • 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.

Normal

PackageType

string

The package type. Valid values:

  • standard: standard package.

  • customized: customized package.

standard

Bandwidth

integer

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

96

InstanceType

string

The instance type. Valid values:

  • Tair

  • Redis

  • Memcache

Redis

Tags

object

Tag

array<object>

The tags of the instance.

object

A tag object.

Value

string

The value of the tag.

value1

Key

string

The key of the tag.

key1

ReplacateId

string

The logical ID of the multi-active instance.

grr-bp11381ebc16****

ArchitectureType

string

The architecture of the instance. Valid values:

  • cluster: Cluster Edition.

  • standard: Standard Edition.

  • rwsplit: read/write splitting.

  • NULL: The default value for all types.

cluster

EngineVersion

string

The database engine version of the instance.

4.0

UserName

string

The username for the database connection. By default, this is the same as the instance ID.

r-bp1zxszhcgatnx****

ZoneId

string

The ID of the zone.

cn-hangzhou-b

CloudType

string

This parameter is returned only for CloudBox instances.

cloudbox

InstanceId

string

The ID of the instance.

r-bp1zxszhcgatnx****

ShardClass

string

The instance type of the data node. For more information, see Specification query navigation.

Note

For a cluster instance, the overall performance is calculated by using the following formula: Performance of a single shard (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 replica nodes in the primary zone.

Note

The ReplicaCount and SlaveReplicaCount parameters apply only to instances in the cloud-native edition. If the instance uses the cluster architecture, these parameters indicate the number of replica nodes per data node in the primary and secondary zones.

1

ReadOnlyCount

string

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

Note

The ReadOnlyCount and SlaveReadOnlyCount parameters apply only to instances in the cloud-native edition that have read/write splitting enabled. If the instance uses the cluster architecture, these parameters indicate the number of read-only nodes per data node in the primary and secondary zones.

1

InstanceClass

string

The instance class.

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

IsRds

boolean

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

  • true

  • false

true

SecondaryZoneId

string

The ID of the secondary zone.

Note

This parameter is not returned if the value of ZoneId indicates a multi-zone deployment. Example: cn-hangzhou-MAZ10(h,i).

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 VPC.

vpc-bp1nme44gek34slfc****

ChargeType

string

The billing method of the instance. Valid values:

  • PrePaid: subscription.

  • PostPaid: pay-as-you-go.

PostPaid

ComputingType

string

The computing type of the instance. Valid values:

  • Ecs: cloud-native edition

  • Machine: physical machine

Ecs

NodeType

string

The node type. Valid values:

  • double: dual-replica.

  • single: single-replica. This value is deprecated.

  • MASTER_SLAVE: high-availability (dual-replica).

  • STAND_ALONE: single-replica.

double

ConnectionMode

string

The connection mode of the instance. Valid values:

  • Standard: standard connection.

  • Safe: proxy connection.

This parameter is deprecated. Call the DescribeDBInstanceNetInfo operation to query connection information.

Standard

RegionId

string

The region ID.

cn-hangzhou

WorkspaceId

string

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": ""
      }
    ]
  }
}

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.