last sync: 2020-Oct-30 14:31:57 UTC

Azure Policy definition

API Management services should use a virtual network

Name API Management services should use a virtual network
Azure Portal
Id ef619a2c-cc4d-4d03-b2ba-8c94a834d85b
Version 1.0.0
details on versioning
Category API Management
Microsoft docs
Description Virtual network on API Management services of the specified SKU should be enabled.
Mode Indexed
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: Audit
Allowed: (Audit, Disabled)
Used RBAC Role none
History
Date/Time (UTC ymd) (i) Change type Change detail
2020-05-29 15:39:09 add ef619a2c-cc4d-4d03-b2ba-8c94a834d85b
Used in Initiatives none
Json
{
  "properties": {
    "displayName": "API Management services should use a virtual network",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "Virtual network on API Management services of the specified SKU should be enabled.",
    "metadata": {
      "version": "1.0.0",
      "category": "API Management"
    },
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        },
        "allowedValues": [
          "Audit",
          "Disabled"
        ],
        "defaultValue": "Audit"
      },
      "evaluatedSkuNames": {
        "type": "Array",
        "metadata": {
          "displayName": "API Management SKU Names",
          "description": "List of API Management SKUs against which this policy will be evaluated."
        },
        "allowedValues": [
          "Developer",
          "Basic",
          "Standard",
          "Premium",
          "Consumption"
        ],
        "defaultValue": [
          "Developer",
          "Premium"
        ]
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.ApiManagement/service"
          },
          {
            "field": "Microsoft.ApiManagement/service/sku.name",
          "in": "[parameters('evaluatedSkuNames')]"
          },
          {
            "anyOf": [
              {
                "field": "Microsoft.ApiManagement/service/virtualNetworkType",
                "exists": "false"
              },
              {
                "field": "Microsoft.ApiManagement/service/virtualNetworkType",
                "equals": "None"
              }
            ]
          }
        ]
      },
      "then": {
      "effect": "[parameters('effect')]"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/ef619a2c-cc4d-4d03-b2ba-8c94a834d85b",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "ef619a2c-cc4d-4d03-b2ba-8c94a834d85b"
}