阅读890 返回首页    go 阿里云


DetachPolicyFromRole__授权策略管理接口_RAM API文档_访问控制-阿里云

接口描述

 为角色撤销指定的授权

请求参数

Action

  • 类型:String
  • 必须:是
  • 描述:系统规定参数,取值:DetachPolicyFromRole

PolicyType

  • 类型:String
  • 必须:是
  • 描述:指定Policy的类型, 取值System或Custom

PolicyName

  • 类型:String
  • 必须:是
  • 描述:指定授权策略名称

RoleName

  • 类型:String
  • 必须:是
  • 描述:指定角色名。例:dev

返回参数

  只有公共返回参数,详见公共返回参数

需要的权限

Action

ram:DetachPolicyFromRole

Resource

acs:ram:*:${AccountId}:role/${RoleName}

acs:ram:*:${AccountId} or system:policy/${PolicyName}

错误信息

InvalidParameter.RoleName.InvalidChars
  • HTTP Status:400
  • Error Message:The parameter - "RoleName" contains invalid chars.
InvalidParameter.RoleName.Length
  • HTTP Status:400
  • Error Message:The parameter - "RoleName" beyond the length limit.
InvalidParameter.PolicyType
  • HTTP Status:400
  • Error Message:The parameter - "PolicyType" is incorrect.
InvalidParameter.PolicyName.InvalidChars
  • HTTP Status:400
  • Error Message:The parameter - "PolicyNam" contains invalid chars.
InvalidParameter.PolicyName.Length
  • HTTP Status:400
  • Error Message:The parameter - "PolicyName" beyond the length limit.
EntityNotExist.Role
  • HTTP Status:404
  • Error Message:The role does not exist.
EntityNotExist.Policy
  • HTTP Status:404
  • Error Message:The policy does not exist.
EntityNotExist.Role.Policy
  • HTTP Status:404
  • Error Message:The indicate policy attached to the role does not exist.

操作示例

请求示例

https://ram.aliyuncs.com/?Action=DetachPolicyFromRole
&PolicyType=Custom
&PolicyName=OSS-Administrator
&RoleName=OSSAdminRole
&<公共请求参数>

返回示例

XML格式

<DetachPolicyFromRoleResponse>
    <RequestId>697852FB-50D7-44D9-9774-530C31EAC572</RequestId>
</DetachPolicyFromRoleResponse>

JSON格式

{
    "RequestId": "697852FB-50D7-44D9-9774-530C31EAC572"
}

最后更新:2016-11-23 17:16:05

  上一篇:go AttachPolicyToRole__授权策略管理接口_RAM API文档_访问控制-阿里云
  下一篇:go ListEntitiesForPolicy__授权策略管理接口_RAM API文档_访问控制-阿里云