Creates a replication pair to asynchronously replicate data between disks.
Operation description
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 for the primary disk and the secondary disk, you must call the StartDiskReplicaPair operation to enable async replication to replicate data from the primary disk to the secondary disk cross regions on a periodic basis.
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:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis 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.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| ebs:CreateDiskReplicaPair | create | *DiskReplicaPair acs:ebs:{#regionId}:{#accountId}:diskreplicapair/* |
|
|
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| RegionId | string | Yes | The ID of the region in which to create the replication pair. | cn-shanghai |
| SourceZoneId | string | Yes | The zone ID of the primary disk. | cn-beijing-f |
| DiskId | string | Yes | The ID of the primary disk. | d-iq80sgp4d0xbk24q**** |
| DestinationRegionId | string | Yes | 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. | cn-shanghai |
| DestinationDiskId | string | Yes | The ID of the secondary disk. | d-sa1f82p58p1tdw9g**** |
| DestinationZoneId | string | Yes | The zone ID of the secondary disk. | cn-shanghai-e |
| PairName | string | No | 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 | TestReplicaPair |
| Description | string | No | The description of the replication pair. The description must be 2 to 256 characters in length and cannot start with | This is description. |
| ChargeType | string | No | The billing method of the replication pair. Valid values:
Default value: POSTPAY. | PREPAY |
| Period | long | No | The subscription duration of the replication pair. When | 1 |
| PeriodUnit | string | No | The unit of the subscription duration of the replication pair. Set the value to Month. Valid value: Month | Month |
| ClientToken | string | No | The client token to ensure the idempotency 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. | 123e4567-e89b-12d3-a456-42665544**** |
| Bandwidth | long | No | 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. | 10240 |
| RPO | long | No | The recovery point objective (RPO) of the replication pair. Unit: seconds. Valid value: 900. | 900 |
| ResourceGroupId | string | No | The ID of the resource group to which the replication pair belongs. | rg-acfmvs**** |
| Tag | array<object> | No | The tags to add to the replication pair-consistent group. You can specify up to 20 tags. | |
| object | No | The tag. | ||
| Value | string | No | The value of the tag. | TestValue |
| Key | string | No | The key of the tag. | TestKey |
| EnableRtc | boolean | No | Whether to enable replication time control. By default, this parameter is disabled. | true |
Response parameters
Examples
Sample success responses
JSONformat
{
"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 contains the same client token but different parameters. |
| 403 | OperationDenied | The operation is not allowed. | The operation is not supported. |
| 403 | OperationDenied.InvalidStatus | The operation is not allowed in current status. | The operation is not supported in the current state. |
| 403 | OperationDenied.QuotaExceed | The operation is not allowed due to quota exceed. | The quota for performing this operation has been 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. | - |
| 403 | Forbidden | User is not authorized to operate. | You are not authorized to manage the resource. Check the account permissions or contact the Alibaba Cloud account. |
| 403 | Forbidden.Action | User 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. |
| 404 | NoSuchResource | The specified resource does not exist. | The specified resource does not exist. |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error has occurred. |
| 504 | RequestTimeout | The 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 time | Summary of changes | Operation |
|---|---|---|
| 2023-03-29 | The Error code has changed | View Change Details |
| 2023-03-08 | The Error code has changed | View Change Details |
