全部文档
当前文档

暂无内容

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

文档中心

创建用户组

请求参数

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

用户组名称
1-64个字符,允许输入大小写英文字母,数字,’ . ‘,’ _ ’ 或 ’ - ’

Description String

用户组描述,1-64字符

返回参数

参数名称
类型
描述
CreateGroupResult Object
Group Object
GroupId String

用户组UUID

示例值:9b5JV0eZSIC_tAEvntpCWA
Path String
示例值:/
GroupName String

用户组名称

示例值:test_group
Description String

用户组描述

CreateDate String
示例值:2021-11-22T08:53:30Z
Krn String

用户组krn

示例值:krn:ksc:iam::2000143391:group/test_group
RequestId String
示例值:413b4696-b713-4bc6-b303-a1e615b18484

请求示例

curl -X GET|POST
'http://iam.api.ksyun.com/?Action=CreateGroup&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&Description=xxx'

返回示例

JSON格式

{
"CreateGroupResult":{
"Group":{
"GroupId":"9b5JV0eZSIC_tAEvntpCWA",
"Path":"/",
"GroupName":"test_group",
"Description":"",
"CreateDate":"2021-11-22T08:53:30Z",
"Krn":"krn:ksc:iam::2000143391:group/test_group"
}
},
"RequestId":"413b4696-b713-4bc6-b303-a1e615b18484"
}

错误码

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

错误码
错误信息
Http状态码
描述
GroupNameInvalidParameterValueAn invalid or out-of-range value was supplied for the ‘GroupName’ parameter.400
GroupDescInvalidParameterValueAn invalid or out-of-range value was supplied for the ‘Description’ parameter.400
GroupLimitExceededThe request was rejected because it attempted to create user group beyond the current KSC account limits. The error message describes the limit exceeded.409
GroupAlreadyExistsThe request was rejected because it attempted to create a group that already exists.409
纯净模式常规模式

纯净模式

点击可全屏预览文档内容