Azure Policy Policy Definition Versions API

The PolicyDefinitionVersions API from Azure Policy — 9 operation(s) for policydefinitionversions.

Operations 13

POST /providers/Microsoft.Authorization/listPolicyDefinitionVersions Lists all built-in policy definition versions #
POST /providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Authorization/listPolicyDefinitionVersions Lists all policy definition versions at management group scope #
POST /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/listPolicyDefinitionVersions Lists all policy definition versions within a subscription #
PUT /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions/{policyDefinitionVersion} Creates or updates a policy definition in a subscription #
DELETE /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions/{policyDefinitionVersion} Deletes a policy definition version in a subscription #
GET /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions/{policyDefinitionVersion} Retrieves a policy definition version in a subscription #
GET /providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions/{policyDefinitionVersion} Retrieves a built-in policy definition version #
PUT /providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions/{policyDefinitionVersion} Creates or updates a policy definition version in a management group #
DELETE /providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions/{policyDefinitionVersion} Deletes a policy definition in a management group #
GET /providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions/{policyDefinitionVersion} Retrieve a policy definition version in a management group #
GET /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions Retrieves policy definition versions for a given policy definition in a… #
GET /providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions Retrieve built-in policy definition versions #
GET /providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions Retrieve policy definition versions in a management group policy definition #

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-policy:microsoft-azure-policy-policydefinitionversions-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

microsoft-azure-policy-policydefinitionversions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Azure Policy Policy Definition Versions API
  x-refined-note:
  - x-merged-from differs across the merged source definitions and was not carried
  - x-ownership differs across the merged source definitions and was not carried
  - x-source differs across the merged source definitions and was not carried
  version: '1.0'
  description: 'Operations tagged PolicyDefinitionVersions across 2 of this provider''s published API definitions: policyDefinitionVersions.json, microsoft-azure-policy-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: PolicyDefinitionVersions
paths:
  /providers/Microsoft.Authorization/listPolicyDefinitionVersions:
    post:
      tags:
      - PolicyDefinitionVersions
      operationId: PolicyDefinitionVersions_ListAllBuiltins
      summary: Lists all built-in policy definition versions
      description: This operation lists all the built-in policy definition versions for all built-in policy definitions.
      x-ms-examples:
        List all built-in policy definition versions:
          $ref: ./examples/listAllBuiltInPolicyDefinitionVersions.json
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      responses:
        '200':
          description: OK - Returns an array of policy definition versions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDefinitionVersionListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
    servers:
    - url: https://management.azure.com
  ? /providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Authorization/listPolicyDefinitionVersions
  : post:
      tags:
      - PolicyDefinitionVersions
      operationId: PolicyDefinitionVersions_ListAllAtManagementGroup
      summary: Lists all policy definition versions at management group scope
      description: This operation lists all the policy definition versions for all policy definitions at the management group scope.
      x-ms-examples:
        List all policy definition versions at management group:
          $ref: ./examples/listAllPolicyDefinitionVersionsByManagementGroup.json
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ManagementGroupNameParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      responses:
        '200':
          description: OK - Returns an array of policy definition versions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDefinitionVersionListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
    servers:
    - url: https://management.azure.com
  /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/listPolicyDefinitionVersions:
    post:
      tags:
      - PolicyDefinitionVersions
      operationId: PolicyDefinitionVersions_ListAll
      summary: Lists all policy definition versions within a subscription
      description: This operation lists all the policy definition versions for all policy definitions within a subscription.
      x-ms-examples:
        List all policy definition versions at subscription:
          $ref: ./examples/listAllPolicyDefinitionVersions.json
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      responses:
        '200':
          description: OK - Returns an array of policy definition versions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDefinitionVersionListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
    servers:
    - url: https://management.azure.com
  ? /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions/{policyDefinitionVersion}
  : put:
      tags:
      - PolicyDefinitionVersions
      operationId: PolicyDefinitionVersions_CreateOrUpdate
      summary: Creates or updates a policy definition in a subscription
      description: This operation creates or updates a policy definition in the given subscription with the given name.
      x-ms-examples:
        Create or update a policy definition version:
          $ref: ./examples/createOrUpdatePolicyDefinitionVersion.json
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: '#/components/parameters/PolicyDefinitionName'
      - $ref: '#/components/parameters/PolicyDefinitionVersion'
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      responses:
        '201':
          description: Created - Returns information about the policy definition version.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDefinitionVersion'
        '200':
          description: OK - Successfully updated policy definition version.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDefinitionVersion'
        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/PolicyDefinitionVersion'
        description: The policy definition properties.
        required: true
    delete:
      tags:
      - PolicyDefinitionVersions
      operationId: PolicyDefinitionVersions_Delete
      summary: Deletes a policy definition version in a subscription
      description: This operation deletes the policy definition version in the given subscription with the given name.
      x-ms-examples:
        Delete a policy definition version:
          $ref: ./examples/deletePolicyDefinitionVersion.json
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: '#/components/parameters/PolicyDefinitionName'
      - $ref: '#/components/parameters/PolicyDefinitionVersion'
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      responses:
        '204':
          description: No Content
        '200':
          description: OK
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
    get:
      tags:
      - PolicyDefinitionVersions
      operationId: PolicyDefinitionVersions_Get
      summary: Retrieves a policy definition version in a subscription
      description: This operation retrieves the policy definition version in the given subscription with the given name.
      x-ms-examples:
        Retrieve a policy definition version:
          $ref: ./examples/getPolicyDefinitionVersion.json
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: '#/components/parameters/PolicyDefinitionName'
      - $ref: '#/components/parameters/PolicyDefinitionVersion'
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      responses:
        '200':
          description: OK - Returns information about the policy definition.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDefinitionVersion'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
    servers:
    - url: https://management.azure.com
  /providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions/{policyDefinitionVersion}:
    get:
      tags:
      - PolicyDefinitionVersions
      operationId: PolicyDefinitionVersions_GetBuiltIn
      summary: Retrieves a built-in policy definition version
      description: This operation retrieves the built-in policy definition version with the given name.
      x-ms-examples:
        Retrieve a built-in policy definition version:
          $ref: ./examples/getBuiltinPolicyDefinitionVersion.json
      parameters:
      - $ref: '#/components/parameters/PolicyDefinitionName'
      - $ref: '#/components/parameters/PolicyDefinitionVersion'
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      responses:
        '200':
          description: OK - Returns information about the built-in policy definition.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDefinitionVersion'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
    servers:
    - url: https://management.azure.com
  ? /providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions/{policyDefinitionVersion}
  : put:
      tags:
      - PolicyDefinitionVersions
      operationId: PolicyDefinitionVersions_CreateOrUpdateAtManagementGroup
      summary: Creates or updates a policy definition version in a management group
      description: This operation creates or updates a policy definition version in the given management group with the given name.
      x-ms-examples:
        Create or update a policy definition version at management group level:
          $ref: ./examples/createOrUpdatePolicyDefinitionVersionAtManagementGroup.json
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ManagementGroupNameParameter
      - $ref: '#/components/parameters/PolicyDefinitionName'
      - $ref: '#/components/parameters/PolicyDefinitionVersion'
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      responses:
        '201':
          description: Created - Returns information about the policy definition version.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDefinitionVersion'
        '200':
          description: OK - Successfully updated policy definition version.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDefinitionVersion'
        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/PolicyDefinitionVersion'
        description: The policy definition properties.
        required: true
    delete:
      tags:
      - PolicyDefinitionVersions
      operationId: PolicyDefinitionVersions_DeleteAtManagementGroup
      summary: Deletes a policy definition in a management group
      description: This operation deletes the policy definition in the given management group with the given name.
      x-ms-examples:
        Delete a policy definition version at management group level:
          $ref: ./examples/deletePolicyDefinitionVersionAtManagementGroup.json
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ManagementGroupNameParameter
      - $ref: '#/components/parameters/PolicyDefinitionName'
      - $ref: '#/components/parameters/PolicyDefinitionVersion'
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      responses:
        '204':
          description: No Content
        '200':
          description: OK
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
    get:
      tags:
      - PolicyDefinitionVersions
      operationId: PolicyDefinitionVersions_GetAtManagementGroup
      summary: Retrieve a policy definition version in a management group
      description: This operation retrieves the policy definition version in the given management group with the given name.
      x-ms-examples:
        Retrieve a policy definition version at management group level:
          $ref: ./examples/getPolicyDefinitionVersionAtManagementGroup.json
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ManagementGroupNameParameter
      - $ref: '#/components/parameters/PolicyDefinitionName'
      - $ref: '#/components/parameters/PolicyDefinitionVersion'
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      responses:
        '200':
          description: OK - Returns information about the policy definition.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDefinitionVersion'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
    servers:
    - url: https://management.azure.com
  /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions:
    get:
      tags:
      - PolicyDefinitionVersions
      operationId: PolicyDefinitionVersions_List
      summary: Retrieves policy definition versions for a given policy definition in a…
      description: This operation retrieves a list of all the policy definition versions for the given policy definition.
      x-ms-examples:
        List policy definition versions by subscription:
          $ref: ./examples/listPolicyDefinitionVersions.json
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: '#/components/parameters/PolicyDefinitionName'
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: '#/components/parameters/TopParameter'
      responses:
        '200':
          description: OK - Returns an array of policy definition versions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDefinitionVersionListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
    servers:
    - url: https://management.azure.com
  /providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions:
    get:
      tags:
      - PolicyDefinitionVersions
      operationId: PolicyDefinitionVersions_ListBuiltIn
      summary: Retrieve built-in policy definition versions
      description: This operation retrieves a list of all the built-in policy definition versions for the given policy definition.
      x-ms-examples:
        List built-in policy definition versions:
          $ref: ./examples/listBuiltInPolicyDefinitionVersions.json
      parameters:
      - $ref: '#/components/parameters/PolicyDefinitionName'
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: '#/components/parameters/TopParameter'
      responses:
        '200':
          description: OK - Returns an array of built-in policy definition versions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDefinitionVersionListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
    servers:
    - url: https://management.azure.com
  ? /providers/Microsoft.Management/managementGroups/{managementGroupName}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}/versions
  : get:
      tags:
      - PolicyDefinitionVersions
      operationId: PolicyDefinitionVersions_ListByManagementGroup
      summary: Retrieve policy definition versions in a management group policy definition
      description: This operation retrieves a list of all the policy definition versions for the given policy definition in the given management group.
      x-ms-examples:
        List policy definition versions by management group:
          $ref: ./examples/listPolicyDefinitionVersionsByManagementGroup.json
      parameters:
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ManagementGroupNameParameter
      - $ref: '#/components/parameters/PolicyDefinitionName'
      - $ref: ../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: '#/components/parameters/TopParameter'
      responses:
        '200':
          description: OK - Returns an array of policy definition versions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyDefinitionVersionListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
    servers:
    - url: https://management.azure.com
components:
  schemas:
    ParameterDefinitionsValue:
      type: object
      properties:
        type:
          description: The data type of the parameter.
          type: string
          enum:
          - String
          - Array
          - Object
          - Boolean
          - Integer
          - Float
          - DateTime
          x-ms-enum:
            name: parameterType
            modelAsString: true
        allowedValues:
          type: array
          items:
            description: The collection of allowed values for the parameter.
          x-ms-identifiers: []
          description: The allowed values for the parameter.
        defaultValue:
          description: The default value for the parameter if no value is provided.
        schema:
          type: object
          description: Provides validation of parameter inputs during assignment using a self-defined JSON schema. This property is only supported for object-type parameters and follows the Json.NET Schema 2019-09 implementation. You can learn more about using schemas at https://json-schema.org/ and test draft schemas at https://www.jsonschemavalidator.net/.
        metadata:
          type: object
          properties:
            displayName:
              type: string
              description: The display name for the parameter.
            description:
              type: string
              description: The description of the parameter.
            strongType:
              type: string
              description: Used when assigning the policy definition through the portal. Provides a context aware list of values for the user to choose from.
            assignPermissions:
              type: boolean
              description: Set to true to have Azure portal create role assignments on the resource ID or resource scope value of this parameter during policy assignment. This property is useful in case you wish to assign permissions outside the assignment scope.
          additionalProperties:
            type: object
          description: General metadata for the parameter.
      description: The definition of a parameter that can be provided to the policy.
    PolicyDefinitionVersionProperties:
      type: object
      properties:
        policyType:
          type: string
          description: The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
          enum:
          - NotSpecified
          - BuiltIn
          - Custom
          - Static
          x-ms-enum:
            name: policyType
            modelAsString: true
        mode:
          type: string
          description: The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.
          default: Indexed
        displayName:
          type: string
          description: The display name of the policy definition.
        description:
          type: string
          description: The policy definition description.
        policyRule:
          type: object
          description: The policy rule.
        metadata:
          type: object
          description: The policy definition metadata.  Metadata is an open ended object and is typically a collection of key value pairs.
        parameters:
          description: The parameter definitions for parameters used in the policy rule. The keys are the parameter names.
          $ref: '#/components/schemas/ParameterDefinitions'
        version:
          type: string
          description: 'The policy definition version in #.#.# format.'
      description: The policy definition properties.
    ParameterDefinitions:
      description: The parameter definitions for parameters used in the policy. The keys are the parameter names.
      type: object
      additionalProperties:
        $ref: '#/components/schemas/ParameterDefinitionsValue'
    PolicyDefinitionVersionListResult:
      type: object
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/PolicyDefinitionVersion'
          description: An array of policy definitions versions.
        nextLink:
          type: string
          description: The URL to use for getting the next set of results.
      description: List of policy definition versions.
    CloudError:
      type: object
      x-ms-external: true
      properties:
        error:
          $ref: ../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse
      description: An error response from a policy operation.
    PolicyDefinitionVersion:
      type: object
      properties:
        properties:
          x-ms-client-flatten: true
          $ref: '#/components/schemas/PolicyDefinitionVersionProperties'
          description: The policy definition version properties.
        id:
          readOnly: true
          type: string
          description: The ID of the policy definition version.
        name:
          readOnly: true
          type: string
          description: The name of the policy definition version.
        type:
          readOnly: true
          type: string
          description: The type of the resource (Microsoft.Authorization/policyDefinitions/versions).
        systemData:
          $ref: ../../../../../../common-types/resource-management/v5/types.json#/definitions/systemData
          readOnly: true
          description: The system metadata relating to this resource.
      description: The ID of the policy definition version.
      x-ms-azure-resource: true
    PolicyDefinitionVersionProperties_2:
      type: object
      properties:
        policyType:
          type: string
          description: The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
          enum:
          - NotSpecified
          - BuiltIn
          - Custom
          - Static
          x-ms-enum:
            name: policyType
            modelAsString: true
        mode:
          type: string
          description: The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.
          default: Indexed
        displayName:
          type: string
          description: The display name of the policy definition.
        description:
          type: string
          description: The policy definition description.
        policyRule:
          type: object
          description: The policy rule.
        metadata:
          type: object
          description: The policy definition metadata.  Metadata is an open ended object and is typically a collection of key value pairs.
        parameters:
          $ref: '#/components/schemas/ParameterDefinitions'
        version:
          type: string
          description: 'The policy definition version in #.#.# format.'
      description: The policy definition properties.
    ErrorResponse:
      title: Error Response
      description: Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)
      type: object
      properties:
        code:
          readOnly: true
          type: string
          description: The error code.
        message:
          readOnly: true
          type: string
          description: The error message.
        target:
          readOnly: true
          type: string
          description: The error target.
        details:
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/ErrorResponse'
          x-ms-identifiers:
          - message
          - target
          description: The error details.
        additionalInfo:
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/ErrorAdditionalInfo'
          x-ms-identifiers: []
          description: The error additional info.
    ErrorAdditionalInfo:
      type: object
      properties:
        type:
          readOnly: true
          type: string
          description: The additional info type.
        info:
          readOnly: true
          type: object
          description: The additional info.
      description: The resource management error additional info.
    CloudError_2:
      type: object
      x-ms-external: true
      properties:
        error:
          $ref: '#/components/schemas/ErrorResponse'
      description: An error response from a policy operation.
    PolicyDefinitionVersion_2:
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/PolicyDefinitionVersionProperties_2'
        id:
          readOnly: true
          type: string
          description: The ID of the policy definition version.
        name:
          readOnly: true
          type: string
          description: The name of the policy definition version.
        type:
          readOnly: true
          type: string
          description: The type of the resource (Microsoft.Authorization/policyDefinitions/versions).
        systemData:
          $ref: '#/components/schemas/systemData'
      description: The ID of the policy definition version.
      x-ms-azure-resource: true
    systemData:
      type: object
      description: Metadata pertaining to creation and last modification of the resource.
      properties:
        createdBy:
          type: string
          description: The identity that created the resource.
        createdByType:
          type: string
          description: The type of identity that created the resource.
          enum:
          - User
          - Application
          - ManagedIdentity
          - Key
          x-ms-enum:
            name: createdByType
            modelAsString: true
        createdAt:
          type: string
          format: date-time
          description: The timestamp of resource creation (UTC).
        lastModifiedBy:
          type: string
          description: The identity that last modified the resource.
        lastModifiedByType:
          type: string
          description: The type of identity that last modified the resource.
          enum:
          - User
          - Application
          - ManagedIdentity
          - Key
          x-ms-enum:
            name: createdByType
            modelAsString: true
        lastModifiedAt:
          type: string
          format: date-time
          description: The timestamp of resource last modification (UTC)
      readOnly: true
  parameters:
    TopParameter:
      name: $top
      in: query
      required: false
      description: Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
      x-ms-parameter-location: method
      schema:
        type: integer
        format: int32
        maximum: 1000
        minimum: 1
    PolicyDefinitionVersion:
      name: policyDefinitionVersion
      in: path
      required: true
      description: The policy definition version.  The format is x.y.z where x is the major version number, y is the minor version number, and z is the patch number
      x-ms-parameter-location: method
      schema:
        type: string
        pattern: ^\d+\.\d+\.\d+$
    PolicyDefinitionName:
      name: policyDefinitionName
      in: path
      required: true
      description: The name of the policy definition.
      x-ms-parameter-location: method
      schema:
        type: string
        pattern: ^[^<>%&:\?/]*[^<>%&:\?/ ]+$
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      description: The ID of the target subscription. The value must be an UUID.
      required: true
      schema:
        type: string
        format: uuid
    ManagementGroupNameParameter:
      name: managementGroupName
      in: path
      description: The name of the management group. The name is case insensitive.
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
        minLength: 1
        maxLength: 90
    ApiVersionParameter:
      name: api-version
      in: query
      description: The API version to use for this operation.
      required: true
      schema:
        type: string
        minLength: 1
  requestBodies:
    PolicyDefinitionVersion:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PolicyDefinitionVersion_2'
      description: The policy definition properties.
      required: 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.
x-refined-from:
- policyDefinitionVersions.json
- microsoft-azure-policy-openapi.yml