Creates an express synchronization group.
Usage notes
When you call this operation, take note of the following items:
Before you call this operation, make sure that you fully understand the billing methods and pricing of Simple Message Queue (SMQ). A bill is generated for SMQ topics and queues on a daily basis. Each express synchronization group corresponds to one topic, and each share added to the synchronization group corresponds to one queue.
The express synchronization feature relies on SMQ and incurs SMQ fees.
When you configure the express synchronization feature, you can add one or more shares that are connected to the same Object Storage Service (OSS) bucket to an express synchronization group. All data changes in the bucket are simultaneously synchronized to the local clients that are mapped to the shares in the express synchronization group. You do not need to separately synchronize data changes from the bucket. 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 OSS bucket and configured a Network File System (NFS) or Server Message Block (SMB) share that connects the file gateway and the OSS bucket.
You can query the OSS buckets that can be used by an express synchronization group by calling the DescribeSharesBucketInfoForExpressSync operation.
SMQ is activated and authorized.
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 for testing | 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 bucket. Notes:
|
BucketPrefix | String | No | test*** | The subdirectory of the OSS bucket. If you want to synchronize data from a specific subdirectory of the bucket, specify this parameter. |
Response parameters
Parameter | Type | Example | Description |
Message | String | successful | The description of the request result. |
RequestId | String | EEFC9927-B097-446D-8FDA-F848C8B2C9E0 | The request ID. |
Code | String | 200 | The HTTP status code. The status code 200 indicates that the request was successful. |
ExpressSyncId | String | sync-0001xv7je357xn8tr*** | The ID of the express synchronization group. |
Success | Boolean | true | Indicates whether the request was successful. |
Examples
Sample requests
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
HTTP status code | Error code | Error message | Description |
400 | EmptyExpressSyncName | You must enter a valid name for the sync group. | The name of the express synchronization group is not specified. |
400 | EmptyBucketName | You must enter a valid name for the bucket. | The name of the OSS bucket is not specified. |
400 | EmptyBucketRegion | You must specify a valid region for the bucket. | 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 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 length of the description exceeds the upper limit of 255 characters. |
400 | DuplicateExpressSyncName | The specified name of the sync group already exists. Try again later after you specify a valid parameter. | 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 configurations of the express synchronization group cause a conflict. 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 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 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 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 OSS bucket and prefix configurations of the express synchronization group conflict with the existing event rules in SMQ. |
403 | NoPermission | Insufficient permissions. We recommend that you contact the administrator of the Alibaba Cloud account to grant the required permissions to you. | You do not have sufficient permissions. Ask the administrator to grant you the required permissions. |
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. | Cross-service access authorization failed. 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 RAM role for cross-service access authorization does not exist. |
500 | InternalError | Unexpected error. Try again later. If the error persists after several tries, we recommend that you submit a ticket. | An internal error occurred. Try again later. If the error persists, submit a ticket. |
For a list of error codes, see Service error codes.