actionFault Injection Simulator

start_experiment

Starts running an experiment from the specified experiment template

Activity as code

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

Typeaction
Modulechaosaws.fis.actions
Namestart_experiment
Returnmapping

Usage

JSON

{
  "name": "start-experiment",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.fis.actions",
    "func": "start_experiment",
    "arguments": {
      "experiment_template_id": ""
    }
  }
}

YAML

name: start-experiment
provider:
  arguments:
    experiment_template_id: ""
  func: start_experiment
  module: chaosaws.fis.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
experiment_template_idstringYesExperiment Template IDFIS experiment template identifier
client_tokenstringnullNoClient Token
tagsmappingnullNoTags

Example

> start_experiment(experiment_template_id="EXT6oWVA1WrLNy4XS")
{
  "ResponseMetadata": {
    "RequestId": "1ceaedae-5897-4b64-9ade-9e94449f1262",
    "HTTPStatusCode": 200,
    "HTTPHeaders": {
      "date": "Thu, 12 Aug 2021 14:21:19 GMT",
      ...
    };
    "experiment": {
      "id": "EXPXDPecuQBFiZs1Jz",
      "experimentTemplateId": "EXT6oWVA1WrLNy4XS",
    ...
    }
  }
}
> start_experiment(
  experiment_template_id="EXT6oWVA1WrLNy4XS",
  client_token="my-unique-token",
  tags={"a-key": "a-value"}
  )

Signature

def start_experiment(
        experiment_template_id: str,
        client_token: str = None,
        tags: Dict[str, str] = None,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass