全部文档
当前文档

暂无内容

如果没有找到您期望的内容,请尝试其他搜索词

文档中心

添加用户到用户组

请求参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数
参数名称
类型
必填
描述
Action String
公共参数,本接口取值:AddUserToGroup。
Version String
公共参数,本接口取值:2015-11-01。
GroupName String

用户组名称

UserName String

要添加的IAM子用户名称

返回参数

参数名称
类型
描述
result Boolean
示例值:true
RequestId String
示例值:6c897139-3904-4776-a056-451e4a597494

请求示例

curl -X GET|POST
'http://iam.api.ksyun.com/?Action=AddUserToGroup&Version=2015-11-01'
-H 'authorization: xxx, SignedHeaders=content-type;host;x-amz-date, Signature=xxx'
-H 'cache-control: no-cache'
-H 'content-type: application/x-www-form-urlencoded'
-H 'host: iam.api.ksyun.com'
-H 'x-amz-date: 20170720T022802Z'
-d 'GroupName=xxx&UserName=xxx'

返回示例

JSON格式

{
"result":true,
"RequestId":"6c897139-3904-4776-a056-451e4a597494"
}

错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码

错误码
错误信息
Http状态码
描述
GroupNameInvalidParameterValueAn invalid or out-of-range value was supplied for the ‘GroupName’ parameter.400
UsernameInvalidParameterValueAn invalid or out-of-range value was supplied for the ‘Username’ parameter.400
GroupNoSuchEntityThe request was rejected because it referenced ‘Group’ that does not exist. The error message describes the entity.404
UserNoSuchEntityThe request was rejected because it referenced ‘User’ that does not exist.404
UserGroupRelationAlreadyExistsThe request was rejected because it attempted to add user to a group that had joined.409
纯净模式常规模式

纯净模式

点击可全屏预览文档内容