PolicyClient
To manage and control access to your resources, you can define customized policies and assign them at a scope
COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
"swagger": "2.0",
"schemes": [
"https"
],
"host": "management.azure.com",
"info": {
"description": "To manage and control access to your resources, you can define customized policies and assign them at a scope.",
"title": "PolicyClient",
"version": "2019-06-01",
"x-apisguru-categories": [
"cloud"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
},
"x-origin": [
{
"format": "swagger",
"url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/resources/resource-manager/Microsoft.Authorization/stable/2019-06-01/policySetDefinitions.json",
"version": "2.0"
}
],
"x-preferred": true,
"x-providerName": "azure.com",
"x-serviceName": "resources-policySetDefinitions",
"x-tags": [
"Azure",
"Microsoft"
]
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"securityDefinitions": {
"azure_auth": {
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"description": "Azure Active Directory OAuth2 Flow",
"flow": "implicit",
"scopes": {
"user_impersonation": "impersonate your user account"
},
"type": "oauth2"
}
},
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"parameters": {
"ApiVersionParameter": {
"description": "The API version to use for the operation.",
"in": "query",
"name": "api-version",
"required": true,
"type": "string"
},
"ManagementGroupIdParameter": {
"description": "The ID of the management group.",
"in": "path",
"name": "managementGroupId",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
},
"SubscriptionIdParameter": {
"description": "The ID of the target subscription.",
"in": "path",
"name": "subscriptionId",
"required": true,
"type": "string"
}
},
"paths": {
"/providers/Microsoft.Authorization/policySetDefinitions": {
"get": {
"description": "This operation retrieves a list of all the built-in policy set definitions.",
"operationId": "PolicySetDefinitions_ListBuiltIn",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns an array of built in policy set definitions.",
"schema": {
"$ref": "#/definitions/PolicySetDefinitionListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"summary": "Retrieves built-in policy set definitions.",
"tags": [
"PolicySetDefinitions"
],
"x-ms-examples": {
"List built-in policy set definitions": {
"parameters": {
"api-version": "2019-06-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
"name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
"properties": {
"description": "Monitor all the available security recommendations in Azure Security Center. This is the default policy for Azure Security Center.",
"displayName": "[Preview]: Enable Monitoring in Azure Security Center",
"metadata": {
"category": "Security Center"
},
"parameters": {},
"policyDefinitions": [
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/a8bef009-a5c9-4d0f-90d7-6018734e8a16"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af8051bf-258b-44e2-a2bf-165330459f9d"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/86b3d65f-7626-441e-b690-81a8b71cff60"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/b0f33259-77d7-4c9e-aac6-3aabcfae693c"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/47a6b606-51aa-4496-8bb7-64b11cf66adc"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e1e5fd5d-3e4c-4ce1-8661-7d1873ae6b15"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af6cd1bd-1635-48cb-bde7-5b15693900b9"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0961003e-5a0a-4549-abde-af6a37f2724d"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/760a85ff-6162-42b3-8d70-698e268f648c"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6"
}
],
"policyType": "BuiltIn"
},
"type": "Microsoft.Authorization/policySetDefinitions"
}
]
},
"headers": {}
}
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}": {
"get": {
"description": "This operation retrieves the built-in policy set definition with the given name.",
"operationId": "PolicySetDefinitions_GetBuiltIn",
"parameters": [
{
"description": "The name of the policy set definition to get.",
"in": "path",
"name": "policySetDefinitionName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns information about the built in policy set definition.",
"schema": {
"$ref": "#/definitions/PolicySetDefinition"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"summary": "Retrieves a built in policy set definition.",
"tags": [
"PolicySetDefinitions"
],
"x-ms-examples": {
"Retrieve a built-in policy set definition": {
"parameters": {
"api-version": "2019-06-01",
"policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
"name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
"properties": {
"description": "Monitor all the available security recommendations in Azure Security Center. This is the default policy for Azure Security Center.",
"displayName": "[Preview]: Enable Monitoring in Azure Security Center",
"metadata": {
"category": "Security Center"
},
"parameters": {},
"policyDefinitions": [
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/a8bef009-a5c9-4d0f-90d7-6018734e8a16"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af8051bf-258b-44e2-a2bf-165330459f9d"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/86b3d65f-7626-441e-b690-81a8b71cff60"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/b0f33259-77d7-4c9e-aac6-3aabcfae693c"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/47a6b606-51aa-4496-8bb7-64b11cf66adc"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e1e5fd5d-3e4c-4ce1-8661-7d1873ae6b15"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af6cd1bd-1635-48cb-bde7-5b15693900b9"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0961003e-5a0a-4549-abde-af6a37f2724d"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/760a85ff-6162-42b3-8d70-698e268f648c"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6"
}
],
"policyType": "BuiltIn"
},
"type": "Microsoft.Authorization/policySetDefinitions"
},
"headers": {}
}
}
}
}
}
},
"/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions": {
"get": {
"description": "This operation retrieves a list of all the a policy set definition in the given management group.",
"operationId": "PolicySetDefinitions_ListByManagementGroup",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/ManagementGroupIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns an array of policy set definitions.",
"schema": {
"$ref": "#/definitions/PolicySetDefinitionListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"summary": "Retrieves all policy set definitions in management group.",
"tags": [
"PolicySetDefinitions"
],
"x-ms-examples": {
"List policy set definitions at management group level": {
"parameters": {
"api-version": "2019-06-01",
"managementGroupId": "MyManagementGroup"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
"name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
"properties": {
"description": "Monitor all the available security recommendations in Azure Security Center. This is the default policy for Azure Security Center.",
"displayName": "[Preview]: Enable Monitoring in Azure Security Center",
"metadata": {
"category": "Security Center"
},
"parameters": {},
"policyDefinitions": [
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/a8bef009-a5c9-4d0f-90d7-6018734e8a16"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af8051bf-258b-44e2-a2bf-165330459f9d"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/86b3d65f-7626-441e-b690-81a8b71cff60"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/b0f33259-77d7-4c9e-aac6-3aabcfae693c"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/47a6b606-51aa-4496-8bb7-64b11cf66adc"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e1e5fd5d-3e4c-4ce1-8661-7d1873ae6b15"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af6cd1bd-1635-48cb-bde7-5b15693900b9"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0961003e-5a0a-4549-abde-af6a37f2724d"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/760a85ff-6162-42b3-8d70-698e268f648c"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6"
}
],
"policyType": "BuiltIn"
},
"type": "Microsoft.Authorization/policySetDefinitions"
},
{
"id": "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"name": "CostManagement",
"properties": {
"description": "Policies to enforce low cost storage SKUs",
"displayName": "Cost Management",
"metadata": {
"category": "Cost Management"
},
"policyDefinitions": [
{
"parameters": {
"listOfAllowedSKUs": {
"value": [
"Standard_GRS",
"Standard_LRS"
]
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"
},
{
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
]
},
"type": "Microsoft.Authorization/policySetDefinitions"
}
]
},
"headers": {}
}
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}": {
"delete": {
"description": "This operation deletes the policy set definition in the given management group with the given name.",
"operationId": "PolicySetDefinitions_DeleteAtManagementGroup",
"parameters": [
{
"description": "The name of the policy set definition to delete.",
"in": "path",
"name": "policySetDefinitionName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/ManagementGroupIdParameter"
}
],
"responses": {
"200": {
"description": "OK"
},
"204": {
"description": "No Content - the policy set definition doesn't exist in the subscription."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"summary": "Deletes a policy set definition.",
"tags": [
"PolicySetDefinitions"
],
"x-ms-examples": {
"Delete a policy set definition at management group level": {
"parameters": {
"api-version": "2019-06-01",
"managementGroupId": "MyManagementGroup",
"policySetDefinitionName": "CostManagement"
},
"responses": {
"200": {
"headers": {}
},
"204": {
"headers": {}
}
}
}
}
},
"get": {
"description": "This operation retrieves the policy set definition in the given management group with the given name.",
"operationId": "PolicySetDefinitions_GetAtManagementGroup",
"parameters": [
{
"description": "The name of the policy set definition to get.",
"in": "path",
"name": "policySetDefinitionName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/ManagementGroupIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns information about the policy set definition.",
"schema": {
"$ref": "#/definitions/PolicySetDefinition"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"summary": "Retrieves a policy set definition.",
"tags": [
"PolicySetDefinitions"
],
"x-ms-examples": {
"Retrieve a policy set definition at management group level": {
"parameters": {
"api-version": "2019-06-01",
"managementGroupId": "MyManagementGroup",
"policySetDefinitionName": "CostManagement"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"name": "CostManagement",
"properties": {
"description": "Policies to enforce low cost storage SKUs",
"displayName": "Cost Management",
"metadata": {
"category": "Cost Management"
},
"policyDefinitions": [
{
"parameters": {
"listOfAllowedSKUs": {
"value": [
"Standard_GRS",
"Standard_LRS"
]
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"
},
{
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
]
},
"type": "Microsoft.Authorization/policySetDefinitions"
},
"headers": {}
}
}
}
}
},
"put": {
"description": "This operation creates or updates a policy set definition in the given management group with the given name.",
"operationId": "PolicySetDefinitions_CreateOrUpdateAtManagementGroup",
"parameters": [
{
"description": "The name of the policy set definition to create.",
"in": "path",
"name": "policySetDefinitionName",
"required": true,
"type": "string"
},
{
"description": "The policy set definition properties.",
"in": "body",
"name": "parameters",
"required": true,
"schema": {
"$ref": "#/definitions/PolicySetDefinition"
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/ManagementGroupIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns information about the policy set definition.",
"schema": {
"$ref": "#/definitions/PolicySetDefinition"
}
},
"201": {
"description": "Created - Returns information about the policy set definition.",
"schema": {
"$ref": "#/definitions/PolicySetDefinition"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"summary": "Creates or updates a policy set definition.",
"tags": [
"PolicySetDefinitions"
],
"x-ms-examples": {
"Create or update a policy set definition at management group level": {
"parameters": {
"api-version": "2019-06-01",
"managementGroupId": "MyManagementGroup",
"parameters": {
"properties": {
"description": "Policies to enforce low cost storage SKUs",
"displayName": "Cost Management",
"metadata": {
"category": "Cost Management"
},
"policyDefinitions": [
{
"parameters": {
"listOfAllowedSKUs": {
"value": [
"Standard_GRS",
"Standard_LRS"
]
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"
},
{
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
]
}
},
"policySetDefinitionName": "CostManagement"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"name": "CostManagement",
"properties": {
"description": "Policies to enforce low cost storage SKUs",
"displayName": "Cost Management",
"metadata": {
"category": "Cost Management"
},
"policyDefinitions": [
{
"parameters": {
"listOfAllowedSKUs": {
"value": [
"Standard_GRS",
"Standard_LRS"
]
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"
},
{
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
]
},
"type": "Microsoft.Authorization/policySetDefinitions"
},
"headers": {}
},
"201": {
"body": {
"id": "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"name": "CostManagement",
"properties": {
"description": "Policies to enforce low cost storage SKUs",
"displayName": "Cost Management",
"metadata": {
"category": "Cost Management"
},
"policyDefinitions": [
{
"parameters": {
"listOfAllowedSKUs": {
"value": [
"Standard_GRS",
"Standard_LRS"
]
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"
},
{
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
]
},
"type": "Microsoft.Authorization/policySetDefinitions"
},
"headers": {}
}
}
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions": {
"get": {
"description": "This operation retrieves a list of all the policy set definitions in the given subscription.",
"operationId": "PolicySetDefinitions_List",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns an array of policy set definitions.",
"schema": {
"$ref": "#/definitions/PolicySetDefinitionListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"summary": "Retrieves the policy set definitions for a subscription.",
"tags": [
"PolicySetDefinitions"
],
"x-ms-examples": {
"List policy set definitions": {
"parameters": {
"api-version": "2019-06-01",
"subscriptionId": "ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
"name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
"properties": {
"description": "Monitor all the available security recommendations in Azure Security Center. This is the default policy for Azure Security Center.",
"displayName": "[Preview]: Enable Monitoring in Azure Security Center",
"metadata": {
"category": "Security Center"
},
"parameters": {},
"policyDefinitions": [
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/a8bef009-a5c9-4d0f-90d7-6018734e8a16"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af8051bf-258b-44e2-a2bf-165330459f9d"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/86b3d65f-7626-441e-b690-81a8b71cff60"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/b0f33259-77d7-4c9e-aac6-3aabcfae693c"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/47a6b606-51aa-4496-8bb7-64b11cf66adc"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e1e5fd5d-3e4c-4ce1-8661-7d1873ae6b15"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/af6cd1bd-1635-48cb-bde7-5b15693900b9"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0961003e-5a0a-4549-abde-af6a37f2724d"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/760a85ff-6162-42b3-8d70-698e268f648c"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6"
}
],
"policyType": "BuiltIn"
},
"type": "Microsoft.Authorization/policySetDefinitions"
},
{
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"name": "CostManagement",
"properties": {
"description": "Policies to enforce low cost storage SKUs",
"displayName": "Cost Management",
"metadata": {
"category": "Cost Management"
},
"policyDefinitions": [
{
"parameters": {
"listOfAllowedSKUs": {
"value": [
"Standard_GRS",
"Standard_LRS"
]
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"
},
{
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
]
},
"type": "Microsoft.Authorization/policySetDefinitions"
}
]
},
"headers": {}
}
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}": {
"delete": {
"description": "This operation deletes the policy set definition in the given subscription with the given name.",
"operationId": "PolicySetDefinitions_Delete",
"parameters": [
{
"description": "The name of the policy set definition to delete.",
"in": "path",
"name": "policySetDefinitionName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK"
},
"204": {
"description": "No Content - the policy set definition doesn't exist in the subscription."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"summary": "Deletes a policy set definition.",
"tags": [
"PolicySetDefinitions"
],
"x-ms-examples": {
"Delete a policy set definition": {
"parameters": {
"api-version": "2019-06-01",
"policySetDefinitionName": "CostManagement",
"subscriptionId": "ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
},
"responses": {
"200": {
"headers": {}
},
"204": {
"headers": {}
}
}
}
}
},
"get": {
"description": "This operation retrieves the policy set definition in the given subscription with the given name.",
"operationId": "PolicySetDefinitions_Get",
"parameters": [
{
"description": "The name of the policy set definition to get.",
"in": "path",
"name": "policySetDefinitionName",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns information about the policy set definition.",
"schema": {
"$ref": "#/definitions/PolicySetDefinition"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"summary": "Retrieves a policy set definition.",
"tags": [
"PolicySetDefinitions"
],
"x-ms-examples": {
"Retrieve a policy set definition": {
"parameters": {
"api-version": "2019-06-01",
"policySetDefinitionName": "CostManagement",
"subscriptionId": "ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"name": "CostManagement",
"properties": {
"description": "Policies to enforce low cost storage SKUs",
"displayName": "Cost Management",
"metadata": {
"category": "Cost Management"
},
"policyDefinitions": [
{
"parameters": {
"listOfAllowedSKUs": {
"value": [
"Standard_GRS",
"Standard_LRS"
]
}
},
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"
},
{
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
]
},
"type": "Microsoft.Authorization/policySetDefinitions"
},
"headers": {}
}
}
}
}
},
"put": {
"description": "This operation creates or updates a policy set definition in the given subscription with the given name.",
"operationId": "PolicySetDefinitions_CreateOrUpdate",
"parameters": [
{
"description": "The name of the policy set definition to create.",
"in": "path",
"name": "policySetDefinitionName",
"required": true,
"type": "string"
},
{
"description": "The policy set definition properties.",
"in": "body",
"name": "parameters",
"required": true,
"schema": {
"$ref": "#/definitions/PolicySetDefinition"
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns information about the policy set definition.",
"schema": {
"$ref": "#/definitions/PolicySetDefinition"
}
},
"201": {
"description": "Created - Returns information about the policy set definition.",
"schema": {
"$ref": "#/definitions/PolicySetDefinition"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"summary": "Creates or updates a policy set definition.",
"tags": [
"PolicySetDefinitions"
],
"x-ms-examples": {
"Create or update a policy set definition": {
"parameters": {
"api-version": "2019-06-01",
"parameters": {
"properties": {
"description": "Policies to enforce low cost storage SKUs",
"displayName": "Cost Management",
"metadata": {
"category": "Cost Management"
},
"policyDefinitions": [
{
"parameters": {
"listOfAllowedSKUs": {
"value": [
"Standard_GRS",
"Standard_LRS"
]
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"
},
{
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
]
}
},
"policySetDefinitionName": "CostManagement",
"subscriptionId": "ae640e6b-ba3e-4256-9d62-2993eecfa6f2"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"name": "CostManagement",
"properties": {
"description": "Policies to enforce low cost storage SKUs",
"displayName": "Cost Management",
"metadata": {
"category": "Cost Management"
},
"policyDefinitions": [
{
"parameters": {
"listOfAllowedSKUs": {
"value": [
"Standard_GRS",
"Standard_LRS"
]
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"
},
{
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
]
},
"type": "Microsoft.Authorization/policySetDefinitions"
},
"headers": {}
},
"201": {
"body": {
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement",
"name": "CostManagement",
"properties": {
"description": "Policies to enforce low cost storage SKUs",
"displayName": "Cost Management",
"metadata": {
"category": "Cost Management"
},
"policyDefinitions": [
{
"parameters": {
"listOfAllowedSKUs": {
"value": [
"Standard_GRS",
"Standard_LRS"
]
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"
},
{
"parameters": {
"prefix": {
"value": "DeptA"
},
"suffix": {
"value": "-LC"
}
},
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming"
}
]
},
"type": "Microsoft.Authorization/policySetDefinitions"
},
"headers": {}
}
}
}
}
}
}
},
"definitions": {
"ErrorResponse": {
"description": "Error response indicates Azure Resource Manager is not able to process the incoming request. The reason is provided in the error message.",
"properties": {
"errorCode": {
"description": "Error code.",
"type": "string"
},
"errorMessage": {
"description": "Error message indicating why the operation failed.",
"type": "string"
},
"httpStatus": {
"description": "Http status code.",
"type": "string"
}
},
"type": "object"
},
"PolicyDefinitionReference": {
"description": "The policy definition reference.",
"properties": {
"parameters": {
"description": "Required if a parameter is used in policy rule.",
"type": "object"
},
"policyDefinitionId": {
"description": "The ID of the policy definition or policy set definition.",
"type": "string"
}
}
},
"PolicySetDefinition": {
"description": "The policy set definition.",
"properties": {
"id": {
"description": "The ID of the policy set definition.",
"readOnly": true,
"type": "string"
},
"name": {
"description": "The name of the policy set definition.",
"readOnly": true,
"type": "string"
},
"properties": {
"$ref": "#/definitions/PolicySetDefinitionProperties",
"description": "The policy definition properties.",
"x-ms-client-flatten": true
},
"type": {
"description": "The type of the resource (Microsoft.Authorization/policySetDefinitions).",
"readOnly": true,
"type": "string"
}
},
"x-ms-azure-resource": true
},
"PolicySetDefinitionListResult": {
"description": "List of policy set definitions.",
"properties": {
"nextLink": {
"description": "The URL to use for getting the next set of results.",
"type": "string"
},
"value": {
"description": "An array of policy set definitions.",
"items": {
"$ref": "#/definitions/PolicySetDefinition"
},
"type": "array"
}
}
},
"PolicySetDefinitionProperties": {
"description": "The policy set definition properties.",
"properties": {
"description": {
"description": "The policy set definition description.",
"type": "string"
},
"displayName": {
"description": "The display name of the policy set definition.",
"type": "string"
},
"metadata": {
"description": "The policy set definition metadata.",
"type": "object"
},
"parameters": {
"description": "The policy set definition parameters that can be used in policy definition references.",
"type": "object"
},
"policyDefinitions": {
"description": "An array of policy definition references.",
"items": {
"$ref": "#/definitions/PolicyDefinitionReference"
},
"type": "array"
},
"policyType": {
"description": "The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom.",
"enum": [
"NotSpecified",
"BuiltIn",
"Custom"
],
"type": "string",
"x-ms-enum": {
"modelAsString": true,
"name": "policyType"
}
}
},
"required": [
"policyDefinitions"
]
}
}
}