Skip to content

Extension chaosazure

Version 0.17.0
Repository https://github.com/chaostoolkit-incubator/chaostoolkit-azure

Build Python versions

This project is a collection of actions and probes, gathered as an extension to the Chaos Toolkit. It targets the Microsoft Azure platform.

Install

This package requires Python 3.8+

To be used from your experiment, this package must be installed in the Python environment where chaostoolkit already lives.

$ pip install -U chaostoolkit-azure

Usage

To use the probes and actions from this package, add the following to your experiment file:

{
  "type": "action",
  "name": "start-service-factory-chaos",
  "provider": {
    "type": "python",
    "module": "chaosazure.vm.actions",
    "func": "stop_machines",
    "secrets": ["azure"],
    "arguments": {
      "parameters": {
        "TimeToRunInSeconds": 45
      }
    }
  }
}

That’s it!

Please explore the code to see existing probes and actions.

Credentials

This extension uses the Azure SDK under the hood.

Environment Variables

The extensions uses a chained approach to locating the appropriate credentials, starting from the secrets in the experiment before moving to environment variables and so on as per the Azure documentation.

In theory, at the bare minimum you don’t need to set anything explicitely into the experiment and let the client figure it out based on the local machine settings.

Experiment Secrets

You may also pass them via the secrets block of the experiment:

{
  "secrets": {
    "azure": {
      "client_id": "your-super-secret-client-id",
      "client_secret": "your-even-more-super-secret-client-secret",
      "tenant_id": "your-tenant-id"
    }
  }
}

You can retrieve secretes as well from environment or HashiCorp vault.

If you are not working with Public Global Azure, e.g. China Cloud You can set the cloud environment.

{
  "client_id": "your-super-secret-client-id",
  "client_secret": "your-even-more-super-secret-client-secret",
  "tenant_id": "your-tenant-id",
  "cloud": "AZURE_CHINA_CLOUD"
}

Available cloud names:

  • AZURE_CHINA_CLOUD
  • AZURE_GERMAN_CLOUD
  • AZURE_PUBLIC_CLOUD
  • AZURE_US_GOV_CLOUD

Either of these values can be passed via AZURE_CLOUD as well.

Subscription

Additionally you need to provide the Azure subscription id.

  • As an environment variable

  • AZURE_SUBSCRIPTION_ID

  • Subscription id in the experiment file

{
  "configuration": {
    "azure_subscription_id": "your-azure-subscription-id"
  }
}

Configuration may be as well retrieved from an environment.

An old, but deprecated way of doing it was as follows, this still works but should not be favoured over the previous approaches as it’s not the Chaos Toolkit way to pass structured configurations.

{
  "configuration": {
    "azure": {
      "subscription_id": "your-azure-subscription-id"
    }
  }
}
  • Subscription id in the Azure credential file

Credential file described in the previous “Credential” section contains as well subscription id. If AZURE_AUTH_LOCATION is set and subscription id is NOT set in the experiment definition, extension will try to load it from the credential file.

Putting it all together

Here is a full example for an experiment containing secrets and configuration:

{
  "version": "1.0.0",
  "title": "...",
  "description": "...",
  "tags": ["azure", "kubernetes", "aks", "node"],
  "configuration": {
    "azure_subscription_id": "xxx"
  },
  "secrets": {
    "azure": {
      "client_id": "xxx",
      "client_secret": "xxx",
      "tenant_id": "xxx"
    }
  },
  "steady-state-hypothesis": {
    "title": "Services are all available and healthy",
    "probes": [
      {
        "type": "probe",
        "name": "consumer-service-must-still-respond",
        "tolerance": 200,
        "provider": {
          "type": "http",
          "url": "https://some-url/"
        }
      }
    ]
  },
  "method": [
    {
      "type": "action",
      "name": "restart-node-at-random",
      "provider": {
        "type": "python",
        "module": "chaosazure.machine.actions",
        "func": "restart_machines",
        "secrets": ["azure"],
        "config": ["azure_subscription_id"]
      }
    }
  ],
  "rollbacks": []
}

Contribute

If you wish to contribute more functions to this package, you are more than welcome to do so. Please, fork this project, make your changes following the usual PEP 8 code style, sprinkling with tests and submit a PR for review.

The Chaos Toolkit projects require all contributors must sign a Developer Certificate of Origin on each commit they would like to merge into the master branch of the repository. Please, make sure you can abide by the rules of the DCO before submitting a PR.

Develop

If you wish to develop on this project, make sure to install the development dependencies.

$ pdm install --dev

Now, you can edit the files and they will be automatically be seen by your environment, even when running from the chaos command locally.

Test

To run the tests for the project execute the following:

$ pdm run test

Exported Activities

aks


count_managed_clusters

Type probe
Module chaosazure.aks.probes
Name count_managed_clusters
Return integer

Return count of Azure managed cluster.

– filter : str Filter the managed cluster. If the filter is omitted all managed_clusters in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

def count_managed_clusters(filter: str = None,
                           configuration: Dict[str, Dict[str, str]] = None,
                           secrets: Dict[str, Dict[str, str]] = None) -> int:
    pass

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "count-managed-clusters",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.aks.probes",
    "func": "count_managed_clusters"
  }
}
name: count-managed-clusters
provider:
  func: count_managed_clusters
  module: chaosazure.aks.probes
  type: python
type: probe

delete_managed_clusters

Type action
Module chaosazure.aks.actions
Name delete_managed_clusters
Return None

Delete a managed cluster at random from a managed Azure Kubernetes Service.

Be aware: Deleting a managed cluster is an invasive action. You will not be able to recover the managed cluster once you deleted it.

– filter : str, optional Filter the managed cluster. If the filter is omitted all managed cluster in the subscription will be selected as potential chaos candidates.

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

delete_managed_cluster(“where resourceGroup==’rg’“, c, s) Stop all managed clusters from the group ‘rg’

delete_managed_cluster(“where resourceGroup==’rg’ and name=’name’“, c, s) Stop the managed cluster from the group ‘rg’ having the name ‘name’

delete_managed_cluster(“where resourceGroup==’rg’ | sample 2”, c, s) Stop two managed clusters at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "delete-managed-clusters",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.aks.actions",
    "func": "delete_managed_clusters"
  }
}
name: delete-managed-clusters
provider:
  func: delete_managed_clusters
  module: chaosazure.aks.actions
  type: python
type: action

delete_node

Type action
Module chaosazure.aks.actions
Name delete_node
Return None

Delete a node at random from a managed Azure Kubernetes Service.

Be aware: Deleting a node is an invasive action. You will not be able to recover the node once you deleted it.

– filter : str Filter the managed AKS. If the filter is omitted all AKS in the subscription will be selected as potential chaos candidates. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "delete-node",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.aks.actions",
    "func": "delete_node"
  }
}
name: delete-node
provider:
  func: delete_node
  module: chaosazure.aks.actions
  type: python
type: action

describe_managed_clusters

Type probe
Module chaosazure.aks.probes
Name describe_managed_clusters
Return None

Describe Azure managed cluster.

– filter : str Filter the managed cluster. If the filter is omitted all managed cluster in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "describe-managed-clusters",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.aks.probes",
    "func": "describe_managed_clusters"
  }
}
name: describe-managed-clusters
provider:
  func: describe_managed_clusters
  module: chaosazure.aks.probes
  type: python
type: probe

restart_node

Type action
Module chaosazure.aks.actions
Name restart_node
Return None

Restart a node at random from a managed Azure Kubernetes Service.

– filter : str Filter the managed AKS. If the filter is omitted all AKS in the subscription will be selected as potential chaos candidates. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "restart-node",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.aks.actions",
    "func": "restart_node"
  }
}
name: restart-node
provider:
  func: restart_node
  module: chaosazure.aks.actions
  type: python
type: action

start_managed_clusters

Type action
Module chaosazure.aks.actions
Name start_managed_clusters
Return None

Start managed cluster at random.

– filter : str, optional Filter the managed cluster. If the filter is omitted all managed cluster in the subscription will be selected as potential chaos candidates.

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

start_managed_cluster(“where resourceGroup==’rg’“, c, s) Stop all managed clusters from the group ‘rg’

start_managed_cluster(“where resourceGroup==’rg’ and name=’name’“, c, s) Stop the managed cluster from the group ‘rg’ having the name ‘name’

start_managed_cluster(“where resourceGroup==’rg’ | sample 2”, c, s) Stop two managed clusters at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "start-managed-clusters",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.aks.actions",
    "func": "start_managed_clusters"
  }
}
name: start-managed-clusters
provider:
  func: start_managed_clusters
  module: chaosazure.aks.actions
  type: python
type: action

stop_managed_clusters

Type action
Module chaosazure.aks.actions
Name stop_managed_clusters
Return None

Stop managed cluster at random.

– filter : str, optional Filter the managed cluster. If the filter is omitted all managed cluster in the subscription will be selected as potential chaos candidates.

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

stop_managed_cluster(“where resourceGroup==’rg’“, c, s) Stop all managed clusters from the group ‘rg’

stop_managed_cluster(“where resourceGroup==’rg’ and name=’name’“, c, s) Stop the managed cluster from the group ‘rg’ having the name ‘name’

stop_managed_cluster(“where resourceGroup==’rg’ | sample 2”, c, s) Stop two managed clusters at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "stop-managed-clusters",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.aks.actions",
    "func": "stop_managed_clusters"
  }
}
name: stop-managed-clusters
provider:
  func: stop_managed_clusters
  module: chaosazure.aks.actions
  type: python
type: action

stop_node

Type action
Module chaosazure.aks.actions
Name stop_node
Return None

Stop a node at random from a managed Azure Kubernetes Service.

– filter : str Filter the managed AKS. If the filter is omitted all AKS in the subscription will be selected as potential chaos candidates. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "stop-node",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.aks.actions",
    "func": "stop_node"
  }
}
name: stop-node
provider:
  func: stop_node
  module: chaosazure.aks.actions
  type: python
type: action

application_gateway


count_application_gateways

Type probe
Module chaosazure.application_gateway.probes
Name count_application_gateways
Return integer

Return count of Azure application gateways.

– filter : str Filter the application gateways. If the filter is omitted all application_gateways in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

def count_application_gateways(
        filter: str = None,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> int:
    pass

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "count-application-gateways",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.application_gateway.probes",
    "func": "count_application_gateways"
  }
}
name: count-application-gateways
provider:
  func: count_application_gateways
  module: chaosazure.application_gateway.probes
  type: python
type: probe

delete_application_gateways

Type action
Module chaosazure.application_gateway.actions
Name delete_application_gateways
Return None

Delete application gateways at random.

Be aware: Deleting an application gateway is an invasive action. You will not be able to recover the application gateway once you deleted it.

– filter : str, optional Filter the application gateways. If the filter is omitted all application gateways in the subscription will be selected as potential chaos candidates.

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

delete_application_gateways(“where resourceGroup==’rg’“, c, s) Delete all application_gateways from the group ‘rg’

delete_application_gateways(“where resourceGroup==’rg’ and name=’name’“, c, s) Delete the application gateway from the group ‘rg’ having the name ‘name’

delete_application_gateways(“where resourceGroup==’rg’ | sample 2”, c, s) Delete two application_gateways at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "delete-application-gateways",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.application_gateway.actions",
    "func": "delete_application_gateways"
  }
}
name: delete-application-gateways
provider:
  func: delete_application_gateways
  module: chaosazure.application_gateway.actions
  type: python
type: action

delete_routes

Type action
Module chaosazure.application_gateway.actions
Name delete_routes
Return None

Delete routes at random. Be aware: Deleting a route is an invasive action. You will not be able to recover the route once you deleted it.

– filter : str, optional Filter the application gateways. If the filter is omitted all routes of all application gateways in the subscription will be selected as potential chaos candidates. name_pattern : str, optional Filter the routes. If the filter is omitted all routes except the first in the server will be selected for the probe. Pattern example: ‘app[0-9]{3}’

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

delete_routes(“where resourceGroup==’rg’“, ‘chaos-’, c, s) Delete all route named ‘chaos-’ in all application gateways from the group ‘rg’ delete_routes(“where resourceGroup==’rg’ and name=’name’“, ‘chaos-test’, c, s) Delete all route named ‘chaos-*’ the server from the group ‘rg’ having the name ‘name’

If all routes are deleted the first will be kept

Signature:

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

Arguments:

Name Type Default Required
filter string null No
name_pattern string null No

Usage:

{
  "name": "delete-routes",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.application_gateway.actions",
    "func": "delete_routes"
  }
}
name: delete-routes
provider:
  func: delete_routes
  module: chaosazure.application_gateway.actions
  type: python
type: action

describe_application_gateways

Type probe
Module chaosazure.application_gateway.probes
Name describe_application_gateways
Return None

Describe Azure application gateways.

– filter : str Filter the application gateways. If the filter is omitted all application gateways in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "describe-application-gateways",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.application_gateway.probes",
    "func": "describe_application_gateways"
  }
}
name: describe-application-gateways
provider:
  func: describe_application_gateways
  module: chaosazure.application_gateway.probes
  type: python
type: probe

describe_routes

Type probe
Module chaosazure.application_gateway.probes
Name describe_routes
Return None

Describe Azure application gateways routes.

– filter : str Filter the application_gateways. If the filter is omitted all application gateways in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’ name_pattern : str Filter the routes. If the filter is omitted all routes in the server will be selected for the probe. Pattern example: ‘app[0-9]{3}’

Signature:

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

Arguments:

Name Type Default Required
filter string null No
name_pattern string null No

Usage:

{
  "name": "describe-routes",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.application_gateway.probes",
    "func": "describe_routes"
  }
}
name: describe-routes
provider:
  func: describe_routes
  module: chaosazure.application_gateway.probes
  type: python
type: probe

start_application_gateways

Type action
Module chaosazure.application_gateway.actions
Name start_application_gateways
Return None

Start application gateway at random.

– filter : str, optional Filter the application gateway. If the filter is omitted all application gateway in the subscription will be selected as potential chaos candidates.

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

start_application_gateways(“where resourceGroup==’rg’“, c, s) Start all application gateways from the group ‘rg’

start_application_gateways(“where resourceGroup==’rg’ and name=’name’“, c, s) Start the application gateway from the group ‘rg’ having the name ‘name’

start_application_gateways(“where resourceGroup==’rg’ | sample 2”, c, s) Start two application gateways at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "start-application-gateways",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.application_gateway.actions",
    "func": "start_application_gateways"
  }
}
name: start-application-gateways
provider:
  func: start_application_gateways
  module: chaosazure.application_gateway.actions
  type: python
type: action

stop_application_gateways

Type action
Module chaosazure.application_gateway.actions
Name stop_application_gateways
Return None

Stop application gateways at random.

– filter : str, optional Filter the application gateways. If the filter is omitted all application gateways in the subscription will be selected as potential chaos candidates.

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

stop_application_gateways(“where resourceGroup==’rg’“, c, s) Stop all application gateways from the group ‘rg’

stop_application_gateways(“where resourceGroup==’rg’ and name=’name’“, c, s) Stop the application gateway from the group ‘rg’ having the name ‘name’

stop_application_gateways(“where resourceGroup==’rg’ | sample 2”, c, s) Stop two application gateways at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "stop-application-gateways",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.application_gateway.actions",
    "func": "stop_application_gateways"
  }
}
name: stop-application-gateways
provider:
  func: stop_application_gateways
  module: chaosazure.application_gateway.actions
  type: python
type: action

machine


burn_io

Type action
Module chaosazure.machine.actions
Name burn_io
Return None

Increases the Disk I/O operations per second of the virtual machine.

– filter : str, optional Filter the virtual machines. If the filter is omitted all machines in the subscription will be selected as potential chaos candidates. duration : int, optional How long the burn lasts. Defaults to 60 seconds. timeout : int Additional wait time (in seconds) for filling operation to be completed Getting and sending data from/to Azure may take some time so it’s not recommended to set this value to less than 30s. Defaults to 60 seconds.

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

burn_io(“where resourceGroup==’rg’“, configuration=c, secrets=s) Increase the I/O operations per second of all machines from the group ‘rg’

burn_io(“where resourceGroup==’rg’ and name=’name’“, configuration=c, secrets=s) Increase the I/O operations per second of the machine from the group ‘rg’ having the name ‘name’

burn_io(“where resourceGroup==’rg’ | sample 2”, configuration=c, secrets=s) Increase the I/O operations per second of two machines at random from the group ‘rg’

Signature:

def burn_io(filter: str = None,
            duration: int = 60,
            timeout: int = 60,
            configuration: Dict[str, Dict[str, str]] = None,
            secrets: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
filter string null No
duration integer 60 No
timeout integer 60 No

Usage:

{
  "name": "burn-io",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.machine.actions",
    "func": "burn_io"
  }
}
name: burn-io
provider:
  func: burn_io
  module: chaosazure.machine.actions
  type: python
type: action

count_machines

Type probe
Module chaosazure.machine.probes
Name count_machines
Return integer

Return count of Azure virtual machines.

– filter : str Filter the virtual machines. If the filter is omitted all machines in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

def count_machines(filter: str = None,
                   configuration: Dict[str, Dict[str, str]] = None,
                   secrets: Dict[str, Dict[str, str]] = None) -> int:
    pass

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "count-machines",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.machine.probes",
    "func": "count_machines"
  }
}
name: count-machines
provider:
  func: count_machines
  module: chaosazure.machine.probes
  type: python
type: probe

delete_machines

Type action
Module chaosazure.machine.actions
Name delete_machines
Return None

Delete virtual machines at random.

Be aware: Deleting a machine is an invasive action. You will not be able to recover the machine once you deleted it.

– filter : str, optional Filter the virtual machines. If the filter is omitted all machines in the subscription will be selected as potential chaos candidates.

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

delete_machines(“where resourceGroup==’rg’“, c, s) Delete all machines from the group ‘rg’

delete_machines(“where resourceGroup==’rg’ and name=’name’“, c, s) Delete the machine from the group ‘rg’ having the name ‘name’

delete_machines(“where resourceGroup==’rg’ | sample 2”, c, s) Delete two machines at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

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

describe_machines

Type probe
Module chaosazure.machine.probes
Name describe_machines
Return None

Describe Azure virtual machines.

– filter : str Filter the virtual machines. If the filter is omitted all machines in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "describe-machines",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.machine.probes",
    "func": "describe_machines"
  }
}
name: describe-machines
provider:
  func: describe_machines
  module: chaosazure.machine.probes
  type: python
type: probe

fill_disk

Type action
Module chaosazure.machine.actions
Name fill_disk
Return None

Fill the disk with random data.

– filter : str, optional Filter the virtual machines. If the filter is omitted all machines in the subscription will be selected as potential chaos candidates. duration : int, optional Lifetime of the file created. Defaults to 120 seconds. timeout : int Additional wait time (in seconds) for filling operation to be completed. Getting and sending data from/to Azure may take some time so it’s not recommended to set this value to less than 30s. Defaults to 60 seconds. size : int Size of the file created on the disk. Defaults to 1GB. path : str, optional The absolute path to write the fill file into. Defaults: C:/burn for Windows clients, /root/burn for Linux clients.

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

fill_disk(“where resourceGroup==’rg’“, configuration=c, secrets=s) Fill all machines from the group ‘rg’

fill_disk(“where resourceGroup==’rg’ and name=’name’“, configuration=c, secrets=s) Fill the machine from the group ‘rg’ having the name ‘name’

fill_disk(“where resourceGroup==’rg’ | sample 2”, configuration=c, secrets=s) Fill two machines at random from the group ‘rg’

Signature:

def fill_disk(filter: str = None,
              duration: int = 120,
              timeout: int = 60,
              size: int = 1000,
              path: str = None,
              configuration: Dict[str, Dict[str, str]] = None,
              secrets: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
filter string null No
duration integer 120 No
timeout integer 60 No
size integer 1000 No
path string null No

Usage:

{
  "name": "fill-disk",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.machine.actions",
    "func": "fill_disk"
  }
}
name: fill-disk
provider:
  func: fill_disk
  module: chaosazure.machine.actions
  type: python
type: action

network_latency

Type action
Module chaosazure.machine.actions
Name network_latency
Return None

Increases the response time of the virtual machine.

– filter : str, optional Filter the virtual machines. If the filter is omitted all machines in the subscription will be selected as potential chaos candidates. duration : int, optional How long the latency lasts. Defaults to 60 seconds. timeout : int Additional wait time (in seconds) for filling operation to be completed Getting and sending data from/to Azure may take some time so it’s not recommended to set this value to less than 30s. Defaults to 60 seconds. delay : int Added delay in ms. Defaults to 200. jitter : int Variance of the delay in ms. Defaults to 50.

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

network_latency(“where resourceGroup==’rg’“, configuration=c, secrets=s) Increase the latency of all machines from the group ‘rg’

network_latency(“where resourceGroup==’rg’ and name=’name’“, configuration=c, secrets=s) Increase the latecy of the machine from the group ‘rg’ having the name ‘name’

network_latency(“where resourceGroup==’rg’ | sample 2”, configuration=c, secrets=s) Increase the latency of two machines at random from the group ‘rg’

Signature:

def network_latency(filter: str = None,
                    duration: int = 60,
                    delay: int = 200,
                    jitter: int = 50,
                    timeout: int = 60,
                    configuration: Dict[str, Dict[str, str]] = None,
                    secrets: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
filter string null No
duration integer 60 No
delay integer 200 No
jitter integer 50 No
timeout integer 60 No

Usage:

{
  "name": "network-latency",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.machine.actions",
    "func": "network_latency"
  }
}
name: network-latency
provider:
  func: network_latency
  module: chaosazure.machine.actions
  type: python
type: action

restart_machines

Type action
Module chaosazure.machine.actions
Name restart_machines
Return None

Restart virtual machines at random.

– filter : str, optional Filter the virtual machines. If the filter is omitted all machines in the subscription will be selected as potential chaos candidates.

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

restart_machines(“where resourceGroup==’rg’“, c, s) Restart all machines from the group ‘rg’

restart_machines(“where resourceGroup==’rg’ and name=’name’“, c, s) Restart the machine from the group ‘rg’ having the name ‘name’

restart_machines(“where resourceGroup==’rg’ | sample 2”, c, s) Restart two machines at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

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

start_machines

Type action
Module chaosazure.machine.actions
Name start_machines
Return None

Start virtual machines at random. Thought as a rollback action.

– filter : str, optional Filter the virtual machines. If the filter is omitted all machines in the subscription will be selected as potential chaos candidates.

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

start_machines(“where resourceGroup==’rg’“, c, s) Start all stopped machines from the group ‘rg’

start_machines(“where resourceGroup==’rg’ and name=’name’“, c, s) Start the stopped machine from the group ‘rg’ having the name ‘name’

start_machines(“where resourceGroup==’rg’ | sample 2”, c, s) Start two stopped machines at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

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

stop_machines

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

Stop virtual machines at random.

– filter : str, optional Filter the virtual machines. If the filter is omitted all machines in the subscription will be selected as potential chaos candidates.

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

stop_machines(“where resourceGroup==’rg’“, c, s) Stop all machines from the group ‘rg’

stop_machines(“where resourceGroup==’mygroup’ and name=’myname’“, c, s) Stop the machine from the group ‘mygroup’ having the name ‘myname’

stop_machines(“where resourceGroup==’mygroup’ | sample 2”, c, s) Stop two machines at random from the group ‘mygroup’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

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

stress_cpu

Type action
Module chaosazure.machine.actions
Name stress_cpu
Return None

Stress CPU up to 100% at virtual machines.

– filter : str, optional Filter the virtual machines. If the filter is omitted all machines in the subscription will be selected as potential chaos candidates. duration : int, optional Duration of the stress test (in seconds) that generates high CPU usage. Defaults to 120 seconds. timeout : int Additional wait time (in seconds) for stress operation to be completed. Getting and sending data from/to Azure may take some time so it’s not recommended to set this value to less than 30s. Defaults to 60 seconds.

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

stress_cpu(“where resourceGroup==’rg’“, configuration=c, secrets=s) Stress all machines from the group ‘rg’

stress_cpu(“where resourceGroup==’rg’ and name=’name’“, configuration=c, secrets=s) Stress the machine from the group ‘rg’ having the name ‘name’

stress_cpu(“where resourceGroup==’rg’ | sample 2”, configuration=c, secrets=s) Stress two machines at random from the group ‘rg’

Signature:

def stress_cpu(filter: str = None,
               duration: int = 120,
               timeout: int = 60,
               configuration: Dict[str, Dict[str, str]] = None,
               secrets: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
filter string null No
duration integer 120 No
timeout integer 60 No

Usage:

{
  "name": "stress-cpu",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.machine.actions",
    "func": "stress_cpu"
  }
}
name: stress-cpu
provider:
  func: stress_cpu
  module: chaosazure.machine.actions
  type: python
type: action

netapp


count_netapp_volumes

Type probe
Module chaosazure.netapp.probes
Name count_netapp_volumes
Return integer

Return count of Azure netapp volumes.

– filter : str Filter the netapp volumes. If the filter is omitted all netapp_volumes in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

def count_netapp_volumes(filter: str = None,
                         configuration: Dict[str, Dict[str, str]] = None,
                         secrets: Dict[str, Dict[str, str]] = None) -> int:
    pass

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "count-netapp-volumes",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.netapp.probes",
    "func": "count_netapp_volumes"
  }
}
name: count-netapp-volumes
provider:
  func: count_netapp_volumes
  module: chaosazure.netapp.probes
  type: python
type: probe

delete_netapp_volumes

Type action
Module chaosazure.netapp.actions
Name delete_netapp_volumes
Return None

Delete netapp volumes at random.

Be aware: Deleting a netapp volume is a invasive action. You will not be able to recover the netapp volume once you deleted it.

– filter : str, optional Filter the netapp volumes. If the filter is omitted all netapp volumes in the subscription will be selected as potential chaos candidates.

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

delete_netapp_volumes(“where resourceGroup==’rg’“, c, s) Delete all netapp volumes from the group ‘rg’

delete_netapp_volumes(“where resourceGroup==’rg’ and name=’name’“, c, s) Delete the netapp volumes from the group ‘rg’ having the name ‘name’

delete_netapp_volumes(“where resourceGroup==’rg’ | sample 2”, c, s) Delete two netapp volumes at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "delete-netapp-volumes",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.netapp.actions",
    "func": "delete_netapp_volumes"
  }
}
name: delete-netapp-volumes
provider:
  func: delete_netapp_volumes
  module: chaosazure.netapp.actions
  type: python
type: action

describe_netapp_volumes

Type probe
Module chaosazure.netapp.probes
Name describe_netapp_volumes
Return None

Describe Azure netapp volumes.

– filter : str Filter the netapp volumes. If the filter is omitted all netapp volumes in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "describe-netapp-volumes",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.netapp.probes",
    "func": "describe_netapp_volumes"
  }
}
name: describe-netapp-volumes
provider:
  func: describe_netapp_volumes
  module: chaosazure.netapp.probes
  type: python
type: probe

postgresql


count_servers

Type probe
Module chaosazure.postgresql.probes
Name count_servers
Return integer

Return count of Azure servers.

– filter : str Filter the servers. If the filter is omitted all servers in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

def count_servers(filter: str = None,
                  configuration: Dict[str, Dict[str, str]] = None,
                  secrets: Dict[str, Dict[str, str]] = None) -> int:
    pass

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "count-servers",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql.probes",
    "func": "count_servers"
  }
}
name: count-servers
provider:
  func: count_servers
  module: chaosazure.postgresql.probes
  type: python
type: probe

create_databases

Type action
Module chaosazure.postgresql.actions
Name create_databases
Return None

Delete databases at random.

Be aware: Deleting a database is an invasive action. You will not be able to recover the database once you deleted it.

– filter : str, optional Filter the servers. If the filter is omitted all databases of all servers in the subscription will be selected as potential chaos candidates.

name : str, required The name of the database to create.

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

create_databases(“where resourceGroup==’rg’“, ‘chaos-test’, c, s) Creating database named ‘chaos-test’ in all servers from the group ‘rg’

create_databases(“where resourceGroup==’rg’ and name=’name’“, ‘chaos-test’, c, s) Creating database named ‘chaos-test’ the server from the group ‘rg’ having the name ‘name’

Signature:

def create_databases(filter: str = None,
                     name: str = None,
                     charset: str = None,
                     collation: str = None,
                     configuration: Dict[str, Dict[str, str]] = None,
                     secrets: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
filter string null No
name string null No
charset string null No
collation string null No

Usage:

{
  "name": "create-databases",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql.actions",
    "func": "create_databases"
  }
}
name: create-databases
provider:
  func: create_databases
  module: chaosazure.postgresql.actions
  type: python
type: action

delete_databases

Type action
Module chaosazure.postgresql.actions
Name delete_databases
Return None

Delete databases at random.

Be aware: Deleting a database is an invasive action. You will not be able to recover the database once you deleted it.

– filter : str, optional Filter the servers. If the filter is omitted all databases of all servers in the subscription will be selected as potential chaos candidates.

name_pattern : str, optional Filter the databases. If the filter is omitted all databases in the server will be selected for the probe. Pattern example: ‘app[0-9]{3}’

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

delete_databases(“where resourceGroup==’rg’“, ‘chaos-’, c, s) Delete all database named ‘chaos-’ in all servers from the group ‘rg’

delete_databases(“where resourceGroup==’rg’ and name=’name’“, ‘chaos-test’, c, s) Delete all database named ‘chaos-*’ the server from the group ‘rg’ having the name ‘name’

Signature:

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

Arguments:

Name Type Default Required
filter string null No
name_pattern string null No

Usage:

{
  "name": "delete-databases",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql.actions",
    "func": "delete_databases"
  }
}
name: delete-databases
provider:
  func: delete_databases
  module: chaosazure.postgresql.actions
  type: python
type: action

delete_servers

Type action
Module chaosazure.postgresql.actions
Name delete_servers
Return None

Delete servers at random.

Be aware: Deleting a server is an invasive action. You will not be able to recover the server once you deleted it.

– filter : str, optional Filter the servers. If the filter is omitted all servers in the subscription will be selected as potential chaos candidates.

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

delete_servers(“where resourceGroup==’rg’“, c, s) Delete all servers from the group ‘rg’

delete_servers(“where resourceGroup==’rg’ and name=’name’“, c, s) Delete the server from the group ‘rg’ having the name ‘name’

delete_servers(“where resourceGroup==’rg’ | sample 2”, c, s) Delete two servers at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "delete-servers",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql.actions",
    "func": "delete_servers"
  }
}
name: delete-servers
provider:
  func: delete_servers
  module: chaosazure.postgresql.actions
  type: python
type: action

describe_databases

Type probe
Module chaosazure.postgresql.probes
Name describe_databases
Return None

Describe Azure servers.

– filter : str Filter the servers. If the filter is omitted all servers in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’ name_pattern : str Filter the databases. If the filter is omitted all databases in the server will be selected for the probe. Pattern example: ‘app[0-9]{3}’

Signature:

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

Arguments:

Name Type Default Required
filter string null No
name_pattern string null No

Usage:

{
  "name": "describe-databases",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql.probes",
    "func": "describe_databases"
  }
}
name: describe-databases
provider:
  func: describe_databases
  module: chaosazure.postgresql.probes
  type: python
type: probe

describe_servers

Type probe
Module chaosazure.postgresql.probes
Name describe_servers
Return None

Describe Azure servers.

– filter : str Filter the servers. If the filter is omitted all servers in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "describe-servers",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql.probes",
    "func": "describe_servers"
  }
}
name: describe-servers
provider:
  func: describe_servers
  module: chaosazure.postgresql.probes
  type: python
type: probe

restart_servers

Type action
Module chaosazure.postgresql.actions
Name restart_servers
Return None

Restart servers at random.

– filter : str, optional Filter the servers. If the filter is omitted all servers in the subscription will be selected as potential chaos candidates.

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

restart_servers(“where resourceGroup==’rg’“, c, s) Restart all servers from the group ‘rg’

restart_servers(“where resourceGroup==’rg’ and name=’name’“, c, s) Restart the server from the group ‘rg’ having the name ‘name’

restart_servers(“where resourceGroup==’rg’ | sample 2”, c, s) Restart two servers at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "restart-servers",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql.actions",
    "func": "restart_servers"
  }
}
name: restart-servers
provider:
  func: restart_servers
  module: chaosazure.postgresql.actions
  type: python
type: action

postgresql_flexible


count_servers

Type probe
Module chaosazure.postgresql_flexible.probes
Name count_servers
Return integer

Return count of Azure servers.

– filter : str Filter the servers. If the filter is omitted all servers in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

def count_servers(filter: str = None,
                  configuration: Dict[str, Dict[str, str]] = None,
                  secrets: Dict[str, Dict[str, str]] = None) -> int:
    pass

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "count-servers",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql_flexible.probes",
    "func": "count_servers"
  }
}
name: count-servers
provider:
  func: count_servers
  module: chaosazure.postgresql_flexible.probes
  type: python
type: probe

create_databases

Type action
Module chaosazure.postgresql_flexible.actions
Name create_databases
Return None

Delete databases at random.

Be aware: Deleting a database is an invasive action. You will not be able to recover the database once you deleted it.

– filter : str, optional Filter the servers. If the filter is omitted all databases of all servers in the subscription will be selected as potential chaos candidates.

name : str, required The name of the database to create.

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

create_databases(“where resourceGroup==’rg’“, ‘chaos-test’, c, s) Creating database named ‘chaos-test’ in all servers from the group ‘rg’

create_databases(“where resourceGroup==’rg’ and name=’name’“, ‘chaos-test’, c, s) Creating database named ‘chaos-test’ the server from the group ‘rg’ having the name ‘name’

Signature:

def create_databases(filter: str = None,
                     name: str = None,
                     charset: str = None,
                     collation: str = None,
                     configuration: Dict[str, Dict[str, str]] = None,
                     secrets: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
filter string null No
name string null No
charset string null No
collation string null No

Usage:

{
  "name": "create-databases",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql_flexible.actions",
    "func": "create_databases"
  }
}
name: create-databases
provider:
  func: create_databases
  module: chaosazure.postgresql_flexible.actions
  type: python
type: action

delete_databases

Type action
Module chaosazure.postgresql_flexible.actions
Name delete_databases
Return None

Delete databases at random.

Be aware: Deleting a database is an invasive action. You will not be able to recover the database once you deleted it.

– filter : str, optional Filter the servers. If the filter is omitted all databases of all servers in the subscription will be selected as potential chaos candidates.

name_pattern : str, optional Filter the databases. If the filter is omitted all databases in the server will be selected for the probe. Pattern example: ‘app[0-9]{3}’

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

delete_databases(“where resourceGroup==’rg’“, ‘chaos-’, c, s) Delete all database named ‘chaos-’ in all servers from the group ‘rg’

delete_databases(“where resourceGroup==’rg’ and name=’name’“, ‘chaos-test’, c, s) Delete all database named ‘chaos-*’ the server from the group ‘rg’ having the name ‘name’

Signature:

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

Arguments:

Name Type Default Required
filter string null No
name_pattern string null No

Usage:

{
  "name": "delete-databases",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql_flexible.actions",
    "func": "delete_databases"
  }
}
name: delete-databases
provider:
  func: delete_databases
  module: chaosazure.postgresql_flexible.actions
  type: python
type: action

delete_servers

Type action
Module chaosazure.postgresql_flexible.actions
Name delete_servers
Return None

Delete servers at random.

Be aware: Deleting a server is an invasive action. You will not be able to recover the server once you deleted it.

– filter : str, optional Filter the servers. If the filter is omitted all servers in the subscription will be selected as potential chaos candidates.

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

delete_servers(“where resourceGroup==’rg’“, c, s) Delete all servers from the group ‘rg’

delete_servers(“where resourceGroup==’rg’ and name=’name’“, c, s) Delete the server from the group ‘rg’ having the name ‘name’

delete_servers(“where resourceGroup==’rg’ | sample 2”, c, s) Delete two servers at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "delete-servers",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql_flexible.actions",
    "func": "delete_servers"
  }
}
name: delete-servers
provider:
  func: delete_servers
  module: chaosazure.postgresql_flexible.actions
  type: python
type: action

delete_tables

Type action
Module chaosazure.postgresql_flexible.actions
Name delete_tables
Return None

Delete a table randomly from all databases in servers matching the filter. Could be used to introduce random failures for resilience testing.

– filter : str, optional Filter the servers. If the filter is omitted, all servers in the subscription will be considered for potential table deletion. table_name : str, optional Specific table name to delete. If this is omitted, a table will be selected randomly for deletion. database_name : str, optional Specific database name to delete the table from. If this is omitted, a database will be selected randomly from the server for table deletion. configuration : Configuration, optional Azure configuration information. secrets : Secrets, optional Azure secret information for authentication. key_vault_url : str, optional The URL to the Azure Key Vault where the secrets are stored.

Here are some examples of calling delete_tables.

delete_tables(“where resourceGroup==’rg’“, “users”, “mydatabase”, c, s, “https://myvault.vault.azure.net/”) Deletes the table ‘users’ from the database ‘mydatabase’ in all servers in the resource group ‘rg’

delete_tables(“where resourceGroup==’rg’ and name=’name’“, None, None, c, s, “https://myvault.vault.azure.net/”) Deletes a random table from a random database in the server named ‘name’ in the resource group ‘rg’

delete_tables(“where resourceGroup==’rg’ | sample 2”, “orders”, “mydatabase”, c, s, “https://myvault.vault.azure.net/”) Deletes the table ‘orders’ from the database ‘mydatabase’ in two random servers in the resource group ‘rg’

Signature:

def delete_tables(filter: str = None,
                  table_name: str = None,
                  database_name: str = None,
                  configuration: Dict[str, Dict[str, str]] = None,
                  secrets: Dict[str, Dict[str, str]] = None,
                  key_vault_url: str = None):
    pass

Arguments:

Name Type Default Required
filter string null No
table_name string null No
database_name string null No
key_vault_url string null No

Usage:

{
  "name": "delete-tables",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql_flexible.actions",
    "func": "delete_tables"
  }
}
name: delete-tables
provider:
  func: delete_tables
  module: chaosazure.postgresql_flexible.actions
  type: python
type: action

describe_databases

Type probe
Module chaosazure.postgresql_flexible.probes
Name describe_databases
Return None

Describe Azure servers.

– filter : str Filter the servers. If the filter is omitted all servers in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’ name_pattern : str Filter the databases. If the filter is omitted all databases in the server will be selected for the probe. Pattern example: ‘app[0-9]{3}’

Signature:

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

Arguments:

Name Type Default Required
filter string null No
name_pattern string null No

Usage:

{
  "name": "describe-databases",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql_flexible.probes",
    "func": "describe_databases"
  }
}
name: describe-databases
provider:
  func: describe_databases
  module: chaosazure.postgresql_flexible.probes
  type: python
type: probe

describe_servers

Type probe
Module chaosazure.postgresql_flexible.probes
Name describe_servers
Return None

Describe Azure servers.

– filter : str Filter the servers. If the filter is omitted all servers in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "describe-servers",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql_flexible.probes",
    "func": "describe_servers"
  }
}
name: describe-servers
provider:
  func: describe_servers
  module: chaosazure.postgresql_flexible.probes
  type: python
type: probe

restart_servers

Type action
Module chaosazure.postgresql_flexible.actions
Name restart_servers
Return None

Restart servers at random.

– filter : str, optional Filter the servers. If the filter is omitted all servers in the subscription will be selected as potential chaos candidates.

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

restart_servers(“where resourceGroup==’rg’“, c, s) Restart all servers from the group ‘rg’

restart_servers(“where resourceGroup==’rg’ and name=’name’“, c, s) Restart the server from the group ‘rg’ having the name ‘name’

restart_servers(“where resourceGroup==’rg’ | sample 2”, c, s) Restart two servers at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "restart-servers",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql_flexible.actions",
    "func": "restart_servers"
  }
}
name: restart-servers
provider:
  func: restart_servers
  module: chaosazure.postgresql_flexible.actions
  type: python
type: action

start_servers

Type action
Module chaosazure.postgresql_flexible.actions
Name start_servers
Return None

Start servers at random. Thought as a rollback action.

– filter : str, optional Filter the servers. If the filter is omitted all servers in the subscription will be selected as potential chaos candidates.

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

start_servers(“where resourceGroup==’rg’“, c, s) Start all stopped servers from the group ‘rg’

start_servers(“where resourceGroup==’rg’ and name=’name’“, c, s) Start the stopped server from the group ‘rg’ having the name ‘name’

start_servers(“where resourceGroup==’rg’ | sample 2”, c, s) Start two stopped servers at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "start-servers",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql_flexible.actions",
    "func": "start_servers"
  }
}
name: start-servers
provider:
  func: start_servers
  module: chaosazure.postgresql_flexible.actions
  type: python
type: action

stop_servers

Type action
Module chaosazure.postgresql_flexible.actions
Name stop_servers
Return None

Stop servers at random.

– filter : str, optional Filter the servers. If the filter is omitted all servers in the subscription will be selected as potential chaos candidates.

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

stop_servers(“where resourceGroup==’rg’“, c, s) Stop all servers from the group ‘rg’

stop_servers(“where resourceGroup==’mygroup’ and name=’myname’“, c, s) Stop the server from the group ‘mygroup’ having the name ‘myname’

stop_servers(“where resourceGroup==’mygroup’ | sample 2”, c, s) Stop two servers at random from the group ‘mygroup’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "stop-servers",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.postgresql_flexible.actions",
    "func": "stop_servers"
  }
}
name: stop-servers
provider:
  func: stop_servers
  module: chaosazure.postgresql_flexible.actions
  type: python
type: action

storage


count_blob_containers

Type probe
Module chaosazure.storage.probes
Name count_blob_containers
Return integer

Return count of Azure Blob Containers in filtered Storage account.

– filter : str Filter the storage account. If the filter is omitted all blob containers in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

def count_blob_containers(filter: str = None,
                          configuration: Dict[str, Dict[str, str]] = None,
                          secrets: Dict[str, Dict[str, str]] = None) -> int:
    pass

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "count-blob-containers",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.storage.probes",
    "func": "count_blob_containers"
  }
}
name: count-blob-containers
provider:
  func: count_blob_containers
  module: chaosazure.storage.probes
  type: python
type: probe

count_storage_accounts

Type probe
Module chaosazure.storage.probes
Name count_storage_accounts
Return integer

Return count of Azure storage account.

– filter : str Filter the storage account. If the filter is omitted all storage_accounts in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

def count_storage_accounts(filter: str = None,
                           configuration: Dict[str, Dict[str, str]] = None,
                           secrets: Dict[str, Dict[str, str]] = None) -> int:
    pass

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "count-storage-accounts",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.storage.probes",
    "func": "count_storage_accounts"
  }
}
name: count-storage-accounts
provider:
  func: count_storage_accounts
  module: chaosazure.storage.probes
  type: python
type: probe

delete_blob_containers

Type action
Module chaosazure.storage.actions
Name delete_blob_containers
Return None

Delete blob containers at random.

Be aware: Deleting a blob container is a invasive action. You will not be able to recover the blob container once you deleted it.

– filter : str, optional Filter the storage account. If the filter is omitted all storage accounts in the subscription will have their blob containers selected as potential chaos candidates. name_pattern : str, optional Filter the blob containers. If the filter is omitted all blob containers will be selected for the probe. Pattern example: ‘container[0-9]{3}’ number : int, optional Pick the number of blob containers matching the two filters that will be deleted. If the number is omitted all blob containers in the list will be deleted.

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

delete_blob_containers(“where resourceGroup==’rg’“, c, s) Delete all blob containers from the group ‘rg’

delete_blob_containers(“where resourceGroup==’rg’ and name=’name’“, c, s) Delete the blob containers from the group ‘rg’ under the storage account named ‘name’

delete_blob_containers(“where resourceGroup==’rg’“, “chaos-”, c, s) Delete the blob containers from the group ‘rg’ matching the “chaos-” pattern

delete_blob_containers(“where resourceGroup==’rg’“, “chaos-”, 3, c, s) Delete 3 blob containers at random from the group ‘rg’ matching the “chaos-” pattern

Signature:

def delete_blob_containers(filter: str = None,
                           name_pattern: str = None,
                           number: int = None,
                           configuration: Dict[str, Dict[str, str]] = None,
                           secrets: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
filter string null No
name_pattern string null No
number integer null No

Usage:

{
  "name": "delete-blob-containers",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.storage.actions",
    "func": "delete_blob_containers"
  }
}
name: delete-blob-containers
provider:
  func: delete_blob_containers
  module: chaosazure.storage.actions
  type: python
type: action

delete_storage_accounts

Type action
Module chaosazure.storage.actions
Name delete_storage_accounts
Return None

Delete storage accounts at random.

Be aware: Deleting a storage account is a invasive action. You will not be able to recover the storage account once you deleted it.

– filter : str, optional Filter the storage accounts. If the filter is omitted all storage accounts in the subscription will be selected as potential chaos candidates.

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

delete_storage_accounts(“where resourceGroup==’rg’“, c, s) Delete all storage accounts from the group ‘rg’

delete_storage_accounts(“where resourceGroup==’rg’ and name=’name’“, c, s) Delete the storage accounts from the group ‘rg’ having the name ‘name’

delete_storage_accounts(“where resourceGroup==’rg’ | sample 2”, c, s) Delete two storage accounts at random from the group ‘rg’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "delete-storage-accounts",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.storage.actions",
    "func": "delete_storage_accounts"
  }
}
name: delete-storage-accounts
provider:
  func: delete_storage_accounts
  module: chaosazure.storage.actions
  type: python
type: action

describe_storage_accounts

Type probe
Module chaosazure.storage.probes
Name describe_storage_accounts
Return None

Describe Azure storage account.

– filter : str Filter the storage account. If the filter is omitted all storage account in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "describe-storage-accounts",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.storage.probes",
    "func": "describe_storage_accounts"
  }
}
name: describe-storage-accounts
provider:
  func: describe_storage_accounts
  module: chaosazure.storage.probes
  type: python
type: probe

vmss


burn_io

Type action
Module chaosazure.vmss.actions
Name burn_io
Return None

Increases the Disk I/O operations per second of the VMSS machine. Similar to the burn_io action of the machine.actions module.

Signature:


Arguments:

Name Type Default Required
filter string null No
duration integer 60 No
timeout integer 60 No
instance_criteria object null No

Usage:

{
  "name": "burn-io",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.vmss.actions",
    "func": "burn_io"
  }
}
name: burn-io
provider:
  func: burn_io
  module: chaosazure.vmss.actions
  type: python
type: action

count_instances

Type probe
Module chaosazure.vmss.probes
Name count_instances
Return integer

Return count of VMSS instances.

– filter : str Filter the VMSS instance. If the filter is omitted all machines in the subscription will be selected for the probe. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

def count_instances(filter: str = None,
                    configuration: Dict[str, Dict[str, str]] = None,
                    secrets: Dict[str, Dict[str, str]] = None) -> int:
    pass

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "count-instances",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosazure.vmss.probes",
    "func": "count_instances"
  }
}
name: count-instances
provider:
  func: count_instances
  module: chaosazure.vmss.probes
  type: python
type: probe

deallocate_vmss

Type action
Module chaosazure.vmss.actions
Name deallocate_vmss
Return None

Deallocate a virtual machine scale set instance at random.

– filter : str Filter the virtual machine scale set. If the filter is omitted all virtual machine scale sets in the subscription will be selected as potential chaos candidates. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:


Arguments:

Name Type Default Required
filter string null No
instance_criteria object null No

Usage:

{
  "name": "deallocate-vmss",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.vmss.actions",
    "func": "deallocate_vmss"
  }
}
name: deallocate-vmss
provider:
  func: deallocate_vmss
  module: chaosazure.vmss.actions
  type: python
type: action

delete_vmss

Type action
Module chaosazure.vmss.actions
Name delete_vmss
Return None

Delete a virtual machine scale set instance at random.

Be aware: Deleting a VMSS instance is an invasive action. You will not be able to recover the VMSS instance once you deleted it.

– filter : str Filter the virtual machine scale set. If the filter is omitted all virtual machine scale sets in the subscription will be selected as potential chaos candidates. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:


Arguments:

Name Type Default Required
filter string null No
instance_criteria object null No

Usage:

{
  "name": "delete-vmss",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.vmss.actions",
    "func": "delete_vmss"
  }
}
name: delete-vmss
provider:
  func: delete_vmss
  module: chaosazure.vmss.actions
  type: python
type: action

fill_disk

Type action
Module chaosazure.vmss.actions
Name fill_disk
Return None

Fill the VMSS machine disk with random data. Similar to the fill_disk action of the machine.actions module.

Signature:


Arguments:

Name Type Default Required
filter string null No
duration integer 120 No
timeout integer 60 No
size integer 1000 No
path string null No
instance_criteria object null No

Usage:

{
  "name": "fill-disk",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.vmss.actions",
    "func": "fill_disk"
  }
}
name: fill-disk
provider:
  func: fill_disk
  module: chaosazure.vmss.actions
  type: python
type: action

network_latency

Type action
Module chaosazure.vmss.actions
Name network_latency
Return None

Increases the response time of the virtual machine. Similar to the network_latency action of the machine.actions module.

Signature:


Arguments:

Name Type Default Required
filter string null No
duration integer 60 No
delay integer 200 No
jitter integer 50 No
timeout integer 60 No
instance_criteria object null No

Usage:

{
  "name": "network-latency",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.vmss.actions",
    "func": "network_latency"
  }
}
name: network-latency
provider:
  func: network_latency
  module: chaosazure.vmss.actions
  type: python
type: action

restart_vmss

Type action
Module chaosazure.vmss.actions
Name restart_vmss
Return None

Restart a virtual machine scale set instance at random.

– filter : str Filter the virtual machine scale set. If the filter is omitted all virtual machine scale sets in the subscription will be selected as potential chaos candidates. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:


Arguments:

Name Type Default Required
filter string null No
instance_criteria object null No

Usage:

{
  "name": "restart-vmss",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.vmss.actions",
    "func": "restart_vmss"
  }
}
name: restart-vmss
provider:
  func: restart_vmss
  module: chaosazure.vmss.actions
  type: python
type: action

stop_vmss

Type action
Module chaosazure.vmss.actions
Name stop_vmss
Return None

Stops instances from the filtered scale set either at random or by a defined instance criteria.

– filter : str Filter the virtual machine scale set. If the filter is omitted all virtual machine scale sets in the subscription will be selected as potential chaos candidates. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’ instance_criteria : Iterable[Mapping[str, any]] Allows specification of criteria for selection of a given virtual machine scale set instance. If the instance_criteria is omitted, an instance will be chosen at random. All of the criteria within each item of the Iterable must match, i.e. AND logic is applied. The first item with all matching criterion will be used to select the instance. Criteria example: [ {“name”: “myVMSSInstance1”}, { “name”: “myVMSSInstance2”, “instanceId”: “2” } {“instanceId”: “3”}, ] If the instances include two items. One with name = myVMSSInstance4 and instanceId = 2. The other with name = myVMSSInstance2 and instanceId = 3. The criteria {“instanceId”: “3”} will be the first match since both the name and the instanceId did not match on the first criteria.

Signature:


Arguments:

Name Type Default Required
filter string null No
instance_criteria object null No

Usage:

{
  "name": "stop-vmss",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.vmss.actions",
    "func": "stop_vmss"
  }
}
name: stop-vmss
provider:
  func: stop_vmss
  module: chaosazure.vmss.actions
  type: python
type: action

stress_vmss_instance_cpu

Type action
Module chaosazure.vmss.actions
Name stress_vmss_instance_cpu
Return None

Signature:


Arguments:

Name Type Default Required
filter string null No
duration integer 120 No
timeout integer 60 No
instance_criteria object null No

Usage:

{
  "name": "stress-vmss-instance-cpu",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.vmss.actions",
    "func": "stress_vmss_instance_cpu"
  }
}
name: stress-vmss-instance-cpu
provider:
  func: stress_vmss_instance_cpu
  module: chaosazure.vmss.actions
  type: python
type: action

webapp


delete_webapp

Type action
Module chaosazure.webapp.actions
Name delete_webapp
Return None

Delete a web app at random.

***Be aware**: Deleting a web app is an invasive action. You will not be able to recover the web app once you deleted it.

– filter : str Filter the web apps. If the filter is omitted all web apps in the subscription will be selected as potential chaos candidates. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "delete-webapp",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.webapp.actions",
    "func": "delete_webapp"
  }
}
name: delete-webapp
provider:
  func: delete_webapp
  module: chaosazure.webapp.actions
  type: python
type: action

restart_webapp

Type action
Module chaosazure.webapp.actions
Name restart_webapp
Return None

Restart a web app at random.

– filter : str Filter the web apps. If the filter is omitted all web apps in the subscription will be selected as potential chaos candidates. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "restart-webapp",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.webapp.actions",
    "func": "restart_webapp"
  }
}
name: restart-webapp
provider:
  func: restart_webapp
  module: chaosazure.webapp.actions
  type: python
type: action

start_webapp

Type action
Module chaosazure.webapp.actions
Name start_webapp
Return None

Start a web app at random.

– filter : str Filter the web apps. If the filter is omitted all web apps in the subscription will be selected as potential chaos candidates. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "start-webapp",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.webapp.actions",
    "func": "start_webapp"
  }
}
name: start-webapp
provider:
  func: start_webapp
  module: chaosazure.webapp.actions
  type: python
type: action

stop_webapp

Type action
Module chaosazure.webapp.actions
Name stop_webapp
Return None

Stop a web app at random.

– filter : str Filter the web apps. If the filter is omitted all web apps in the subscription will be selected as potential chaos candidates. Filtering example: ‘where resourceGroup==”myresourcegroup” and name=”myresourcename”’

Signature:

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

Arguments:

Name Type Default Required
filter string null No

Usage:

{
  "name": "stop-webapp",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosazure.webapp.actions",
    "func": "stop_webapp"
  }
}
name: stop-webapp
provider:
  func: stop_webapp
  module: chaosazure.webapp.actions
  type: python
type: action