创建极速同步组。
接口说明
调用该接口时,您需要注意:
-
请确保在使用该接口前,已充分了解阿里云轻量消息队列(原 MNS)产品的收费方式和价格。轻量消息队列(原 MNS)费用由主题(Topic)和队列(Queue)两部分组成,并按天进行计费。每个极速同步组按照一个 Topic 进行计费,每个加入同步组的共享都会按一个 Queue 进行计费。
-
极速同步功能依赖于阿里云轻量消息队列(原 MNS)实现,因此使用极速同步会产生相应服务的费用。
-
使用极速同步功能,您可以将一个或多个连接至同一个 OSS Bucket 的共享加入一个同步组。对该 Bucket 中数据进行的任何改动都会同步至该同步组中所有共享的本地客户端,从而无需单独对每个共享进行反向同步,提高数据同步的效率和准确性。
-
目前只有标准型、增强型及性能型的云存储网关支持极速同步功能。
-
请确认您已创建文件网关并添加缓存,如果没有请创建文件网关及添加缓存。
-
请确认您已创建 OSS Bucket,并配置了文件网关与 OSS Bucket 之间的 NFS 或 SMB 共享。
-
可加入极速同步组的相关 Bucket 信息可以通过 DescribeSharesBucketInfoForExpressSync 接口查询。
-
请确认您已开通阿里云轻量消息队列(原 MNS)并授权。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
hcs-sgw:CreateExpressSync | create | *全部资源 * |
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
Name | string | 是 | 极速同步组名称。同步组名称长度限制 1~128 个字符,可以包含大小写字母、中文、数字、半角句号(.)、下划线(_)或短划线(-),同时必须以大小写字母或者中文开头。 | alex-tb*** |
Description | string | 否 | 极速同步组描述。长度限制为 255 个字符。 | 同步组测试 |
BucketRegion | string | 是 | OSS Bucket 所在地域。 | cn-hangzhou |
BucketName | string | 是 | Bucket 名称。请注意:
| sgw-test*** |
BucketPrefix | string | 否 | Bucket 子目录。如果您要对 Bucket 特定子目录内的数据改动进行同步,可以填写您需要的子目录。 | test*** |
返回参数
示例
正常返回示例
JSON
格式
{
"Message": "successful",
"RequestId": "EEFC9927-B097-446D-8FDA-F848C8B2C9E0",
"Code": "200",
"ExpressSyncId": "sync-0001xv7je357xn8tr***",
"Success": true
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | EmptyExpressSyncName | You must enter a valid name for the sync group. | 同步组名称不能为空。 |
400 | EmptyBucketName | You must enter a valid name for the bucket. | Bucket名称不能为空。 |
400 | EmptyBucketRegion | You must specify a valid region for the bucket. | OSS 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. | 无效的同步组名称,同步组名称长度限制为1~128个字符,可以包含大小写字母,中文,数字,“.”,“_”或“-”,同时必须以大小写字母或者中文开头。 |
400 | DescriptionOverLimit | The length of the specified gateway description exceeds the maximum limit. The description cannot exceed 255 characters. | 网关描述超过最大长度,最大限度为255个字符。 |
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. | 指定的RegionId不存在,请您确认该参数是否正确。 |
400 | InvalidBucketName | The specified bucket name is invalid. You must enter a valid bucket name. | 无效的Bucket名称,请检查参数后重试。 |
400 | ExpressSyncNotificationEventConflict | The express sync configuration of bucket and prefix conflicts with existing notification events in MNS. | 该极速同步组的bucket和prefix配置与轻量消息队列(原 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. | 内部错误,请重试。如果多次尝试失败,请提交工单。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|