Bylaw

Gallery › Media Services › Azure built-in policies

[Deprecated]: Azure Media Services accounts should use an API that supports Private Link

Converted Policy Audit Deny Disabled Mode Indexed Version 1.1.0-deprecated Deprecated

This policy is deprecated because Media Services retirement. Learn more about policy definition deprecation at aka.ms/policydefdeprecation.

ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.

Azure Policy JSONRequirePrivateLinkSupport_Audit.json · 52 lines
{
  "properties": {
    "displayName": "[Deprecated]: Azure Media Services accounts should use an API that supports Private Link",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "This policy is deprecated because Media Services retirement. Learn more about policy definition deprecation at aka.ms/policydefdeprecation.",
    "metadata": {
      "version": "1.1.0-deprecated",
      "category": "Media Services",
      "deprecated": true
    },
    "version": "1.1.0",
    "parameters": {
      "effect": {
        "type": "string",
        "allowedValues": [
          "Audit",
          "Deny",
          "Disabled"
        ],
        "defaultValue": "Disabled",
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        }
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.Media/mediaservices"
          },
          {
            "field": "Microsoft.Media/mediaservices/encryption.type",
            "exists": "false"
          }
        ]
      },
      "then": {
        "effect": "[parameters('effect')]"
      }
    },
    "versions": [
      "1.1.0",
      "1.0.0"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/a77d8bb4-8d22-4bc1-a884-f582a705b480",
  "name": "a77d8bb4-8d22-4bc1-a884-f582a705b480"
}
Bylawa77d8bb4-8d22-4bc1-a884-f582a705b480.bylaw.ps1 · 30 lines
# Converted from RequirePrivateLinkSupport_Audit.json by ConvertTo-Bylaw.
Policy 'a77d8bb4-8d22-4bc1-a884-f582a705b480' {

    Properties @{
        DisplayName   = '[Deprecated]: Azure Media Services accounts should use an API that supports Private Link'
        Description   = 'This policy is deprecated because Media Services retirement. Learn more about policy definition deprecation at aka.ms/policydefdeprecation.'
        Version       = '1.1.0-deprecated'
        Category      = 'Media Services'
        Deprecated    = $true
        PolicyVersion = '1.1.0'
        Mode          = 'Indexed'
    }

    Parameter Effect @{
        Type          = 'string'
        AllowedValues = @('Audit', 'Deny', 'Disabled')
        Default       = 'Disabled'
        DisplayName   = 'Effect'
        Description   = 'Enable or disable the execution of the policy'
    }

    Resource 'Microsoft.Media/mediaservices' {

        Require 'encryption.type exists' {
            Field 'Microsoft.Media/mediaservices/encryption.type' -AllowUnknownAlias | Must -Exist
        }
    }

    Effect (Param Effect)
}

Source: built-in-policies/policyDefinitions/Media Services/RequirePrivateLinkSupport_Audit.json in Azure/azure-policy, under the MIT licence.