更新时间:2024-01-16 GMT+08:00
分享

修改共享目录成员

功能介绍

批量添加或者移除共享目录成员。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

POST /v1/{project_id}/persistent-storages/{storage_id}/actions/assign-share-folder

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID。

storage_id

String

WKS存储ID。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

表3 请求Body参数

参数

是否必选

参数类型

描述

storage_claim_id

String

WKS存储目录声明ID。

add_items

Array of Assignment objects

增加的成员列表。

del_items

Array of Attachment objects

移除的成员列表。

表4 Assignment

参数

是否必选

参数类型

描述

policy_statement_id

String

策略ID。

attach

String

目标。

attach_type

String

关联对象类型:

  • USER - 用户

  • USER_GROUP - 用户组

表5 Attachment

参数

是否必选

参数类型

描述

attach

String

目标。

attach_type

String

关联对象类型:

  • USER - 用户

  • USER_GROUP - 用户组

响应参数

状态码: 400

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

状态码: 401

表7 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

状态码: 403

表8 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

状态码: 404

表9 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

状态码: 405

表10 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

状态码: 500

表11 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

状态码: 503

表12 响应Body参数

参数

参数类型

描述

error_code

String

错误码,失败时返回。

error_msg

String

错误描述。

请求示例

POST /v1/a4da8115c9d8464ead3a38309130523f/persistent-storages/544959151881584640/actions/assign-share-folder

{
  "storage_claim_id" : 544959151881584640,
  "add_items" : [ {
    "attach" : "USER001***@local.com",
    "attach_type" : "USER",
    "policy_statement_id" : 1
  } ],
  "del_items" : [ {
    "attach" : "USER001***@local.com",
    "attach_type" : "USER"
  } ]
}

响应示例

状态码: 200

成功响应。

null

状态码

状态码

描述

200

成功响应。

400

由于包含语法错误,当前请求无法被服务器理解。

401

鉴权失败。

403

没有操作权限。

404

找不到资源。

405

请求中指定的方法不被允许。

500

服务内部错误,具体返回错误码请参见错误码说明。

503

服务不可用。

错误码

请参见错误码

相关文档