Creates a replication pair to asynchronously replicate data between disks.
Operation description
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.
Currently, the async replication feature can asynchronously replicate data only between enhanced SSDs (ESSDs). The functionality of disks in replication pairs is limited. You are charged on a subscription basis for the bandwidth that is used by the async replication feature.
Before you call this operation, 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 the same region as the primary disk. The async replication feature is supported in the China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), China (Heyuan), China (Chengdu), China (Hong Kong), Singapore, US (Silicon Valley), and US (Virginia) regions.
- 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
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.
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. It 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. This parameter is required when the
| 1 |
PeriodUnit | string | No | The unit of the subscription duration of the replication pair. Valid values:
Default value: Month. | Month |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it 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 between the primary disk and 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. Set the value to 900. | 900 |
ResourceGroupId | string | No | The ID of the resource group to which to assign the replication group. | rg-acfmvs**** |
Tag | array<object> | No | The resource tags. You can specify up to 20 tags. | |
object | No | 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. | ||
Key | string | No | The key of tag N to add to the resource. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot contain | TestKey |
Value | string | No | The value of tag N to add to the resource. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with | TestValue |
Response parameters
Examples
Sample success responses
JSON
format
{
"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 |