AWS Identity and Access Management
CLI Reference (API Version 2010-05-08)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

iam-groupcreate

Description

Creates a new empty group. An AWS account can have only a limited number of groups. For more information, see Appendix A: Limitations on IAM Entities.

Syntax

iam-groupcreate -g GROUPNAME [-p PATH] [-v]

Options

Name Description Required

-g GROUPNAME

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

Type: String

Constraints: See Appendix A: Limitations on IAM Entities

Default: None

Yes

-p PATH

Path to the group. For more information about paths, go to Identifiers for IAM Entities in Using AWS Identity and Access Management. If you don't want the group to have a path, set to /.

Type: String

Constraints: See Appendix A: Limitations on IAM Entities

Default: /

No

-v

Causes the response to include the newly created group's ARN and GUID. For more information about ARNs and GUIDs, go to Identifiers for IAM Entities in Using AWS Identity and Access Management.

Type: String

Default: None

No

Output

If the command is successful, the output is empty. Exception: If you use the -v option, the response includes the group's ARN and GUID.

Examples

The following example creates a new group called Admins with no path. You could omit the -p option and get the same result.

PROMPT> iam-groupcreate -g Admins -p / -v
arn:aws:iam::123456789012:group/Admins	
AIDACKCEVSQ6C2EXAMPLE

The following example creates a new group called Managers with a path of /division_abc/subdivision_xyz/product_1234/.

PROMPT> iam-groupcreate -g Managers -p /division_abc/subdivision_xyz/
product_1234/ -v
arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_1234/Managers
AIDGPMS9RO4H3FEXAMPLE