Azure ModesΒΆ

Custodian can run in numerous modes depending with the default being pull Mode.

  • pull:

    Default mode, which runs locally where custodian is run.

    Schema:

    {}
    
  • azure-periodic:

    Runs custodian in Azure Functions at a user defined cron interval.

    Schema:

    {
      "execution-options": {
        "type": "object"
      },
      "provision-options": {
        "appInsights": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "properties": {
                "location": "string",
                "name": "string",
                "resourceGroupName": "string"
              },
              "type": "object"
            }
          ],
          "type": "object"
        },
        "servicePlan": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "properties": {
                "autoScale": {
                  "properties": {
                    "defaultCapacity": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "maxCapacity": {
                      "type": "string"
                    },
                    "minCapacity": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "location": "string",
                "name": "string",
                "resourceGroupName": "string",
                "skuName": "string",
                "skuTier": "string"
              },
              "type": "object"
            }
          ],
          "type": "object"
        },
        "storageAccount": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "properties": {
                "location": "string",
                "name": "string",
                "resourceGroupName": "string"
              },
              "type": "object"
            }
          ],
          "type": "object"
        },
        "type": "object"
      },
      "schedule": {
        "type": "string"
      }
    }
    
  • azure-event-grid:

    Runs custodian in Azure Functions triggered by event-grid events. This allows you to apply your policies as soon as events occur. See Azure Event Grid for more details.

    Schema:

    {
      "events": {
        "items": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "properties": {
                "event": {
                  "type": "string"
                },
                "resourceProvider": {
                  "type": "string"
                }
              },
              "required": [
                "resourceProvider",
                "event"
              ],
              "type": "object"
            }
          ]
        },
        "required": true,
        "type": "array"
      },
      "execution-options": {
        "type": "object"
      },
      "provision-options": {
        "appInsights": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "properties": {
                "location": "string",
                "name": "string",
                "resourceGroupName": "string"
              },
              "type": "object"
            }
          ],
          "type": "object"
        },
        "servicePlan": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "properties": {
                "autoScale": {
                  "properties": {
                    "defaultCapacity": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "maxCapacity": {
                      "type": "string"
                    },
                    "minCapacity": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "location": "string",
                "name": "string",
                "resourceGroupName": "string",
                "skuName": "string",
                "skuTier": "string"
              },
              "type": "object"
            }
          ],
          "type": "object"
        },
        "storageAccount": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "properties": {
                "location": "string",
                "name": "string",
                "resourceGroupName": "string"
              },
              "type": "object"
            }
          ],
          "type": "object"
        },
        "type": "object"
      }
    }