Metadata-Version: 2.1
Name: c7n-azure
Version: 0.7.5
Summary: Cloud Custodian - Azure Support
Home-page: https://cloudcustodian.io
Author: Cloud Custodian Project
License: UNKNOWN
Platform: UNKNOWN
Requires-Python: >=3.6,<4.0
Description-Content-Type: text/markdown
Requires-Dist: PyJWT (<2.0.0,>=1.7.1)
Requires-Dist: adal (<2.0.0,>=1.2.2)
Requires-Dist: applicationinsights (<0.12.0,>=0.11.9)
Requires-Dist: apscheduler (<4.0.0,>=3.6.3)
Requires-Dist: argcomplete (<2.0.0,>=1.12.0)
Requires-Dist: attrs (<21.0.0,>=20.1.0)
Requires-Dist: azure-cli-core (<3.0.0,>=2.0.81)
Requires-Dist: azure-cosmos (<4.0.0,>=3.1.2)
Requires-Dist: azure-cosmosdb-table (<2.0.0,>=1.0.6)
Requires-Dist: azure-graphrbac (<0.62.0,>=0.61.1)
Requires-Dist: azure-keyvault (==1.1.0)
Requires-Dist: azure-mgmt-apimanagement (<0.2.0,>=0.1.0)
Requires-Dist: azure-mgmt-applicationinsights (<0.3.0,>=0.2.0)
Requires-Dist: azure-mgmt-authorization (<0.61.0,>=0.60.0)
Requires-Dist: azure-mgmt-batch (<8.0.0,>=7.0.0)
Requires-Dist: azure-mgmt-cdn (<5.0.0,>=4.0.0)
Requires-Dist: azure-mgmt-cognitiveservices (<6.0.0,>=5.0.0)
Requires-Dist: azure-mgmt-compute (<11.0.0,>=10.0.0)
Requires-Dist: azure-mgmt-containerinstance (<2.0.0,>=1.5.0)
Requires-Dist: azure-mgmt-containerregistry (<3.0.0,>=2.8.0)
Requires-Dist: azure-mgmt-containerservice (<9.0.0,>=8.2.0)
Requires-Dist: azure-mgmt-cosmosdb (<0.12.0,>=0.11.0)
Requires-Dist: azure-mgmt-costmanagement (<0.2.0,>=0.1.0)
Requires-Dist: azure-mgmt-databricks (<0.2.0,>=0.1.0)
Requires-Dist: azure-mgmt-datafactory (<0.9.0,>=0.8.0)
Requires-Dist: azure-mgmt-datalake-store (<0.6.0,>=0.5.0)
Requires-Dist: azure-mgmt-dns (<4.0.0,>=3.0.0)
Requires-Dist: azure-mgmt-eventgrid (<3.0.0,>=2.2.0)
Requires-Dist: azure-mgmt-eventhub (<4.0.0,>=3.0.0)
Requires-Dist: azure-mgmt-hdinsight (<2.0.0,>=1.4.0)
Requires-Dist: azure-mgmt-iothub (<0.11.0,>=0.10.0)
Requires-Dist: azure-mgmt-keyvault (==1.1.0)
Requires-Dist: azure-mgmt-logic (<4.0.0,>=3.0.0)
Requires-Dist: azure-mgmt-managementgroups (<0.3.0,>=0.2.0)
Requires-Dist: azure-mgmt-monitor (<0.8.0,>=0.7.0)
Requires-Dist: azure-mgmt-network (<10.0.0,>=9.0.0)
Requires-Dist: azure-mgmt-policyinsights (<0.5.0,>=0.4.0)
Requires-Dist: azure-mgmt-rdbms (<2.0.0,>=1.9.0)
Requires-Dist: azure-mgmt-redis (<7.0.0,>=6.0.0)
Requires-Dist: azure-mgmt-resource (<7,>=6)
Requires-Dist: azure-mgmt-resourcegraph (<3.0.0,>=2.0.0)
Requires-Dist: azure-mgmt-search (<3.0.0,>=2.1.0)
Requires-Dist: azure-mgmt-sql (<0.17.0,>=0.16.0)
Requires-Dist: azure-mgmt-storage (<8.0.0,>=7.1.0)
Requires-Dist: azure-mgmt-subscription (<0.6.0,>=0.5.0)
Requires-Dist: azure-mgmt-web (<0.45.0,>=0.44.0)
Requires-Dist: azure-storage-blob (<2.2,>=2.1)
Requires-Dist: azure-storage-file (<3.0.0,>=2.1.0)
Requires-Dist: azure-storage-queue (<2.2,>=2.1)
Requires-Dist: boto3 (<2.0.0,>=1.14.54)
Requires-Dist: botocore (<2.0.0,>=1.17.54)
Requires-Dist: c7n (<0.10.0,>=0.9.5)
Requires-Dist: click (<8.0,>=7.0)
Requires-Dist: distlib (<0.4.0,>=0.3.0)
Requires-Dist: docutils (<0.16.0,>=0.15.2)
Requires-Dist: importlib-metadata (<2.0.0,>=1.7.0)
Requires-Dist: jmespath (<0.11.0,>=0.10.0)
Requires-Dist: jsonpickle (<2.0,>=1.2)
Requires-Dist: jsonschema (<4.0.0,>=3.2.0)
Requires-Dist: netaddr (<0.8.0,>=0.7.19)
Requires-Dist: pyrsistent (<0.17.0,>=0.16.0)
Requires-Dist: python-dateutil (<3.0.0,>=2.8.1)
Requires-Dist: pyyaml (<6.0.0,>=5.3.1)
Requires-Dist: requests (<3.0.0,>=2.22.0)
Requires-Dist: s3transfer (<0.4.0,>=0.3.3)
Requires-Dist: six (<2.0.0,>=1.15.0)
Requires-Dist: tabulate (<0.9.0,>=0.8.7)
Requires-Dist: urllib3 (<2.0.0,>=1.25.10)
Requires-Dist: zipp (<4.0.0,>=3.1.0)
Requires-Dist: azure-functions (<2.0.0,>=1.0.8) ; python_version >= "3" and python_version < "4"


# Cloud Custodian - Azure Support

This a plugin to Cloud Custodian that adds Azure support.

## Install Cloud Custodian and Azure Plugin

The Azure provider must be installed as a separate package in addition to c7n. 

    $ git clone https://github.com/cloud-custodian/cloud-custodian.git
    $ virtualenv custodian
    $ source custodian/bin/activate
    (custodian) $ pip install -e cloud-custodian/.
    (custodian) $ pip install -e cloud-custodian/tools/c7n_azure/.


## Write your first policy

A policy specifies the following items:

- The type of resource to run the policy against
- Filters to narrow down the set of resources
- Actions to take on the filtered set of resources

For this tutorial we will add a tag to all virtual machines with the name "Hello" and the value "World".

Create a file named ``custodian.yml`` with this content:

    policies:
        - name: my-first-policy
          description: |
            Adds a tag to all virtual machines
          resource: azure.vm
          actions:
            - type: tag
              tag: Hello
              value: World

## Run your policy

First, choose one of the supported authentication mechanisms and either log in to Azure CLI or set
environment variables as documented in [Authentication](https://cloudcustodian.io/docs/azure/authentication.html#azure-authentication).

    custodian run --output-dir=. custodian.yml


If successful, you should see output similar to the following on the command line

    2016-12-20 08:35:06,133: custodian.policy:INFO Running policy my-first-policy resource: azure.vm
    2016-12-20 08:35:07,514: custodian.policy:INFO policy: my-first-policy resource:azure.vm has count:1 time:1.38
    2016-12-20 08:35:08,188: custodian.policy:INFO policy: my-first-policy action: tag: 1 execution_time: 0.67


You should also find a new ``my-first-policy`` directory with a log and other
files (subsequent runs will append to the log by default rather than
overwriting it). 

## Links
- [Getting Started](https://cloudcustodian.io/docs/azure/gettingstarted.html)
- [Example Scenarios](https://cloudcustodian.io/docs/azure/examples/index.html)
- [Example Policies](https://cloudcustodian.io/docs/azure/policy/index.html)






