Creates an express synchronization group.
Operation description
Operation description
When you invoke this operation, take note of the following items:
-
- Make sure that you fully understand the billing methods and pricing of Simple Message Queue (formerly MNS) before you invoke this operation. The fees for Simple Message Queue (formerly MNS) consist of topic and queue fees, and are billed on a daily basis. Each express synchronization group is billed as one topic, and each share added to the synchronization group is billed as one queue.
-
The express synchronization feature relies on Simple Message Queue (formerly MNS). Therefore, using express synchronization incurs fees for the corresponding service.
-
By using the express synchronization feature, you can add one or more shares connected to the same OSS bucket to a synchronization group. Any changes made to the data in the bucket are synchronized to the local clients of all shares in the synchronization group. This eliminates the need to perform reverse synchronization for each share individually, improving the efficiency and accuracy of data synchronization.
-
Currently, only standard, enhanced, and compute-optimized instance cloud storage gateways support the express synchronization feature.
-
Confirm that you have created a file gateway and added a cache. If not, create a file gateway and add a cache.
-
Confirm that you have created an OSS bucket and configured an NFS or SMB share between the file gateway and the OSS bucket.
-
You can invoke the DescribeSharesBucketInfoForExpressSync operation to query the information about buckets that can be added to an express synchronization group.
-
Confirm that you have activated Simple Message Queue (formerly MNS) and completed the authorization.
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 (-). It 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. |
Synchronization group test |
| BucketRegion |
string |
Yes |
The region where the OSS bucket resides. |
cn-hangzhou |
| BucketName |
string |
Yes |
The name of the bucket. Take note of the following items:
|
sgw-test*** |
| BucketPrefix |
string |
No |
The subdirectory of the bucket. If you want to synchronize data changes in a specific subdirectory of the bucket, specify the subdirectory. |
test*** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Message |
string |
The description of the request result. |
successful |
| RequestId |
string |
The request ID. |
EEFC9927-B097-446D-8FDA-F848C8B2C9E0 |
| Code |
string |
The HTTP status code. A status code of 200 indicates that the request is successful. |
200 |
| ExpressSyncId |
string |
The ID of the express synchronization group. |
sync-0001xv7je357xn8tr*** |
| Success |
boolean |
Indicates whether the request is 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.