group_membership#

State module for managing IAM Group Membership.

async idem_aws.states.aws.iam.group_membership.present(hub, ctx, name: str, group: str, users: List, resource_id: str = None) Dict[str, Any][source]#

Adds the specified user to the specified group.

Parameters:
  • name (str) – A name to represent the operation. This name is only for logging purpose. It is not used to attach a user to a group.

  • group (str) – Group Name

  • users (List) – List of users to attach to the group.

  • resource_id (str, Optional) – The identifier for this object. Group Name

Request Syntax:
[iam-group-membership]:
  aws.iam.group_membership.present:
    - name: 'string'
    - resource_id: 'string'
    - group: 'string'
    - users: list
Returns:

Dict[str, Any]

Examples

iam-group-membership-temp-name:
  aws.iam.group_membership.present:
    - name: test_group
    - resource_id: test_group
    - group: test_group
    - users:
      - test_user
async idem_aws.states.aws.iam.group_membership.absent(hub, ctx, name: str, users: List = [], resource_id: str = None) Dict[str, Any][source]#

Removes users from the specified Group.

Parameters:
  • name (str) – The name of the AWS IAM Group.

  • users (List, Optional) – List of users to remove.

  • resource_id (str) – Name of IAM group.

Request Syntax:
[group_name]:
  aws.iam.group.absent:
    - name: "string"
    - resource_id: "string"
    - users:
      - "string"
Returns:

Dict[str, Any]

Examples

iam-group-membership-test-group:
  aws.iam.group_membership.absent:
    - name: test_group
    - resource_id: test_group
    - users:
      - test_user
async idem_aws.states.aws.iam.group_membership.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Gets information about the IAM Group membership.

Lists the names of the users in IAM group.

Returns:

Dict[str, Any]

Examples

$ idem describe aws.iam.group_membership