actionSSM

put_parameter

Add or update a parameter in the Systems Manager Parameter Store

Activity as code

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

Typeaction
Modulechaosaws.ssm.actions
Nameput_parameter
Returnmapping

Usage

JSON

{
  "name": "put-parameter",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.ssm.actions",
    "func": "put_parameter",
    "arguments": {
      "name": "",
      "value": ""
    }
  }
}

YAML

name: put-parameter
provider:
  arguments:
    name: ""
    value: ""
  func: put_parameter
  module: chaosaws.ssm.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
namestringYesNameName of the parameter to set
valuestringYesValueValue for the parameter
descriptionstringnullNoDescription
typestringnullNoParameter TypeType such as String
key_idstringnullNoKMS Key IDKMS key identifier to encrypt the value
overwritebooleanfalseNoOverwriteIf the parameter exists, should it be overwritten
allowed_patternstringnullNoValidation PatternRegex to validate the parameter value
tagslistnullNoTags
tierstringnullNoTierStorage class
policiesstringnullNoPoliciesStorage policies
data_typestringnullNoData TypeValidation data type for String value

Example configuration within experiment

{
  "name": "Activate Chaos",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.ssm.actions",
    "func": "put_parameter",
    "arguments": {
      "name": "chaos_trigger",
      "value": true,
      "overwrite": true,
      "type": "SecureString"
    }
  }
}

Signature

def put_parameter(name: str,
                  value: str,
                  description: str = None,
                  type: str = None,
                  key_id: str = None,
                  overwrite: bool = False,
                  allowed_pattern: str = None,
                  tags: List[Dict[str, str]] = None,
                  tier: str = None,
                  policies: str = None,
                  data_type: str = None,
                  configuration: Dict[str, Dict[str, str]] = None,
                  secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass