Creates an express synchronization group.
When you call the operation, take note of the following information:
- Before you call this operation, make sure that you fully understand the billing methods and pricing of Message Service (MNS). A bill is generated for MNS topics and queues on a daily basis. Each express synchronization group is counted as one topic, and each share added to the synchronization group is counted as one queue.
- Express synchronization must be used in combination with MNS. If you enable express synchronization, you are charged for using MNS.
- When you configure the express synchronization feature, you can add one or more shares to an express synchronization group if these shares are connected to the same OSS bucket. All data changes in the bucket are simultaneously synchronized to the CSG agents mapped to the shares in the express synchronization group. You do not need to separately synchronize data changes from these shares. This improves the efficiency and accuracy of data synchronization.
- Only Standard, Enhanced, and Performance Optimized gateways support the express synchronization feature.
- Make sure that you have created a file gateway and configured a cache disk.
- Make sure that you have created an Object Storage Service (OSS) bucket and configured an NFS or SMB share between the file gateway and the OSS bucket.
- You can query the OSS buckets that can be used by the express synchronization group by calling the DescribeSharesBucketInfoForExpressSync operation.
- Make sure that you have activated and authorized MNS.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateExpressSync |
The operation that you want to perform. Set the value to CreateExpressSync. |
Name | String | Yes | alex-tb*** |
The name of the express synchronization group. The name must be 1 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. |
Description | String | No | Synchronization group test |
The description of the express synchronization group. The description cannot exceed 255 characters in length. |
BucketRegion | String | Yes | cn-hangzhou |
The region where the OSS bucket resides. |
BucketName | String | Yes | sgw-test*** |
The name of the OSS bucket. Take note of the following information:
|
BucketPrefix | String | No | test*** |
The subdirectory of the OSS bucket. If you want to synchronize data from a specific subdirectory of the bucket, specify the parameter. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Message | String | successful |
The description of the status code. |
RequestId | String | EEFC9927-B097-446D-8FDA-F848C8B2C9E0 |
The ID of the request. |
Code | String | 200 |
The HTTP status code. If the request is successful, 200 is returned. |
ExpressSyncId | String | sync-0001xv7je357xn8tr*** |
The ID of the express synchronization group. |
Success | Boolean | true |
Indicates whether the request is successful. |
Examples
Sample request
http(s)://[Endpoint]/?Action=CreateExpressSync
&BucketName=sgw-test***
&BucketRegion=cn-hangzhou
&Name=alex-tb***
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateExpressSyncResponse>
<Message>successful</Message>
<RequestId>EEFC9927-B097-446D-8FDA-F848C8B2C9E0</RequestId>
<ExpressSyncId>sync-0001xv7je357xn8tr***</ExpressSyncId>
<Code>200</Code>
<Success>true</Success>
</CreateExpressSyncResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Message" : "successful",
"RequestId" : "EEFC9927-B097-446D-8FDA-F848C8B2C9E0",
"ExpressSyncId" : "sync-0001xv7je357xn8tr***",
"Code" : "200",
"Success" : true
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | EmptyExpressSyncName | You must enter a valid name for the sync group. | The error message returned because the name of the express synchronization group is not specified. |
400 | EmptyBucketName | You must enter a valid name for the bucket. | The error message returned because the name of the OSS bucket is not specified. |
400 | EmptyBucketRegion | You must specify a valid region for the bucket. | The error message returned because the region of the OSS bucket is not specified. |
400 | InvalidExpressSyncName | The specified name for the sync group is invalid. The name must be 1 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter. | The error message returned because the name of the express synchronization group is invalid. The name must be 1 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). In addition, it must start with a letter. |
400 | DescriptionOverLimit | The length of the specified gateway description exceeds the maximum limit. The description cannot exceed 255 characters. | The error message returned because the length of the description exceeds the upper limit, which is 255 characters. |
400 | DuplicateExpressSyncName | The specified name of the sync group already exists. Try again later after you specify a valid parameter. | The error message returned because the name of the express synchronization group already exists. Check the parameter and try again. |
400 | ConflictExpressSyncConfig | The parameter you specified for the sync group is invalid. Try again later after you specify a valid parameter. | The error message returned because the configurations of the express synchronization group conflict with each other. Check the parameters and try again. |
400 | ExpressSyncNotificationEventLimitExceed | The number of sync groups exceeds the maximum limit. If you want to add more sync groups, we recommend that you submit a ticket to apply for the whitelist permission. | The error message returned because the number of express synchronization groups has reached the upper limit. To be added to the whitelist, submit a ticket. |
400 | InvalidRegionId | The specified RegionId does not exist. You must specify a valid RegionId. | The error message returned because the specified RegionId parameter does not exist. Check whether the parameter is valid. |
400 | InvalidBucketName | The specified bucket name is invalid. You must enter a valid bucket name. | The error message returned because the name of the OSS bucket is invalid. Check the parameter and try again. |
400 | ExpressSyncNotificationEventConflict | The express sync configuration of bucket and prefix conflicts with existing notification events in MNS. | The error message returned because the OSS bucket and prefix configurations of the express synchronization group conflict with the existing event rules of the MNS service. |
500 | InternalError | Unexpected error. Try again later. If the error persists after several tries, we recommend that you submit a ticket. | The error message returned because an internal error has occurred. Try again later. If the error persists, submit a ticket. |
403 | NoPermission | Insufficient permissions. We recommend that you contact the administrator of the Alibaba Cloud account to grant the required permissions to you. | The error message returned because you do not have the required permissions. Contact the administrator to grant permissions to you. |
403 | AssumeRoleFail | Failed to perform cross-service authorization. Try again later. If the error persists after several tries, we recommend that you submit a ticket. | The error message returned because the RAM role failed to authorize access to CSG. Try again later. If the error persists, submit a ticket. |
404 | RoleNotExist | The role that Cloud Storage Gateway needs to obtain cross-service authorization does not exist. You must grant the required permissions to Cloud Storage Gateway. | The error message returned because the RAM role used to authorize access to CSG does not exist. |
For a list of error codes, visit the API Error Center.