edit-icon download-icon

CreateGroup

Last Updated: Nov 10, 2017

Interface description

Creates a user group.

Request parameters

Action
  • Type: String
  • Required: Yes
  • Description: Operation name. Value: CreateGroup
GroupName
  • Type: String
  • Required: Yes
  • Description: Group name. It consists of a maximum of 64 characters.
  • Format: ^[a-zA-Z0-9\-]+$
Comments
  • Type: String
  • Required: No
  • Description: Remark information. It consists of a maximum of 128 characters.

Return parameters

Group

Required permissions

Action

ram:CreateGroup

Resource

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

Error messages

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.Comments.Length
  • HTTP Status: 400
  • Error Message: The parameter - “Comments” beyond the length limit.
EntityAlreadyExists.Group
  • HTTP Status: 409
  • Error Message: The group does already EXIST.
LimitExceeded.Group
  • HTTP Status: 409
  • Error Message: The count of groups beyond the current limits.

Operation examples

Request example

  1. https://ram.aliyuncs.com/?Action=CreateGroup
  2. &GroupName=Dev-Team
  3. &Comments=Development team
  4. &<Public request parameters>

Return example

XML format

  1. <CreateGroupResponse>
  2. <RequestId>D3F0679E-9757-95DB-AF2D-04D5188C69C5</RequestId>
  3. <Group>
  4. <GroupName>Dev-Team</GroupName>
  5. <Comments>Development team</Comments>
  6. <CreateDate>2015-01-23T12:33:18Z</CreateDate>
  7. </Group>
  8. </CreateGroupResponse>

JSON format

  1. {
  2. "RequestId": "D3F0679E-9757-95DB-AF2D-04D5188C69C5",
  3. "Group": {
  4. "GroupName": "Dev-Team",
  5. "Comments": "Development team",
  6. "CreateDate": "2015-01-23T12:33:18Z"
  7. }
  8. }
Thank you! We've received your feedback.