Azure
action Machine

# stop_machines

Stop virtual machines at random

Run it now
View details

Type | action
Module | chaosazure.machine.actions
Name | stop_machines
Return | None

Usage

JSON

    {
      "name": "stop-machines",
      "type": "action",
      "provider": {
        "type": "python",
        "module": "chaosazure.machine.actions",
        "func": "stop_machines"
      }
    }

YAML

    name: stop-machines
    provider:
      func: stop_machines
      module: chaosazure.machine.actions
      type: python
    type: action

Arguments

Name | Type | Default | Required | Title | Description
--- | --- | --- | --- | --- | ---
filter | string | null | No | Filter | Target filter selector

If the filter is omitted all machines in the subscription will be selected as potential chaos candidates.

Thought of as a rollback action.

Examples

Some calling examples. Deep dive into the filter syntax: https://docs.microsoft.com/en-us/azure/kusto/query/

    # Stop all machines from the group 'rg'
    > stop_machines("where resourceGroup=='rg'", c, s)

    # Stop the machine from the group 'mygroup' having the name 'myname'
    > stop_machines("where resourceGroup=='mygroup' and name='myname'", c, s)

    # Stop two machines at random from the group 'mygroup'
    > stop_machines("where resourceGroup=='mygroup' | sample 2", c, s)

Signature

    def stop_machines(filter: str = None,
                      configuration: Dict[str, Dict[str, str]] = None,
                      secrets: Dict[str, Dict[str, str]] = None):
        pass

## Related starters

- Azure
  action Machine

  ## `delete_machines`

  Delete virtual machines at random
- Azure
  action Machine

  ## `stress_cpu`

  Stress CPU up to 100% at random machines
- Azure
  action Machine

  ## `fill_disk`

  Fill the disk with random data