UpdateRole__角色管理接口_RAM API文档_访问控制-阿里云
接口描述
更新角色信息
请求参数
Action
- 类型:String
- 必须:是
- 描述:操作接口名,系统规定参数,取值:UpdateRole
RoleName
- 类型:String
- 必须:是
- 描述:指定角色名,最多包含64个字符
- 格式:
^[a-zA-Z0-9.@-]+$
NewAssumeRolePolicyDocument
- 类型:String
- 必须:否
- 描述:指定可以扮演此角色的身份。
需要的权限
Action
ram:UpdateRole
Resource
acs:ram:*:${AccountId}:role/*
返回参数
Role
- 类型:Role Type
- 描述:角色信息
错误信息
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.NewAssumeRolePolicyDocument.Length
- HTTP Status:400
- Error Message:The parameter - "NewAssumeRolePolicyDocument" beyond the length limit.
EntityNotExist.Role
- HTTP Status:404
- Error Message:The role does not exist.
MalformedPolicyDocument
- HTTP Status:400
- Error Message:{The error details}
操作示例
请求示例
https://ram.aliyuncs.com/?Action=UpdateRole
&RoleName=ECSAdmin
&NewAssumeRolePolicyDocument=xxxx //TODO
&<公共请求参数>
返回示例
XML
格式
<UpdateRoleResponse>
<RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
<Role>
<RoleId>901234567890123</RoleId>
<RoleName>ECSAdmin</RoleName>
<Arn>acs:ram::1234567890123456:role/ECSAdmin</Arn>
<Description>ECS管理角色</Description>
<AssumeRolePolicyDocument>{ "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "RAM": "acs:ram::123456789012345678:root" } } ], "Version": "1" }</AssumeRolePolicyDocument>
<CreateDate>2015-01-23T12:33:18Z</CreateDate>
<UpdateDate>2015-01-23T12:33:18Z</UpdateDate>
</Role>
</UpdateRoleResponse>
JSON
格式
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"Role": {
"RoleId": "901234567890123",
"RoleName": "ECSAdmin",
"Arn": "acs:ram::1234567890123456:role/ECSAdmin",
"Description": "ECS管理角色",
"AssumeRolePolicyDocument": "{ "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "RAM": "acs:ram::123456789012345678:root" } } ], "Version": "1" }",
"CreateDate": "2015-01-23T12:33:18Z",
"UpdateDate": "2015-01-23T12:33:18Z"
}
}
最后更新:2016-11-23 17:16:05
上一篇:
GetRole__角色管理接口_RAM API文档_访问控制-阿里云
下一篇:
ListRoles__角色管理接口_RAM API文档_访问控制-阿里云
常见错误说明__附录_大数据计算服务-阿里云
发送短信接口__API使用手册_短信服务-阿里云
接口文档__Android_安全组件教程_移动安全-阿里云
运营商错误码(联通)__常见问题_短信服务-阿里云
设置短信模板__使用手册_短信服务-阿里云
OSS 权限问题及排查__常见错误及排除_最佳实践_对象存储 OSS-阿里云
消息通知__操作指南_批量计算-阿里云
设备端快速接入(MQTT)__快速开始_阿里云物联网套件-阿里云
查询API调用流量数据__API管理相关接口_API_API 网关-阿里云
使用STS访问__JavaScript-SDK_SDK 参考_对象存储 OSS-阿里云