group_policy_attachment#

State module for managing IAM Group policy attachment.

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

Attaches the specified managed policy to the specified IAM group.

Use this operation to attach a managed policy to a user.

Parameters:
  • name (str) – An Idem name of the state.

  • group (str) – The name (friendly name, not ARN) of the group to attach the policy to. This parameter allows (through 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: _+=,.@-

  • policy_arn (str) – The Amazon Resource Name (ARN) of the IAM policy you want to attach.

  • resource_id (str, Optional) – Policy ARN

Request Syntax:
[iam-attach-group-policy]:
  aws.iam.group_policy_attachment.present:
    - name: "string"
    - group: "string"
    - policy_arn: "string"
    - resource_id: "string"
Returns:

Dict[str, Any]

Examples

idem-test-attach-policy:
  aws.iam.group_policy_attachment.present:
    - name: test-policy-attachment
    - group: test-policy-attachment
    - policy_arn: arn:aws:iam::aws:policy/AdministratorAccess
async idem_aws.states.aws.iam.group_policy_attachment.absent(hub, ctx, name: str, group: str = None, policy_arn: str = None, resource_id: str = None) Dict[str, Any][source]#

Removes the specified managed policy from the specified group.

Parameters:
  • name (str) – An Idem name of the state.

  • group (str, Optional) – The name (friendly name, not ARN) of the IAM user to detach the policy from.

  • policy_arn (str, Optional) – The Amazon Resource Name (ARN) of the IAM policy you want to detach.

  • resource_id (str, Optional) – Policy ARN

Request Syntax:
[iam-group-policy-name]:
  aws.iam.group_policy_attachment.absent:
    - name: "string"
    - group: "string"
    - policy_arn: '"string"
    - resource_id: "string"
Returns:

Dict[str, Any]

Examples

idem-test-attach-policy:
  aws.iam.group_policy_attachment.absent:
    - name: test-policy-attachment
    - group: test-group
    - policy_arn: arn:aws:iam::aws:policy/AdministratorAccess
async idem_aws.states.aws.iam.group_policy_attachment.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Gets information about the IAM Group policy attachment.

Lists all managed policies that are attached to the specified IAM group.

Returns:

Dict[str, Any]

Examples

$ idem describe aws.iam.group_policy_attachment