Skip to content

IAM  >  Operations  >  create_group

create_group

Operation

create_group async

create_group(input: CreateGroupInput, plugins: list[Plugin] | None = None) -> CreateGroupOutput

Creates a new group.

For information about the number of groups you can create, see IAM and STS quotas in the IAM User Guide.

Parameters:

Name Type Description Default
input CreateGroupInput

An instance of CreateGroupInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateGroupOutput

An instance of CreateGroupOutput.

Input

CreateGroupInput dataclass

Bases: _SerdeShape

Dataclass for CreateGroupInput structure.

Attributes

group_name class-attribute instance-attribute
group_name: str | None = ...

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

IAM user, group, role, and policy names must be unique within the account. Names are not distinguished by case. For example, you cannot create resources named both "MyResource" and "myresource".

path class-attribute instance-attribute
path: str | None = ...

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 parameter allows (through 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. In addition, it can contain any ASCII character from the ! (!) through the DEL character (), including most punctuation characters, digits, and upper and lowercased letters.

Output

CreateGroupOutput dataclass

Bases: _SerdeShape

Contains the response to a successful CreateGroup request.

Attributes

group instance-attribute
group: Group

A structure containing details about the new group.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.