Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . iam ]

create-group

Description

Creates a new group.

For information about the number of groups you can create, see Limitations on IAM Entities in the IAM User Guide .

See also: AWS API Documentation

Synopsis

  create-group
[--path <value>]
--group-name <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--path (string)

The path to the group. For more information about paths, see IAM Identifiers in the IAM User Guide .

This parameter is optional. If it is not included, it defaults to a slash (/).

This paramater allows (per its regex pattern ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes, containing any ASCII character from the ! (u0021) thru the DEL character (u007F), including most punctuation characters, digits, and upper and lowercased letters.

--group-name (string)

The name of the group to create. Do not include the path in this value.

This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-. The group name must be unique within the account. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

Examples

To create an IAM group

The following create-group command creates an IAM group named Admins:

aws iam create-group --group-name Admins

Output:

{
    "Group": {
        "Path": "/",
        "CreateDate": "2015-03-09T20:30:24.940Z",
        "GroupId": "AIDGPMS9RO4H3FEXAMPLE",
        "Arn": "arn:aws:iam::123456789012:group/Admins",
        "GroupName": "Admins"
    }
}

For more information, see Creating IAM Groups in the Using IAM guide.

Output

Group -> (structure)

A structure containing details about the new group.

Path -> (string)

The path to the group. For more information about paths, see IAM Identifiers in the Using IAM guide.

GroupName -> (string)

The friendly name that identifies the group.

GroupId -> (string)

The stable and unique string identifying the group. For more information about IDs, see IAM Identifiers in the Using IAM guide.

Arn -> (string)

The Amazon Resource Name (ARN) specifying the group. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.

CreateDate -> (timestamp)

The date and time, in ISO 8601 date-time format , when the group was created.