Metadata-Version: 2.1
Name: c7n_azure
Version: 0.7.44
Summary: Cloud Custodian - Azure Support
Home-page: https://cloudcustodian.io
License: Apache-2.0
Author: Cloud Custodian Project
Requires-Python: >=3.9.2,<4.0.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Distributed Computing
Classifier: Topic :: System :: Systems Administration
Requires-Dist: c7n (==0.9.45) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: c7n (==0.9.45) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-authorization (==1.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-advisor (==9.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-apimanagement (==1.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-appconfiguration (==0.7.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-applicationinsights (==1.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-automation (==0.1.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-batch (==15.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-cognitiveservices (==11.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-cosmosdb (==6.4.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-costmanagement (==1.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-containerinstance (==7.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-compute (==29.1.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-cdn (==12.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-containerregistry (==14.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-containerservice (==15.1.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-databricks (==1.0.0b1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-datalake-analytics (==0.5.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-datalake-store (==0.5.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-datafactory (==1.1.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-desktopvirtualization (==1.1.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-dns (==8.0.0b1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-eventgrid (==10.4.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-eventhub (==11.2.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-hdinsight (==7.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-iothub (==1.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-keyvault (==8.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-kusto (==2.2.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-machinelearningservices (==2.0.0b2) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-managementgroups (==1.0.0b1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-network (==28.1.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-redhatopenshift (==1.5.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-resourcegraph (==7.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-resource (==23.4.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-rdbms (==10.2.0b17) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-search (==8.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-sql (==1.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-storage (==22.2.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-streamanalytics (==1.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-subscription (==1.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-web (==3.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-logic (==9.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-storage-blob (==12.25.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-storage-queue (==12.12.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-cosmosdb-table (==1.0.6) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: applicationinsights (==0.11.10) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: apscheduler (==3.11.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: distlib (==0.3.9) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: pyjwt (==2.10.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: adal (==1.2.7) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: requests (==2.32.3) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-functions (==1.23.0) ; python_full_version >= "3.9.2" and python_version < "4"
Requires-Dist: azure-graphrbac (==0.61.2) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: netaddr (==0.7.20) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-storage-file (==2.1.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-policyinsights (==1.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-monitor (==2.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: click (==8.1.8) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-cosmos (==3.2.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-redis (==14.5.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-keyvault-secrets (==4.9.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-keyvault-keys (==4.10.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-keyvault-certificates (==4.9.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-identity (==1.23.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-keyvault (==4.2.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-storage-file-share (==12.21.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: cryptography (==44.0.3) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-msi (==1.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: jmespath (==1.0.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-servicefabric (==1.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-trafficmanager (==0.51.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-frontdoor (==1.2.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-security (==7.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-servicebus (==8.2.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-appplatform (==8.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-recoveryservices (==2.5.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-signalr (==0.4.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-synapse (==2.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-recoveryservicesbackup (==7.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: urllib3 (==1.26.20) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: argcomplete (==3.6.2) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: boto3 (==1.38.25) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: docutils (==0.18.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: importlib-metadata (==8.6.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: jsonschema (==4.24.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: python-dateutil (==2.9.0.post0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: pyyaml (==6.0.2) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: tabulate (==0.9.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-common (==1.1.28) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-core (==1.5.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: msrest (==0.7.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: msrestazure (==0.6.4.post1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: isodate (==0.7.2) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: typing-extensions (==4.13.2) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-datalake-nspkg (==3.0.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-core (==1.34.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-cosmosdb-nspkg (==2.0.2) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: tzlocal (==5.3.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: certifi (==2025.4.26) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: charset-normalizer (==3.4.2) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: idna (==3.10) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: werkzeug (==3.1.3) ; python_full_version >= "3.9.2" and python_version < "4"
Requires-Dist: azure-storage-common (==2.1.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: colorama (==0.4.6) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0" and platform_system == "Windows"
Requires-Dist: six (==1.17.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: msal (==1.32.3) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: msal-extensions (==1.3.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: cffi (==1.17.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0" and platform_python_implementation != "PyPy"
Requires-Dist: botocore (==1.38.25) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: s3transfer (==0.13.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: zipp (==3.22.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: attrs (==25.3.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: jsonschema-specifications (==2025.4.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: referencing (==0.36.2) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: rpds-py (==0.25.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: requests-oauthlib (==2.0.0) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-mgmt-nspkg (==3.0.2) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: azure-nspkg (==3.0.2) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: tzdata (==2025.2) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0" and platform_system == "Windows"
Requires-Dist: markupsafe (==3.0.2) ; python_full_version >= "3.9.2" and python_version < "4"
Requires-Dist: pyjwt (==2.10.1) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Requires-Dist: pycparser (==2.22) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0" and platform_python_implementation != "PyPy"
Requires-Dist: oauthlib (==3.2.2) ; python_full_version >= "3.9.2" and python_full_version < "4.0.0"
Project-URL: Documentation, https://cloudcustodian.io/docs/
Project-URL: Repository, https://github.com/cloud-custodian/cloud-custodian
Description-Content-Type: text/markdown


# 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)





