Azure
start_machines
Start virtual machines at random
Below are the details and signature of the activity Python module.
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