CreateExpressSync_云存储网关_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

调用该接口时,您需要注意:

  • 请确保在使用该接口前,已充分了解阿里云轻量消息队列(原 MNS)产品的收费方式和价格。轻量消息队列(原 MNS)费用由主题(Topic)和队列(Queue)两部分组成,并按天进行计费。每个极速同步组按照一个 Topic 进行计费,每个加入同步组的共享都会按一个 Queue 进行计费。

  • 极速同步功能依赖于阿里云轻量消息队列(原 MNS)实现,因此使用极速同步会产生相应服务的费用。

  • 使用极速同步功能,您可以将一个或多个连接至同一个 OSS Bucket 的共享加入一个同步组。对该 Bucket 中数据进行的任何改动都会同步至该同步组中所有共享的本地客户端,从而无需单独对每个共享进行反向同步,提高数据同步的效率和准确性。

  • 目前只有标准型、增强型及性能型的云存储网关支持极速同步功能。

  • 请确认您已创建文件网关并添加缓存,如果没有请创建文件网关及添加缓存。

  • 请确认您已创建 OSS Bucket,并配置了文件网关与 OSS Bucket 之间的 NFS 或 SMB 共享。

  • 可加入极速同步组的相关 Bucket 信息可以通过 DescribeSharesBucketInfoForExpressSync 接口查询。

  • 请确认您已开通阿里云轻量消息队列(原 MNS)并授权。

流控信息

当前云产品API请求速率暂未透出。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
hcs-sgw:CreateExpressSync
Create
全部资源
*

请求参数

字段名称字段详情
Namestring

极速同步组名称。同步组名称长度限制 1~128 个字符,可以包含大小写字母、中文、数字、半角句号(.)、下划线(_)或短划线(-),同时必须以大小写字母或者中文开头。

示例值:alex-tb***
Descriptionstring

极速同步组描述。长度限制为 255 个字符。

示例值:同步组测试
BucketRegionstring

OSS Bucket 所在地域。

示例值:cn-hangzhou
BucketNamestring

Bucket 名称。请注意:展开详情

示例值:sgw-test***
BucketPrefixstring

Bucket 子目录。如果您要对 Bucket 特定子目录内的数据改动进行同步,可以填写您需要的子目录。

示例值:test***

返回参数

字段名称字段详情
Messagestring

请求结果描述。

示例值:successful
RequestIdstring

请求 ID。

示例值:EEFC9927-B097-446D-8FDA-F848C8B2C9E0
Codestring

状态码。状态码为 200 表示请求成功。

示例值:200
ExpressSyncIdstring

极速同步组 ID。

示例值:sync-0001xv7je357xn8tr***
Successboolean

请求是否成功。

示例值:true

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
EmptyExpressSyncName
You must enter a valid name for the sync group.诊断
400
EmptyBucketName
You must enter a valid name for the bucket.诊断
400
EmptyBucketRegion
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.诊断
400
DescriptionOverLimit
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.诊断
400
ConflictExpressSyncConfig
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.诊断
400
InvalidRegionId
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.诊断
400
ExpressSyncNotificationEventConflict
The express sync configuration of bucket and prefix conflicts with existing notification events in MNS.诊断
403
NoPermission
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.诊断
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.诊断
500
InternalError
Unexpected error. Try again later. If the error persists after several tries, we recommend that you submit a ticket.诊断

变更历史

暂无变更历史

相关示例