All Products
Search
Document Center

Elastic Compute Service:DescribeDiskReplicaPairs

Last Updated:Nov 26, 2024

Queries information about replication pairs in a specific region.

Operation description

Usage notes

  • For information about the regions in which async replication is available, see Overview .
  • When you call this operation for a specific region, if the primary disk (source disk) or secondary disk (destination disk) of a replication pair resides in the region, information about the replication pair is displayed in the response.
  • If you want to perform a paged query, configure the NextToken and MaxResults parameters. During a paged query, when you call the DescribeDiskReplicaPairs operation to retrieve the first page of results, set MaxResults to limit the maximum number of entries to return in the call. The return value of NextToken is a pagination token, which can be used in the next call to retrieve a new page of results. When you call the DescribeDiskReplicaPairs operation to retrieve a new page of results, set NextToken to the NextToken value returned in the previous call and set MaxResults to specify the maximum number of entries to return in this call.

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.

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
ebs:DescribeDiskReplicaPairsget
*DiskReplicaPair
acs:ebs:{#regionId}:{#accountId}:diskreplicapair/*
*DiskReplicaPair
acs:ebs:{#regionId}:{#accountId}:diskreplicapair/{#ReplicaPairId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the primary or secondary disk in the replication pair. You can call the DescribeRegions operation to query the most recent list of regions in which async replication is supported.

cn-beijing
MaxResultslongNo

The maximum number of entries per page. You can use this parameter together with NextToken.

Valid values: 1 to 500.

Default value: 10.

1
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken. If you specify NextToken, the PageSize and PageNumber request parameters do not take effect, and the TotalCount response parameter is invalid.

AAAAAdDWBF2****
PairIdsstringNo

The IDs of replication pairs. You can specify the IDs of one or more replication pairs and separate the IDs with commas (,). Example: pair-cn-dsa****,pair-cn-asd****.

This parameter is empty by default, which indicates that all replication pairs in the specified region are queried. You can specify a maximum of 100 replication pair IDs.

pair-cn-dsa****
SitestringNo

The type of the site from which the information of replication pairs is retrieved. Valid value:

  • production: primary site
  • backup: secondary site

Default value: production.

production
ReplicaGroupIdstringNo

The ID of the replication pair-consistent group. You can specify the ID of a replication pair-consistent group to query the replication pairs in the group. Example: pg-****.

This parameter is empty by default, which indicates that all replication pairs in the specified region are queried.

Note If this parameter is set to-, replication pairs that are not added to any replication pair-consistent groups are returned.
pg-****
PageNumberintegerNo

The page number.

5
PageSizeintegerNo

The number of entries per page. Valid values: 1 to 100.

10
ResourceGroupIdstringNo

The ID of the resource group to which the replication pair belongs.

rg-acfmvs******
NamestringNo

The name of the replication pair. Fuzzy search is supported.

name***
Tagarray<object>No

The tags. Up to 20 tags are supported.

objectNo

The value of tag N used for exact search of EBS resources. The tag value must be 1 to 128 characters in length. Valid values of N: 1 to 20.

KeystringNo

The key of the tag.

TestKey
ValuestringNo

The value of the tag.

TestValue

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

AAA478A0-BEE6-1D42-BEB6-A9CFEAD6****
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.

AAAAAdDWBF2****
ReplicaPairsarray<object>

Details about the replication pairs.

ReplicaPairobject
ReplicaPairIdstring

The ID of the replication pair.

pair-cn-dsa****
SourceRegionstring

The region ID of the primary disk.

cn-beijing
SourceZoneIdstring

The zone ID of the primary disk.

cn-beijing-a
SourceDiskIdstring

The ID of the primary disk.

d-bp131n0q38u3a4zi****
DestinationRegionstring

The region ID of the secondary disk.

cn-shanghai
DestinationZoneIdstring

The zone ID of the secondary disk.

cn-shanghai-b
DestinationDiskIdstring

The ID of the secondary disk.

d-asdfjl2342kj2l3k4****
PairNamestring

The name of the replication pair.

TestReplicaPair
Descriptionstring

The description of the replication pair.

This is description.
Statusstring

The status of the replication pair. Valid values:

  • invalid: The replication pair was invalid. When a replication pair becomes abnormal, it enters this state.
  • creating: The replication pair was being created.
  • created: The replication pair was created.
  • create_failed: The replication pair failed to be created.
  • initial_syncing: Data was synchronized from the primary disk to the secondary disk for the first time. After a replication pair is created and activated, the replication pair is in this state the first time data is synchronized from the primary disk to the secondary disk.
  • manual_syncing: Data was being manually synchronized from the primary disk to the secondary disk. After data is manually synchronized from the primary disk to the secondary disk, the replication pair returns to the stopped state. The first time data is manually synchronized from the primary disk to the secondary disk, the replication pair is in the manual_syncing state during the synchronization.
  • syncing: Data was being synchronized from the primary disk to the secondary disk. When data is being asynchronously replicated from the primary disk to the secondary disk again in subsequent operations, the replication pair is in this state.
  • normal: The replication pair was working as expected. When the system finishes replicating data from the primary disk to the secondary disk within the current replication cycle, the replication pair enters this state.
  • stopping: The replication pair was being stopped.
  • stopped: The replication pair was stopped.
  • stop_failed: The replication pair failed to be stopped.
  • failovering: A failover was being performed.
  • failovered: A failover was performed.
  • failover_failed: A failover failed to be performed.
  • reprotecting: A reverse replication was being performed.
  • reprotect_failed: A reverse replication failed to be performed.
  • deleting: The replication pair was being deleted.
  • delete_failed: The replication pair failed to be deleted.
  • deleted: The replication pair was deleted.
created
RPOlong

The recovery point objective (RPO) of the replication pair. Unit: seconds.

900
Bandwidthlong

The bandwidth used to asynchronously replicate data from the primary disk to the secondary disk. Unit: Kbit/s.

10240
StatusMessagestring

The message that describes the state of the replication pair. This parameter has a value when Status has a value of invalid or create_failed. Valid values:

  • PrePayOrderExpired: The replication pair has expired.
  • PostPayOrderCeaseService: The pay-as-you-go replication pair has been stopped due to an overdue payment.
  • DeviceRemoved: The primary or secondary disk has been deleted.
  • DeviceKeyChanged: The DeviceKey mapping of the primary or secondary disk has changed.
  • DeviceSizeChanged: The DeviceSize value of the primary or secondary disk has changed.
  • OperationDenied.QuotaExceed: The maximum number of replication pairs that can be created has been reached.
PrePayOrderExpired
LastRecoverPointlong

The time when data was last replicated from the primary disk to the secondary disk in the replication pair. The value of this parameter is a timestamp. Unit: seconds. 86,400 seconds is equivalent to 24 hours.

1649751977
ReplicaGroupIdstring

The ID of the replication pair-consistent group to which the replication pair belongs.

pg-xxxx****
CreateTimelong

The time when the replication pair was created. The value of this parameter is a timestamp. Unit: seconds.

1649750977
ReplicaGroupNamestring

The name of the replication pair-consistent group to which the replication pair belongs.

pg-name****
Sitestring

The type of the site from which the information about the replication pairs and replication pair-consistent group was obtained. Valid values:

  • production: primary site
  • backup: secondary site
production
PrimaryRegionstring

The initial source region (primary region) of the replication pair.

cn-beijing
StandbyRegionstring

The initial destination region (secondary region) of the replication pair.

cn-shanghai
PrimaryZonestring

The initial source zone (primary zone) of the replication pair.

cn-beijing-a
StandbyZonestring

The initial destination zone (secondary zone) of the replication pair.

cn-shanghai-b
ChargeTypestring

The billing method of the replication pair. Valid values:

  • PREPAY: subscription
  • POSTPAY: pay-as-you-go
PREPAY
ExpiredTimelong

The time when the replication pair expires. The value of this parameter is a timestamp. Unit: seconds.

1649750977
Tagsarray<object>

The tags of the replication pair.

Tagobject
TagKeystring

The key of the tag.

testKey
TagValuestring

The value of the tag.

testValue
ResourceGroupIdstring

The ID of the resource group to which the replication pair belongs.

rg-acfmvs*****
PageNumberinteger

The page number.

1
PageSizeinteger

The number of entries per page.

10
TotalCountlong

The total number of entries returned.

60

Examples

Sample success responses

JSONformat

{
  "RequestId": "AAA478A0-BEE6-1D42-BEB6-A9CFEAD6****",
  "NextToken": "AAAAAdDWBF2****",
  "ReplicaPairs": [
    {
      "ReplicaPairId": "pair-cn-dsa****",
      "SourceRegion": "cn-beijing",
      "SourceZoneId": "cn-beijing-a",
      "SourceDiskId": "d-bp131n0q38u3a4zi****",
      "DestinationRegion": "cn-shanghai",
      "DestinationZoneId": "cn-shanghai-b",
      "DestinationDiskId": "d-asdfjl2342kj2l3k4****",
      "PairName": "TestReplicaPair",
      "Description": "This is description.",
      "Status": "created",
      "RPO": 900,
      "Bandwidth": 10240,
      "StatusMessage": "PrePayOrderExpired",
      "LastRecoverPoint": 1649751977,
      "ReplicaGroupId": "pg-xxxx****",
      "CreateTime": 1649750977,
      "ReplicaGroupName": "pg-name****",
      "Site": "production",
      "PrimaryRegion": "cn-beijing",
      "StandbyRegion": "cn-shanghai",
      "PrimaryZone": "cn-beijing-a",
      "StandbyZone": "cn-shanghai-b",
      "ChargeType": "PREPAY",
      "ExpiredTime": 1649750977,
      "Tags": [
        {
          "TagKey": "testKey",
          "TagValue": "testValue"
        }
      ],
      "ResourceGroupId": "rg-acfmvs*****"
    }
  ],
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 60
}

Error codes

HTTP status codeError codeError messageDescription
403OperationDeniedThe operation is not allowed.The operation is not supported.
403OperationDenied.InvalidStatusThe operation is not allowed in current status.The operation is not supported in the current state.
403ForbiddenUser is not authorized to operate.You are not authorized to manage the resource. Check the account permissions or contact the Alibaba Cloud account.
403Forbidden.ActionUser is not authorized to operate this action.You are not authorized to perform this operation. Check the account permissions or contact the Alibaba Cloud account.
404NoSuchResourceThe specified resource does not exist.The specified resource does not exist.
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error has occurred.
504RequestTimeoutThe request is timeout, please try again later.The request has timed out. Try again later.

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

Change history

Change timeSummary of changesOperation
2024-08-14The Error code has changed. The request parameters of the API has changedView Change Details
2024-06-17The Error code has changedView Change Details