All Products
Search
Document Center

Cloud Storage Gateway:AddSharesToExpressSync

Last Updated:Aug 04, 2025

Adds one or more shares to an express synchronization group.

Operation description

When you call this operation, note the following:

  • Ensure that an express synchronization group is created. If not, you can call the CreateExpressSync operation to create one. The bucket for the express synchronization group must be the same as the bucket for the share.

  • If the share name that you specify is empty, the request is ignored.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

hcs-sgw:AddSharesToExpressSync

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ExpressSyncId

string

Yes

The ID of the express synchronization group.

sync-0001xv7je357xn8tr***

GatewayShares

string

Yes

The names of gateway shares. You can add multiple shares. The value must be a JSON string that is in the following format: {"Gateway ID1":"Share 1,Share 2","Gateway ID2":"Share 1,Share 2"}

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

Response parameters

Parameter

Type

Description

Example

object

TaskId

string

The ID of the task.

t-0001xv7je357xr6ql***

RequestId

string

The ID of the request.

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

Message

string

The description of the request result.

successful

MnsTopic

string

The Simple Message Queue (formerly MNS) topic that is used by the express synchronization group.

MnsQueues

string

The Simple Message Queue (formerly MNS) queue that is used by the express synchronization group.

MnsFullSyncDelay

integer

The latency of the first full synchronization. Unit: seconds.

MnsPublicEndpoint

string

The public endpoint of Simple Message Queue (formerly MNS) that is used by the express synchronization group.

MnsInnerEndpoint

string

The internal endpoint of Simple Message Queue (formerly MNS) that is used by the express synchronization group.

Code

string

The status code. A status code of 200 indicates that the request was successful.

200

Success

boolean

Indicates whether the request was successful.

true

Examples

Success response

JSON format

{
  "TaskId": "t-0001xv7je357xr6ql***",
  "RequestId": "1EDBC004-6B1C-4511-ACF5-0B4875BA3887",
  "Message": "successful",
  "MnsTopic": "",
  "MnsQueues": "",
  "MnsFullSyncDelay": 0,
  "MnsPublicEndpoint": "",
  "MnsInnerEndpoint": "",
  "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. You must specify a valid ID for the sync group.
400 ExpressSyncNotExist The specified sync group does not exist. You must specify a valid parameter. The specified sync group does not exist. You must specify a valid parameter.
400 ExpressSyncInOperation The sync group is busy. Try again later. The sync group is busy. Try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.