Creates an express synchronization group.
Operation description
Description
Note the following when you call this operation:
-
Make sure that you understand the billing methods and pricing of Simple Message Queue (formerly MNS). You are charged daily for MNS topics and queues. Each express synchronization group is billed as a topic, and each share that is added to an express synchronization group is billed as a queue.
-
The express synchronization feature is built on Simple Message Queue (formerly MNS). Therefore, you are charged for using this feature.
-
The express synchronization feature lets you add one or more shares that are connected to the same OSS bucket to a synchronization group. Data changes in the bucket are then synchronized to the local clients of all shares in the group. This eliminates the need to perform a remote sync for each share, which improves the efficiency and accuracy of data synchronization.
-
Only Medium, Enhanced, and Performance Cloud Storage Gateway instances support the express synchronization feature.
-
Make sure that you have created a file gateway and added a cache.
-
Make sure that you have created an OSS bucket and configured an NFS or SMB share between the file gateway and the OSS bucket.
-
You can call the DescribeSharesBucketInfoForExpressSync operation to query the buckets that can be added to an express synchronization group.
-
Make sure that you have activated Simple Message Queue (formerly MNS) and granted the required permissions.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hcs-sgw:CreateExpressSync |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The name of the express synchronization group. The name must be 1 to 128 characters in length and can contain letters, Chinese characters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter or a Chinese character. |
alex-tb*** |
| Description |
string |
No |
The description of the express synchronization group. The description can be up to 255 characters in length. |
|
| BucketRegion |
string |
Yes |
The region where the OSS bucket is located. |
cn-hangzhou |
| BucketName |
string |
Yes |
The name of the bucket. Note:
|
sgw-test*** |
| BucketPrefix |
string |
No |
The prefix of the subdirectory in the bucket. If you want to synchronize data changes in a specific subdirectory of the bucket, you can specify the subdirectory. |
test*** |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
|||
| Message |
string |
The message that is returned. |
successful |
| RequestId |
string |
The request ID. |
EEFC9927-B097-446D-8FDA-F848C8B2C9E0 |
| Code |
string |
The status code. A status code of 200 indicates that the request was successful. |
200 |
| ExpressSyncId |
string |
The ID of the express synchronization group. |
sync-0001xv7je357xn8tr*** |
| Success |
boolean |
Indicates whether the request was successful. |
true |
Examples
Success response
JSON format
{
"Message": "successful",
"RequestId": "EEFC9927-B097-446D-8FDA-F848C8B2C9E0",
"Code": "200",
"ExpressSyncId": "sync-0001xv7je357xn8tr***",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | EmptyExpressSyncName | You must enter a valid name for the sync group. | You must enter a valid name for the sync group. |
| 400 | EmptyBucketName | You must enter a valid name for the bucket. | You must enter a valid name for the bucket. |
| 400 | EmptyBucketRegion | You must specify a valid region for the bucket. | You must specify a valid region for the bucket. |
| 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 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. |
| 400 | DescriptionOverLimit | The length of the specified gateway description exceeds the maximum limit. The description cannot exceed 255 characters. | The length of the specified gateway description exceeds the maximum limit. The description cannot exceed 255 characters. |
| 400 | DuplicateExpressSyncName | The specified name of the sync group already exists. Try again later after you specify a valid parameter. | The specified name of the sync group already exists. Try again later after you specify a valid parameter. |
| 400 | ConflictExpressSyncConfig | The parameter you specified for the sync group is invalid. Try again later after you specify a valid parameter. | The parameter you specified for the sync group is invalid. Try again later after you specify a valid parameter. |
| 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 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. |
| 400 | InvalidRegionId | The specified RegionId does not exist. You must specify a valid RegionId. | The specified RegionId does not exist. You must specify a valid RegionId. |
| 400 | InvalidBucketName | The specified bucket name is invalid. You must enter a valid bucket name. | The specified bucket name is invalid. You must enter a valid bucket name. |
| 400 | ExpressSyncNotificationEventConflict | The express sync configuration of bucket and prefix conflicts with existing notification events in MNS. | The bucket and prefix configurations of the synchronization group conflict with the existing event rule configurations in the MNS. |
| 500 | InternalError | Unexpected error. Try again later. If the error persists after several tries, we recommend that you submit a ticket. | Unexpected error. Try again later. If the error persists after several tries, we recommend that you 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. | Insufficient permissions. We recommend that you contact the administrator of the Alibaba Cloud account to grant the required 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. | Failed to perform cross-service authorization. Try again later. If the error persists after several tries, we recommend that you 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 role that Cloud Storage Gateway needs to obtain cross-service authorization does not exist. You must grant the required permissions to Cloud Storage Gateway. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.