actionIAM

attach_role_policy

Attach a role to a policy

Activity as code

Below are the details and signature of the activity Python module.

Typeaction
Modulechaosaws.iam.actions
Nameattach_role_policy
Returnmapping

Usage

JSON

{
  "name": "attach-role-policy",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.iam.actions",
    "func": "attach_role_policy",
    "arguments": {
      "arn": "",
      "role_name": ""
    }
  }
}

YAML

name: attach-role-policy
provider:
  arguments:
    arn: ""
    role_name: ""
  func: attach_role_policy
  module: chaosaws.iam.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
arnstringYesPolicy ARN
role_namestringYesRole NameName of the role to attach to the policy

Signature

def attach_role_policy(
        arn: str,
        role_name: str,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass