Microsoft Azure Variables API

The Variables API from Microsoft Azure, for variables.

GitHub OpenAPI

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

DELETE /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/variables/{variableName} Delete a subscription policy variable · Microsoft Azure Deletes A Variable #
Ask an LLM
“How do I remove a policy variable from my subscription?”
“Can I delete a subscription-level variable that policies still reference?”
Tell an agent destructive · confirm first
Delete policy variable {variableName} from subscription {subscriptionId}.
Remove the subscription-scoped variable {variableName}.
PUT /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/variables/{variableName} Create or update a subscription policy variable · Microsoft Azure Creates Or Updates A Variable #
Ask an LLM
“Can I create a policy variable at subscription level for my policy definitions to use?”
“Which policy definitions are allowed to use a variable created on a subscription?”
Tell an agent
Create policy variable {variableName} in subscription {subscriptionId} with properties {properties}.
Update subscription policy variable {variableName} to {properties}.
GET /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/variables/{variableName} Get a policy variable at subscription scope · Microsoft Azure Retrieves A Variable #
Ask an LLM
“How do I look up a policy variable defined on my subscription?”
“What columns does a subscription-level policy variable declare?”
Tell an agent
Get policy variable {variableName} in subscription {subscriptionId}.
Show the subscription-scoped policy variable {variableName}.
DELETE /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/variables/{variableName} Delete a management group policy variable · Microsoft Azure Deletes A Variable #
Ask an LLM
“How do I delete a policy variable that lives on a management group?”
“Can I remove a management-group variable without touching subscription ones?”
Tell an agent destructive · confirm first
Delete policy variable {variableName} from management group {managementGroupId}.
Remove variable {variableName} defined at management group {managementGroupId}.
PUT /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/variables/{variableName} Create or update a management group policy variable · Microsoft Azure Creates Or Updates A Variable #
Ask an LLM
“Can I define a policy variable once on a management group so child scopes can use it?”
“What properties must I send to create a variable on a management group?”
Tell an agent
Create policy variable {variableName} in management group {managementGroupId} with properties {properties}.
Update management group {managementGroupId} variable {variableName}.
GET /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/variables/{variableName} Get a policy variable at management group scope · Microsoft Azure Retrieves A Variable #
Ask an LLM
“Where can I read a policy variable that was defined on a management group?”
“What does a management-group-level policy variable contain?”
Tell an agent
Get policy variable {variableName} in management group {managementGroupId}.
Show management group {managementGroupId}'s variable {variableName}.
GET /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/variables List policy variables in a subscription · Microsoft Azure Retrieves All Variables That Are At This Subscription Level #
Ask an LLM
“Which policy variables are defined at my subscription level?”
“Can I see every Azure Policy variable on a subscription at once?”
Tell an agent
List all policy variables in subscription {subscriptionId}.
Show every variable created on my subscription {subscriptionId}.
GET /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/variables List policy variables for a management group · Microsoft Azure Retrieves All Variables That Are At This Management Group Level #
Ask an LLM
“Which policy variables apply to a given management group?”
“Can I list all variables defined on a management group?”
Tell an agent
List the policy variables for management group {managementGroupId}.
Show every variable applicable to management group {managementGroupId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure:microsoft-azure-variables-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-variables-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Azure PolicyClient Variables API
  version: 2022-08-01-preview
  description: To use in policy authoring you can create a variable at a scope. Variables created at a scope can be shared between multiple policy definitions.
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: Variables
paths:
  /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/variables/{variableName}:
    delete:
      tags:
      - Variables
      operationId: microsoftAzureVariablesDelete
      summary: Microsoft Azure Deletes A Variable
      description: This operation deletes a variable, given its name and the subscription it was created in. The scope of a variable is the part of its ID preceding '/providers/Microsoft.Authorization/variables/{variableName}'.
      x-ms-examples:
        Delete a variable:
          $ref: ./examples/deleteVariable.json
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/VariableNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: OK
        '204':
          description: No Content - the variable doesn't exist.
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
    put:
      tags:
      - Variables
      operationId: microsoftAzureVariablesCreateorupdate
      summary: Microsoft Azure Creates Or Updates A Variable
      description: This operation creates or updates a variable with the given subscription and name. Policy variables can only be used by a policy definition at the scope they are created or below.
      x-ms-examples:
        Create or update a variable:
          $ref: ./examples/createOrUpdateVariable.json
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/VariableNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: OK - Returns information about the updated variable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Variable'
        '201':
          description: Created - Returns information about the new variable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Variable'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Variable'
        description: Parameters for the variable.
        required: true
    get:
      tags:
      - Variables
      operationId: microsoftAzureVariablesGet
      summary: Microsoft Azure Retrieves A Variable
      description: This operation retrieves a single variable, given its name and the subscription it was created at.
      x-ms-examples:
        Retrieve a variable:
          $ref: ./examples/getVariable.json
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/VariableNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: OK - Returns information about the variable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Variable'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
  ? /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/variables/{variableName}
  : delete:
      tags:
      - Variables
      operationId: microsoftAzureVariablesDeleteatmanagementgroup
      summary: Microsoft Azure Deletes A Variable
      description: This operation deletes a variable, given its name and the management group it was created in. The scope of a variable is the part of its ID preceding '/providers/Microsoft.Authorization/variables/{variableName}'.
      x-ms-examples:
        Delete a variable at management group:
          $ref: ./examples/deleteVariableAtManagementGroup.json
      parameters:
      - $ref: '#/components/parameters/ManagementGroupIdParameter'
      - $ref: '#/components/parameters/VariableNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: OK
        '204':
          description: No Content - the variable doesn't exist.
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
    put:
      tags:
      - Variables
      operationId: microsoftAzureVariablesCreateorupdateatmanagementgroup
      summary: Microsoft Azure Creates Or Updates A Variable
      description: This operation creates or updates a variable with the given management group and name. Policy variables can only be used by a policy definition at the scope they are created or below.
      x-ms-examples:
        Create or update a variable at management group:
          $ref: ./examples/createOrUpdateVariableAtManagementGroup.json
      parameters:
      - $ref: '#/components/parameters/ManagementGroupIdParameter'
      - $ref: '#/components/parameters/VariableNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: OK - Returns information about the updated variable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Variable'
        '201':
          description: Created - Returns information about the new variable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Variable'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Variable'
        description: Parameters for the variable.
        required: true
    get:
      tags:
      - Variables
      operationId: microsoftAzureVariablesGetatmanagementgroup
      summary: Microsoft Azure Retrieves A Variable
      description: This operation retrieves a single variable, given its name and the management group it was created at.
      x-ms-examples:
        Retrieve a variable at management group:
          $ref: ./examples/getVariableAtManagementGroup.json
      parameters:
      - $ref: '#/components/parameters/ManagementGroupIdParameter'
      - $ref: '#/components/parameters/VariableNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: OK - Returns information about the variable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Variable'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
  /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/variables:
    get:
      tags:
      - Variables
      operationId: microsoftAzureVariablesList
      summary: Microsoft Azure Retrieves All Variables That Are At This Subscription Level
      description: This operation retrieves the list of all variables associated with the given subscription.
      x-ms-examples:
        List variables that apply to a subscription:
          $ref: ./examples/listVariablesForSubscription.json
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: OK - Returns an array of variables.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariableListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
  /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/variables:
    get:
      tags:
      - Variables
      operationId: microsoftAzureVariablesListformanagementgroup
      summary: Microsoft Azure Retrieves All Variables That Are At This Management Group Level
      description: This operation retrieves the list of all variables applicable to the management group.
      x-ms-examples:
        List variables that apply to a management group:
          $ref: ./examples/listVariablesForManagementGroup.json
      parameters:
      - $ref: '#/components/parameters/ManagementGroupIdParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: OK - Returns an array of variables.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariableListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
components:
  parameters:
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      required: true
      description: The ID of the target subscription.
      schema:
        type: string
    ManagementGroupIdParameter:
      name: managementGroupId
      in: path
      required: true
      description: The ID of the management group.
      x-ms-parameter-location: method
      schema:
        type: string
    VariableNameParameter:
      name: variableName
      in: path
      required: true
      description: The name of the variable to operate on.
      x-ms-parameter-location: method
      schema:
        type: string
    ApiVersionParameter:
      name: api-version
      in: query
      required: true
      description: The API version to use for the operation.
      x-ms-parameter-location: client
      schema:
        type: string
  schemas:
    VariableListResult:
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/Variable'
          description: An array of variables.
        nextLink:
          readOnly: true
          type: string
          description: The URL to use for getting the next set of results.
      type: object
      description: List of variables.
    PolicyVariableColumn:
      required:
      - columnName
      properties:
        columnName:
          type: string
          description: The name of this policy variable column.
      type: object
      description: The variable column.
    CloudError:
      x-ms-external: true
      properties:
        error:
          $ref: ../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse
      type: object
      description: An error response from a policy operation.
    PolicyVariableProperties:
      required:
      - columns
      properties:
        columns:
          type: array
          items:
            $ref: '#/components/schemas/PolicyVariableColumn'
          x-ms-identifiers:
          - columnName
          description: Variable column definitions.
      type: object
      description: The variable properties.
    Variable:
      required:
      - properties
      properties:
        properties:
          x-ms-client-flatten: true
          $ref: '#/components/schemas/PolicyVariableProperties'
          description: Properties for the variable.
        systemData:
          readOnly: true
          type: object
          description: Azure Resource Manager metadata containing createdBy and modifiedBy information.
          $ref: ../../../../../common-types/resource-management/v2/types.json#/definitions/systemData
        id:
          readOnly: true
          type: string
          description: The ID of the variable.
        name:
          readOnly: true
          type: string
          description: The name of the variable.
        type:
          readOnly: true
          type: string
          description: The type of the resource (Microsoft.Authorization/variables).
      type: object
      description: The variable.
      x-ms-azure-resource: true
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow.