Azure
delete_machines
Delete virtual machines at random
Below are the details and signature of the activity Python module.
Type | action |
Module | chaosazure.machine.actions |
Name | start_machines |
Return | None |
Usage
JSON
{
"name": "start-machines",
"type": "action",
"provider": {
"type": "python",
"module": "chaosazure.machine.actions",
"func": "start_machines"
}
}
YAML
name: start-machines
provider:
func: start_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/
# Start all stopped machines from the group 'rg'
> start_machines("where resourceGroup=='rg'", c, s)
# Start the stopped machine from the group 'rg' having the name 'name'
> start_machines("where resourceGroup=='rg' and name='name'", c, s)
# Start two stopped machines at random from the group 'rg'
> start_machines("where resourceGroup=='rg' | sample 2", c, s)
Signature
def start_machines(filter: str = None,
configuration: Dict[str, Dict[str, str]] = None,
secrets: Dict[str, Dict[str, str]] = None):
pass