actionIAM

create_policy

Create a new IAM policy

Activity as code

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

Typeaction
Modulechaosaws.iam.actions
Namecreate_policy
Returnmapping

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

NameTypeDefaultRequiredTitleDescription
namestringYesPolicy Name
policymappingYesDefinition
pathstring”/”NoPath
descriptionstring""NoDescription

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