阅读993 返回首页    go 阿里云


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

接口描述

 设置授权策略默认版本

请求参数

Action

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

PolicyName

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

VersionId

  • 类型:String
  • 必须:是
  • 描述:新默认版本的Id

返回参数

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

需要的权限

Action

ram:SetDefaultPolicyVersion

Resource

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

错误信息

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.
InvalidParameter.VersionId.Format
  • HTTP Status:400
  • Error Message:The format of the parameter - "VersionId" is incorrect.
EntityNotExist.Policy
  • HTTP Status:404
  • Error Message:The policy does not exist.
EntityNotExist.Policy.Version
  • HTTP Status:404
  • Error Message:The policy version does not exist.

操作示例

请求示例

https://ram.aliyuncs.com/?Action=SetDefaultPolicyVersion
&PolicyName=OSS-Administrator
&VersionId=v2
&<公共请求参数>

返回示例

XML格式

<SetDefaultPolicyVersionResponse>
    <RequestId>9B34724D-54B0-4A51-B34D-4512372FE1BE</RequestId>
</SetDefaultPolicyVersionResponse>

JSON格式

{
    "RequestId": "9B34724D-54B0-4A51-B34D-4512372FE1BE"
}

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

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