Bylaw

Gallery › Cognitive Services › Azure built-in policies

[Preview]: Guardrail for Cognitive Services Deployments

Converted Initiative Version 1.0.0-preview Preview

Mandate guardrail configuration for model deployments within your organization.

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

Azure Policy JSONAllowDeploymentControl_Audit.json · 866 lines
{
  "properties": {
    "displayName": "[Preview]: Guardrail for Cognitive Services Deployments",
    "policyType": "BuiltIn",
    "description": "Mandate guardrail configuration for model deployments within your organization.",
    "metadata": {
      "version": "1.0.0-preview",
      "category": "Cognitive Services",
      "preview": true
    },
    "version": "1.0.0-preview",
    "parameters": {
      "effect": {
        "type": "string",
        "defaultValue": "Audit",
        "allowedValues": [
          "Audit",
          "Disabled"
        ],
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy."
        }
      },
      "allowedSexualSeveritiesForPrompt": {
        "type": "Array",
        "defaultValue": [
          "Medium",
          "High"
        ],
        "allowedValues": [
          "Low",
          "Medium",
          "High"
        ],
        "metadata": {
          "displayName": "Allowed Sexual Severities for Prompt",
          "description": "List of severities for sexual content on Prompt."
        }
      },
      "allowedSexualEnabledForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Sexual Enabled Configuration for Prompt",
          "description": "List of enabled values for sexual content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedSexualBlockingForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Sexual Blocking Configuration for Prompt",
          "description": "List of blocking values for sexual content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedSexualSeveritiesForCompletion": {
        "type": "Array",
        "defaultValue": [
          "Medium",
          "High"
        ],
        "allowedValues": [
          "Low",
          "Medium",
          "High"
        ],
        "metadata": {
          "displayName": "Allowed Sexual Severities for Completion",
          "description": "List of severities for sexual content on Completion."
        }
      },
      "allowedSexualEnabledForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Sexual Enabled Configuration for Completion",
          "description": "List of enabled values for sexual content on Completion. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedSexualBlockingForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Sexual Blocking Configuration for Completion",
          "description": "List of blocking values for sexual content on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedHateSeveritiesForPrompt": {
        "type": "Array",
        "defaultValue": [
          "Medium",
          "High"
        ],
        "allowedValues": [
          "Low",
          "Medium",
          "High"
        ],
        "metadata": {
          "displayName": "Allowed Hate Severities for Prompt",
          "description": "List of severities for hate content on Prompt."
        }
      },
      "allowedHateEnabledForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Hate Enabled Configuration for Prompt",
          "description": "List of enabled values for hate content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedHateBlockingForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Hate Blocking Configuration for Prompt",
          "description": "List of blocking values for hate content on Prompt. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedHateSeveritiesForCompletion": {
        "type": "Array",
        "defaultValue": [
          "Medium",
          "High"
        ],
        "allowedValues": [
          "Low",
          "Medium",
          "High"
        ],
        "metadata": {
          "displayName": "Allowed Hate Severities for Completion",
          "description": "List of severities for hate content on Completion."
        }
      },
      "allowedHateEnabledForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Hate Enabled Configuration for Completion",
          "description": "List of enabled values for hate content on Completion. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedHateBlockingForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Hate Blocking Configuration for Completion",
          "description": "List of blocking values for hate content on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedViolenceSeveritiesForPrompt": {
        "type": "Array",
        "defaultValue": [
          "Medium",
          "High"
        ],
        "allowedValues": [
          "Low",
          "Medium",
          "High"
        ],
        "metadata": {
          "displayName": "Allowed Violence Severities for Prompt",
          "description": "List of severities for violence content on Prompt."
        }
      },
      "allowedViolenceEnabledForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Violence Enabled Configuration for Prompt",
          "description": "List of enabled values for violence content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedViolenceBlockingForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Violence Blocking Configuration for Prompt",
          "description": "List of blocking values for violence content on Prompt. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedViolenceSeveritiesForCompletion": {
        "type": "Array",
        "defaultValue": [
          "Medium",
          "High"
        ],
        "allowedValues": [
          "Low",
          "Medium",
          "High"
        ],
        "metadata": {
          "displayName": "Allowed Violence Severities for Completion",
          "description": "List of severities for violence content on Completion."
        }
      },
      "allowedViolenceEnabledForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Violence Enabled Configuration for Completion",
          "description": "List of enabled values for violence content on Completion. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedViolenceBlockingForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Violence Blocking Configuration for Completion",
          "description": "List of blocking values for violence content on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedSelfharmSeveritiesForPrompt": {
        "type": "Array",
        "defaultValue": [
          "Medium",
          "High"
        ],
        "allowedValues": [
          "Low",
          "Medium",
          "High"
        ],
        "metadata": {
          "displayName": "Allowed Self-harm Severities for Prompt",
          "description": "List of severities for self-harm content on Prompt."
        }
      },
      "allowedSelfharmEnabledForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Self-harm Enabled Configuration for Prompt",
          "description": "List of enabled values for self-harm content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedSelfharmBlockingForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Self-harm Blocking Configuration for Prompt",
          "description": "List of blocking values for self-harm content on Prompt. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedSelfharmSeveritiesForCompletion": {
        "type": "Array",
        "defaultValue": [
          "Medium",
          "High"
        ],
        "allowedValues": [
          "Low",
          "Medium",
          "High"
        ],
        "metadata": {
          "displayName": "Allowed Self-harm Severities for Completion",
          "description": "List of severities for self-harm content on Completion."
        }
      },
      "allowedSelfharmEnabledForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Self-harm Enabled Configuration for Completion",
          "description": "List of enabled values for self-harm content on Completion. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedSelfharmBlockingForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Self-harm Blocking Configuration for Completion",
          "description": "List of blocking values for self-harm content on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedJailbreakEnabledForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Jailbreak Enabled Configuration for Prompt",
          "description": "List of enabled values for jailbreak content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedJailbreakBlockingForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Jailbreak Blocking Configuration for Prompt",
          "description": "List of blocking values for jailbreak content on Prompt. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedProfanityEnabledForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Profanity Enabled Configuration for Prompt",
          "description": "List of enabled values for profanity content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedProfanityBlockingForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Profanity Blocking Configuration for Prompt",
          "description": "List of blocking values for profanity content on Prompt. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedProfanityEnabledForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Profanity Enabled Configuration for Completion",
          "description": "List of enabled values for profanity content on Completion. Can be set to true, false, or both. True implies that content filtering must be enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedProfanityBlockingForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Profanity Blocking Configuration for Completion",
          "description": "List of blocking values for profanity content on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedProtectedMaterialCodeEnabledForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Protected Material Code Enabled Configuration for Completion",
          "description": "List of enabled values for Protected Material Code on Completion. Can be set to true, false, or both. True implies that content filtering must be enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedProtectedMaterialCodeBlockingForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Protected Material Code Blocking Configuration for Completion",
          "description": "List of blocking values for Protected Material Code on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedProtectedMaterialTextEnabledForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Protected Material Text Enabled Configuration for Completion",
          "description": "List of enabled values for Protected Material Text on Completion. Can be set to true, false, or both. True implies that content filtering must be enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedProtectedMaterialTextBlockingForCompletion": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Protected Material Text Blocking Configuration for Completion",
          "description": "List of blocking values for Protected Material Text on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedSpotlightingEnabledForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Spotlighting Enabled Configuration for Completion",
          "description": "List of enabled values for Spotlighting on Completion. Can be set to true, false, or both. True implies that content filtering must be enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedSpotlightingBlockingForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Spotlighting Blocking Configuration for Completion",
          "description": "List of blocking values for Spotlighting on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedIndirectAttackEnabledForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Indirect Attack Enabled Configuration for Completion",
          "description": "List of enabled values for Indirect Attack on Completion. Can be set to true, false, or both. True implies that content filtering must be enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay"
        }
      },
      "allowedIndirectAttackBlockingForPrompt": {
        "type": "Array",
        "defaultValue": [
          "true"
        ],
        "allowedValues": [
          "true",
          "false"
        ],
        "metadata": {
          "displayName": "Allowed Indirect Attack Blocking Configuration for Completion",
          "description": "List of blocking values for Indirect Attack on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay"
        }
      },
      "raiPolicyMode": {
        "type": "Array",
        "defaultValue": [
          "Default"
        ],
        "allowedValues": [
          "Default",
          "Asynchronous_filter"
        ],
        "metadata": {
          "displayName": "Streaming Mode",
          "description": "The Streaming Model of the Filter, Default or Asynchronous_filter."
        }
      }
    },
    "policyDefinitions": [
      {
        "policyDefinitionReferenceId": "CognitiveServices Content Filter Control on Sexual for Model Deployments",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/930f48f9-f07e-427c-9494-52603581c6a9",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          },
          "filterName": {
            "value": "Sexual"
          },
          "allowedSeveritiesForPrompt": {
            "value": "[parameters('allowedSexualSeveritiesForPrompt')]"
          },
          "allowedEnabledForPrompt": {
            "value": "[parameters('allowedSexualEnabledForPrompt')]"
          },
          "allowedBlockingForPrompt": {
            "value": "[parameters('allowedSexualBlockingForPrompt')]"
          },
          "allowedSeveritiesForCompletion": {
            "value": "[parameters('allowedSexualSeveritiesForCompletion')]"
          },
          "allowedEnabledForCompletion": {
            "value": "[parameters('allowedSexualEnabledForCompletion')]"
          },
          "allowedBlockingForCompletion": {
            "value": "[parameters('allowedSexualBlockingForCompletion')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "CognitiveServices Content Filter Control on Hate for Model Deployments",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/930f48f9-f07e-427c-9494-52603581c6a9",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          },
          "filterName": {
            "value": "Hate"
          },
          "allowedSeveritiesForPrompt": {
            "value": "[parameters('allowedHateSeveritiesForPrompt')]"
          },
          "allowedEnabledForPrompt": {
            "value": "[parameters('allowedHateEnabledForPrompt')]"
          },
          "allowedBlockingForPrompt": {
            "value": "[parameters('allowedHateBlockingForPrompt')]"
          },
          "allowedSeveritiesForCompletion": {
            "value": "[parameters('allowedHateSeveritiesForCompletion')]"
          },
          "allowedEnabledForCompletion": {
            "value": "[parameters('allowedHateEnabledForCompletion')]"
          },
          "allowedBlockingForCompletion": {
            "value": "[parameters('allowedHateBlockingForCompletion')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "CognitiveServices Content Filter Control on Violence for Model Deployments",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/930f48f9-f07e-427c-9494-52603581c6a9",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          },
          "filterName": {
            "value": "Violence"
          },
          "allowedSeveritiesForPrompt": {
            "value": "[parameters('allowedViolenceSeveritiesForPrompt')]"
          },
          "allowedEnabledForPrompt": {
            "value": "[parameters('allowedViolenceEnabledForPrompt')]"
          },
          "allowedBlockingForPrompt": {
            "value": "[parameters('allowedViolenceBlockingForPrompt')]"
          },
          "allowedSeveritiesForCompletion": {
            "value": "[parameters('allowedViolenceSeveritiesForCompletion')]"
          },
          "allowedEnabledForCompletion": {
            "value": "[parameters('allowedViolenceEnabledForCompletion')]"
          },
          "allowedBlockingForCompletion": {
            "value": "[parameters('allowedViolenceBlockingForCompletion')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "CognitiveServices Content Filter Control on Self-harm for Model Deployments",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/930f48f9-f07e-427c-9494-52603581c6a9",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          },
          "filterName": {
            "value": "Selfharm"
          },
          "allowedSeveritiesForPrompt": {
            "value": "[parameters('allowedSelfharmSeveritiesForPrompt')]"
          },
          "allowedEnabledForPrompt": {
            "value": "[parameters('allowedSelfharmEnabledForPrompt')]"
          },
          "allowedBlockingForPrompt": {
            "value": "[parameters('allowedSelfharmBlockingForPrompt')]"
          },
          "allowedSeveritiesForCompletion": {
            "value": "[parameters('allowedSelfharmSeveritiesForCompletion')]"
          },
          "allowedEnabledForCompletion": {
            "value": "[parameters('allowedSelfharmEnabledForCompletion')]"
          },
          "allowedBlockingForCompletion": {
            "value": "[parameters('allowedSelfharmBlockingForCompletion')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "CognitiveServices Content Filter Control on Jailbreak for Model Deployments",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/f3a9c2e0-7b4d-4d8f-9c3a-2e1f6b9a8d4e",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          },
          "filterName": {
            "value": "Jailbreak"
          },
          "allowedEnabledForPrompt": {
            "value": "[parameters('allowedJailbreakEnabledForPrompt')]"
          },
          "allowedBlockingForPrompt": {
            "value": "[parameters('allowedJailbreakBlockingForPrompt')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "CognitiveServices Content Filter Control on Profanity for Model Deployments - Prompt",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/f3a9c2e0-7b4d-4d8f-9c3a-2e1f6b9a8d4e",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          },
          "filterName": {
            "value": "Profanity"
          },
          "allowedEnabledForPrompt": {
            "value": "[parameters('allowedProfanityEnabledForPrompt')]"
          },
          "allowedBlockingForPrompt": {
            "value": "[parameters('allowedProfanityBlockingForPrompt')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "CognitiveServices Content Filter Control on Profanity for Model Deployments - Completion",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af253d37-136a-42f8-a1fc-30010c083d41",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          },
          "filterName": {
            "value": "Profanity"
          },
          "allowedEnabledForCompletion": {
            "value": "[parameters('allowedProfanityEnabledForCompletion')]"
          },
          "allowedBlockingForCompletion": {
            "value": "[parameters('allowedProfanityBlockingForCompletion')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "CognitiveServices Content Filter Control on Protected Material Code for Model Deployments",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af253d37-136a-42f8-a1fc-30010c083d41",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          },
          "filterName": {
            "value": "Protected Material Code"
          },
          "allowedEnabledForCompletion": {
            "value": "[parameters('allowedProtectedMaterialCodeEnabledForCompletion')]"
          },
          "allowedBlockingForCompletion": {
            "value": "[parameters('allowedProtectedMaterialCodeBlockingForCompletion')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "CognitiveServices Content Filter Control on Protected Material Text for Model Deployments",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af253d37-136a-42f8-a1fc-30010c083d41",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          },
          "filterName": {
            "value": "Protected Material Text"
          },
          "allowedEnabledForCompletion": {
            "value": "[parameters('allowedProtectedMaterialTextEnabledForCompletion')]"
          },
          "allowedBlockingForCompletion": {
            "value": "[parameters('allowedProtectedMaterialTextBlockingForCompletion')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "CognitiveServices Content Filter Control on Spotlighting for Model Deployments",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/f3a9c2e0-7b4d-4d8f-9c3a-2e1f6b9a8d4e",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          },
          "filterName": {
            "value": "Indirect Attack Spotlighting"
          },
          "allowedEnabledForPrompt": {
            "value": "[parameters('allowedSpotlightingEnabledForPrompt')]"
          },
          "allowedBlockingForPrompt": {
            "value": "[parameters('allowedSpotlightingBlockingForPrompt')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "CognitiveServices Content Filter Control on XPIA for Model Deployments",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/f3a9c2e0-7b4d-4d8f-9c3a-2e1f6b9a8d4e",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          },
          "filterName": {
            "value": "Indirect Attack"
          },
          "allowedEnabledForPrompt": {
            "value": "[parameters('allowedIndirectAttackEnabledForPrompt')]"
          },
          "allowedBlockingForPrompt": {
            "value": "[parameters('allowedIndirectAttackBlockingForPrompt')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "CognitiveServices guardrail mode for Model Deployments",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/c1ad46c6-37f8-4af0-9c71-c208375c87dd",
        "definitionVersion": "1.*.*-preview",
        "parameters": {
          "effect": {
            "value": "[parameters('effect')]"
          },
          "raiPolicyMode": {
            "value": "[parameters('raiPolicyMode')]"
          }
        }
      }
    ],
    "versions": [
      "1.0.0-PREVIEW"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policySetDefinitions/5207647b-3e83-4e28-b836-c382cb5e2a2e",
  "name": "5207647b-3e83-4e28-b836-c382cb5e2a2e"
}
Bylaw5207647b-3e83-4e28-b836-c382cb5e2a2e.bylaw.ps1 · 451 lines
# Converted from AllowDeploymentControl_Audit.json by ConvertTo-Bylaw.
Initiative '5207647b-3e83-4e28-b836-c382cb5e2a2e' {

    Properties @{
        DisplayName   = '[Preview]: Guardrail for Cognitive Services Deployments'
        Description   = 'Mandate guardrail configuration for model deployments within your organization.'
        Version       = '1.0.0-preview'
        Category      = 'Cognitive Services'
        Preview       = $true
        PolicyVersion = '1.0.0-preview'
    }

    Parameter Effect @{
        Type          = 'string'
        AllowedValues = @('Audit', 'Disabled')
        Default       = 'Audit'
        DisplayName   = 'Effect'
        Description   = 'Enable or disable the execution of the policy.'
    }
    Parameter AllowedSexualSeveritiesForPrompt @{
        Type          = 'Array'
        AllowedValues = @('Low', 'Medium', 'High')
        Default       = @('Medium', 'High')
        DisplayName   = 'Allowed Sexual Severities for Prompt'
        Description   = 'List of severities for sexual content on Prompt.'
    }
    Parameter AllowedSexualEnabledForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Sexual Enabled Configuration for Prompt'
        Description   = 'List of enabled values for sexual content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedSexualBlockingForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Sexual Blocking Configuration for Prompt'
        Description   = 'List of blocking values for sexual content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedSexualSeveritiesForCompletion @{
        Type          = 'Array'
        AllowedValues = @('Low', 'Medium', 'High')
        Default       = @('Medium', 'High')
        DisplayName   = 'Allowed Sexual Severities for Completion'
        Description   = 'List of severities for sexual content on Completion.'
    }
    Parameter AllowedSexualEnabledForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Sexual Enabled Configuration for Completion'
        Description   = 'List of enabled values for sexual content on Completion. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedSexualBlockingForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Sexual Blocking Configuration for Completion'
        Description   = 'List of blocking values for sexual content on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedHateSeveritiesForPrompt @{
        Type          = 'Array'
        AllowedValues = @('Low', 'Medium', 'High')
        Default       = @('Medium', 'High')
        DisplayName   = 'Allowed Hate Severities for Prompt'
        Description   = 'List of severities for hate content on Prompt.'
    }
    Parameter AllowedHateEnabledForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Hate Enabled Configuration for Prompt'
        Description   = 'List of enabled values for hate content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedHateBlockingForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Hate Blocking Configuration for Prompt'
        Description   = 'List of blocking values for hate content on Prompt. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedHateSeveritiesForCompletion @{
        Type          = 'Array'
        AllowedValues = @('Low', 'Medium', 'High')
        Default       = @('Medium', 'High')
        DisplayName   = 'Allowed Hate Severities for Completion'
        Description   = 'List of severities for hate content on Completion.'
    }
    Parameter AllowedHateEnabledForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Hate Enabled Configuration for Completion'
        Description   = 'List of enabled values for hate content on Completion. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedHateBlockingForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Hate Blocking Configuration for Completion'
        Description   = 'List of blocking values for hate content on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedViolenceSeveritiesForPrompt @{
        Type          = 'Array'
        AllowedValues = @('Low', 'Medium', 'High')
        Default       = @('Medium', 'High')
        DisplayName   = 'Allowed Violence Severities for Prompt'
        Description   = 'List of severities for violence content on Prompt.'
    }
    Parameter AllowedViolenceEnabledForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Violence Enabled Configuration for Prompt'
        Description   = 'List of enabled values for violence content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedViolenceBlockingForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Violence Blocking Configuration for Prompt'
        Description   = 'List of blocking values for violence content on Prompt. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedViolenceSeveritiesForCompletion @{
        Type          = 'Array'
        AllowedValues = @('Low', 'Medium', 'High')
        Default       = @('Medium', 'High')
        DisplayName   = 'Allowed Violence Severities for Completion'
        Description   = 'List of severities for violence content on Completion.'
    }
    Parameter AllowedViolenceEnabledForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Violence Enabled Configuration for Completion'
        Description   = 'List of enabled values for violence content on Completion. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedViolenceBlockingForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Violence Blocking Configuration for Completion'
        Description   = 'List of blocking values for violence content on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedSelfharmSeveritiesForPrompt @{
        Type          = 'Array'
        AllowedValues = @('Low', 'Medium', 'High')
        Default       = @('Medium', 'High')
        DisplayName   = 'Allowed Self-harm Severities for Prompt'
        Description   = 'List of severities for self-harm content on Prompt.'
    }
    Parameter AllowedSelfharmEnabledForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Self-harm Enabled Configuration for Prompt'
        Description   = 'List of enabled values for self-harm content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedSelfharmBlockingForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Self-harm Blocking Configuration for Prompt'
        Description   = 'List of blocking values for self-harm content on Prompt. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedSelfharmSeveritiesForCompletion @{
        Type          = 'Array'
        AllowedValues = @('Low', 'Medium', 'High')
        Default       = @('Medium', 'High')
        DisplayName   = 'Allowed Self-harm Severities for Completion'
        Description   = 'List of severities for self-harm content on Completion.'
    }
    Parameter AllowedSelfharmEnabledForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Self-harm Enabled Configuration for Completion'
        Description   = 'List of enabled values for self-harm content on Completion. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedSelfharmBlockingForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Self-harm Blocking Configuration for Completion'
        Description   = 'List of blocking values for self-harm content on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedJailbreakEnabledForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Jailbreak Enabled Configuration for Prompt'
        Description   = 'List of enabled values for jailbreak content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedJailbreakBlockingForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Jailbreak Blocking Configuration for Prompt'
        Description   = 'List of blocking values for jailbreak content on Prompt. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedProfanityEnabledForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Profanity Enabled Configuration for Prompt'
        Description   = 'List of enabled values for profanity content on Prompt. Can be set to true, false, or both. True implies that content filtering must be Enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedProfanityBlockingForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Profanity Blocking Configuration for Prompt'
        Description   = 'List of blocking values for profanity content on Prompt. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedProfanityEnabledForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Profanity Enabled Configuration for Completion'
        Description   = 'List of enabled values for profanity content on Completion. Can be set to true, false, or both. True implies that content filtering must be enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedProfanityBlockingForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Profanity Blocking Configuration for Completion'
        Description   = 'List of blocking values for profanity content on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedProtectedMaterialCodeEnabledForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Protected Material Code Enabled Configuration for Completion'
        Description   = 'List of enabled values for Protected Material Code on Completion. Can be set to true, false, or both. True implies that content filtering must be enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedProtectedMaterialCodeBlockingForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Protected Material Code Blocking Configuration for Completion'
        Description   = 'List of blocking values for Protected Material Code on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedProtectedMaterialTextEnabledForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Protected Material Text Enabled Configuration for Completion'
        Description   = 'List of enabled values for Protected Material Text on Completion. Can be set to true, false, or both. True implies that content filtering must be enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedProtectedMaterialTextBlockingForCompletion @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Protected Material Text Blocking Configuration for Completion'
        Description   = 'List of blocking values for Protected Material Text on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedSpotlightingEnabledForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Spotlighting Enabled Configuration for Completion'
        Description   = 'List of enabled values for Spotlighting on Completion. Can be set to true, false, or both. True implies that content filtering must be enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedSpotlightingBlockingForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Spotlighting Blocking Configuration for Completion'
        Description   = 'List of blocking values for Spotlighting on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedIndirectAttackEnabledForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Indirect Attack Enabled Configuration for Completion'
        Description   = 'List of enabled values for Indirect Attack on Completion. Can be set to true, false, or both. True implies that content filtering must be enabled, False implies that content filtering must be disabled, and setting both true and false implies that either setting is okay'
    }
    Parameter AllowedIndirectAttackBlockingForPrompt @{
        Type          = 'Array'
        AllowedValues = @('true', 'false')
        Default       = @('true')
        DisplayName   = 'Allowed Indirect Attack Blocking Configuration for Completion'
        Description   = 'List of blocking values for Indirect Attack on Completion. Can be set to true, false, or both. True implies that content filtering must be blocking, False implies that content filtering must not be blocking, and setting both true and false implies that either setting is okay'
    }
    Parameter RaiPolicyMode @{
        Type          = 'Array'
        AllowedValues = @('Default', 'Asynchronous_filter')
        Default       = @('Default')
        DisplayName   = 'Streaming Mode'
        Description   = 'The Streaming Model of the Filter, Default or Asynchronous_filter.'
    }

    PolicyDefinition @{
        Id          = '930f48f9-f07e-427c-9494-52603581c6a9'
        ReferenceId = 'CognitiveServices Content Filter Control on Sexual for Model Deployments'
        Version     = '1.*.*-preview'
        Parameters  = [ordered]@{
            effect                         = (Param Effect)
            filterName                     = 'Sexual'
            allowedSeveritiesForPrompt     = (Param AllowedSexualSeveritiesForPrompt)
            allowedEnabledForPrompt        = (Param AllowedSexualEnabledForPrompt)
            allowedBlockingForPrompt       = (Param AllowedSexualBlockingForPrompt)
            allowedSeveritiesForCompletion = (Param AllowedSexualSeveritiesForCompletion)
            allowedEnabledForCompletion    = (Param AllowedSexualEnabledForCompletion)
            allowedBlockingForCompletion   = (Param AllowedSexualBlockingForCompletion)
        }
    }

    PolicyDefinition @{
        Id          = '930f48f9-f07e-427c-9494-52603581c6a9'
        ReferenceId = 'CognitiveServices Content Filter Control on Hate for Model Deployments'
        Version     = '1.*.*-preview'
        Parameters  = [ordered]@{
            effect                         = (Param Effect)
            filterName                     = 'Hate'
            allowedSeveritiesForPrompt     = (Param AllowedHateSeveritiesForPrompt)
            allowedEnabledForPrompt        = (Param AllowedHateEnabledForPrompt)
            allowedBlockingForPrompt       = (Param AllowedHateBlockingForPrompt)
            allowedSeveritiesForCompletion = (Param AllowedHateSeveritiesForCompletion)
            allowedEnabledForCompletion    = (Param AllowedHateEnabledForCompletion)
            allowedBlockingForCompletion   = (Param AllowedHateBlockingForCompletion)
        }
    }

    PolicyDefinition @{
        Id          = '930f48f9-f07e-427c-9494-52603581c6a9'
        ReferenceId = 'CognitiveServices Content Filter Control on Violence for Model Deployments'
        Version     = '1.*.*-preview'
        Parameters  = [ordered]@{
            effect                         = (Param Effect)
            filterName                     = 'Violence'
            allowedSeveritiesForPrompt     = (Param AllowedViolenceSeveritiesForPrompt)
            allowedEnabledForPrompt        = (Param AllowedViolenceEnabledForPrompt)
            allowedBlockingForPrompt       = (Param AllowedViolenceBlockingForPrompt)
            allowedSeveritiesForCompletion = (Param AllowedViolenceSeveritiesForCompletion)
            allowedEnabledForCompletion    = (Param AllowedViolenceEnabledForCompletion)
            allowedBlockingForCompletion   = (Param AllowedViolenceBlockingForCompletion)
        }
    }

    PolicyDefinition @{
        Id          = '930f48f9-f07e-427c-9494-52603581c6a9'
        ReferenceId = 'CognitiveServices Content Filter Control on Self-harm for Model Deployments'
        Version     = '1.*.*-preview'
        Parameters  = [ordered]@{
            effect                         = (Param Effect)
            filterName                     = 'Selfharm'
            allowedSeveritiesForPrompt     = (Param AllowedSelfharmSeveritiesForPrompt)
            allowedEnabledForPrompt        = (Param AllowedSelfharmEnabledForPrompt)
            allowedBlockingForPrompt       = (Param AllowedSelfharmBlockingForPrompt)
            allowedSeveritiesForCompletion = (Param AllowedSelfharmSeveritiesForCompletion)
            allowedEnabledForCompletion    = (Param AllowedSelfharmEnabledForCompletion)
            allowedBlockingForCompletion   = (Param AllowedSelfharmBlockingForCompletion)
        }
    }

    PolicyDefinition @{
        Id          = 'f3a9c2e0-7b4d-4d8f-9c3a-2e1f6b9a8d4e'
        ReferenceId = 'CognitiveServices Content Filter Control on Jailbreak for Model Deployments'
        Version     = '1.*.*-preview'
        Parameters  = [ordered]@{
            effect                   = (Param Effect)
            filterName               = 'Jailbreak'
            allowedEnabledForPrompt  = (Param AllowedJailbreakEnabledForPrompt)
            allowedBlockingForPrompt = (Param AllowedJailbreakBlockingForPrompt)
        }
    }

    PolicyDefinition @{
        Id          = 'f3a9c2e0-7b4d-4d8f-9c3a-2e1f6b9a8d4e'
        ReferenceId = 'CognitiveServices Content Filter Control on Profanity for Model Deployments - Prompt'
        Version     = '1.*.*-preview'
        Parameters  = [ordered]@{
            effect                   = (Param Effect)
            filterName               = 'Profanity'
            allowedEnabledForPrompt  = (Param AllowedProfanityEnabledForPrompt)
            allowedBlockingForPrompt = (Param AllowedProfanityBlockingForPrompt)
        }
    }

    PolicyDefinition @{
        Id          = 'af253d37-136a-42f8-a1fc-30010c083d41'
        ReferenceId = 'CognitiveServices Content Filter Control on Profanity for Model Deployments - Completion'
        Version     = '1.*.*-preview'
        Parameters  = [ordered]@{
            effect                       = (Param Effect)
            filterName                   = 'Profanity'
            allowedEnabledForCompletion  = (Param AllowedProfanityEnabledForCompletion)
            allowedBlockingForCompletion = (Param AllowedProfanityBlockingForCompletion)
        }
    }

    PolicyDefinition @{
        Id          = 'af253d37-136a-42f8-a1fc-30010c083d41'
        ReferenceId = 'CognitiveServices Content Filter Control on Protected Material Code for Model Deployments'
        Version     = '1.*.*-preview'
        Parameters  = [ordered]@{
            effect                       = (Param Effect)
            filterName                   = 'Protected Material Code'
            allowedEnabledForCompletion  = (Param AllowedProtectedMaterialCodeEnabledForCompletion)
            allowedBlockingForCompletion = (Param AllowedProtectedMaterialCodeBlockingForCompletion)
        }
    }

    PolicyDefinition @{
        Id          = 'af253d37-136a-42f8-a1fc-30010c083d41'
        ReferenceId = 'CognitiveServices Content Filter Control on Protected Material Text for Model Deployments'
        Version     = '1.*.*-preview'
        Parameters  = [ordered]@{
            effect                       = (Param Effect)
            filterName                   = 'Protected Material Text'
            allowedEnabledForCompletion  = (Param AllowedProtectedMaterialTextEnabledForCompletion)
            allowedBlockingForCompletion = (Param AllowedProtectedMaterialTextBlockingForCompletion)
        }
    }

    PolicyDefinition @{
        Id          = 'f3a9c2e0-7b4d-4d8f-9c3a-2e1f6b9a8d4e'
        ReferenceId = 'CognitiveServices Content Filter Control on Spotlighting for Model Deployments'
        Version     = '1.*.*-preview'
        Parameters  = [ordered]@{
            effect                   = (Param Effect)
            filterName               = 'Indirect Attack Spotlighting'
            allowedEnabledForPrompt  = (Param AllowedSpotlightingEnabledForPrompt)
            allowedBlockingForPrompt = (Param AllowedSpotlightingBlockingForPrompt)
        }
    }

    PolicyDefinition @{
        Id          = 'f3a9c2e0-7b4d-4d8f-9c3a-2e1f6b9a8d4e'
        ReferenceId = 'CognitiveServices Content Filter Control on XPIA for Model Deployments'
        Version     = '1.*.*-preview'
        Parameters  = [ordered]@{
            effect                   = (Param Effect)
            filterName               = 'Indirect Attack'
            allowedEnabledForPrompt  = (Param AllowedIndirectAttackEnabledForPrompt)
            allowedBlockingForPrompt = (Param AllowedIndirectAttackBlockingForPrompt)
        }
    }

    PolicyDefinition @{
        Id          = 'c1ad46c6-37f8-4af0-9c71-c208375c87dd'
        ReferenceId = 'CognitiveServices guardrail mode for Model Deployments'
        Version     = '1.*.*-preview'
        Parameters  = [ordered]@{
            effect        = (Param Effect)
            raiPolicyMode = (Param RaiPolicyMode)
        }
    }
}

Members (12)

Source: built-in-policies/policySetDefinitions/Cognitive Services/AllowDeploymentControl_Audit.json in Azure/azure-policy, under the MIT licence.