All Products
Search
Document Center

Cloud Storage Gateway:AddSharesToExpressSync

Last Updated:Oct 23, 2024

Adds a share to an express synchronization group.

When you call the operation, take note of the following information:

  • Make sure that you have created an express synchronization group. You can create an express synchronization group by calling the CreateExpressSync operation. The express synchronization group and share must use the same Object Storage Service (OSS) bucket.
  • If you leave the share name empty for a gateway, no shares of the gateway will be added to the express synchronization group.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes AddSharesToExpressSync

The operation that you want to perform. Set the value to AddSharesToExpressSync.

ExpressSyncId String Yes sync-0001xv7je357xn8tr***

The ID of the express synchronization group.

GatewayShares String Yes {"gw-000gwgp0j3jp8cb3t***":"share1,share2","gw-0001b2otnkdzte62j***":"weekly"}

The name of the share. You can specify multiple shares in the following JSON form: {"Gateway ID 1":"Share 1, Share 2","Gateway ID 2":"Share 1, Share 2"}

Response parameters

Parameter

Type

Example

Description

TaskId String t-0001xv7je357xr6ql***

The task ID.

RequestId String 1EDBC004-6B1C-4511-ACF5-0B4875BA3887

The request ID.

Message String successful

The description of the request result.

MnsTopic String sgw-express-sync-topic-sync-0009e51kabuou08***

The Simple Message Queue (SMQ) topic used by the express synchronization group.

MnsQueues String sgw-express-sync-queue-gw-0009e51kabuoty9***-341604

The SMQ queues used by the express synchronization group.

MnsFullSyncDelay Long 719

The latency of the initial full synchronization. Unit: seconds

MnsPublicEndpoint String http://123.mns.cn-hangzhou.aliyuncs.com/

The public endpoint of SMQ.

MnsInnerEndpoint String http://123.mns.cn-hangzhou-internal.aliyuncs.com/

The internal endpoint of SMQ.

Code String 200

The HTTP status code. The status code 200 indicates that the request was successful.

Success Boolean true

Indicates whether the request was successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=AddSharesToExpressSync
&ExpressSyncId=sync-0001xv7je357xn8tr***
&GatewayShares={"gw-000gwgp0j3jp8cb3t***":"share1,share2","gw-0001b2otnkdzte62j***":"weekly"}
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<AddSharesToExpressSyncResponse>
    <TaskId>t-0001xv7je357xr6ql***</TaskId>
    <RequestId>1EDBC004-6B1C-4511-ACF5-0B4875BA3887</RequestId>
    <Message>successful</Message>
    <MnsTopic>sgw-express-sync-topic-sync-0009e51kabuou08***</MnsTopic>
    <MnsQueues>sgw-express-sync-queue-gw-0009e51kabuoty9***-341604</MnsQueues>
    <MnsFullSyncDelay>719</MnsFullSyncDelay>
    <MnsPublicEndpoint>http://123.mns.cn-hangzhou.aliyuncs.com/</MnsPublicEndpoint>
    <MnsInnerEndpoint>http://123.mns.cn-hangzhou-internal.aliyuncs.com/</MnsInnerEndpoint>
    <Code>200</Code>
    <Success>true</Success>
</AddSharesToExpressSyncResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TaskId" : "t-0001xv7je357xr6ql***",
  "RequestId" : "1EDBC004-6B1C-4511-ACF5-0B4875BA3887",
  "Message" : "successful",
  "MnsTopic" : "sgw-express-sync-topic-sync-0009e51kabuou08***",
  "MnsQueues" : "sgw-express-sync-queue-gw-0009e51kabuoty9***-341604",
  "MnsFullSyncDelay" : 719,
  "MnsPublicEndpoint" : "http://123.mns.cn-hangzhou.aliyuncs.com/",
  "MnsInnerEndpoint" : "http://123.mns.cn-hangzhou-internal.aliyuncs.com/",
  "Code" : "200",
  "Success" : true
}

Error codes

HTTP status code

Error code

Error message

Description

400 EmptyExpressSyncId You must specify a valid ID for the sync group. No express synchronization group is specified.
400 ExpressSyncNotExist The specified sync group does not exist. You must specify a valid parameter. The specified express synchronization group does not exist. Check whether you have specified the intended synchronization group.
400 ExpressSyncInOperation The sync group is busy. Try again later. The synchronization is being operated on. Try again later.

For a list of error codes, see Service error codes.