DisassociateResourceShare_资源共享_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.

接口说明

  • 资源所有者可以调用本 API,移除共享资源或资源使用者。
  • 在资源目录外共享资源时,对于已加入共享的资源使用者,可以调用本 API 主动退出共享单元。更多信息,请参见资源使用者退出共享单元

本文将提供一个示例,使用资源目录管理账号,在cn-hangzhou地域的共享单元rs-6GRmdD3X****中,移除资源使用者172050525300****,即停止对该资源使用者的共享。

流控信息

请求速率为10/1(s)。

授权信息

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

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
resourcesharing:DisassociateResourceShare
Update
全部资源
*
resourcesharing:RequestedResourceType
resourcesharing:ResourceArn

请求参数

字段名称字段详情
ResourceShareIdstring

共享单元 ID。

示例值:rs-6GRmdD3X****参考取值来源:
    UpdateResourceShare
    ListSharedResources
    CreateResourceShare
    AssociateResourceShare
    AcceptResourceShareInvitation
    RejectResourceShareInvitation
Resourcesarray<object>

资源列表。

子级条数 <= 20
Targetsarray<string>

资源使用者。

示例值:172050525300****子级条数 <= 20
ResourceOwnerstring

共享单元归属者。取值:展开详情

示例值:Self

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

示例值:95230BC9-A8E8-4493-96BD-4F0C758E37F8
ResourceShareAssociationsarray<object>

共享单元关联的共享资源或资源使用者信息。

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
MissingParameter.ResourceShareId
You must specify ResourceShareId.诊断
400
InvalidParameter.ResourceShareId
The ResourceShareId is invalid.诊断
400
InvalidParameter.Resources
The Resources is invalid.诊断
400
InvalidParameter.Resources.Duplicate
The Resources contains duplicate values.诊断
400
InvalidParameter.Resources.Length
The maximum number of Resources exceeds 5.诊断
400
InvalidParameter.Targets
The Targets is invalid.诊断
400
InvalidParameter.Targets.Duplicate
The Targets contains duplicate values.诊断
400
InvalidParameter.Targets.Length
The maximum number of Targets exceeds 5.诊断
400
ResourceAndTargetBothEmpty
Either a resource or a shared target must be specified.诊断
400
DisassociateInvalid
You can not disassociate unassociated resource or target.诊断
400
InvalidParameter
The specified parameter is invalid.诊断
400
InvalidParameter.ResourceType
The ResourceType is invalid.诊断
404
EntityNotExists.ResourceShare
The resource share does not exist in the current account.诊断
409
AccountNotInResourceDirectory
The account is not a master or a member of a resource directory.诊断
409
ResourceShareStatusMismatchAction
The status of the resource share does not allow the specified operation.诊断
409
DisassociateConflict
You cannot perform the operation while association is already in progress.诊断
409
LeavingFailed.Account
The account was added to the resource share automatically by resoucre directory.诊断
409
LeavingFailed.ResourceType
The resource share contains resources of the resource types that dont support this action.诊断
409
ExternalTargetWithdrawConflict
Existing internal association task in resource directory when disassociating with resource share.诊断

变更历史

变更时间变更内容概要操作
2024-01-03
变更返回参数

相关示例