閱讀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文檔_訪問控製-阿裏雲