Creates a replication pair to asynchronously replicate data between disks.
Usage notes
Async replication is a feature that protects data across regions by using the data replication capability of Elastic Block Storage (EBS). This feature can be used to asynchronously replicate data from a disk in one region to a disk in another region for disaster recovery purposes. You can use this feature to implement disaster recovery for critical business to protect data in your databases and improve business continuity. You are charged on a subscription basis for the bandwidth that is used by the async replication feature.
Currently, the async replication feature can asynchronously replicate data only between enhanced SSDs (ESSDs). The functionality of disks in replication pairs is limited.
Take note of the following items:
- Make sure that the source disk (primary disk) from which to replicate data and the destination disk (secondary disk) to which to replicate data are created. You can call the CreateDisk operation to create disks.
- The secondary disk cannot reside in the same region as the primary disk. For information about the regions that support async replication, see Overview.
- After you call this operation to create a replication pair, you must call the StartDiskReplicaPair operation to enable async replication to periodically replicate data from the primary disk to the secondary disk across regions.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | CreateDiskReplicaPair | The operation that you want to perform. Set the value to CreateDiskReplicaPair. |
RegionId | String | Yes | cn-shanghai | The ID of the region in which to create the replication pair. |
SourceZoneId | String | Yes | cn-beijing-f | The zone ID of the primary disk. |
DiskId | String | Yes | d-iq80sgp4d0xbk24q**** | The ID of the primary disk. |
DestinationRegionId | String | Yes | cn-shanghai | The region ID of the secondary disk. You can call the DescribeRegions operation to query the most recent list of regions in which async replication is supported. |
DestinationDiskId | String | Yes | d-sa1f82p58p1tdw9g**** | The ID of the secondary disk. |
DestinationZoneId | String | Yes | cn-shanghai-e | The zone ID of the secondary disk. |
PairName | String | No | TestReplicaPair | The name of the replication pair. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with |
Description | String | No | This is description. | The description of the replication pair. The description must be 2 to 256 characters in length and cannot start with |
ChargeType | String | No | PREPAY | The billing method of the replication pair. Valid values:
Default value: POSTPAY. |
Period | Long | No | 1 | The subscription duration of the replication pair. When |
PeriodUnit | String | No | Month | The unit of the subscription duration of the replication pair. Set the value to Month. Valid value: Month |
ClientToken | String | No | 123e4567-e89b-12d3-a456-42665544**** | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. |
Bandwidth | Long | No | 10240 | The bandwidth to use to asynchronously replicate data from the primary disk to the secondary disk. Unit: Kbit/s. Valid values:
Default value: 10240. When you set the ChargeType parameter to POSTPAY, the Bandwidth parameter is automatically set to 0 and cannot be modified. The value 0 indicates that bandwidth is dynamically allocated based on the volume of data that is asynchronously replicated from the primary disk to the secondary disk. |
RPO | Long | No | 900 | The recovery point objective (RPO) of the replication pair. Unit: seconds. Valid value: 900. |
ResourceGroupId | String | No | rg-acfmvs**** | The ID of the resource group to which to assign the replication pair. |
Tag.N.Key | String | No | TestKey | The key of tag N to add to the replication pair. |
Tag.N.Value | String | No | TestValue | The value of tag N to add to the replication pair. |
Response parameters
Parameter |
Type |
Example |
Description |
RequestId | String | C123F94F-4E38-19AE-942A-A8D6F44F**** | The ID of the request. |
ReplicaPairId | String | pair-cn-dsa**** | The ID of the replication pair. |
OrderId | String | 123456**** | The order ID. |
Examples
Sample requests
http(s)://ebs.cn-beijing.aliyuncs.com/?Action=CreateDiskReplicaPair
&RegionId=cn-shanghai
&SourceZoneId=cn-beijing-f
&DiskId=d-iq80sgp4d0xbk24q****
&DestinationRegionId=cn-shanghai
&DestinationDiskId=d-sa1f82p58p1tdw9g****
&DestinationZoneId=cn-shanghai-e
&PairName=TestReplicaPair
&Description=This is description.
&ChargeType=PREPAY
&Period=1
&PeriodUnit=Month
&ClientToken=123e4567-e89b-12d3-a456-42665544****
&Bandwidth=10240
&RPO=900
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateDiskReplicaPairResponse>
<RequestId>C123F94F-4E38-19AE-942A-A8D6F44F****</RequestId>
<ReplicaPairId>pair-cn-dsa****</ReplicaPairId>
<OrderId>123456****</OrderId>
</CreateDiskReplicaPairResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "C123F94F-4E38-19AE-942A-A8D6F44F****",
"ReplicaPairId" : "pair-cn-dsa****",
"OrderId" : "123456****"
}
Error codes
HTTP status code |
Error code |
Error message |
Description |
400 | IdempotentParameterMismatch | The specified parameter has changed while using an already used clientToken. | The request and a previous request contain the same client token but different parameters. |
403 | OperationDenied | The operation is not allowed. | You cannot perform this operation. |
403 | OperationDenied.InvalidStatus | The operation is not allowed in current status. | This operation cannot be performed on the resource in the current state. |
403 | OperationDenied.QuotaExceed | The operation is not allowed due to quota exceed. | The quota is exceeded. |
403 | LastTokenProcessing | The last token request is processing. | The value of clientToken is used in another request that is being processed. Try again later. |
403 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance. | Your account does not have a sufficient balance. |
403 | Forbidden | User is not authorized to operate. | You do not have the permissions to perform this operation on the resource. Check the permissions of your account or contact the administrator of the Apsara Stack tenant account. |
403 | Forbidden.Action | User is not authorized to operate this action. | You have no access to this operation. Check the permissions of your account or contact the administrator of the Alibaba Cloud account. |
404 | NoSuchResource | The specified resource does not exist. | The specified resource is not found. |
500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error occurred. |
504 | RequestTimeout | The request is timeout, please try again later. | The request timed out. Try again later. |
For a list of error codes, see Service error codes.