閱讀582 返回首頁    go 人物


AttachPolicyToGroup__授權策略管理接口_RAM API文檔_訪問控製-阿裏雲

接口描述

 為指定用戶附加授權

請求參數

Action

  • 類型:String
  • 必須:是
  • 描述:係統規定參數,取值:AttachPolicyToGroup

PolicyType

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

PolicyName

  • 類型:String
  • 必須:是
  • 描述:指定授權策略名稱

GroupName

  • 類型:String
  • 必須:是
  • 描述:指定組名。例:dev

返回參數

  隻有公共返回參數,詳見公共返回參數

需要的權限

Action

ram:AttachPolicyToGroup

Resource

acs:ram:*:${AccountId}:group/${GroupName}

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

錯誤信息

InvalidParameter.GroupName.InvalidChars
  • HTTP Status:400
  • Error Message:The parameter - "GroupName" contains invalid chars.
InvalidParameter.GroupName.Length
  • HTTP Status:400
  • Error Message:The parameter - "GroupName" 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.Group
  • HTTP Status:404
  • Error Message:The group does not exist.
EntityNotExist.Policy
  • HTTP Status:404
  • Error Message:The policy does not exist.
EntityAlreadyExists.Group.Policy
  • HTTP Status:409
  • Error Message:The group has already been attached this policy.
LimitExceeded.Group.Policy
  • HTTP Status:409
  • Error Message:The policy count of the group beyond the current limits.

操作示例

請求示例

https://ram.aliyuncs.com/?Action=AttachPolicyToGroup
&PolicyType=Custom
&PolicyName=OSS-Administrator
&GroupName=dev
&<公共請求參數>

返回示例

XML格式

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

JSON格式

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

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

  上一篇:go DetachPolicyFromUser__授權策略管理接口_RAM API文檔_訪問控製-阿裏雲
  下一篇:go DetachPolicyFromGroup__授權策略管理接口_RAM API文檔_訪問控製-阿裏雲