Create a Guardrail via the REST API (az rest)
Use this path only when the user explicitly asks for programmatic/CLI/CI/CD creation. Otherwise, guide them to the portal.
Prerequisites
- Azure CLI installed and logged in (
az login) - Foundry Account Owner role (or higher) on the Azure AI resource
- The Azure AI Services account name, resource group, and subscription ID
Step 1: Set Variables
bash
SUBSCRIPTION_ID=$(az account show --query id -o tsv)