AWS
action IAM

# create_policy

Create a new IAM policy

Run it now
View details

Type | action
Module | chaosaws.iam.actions
Name | create_policy
Return | mapping

Usage

JSON

    {
      "name": "create-policy",
      "type": "action",
      "provider": {
        "type": "python",
        "module": "chaosaws.iam.actions",
        "func": "create_policy",
        "arguments": {
          "name": "",
          "policy": {}
        }
      }
    }

YAML

    name: create-policy
    provider:
      arguments:
        name: ""
        policy: {}
      func: create_policy
      module: chaosaws.iam.actions
      type: python
    type: action

Arguments

Name | Type | Default | Required | Title | Description
--- | --- | --- | --- | --- | ---
name | string |  | Yes | Policy Name |
policy | mapping |  | Yes | Definition |
path | string | ”/“ | No | Path |
description | string | "" | No | Description |

Signature

    def create_policy(name: str,
                      policy: Dict[str, Any],
                      path: str = '/',
                      description: str = '',
                      configuration: Dict[str, Dict[str, str]] = None,
                      secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
        pass

## Related starters

- AWS
  action IAM

  ## `attach_role_policy`

  Attach a role to a policy
- AWS
  action IAM

  ## `detach_role_policy`

  Detach a role from a policy
- AWS
  probe IAM

  ## `get_policy`

  Get a policy by its ARN