UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 43 kB
{"openapi":"3.0.0","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://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/policyAssignments.json","version":"2.0"}],"x-preferred":true,"x-providerName":"azure.com","x-serviceName":"resources-policyAssignments","x-tags":["Azure","Microsoft"]},"security":[{"azure_auth":["user_impersonation"]}],"paths":{"/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments":{"get":{"description":"This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}.","operationId":"PolicyAssignments_List","parameters":[{"description":"The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed.","in":"query","name":"$filter","required":false,"schema":{"type":"string"},"examples":{"List policy assignments that apply to a subscription":{"value":"atScope()"}}},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"responses":{"200":{"description":"OK - Returns an array of policy assignments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyAssignmentListResult"},"examples":{"List policy assignments that apply to a subscription":{"$ref":"#/components/examples/List_policy_assignments_that_apply_to_a_subscription"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Retrieves all policy assignments that apply to a subscription.","tags":["PolicyAssignments"],"x-ms-odata":"#/components/schemas/PolicyAssignment","x-ms-pageable":{"nextLinkName":"nextLink"}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments":{"get":{"description":"This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the resource group.","operationId":"PolicyAssignments_ListForResourceGroup","parameters":[{"description":"The name of the resource group that contains policy assignments.","in":"path","name":"resourceGroupName","required":true,"schema":{"type":"string","minLength":1,"maxLength":90,"pattern":"^[-\\w\\._\\(\\)]+$"},"examples":{"List policy assignments that apply to a resource group":{"value":"TestResourceGroup"}}},{"description":"The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed.","in":"query","name":"$filter","required":false,"schema":{"type":"string"},"allowReserved":true,"examples":{"List policy assignments that apply to a resource group":{"value":"atScope()"}}},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"responses":{"200":{"description":"OK - Returns an array of policy assignments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyAssignmentListResult"},"examples":{"List policy assignments that apply to a resource group":{"$ref":"#/components/examples/List_policy_assignments_that_apply_to_a_resource_group"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Retrieves all policy assignments that apply to a resource group.","tags":["PolicyAssignments"],"x-ms-pageable":{"nextLinkName":"nextLink"}}},"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments":{"get":{"deprecated":false,"description":"This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').","operationId":"PolicyAssignments_ListForResource","parameters":[{"description":"The name of the resource group containing the resource.","in":"path","name":"resourceGroupName","required":true,"schema":{"type":"string","minLength":1,"maxLength":90,"pattern":"^[-\\w\\._\\(\\)]+$"},"examples":{"List all policy assignments that apply to a resource":{"value":"TestResourceGroup"}}},{"description":"The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines)","in":"path","name":"resourceProviderNamespace","required":true,"schema":{"type":"string"},"examples":{"List all policy assignments that apply to a resource":{"value":"Microsoft.Compute"}}},{"description":"The parent resource path. Use empty string if there is none.","in":"path","name":"parentResourcePath","required":true,"x-ms-skip-url-encoding":true,"schema":{"type":"string"},"examples":{"List all policy assignments that apply to a resource":{"value":"virtualMachines/MyTestVm"}}},{"description":"The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites).","in":"path","name":"resourceType","required":true,"x-ms-skip-url-encoding":true,"schema":{"type":"string"},"examples":{"List all policy assignments that apply to a resource":{"value":"domainNames"}}},{"description":"The name of the resource.","in":"path","name":"resourceName","required":true,"schema":{"type":"string"},"examples":{"List all policy assignments that apply to a resource":{"value":"MyTestComputer.cloudapp.net"}}},{"description":"The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed.","in":"query","name":"$filter","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"responses":{"200":{"description":"OK - Returns an array of policy assignments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyAssignmentListResult"},"examples":{"List all policy assignments that apply to a resource":{"$ref":"#/components/examples/List_all_policy_assignments_that_apply_to_a_resource"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Retrieves all policy assignments that apply to a resource.","tags":["PolicyAssignments"],"x-ms-odata":"#/components/schemas/PolicyAssignment","x-ms-pageable":{"nextLinkName":"nextLink"}}},"/{policyAssignmentId}":{"delete":{"description":"This operation deletes the policy with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope} are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group), '/subscriptions/{subscriptionId}' (subscription), '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' (resource).","operationId":"PolicyAssignments_DeleteById","parameters":[{"description":"The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.","in":"path","name":"policyAssignmentId","required":true,"x-ms-skip-url-encoding":true,"schema":{"type":"string"},"examples":{"Delete a policy assignment by ID":{"value":"providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage"}}},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"OK - Returns information about the policy assignment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyAssignment"},"examples":{"Delete a policy assignment by ID":{"$ref":"#/components/examples/Delete_a_policy_assignment_by_ID"}}}}},"204":{"description":"No Content - the policy assignment doesn't exist."},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Deletes a policy assignment.","tags":["PolicyAssignments"]},"get":{"description":"The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.","operationId":"PolicyAssignments_GetById","parameters":[{"description":"The ID of the policy assignment to get. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.","in":"path","name":"policyAssignmentId","required":true,"x-ms-skip-url-encoding":true,"schema":{"type":"string"},"examples":{"Retrieve a policy assignment by ID":{"value":"providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage"},"Retrieve a policy assignment with a managed identity by ID":{"value":"providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage"}}},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"OK - Returns information about the policy assignment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyAssignment"},"examples":{"Retrieve a policy assignment by ID":{"$ref":"#/components/examples/Retrieve_a_policy_assignment_by_ID"},"Retrieve a policy assignment with a managed identity by ID":{"$ref":"#/components/examples/Retrieve_a_policy_assignment_with_a_managed_identity_by_ID"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Retrieves the policy assignment with the given ID.","tags":["PolicyAssignments"]},"put":{"description":"This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.","operationId":"PolicyAssignments_CreateById","parameters":[{"description":"The ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.","in":"path","name":"policyAssignmentId","required":true,"x-ms-skip-url-encoding":true,"schema":{"type":"string"},"examples":{"Create or update policy assignment by ID":{"value":"providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage"},"Create or update policy assignment with a managed identity by ID":{"value":"providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage"}}},{"$ref":"#/components/parameters/ApiVersionParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyAssignment"}}},"description":"Parameters for policy assignment.","required":true},"responses":{"201":{"description":"Created - Returns information about the policy assignment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyAssignment"},"examples":{"Create or update policy assignment by ID":{"$ref":"#/components/examples/Create_or_update_policy_assignment_by_ID"},"Create or update policy assignment with a managed identity by ID":{"$ref":"#/components/examples/Create_or_update_policy_assignment_with_a_managed_identity_by_ID"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Creates or updates a policy assignment.","tags":["PolicyAssignments"]}},"/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}":{"delete":{"description":"This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.","operationId":"PolicyAssignments_Delete","parameters":[{"description":"The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'","in":"path","name":"scope","required":true,"x-ms-skip-url-encoding":true,"schema":{"type":"string"},"examples":{"Delete a policy assignment":{"value":"subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"}}},{"description":"The name of the policy assignment to delete.","in":"path","name":"policyAssignmentName","required":true,"schema":{"type":"string"},"examples":{"Delete a policy assignment":{"value":"EnforceNaming"}}},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"OK - Returns information about the deleted assignment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyAssignment"},"examples":{"Delete a policy assignment":{"$ref":"#/components/examples/Delete_a_policy_assignment"}}}}},"204":{"description":"No Content - the policy assignment doesn't exist."},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Deletes a policy assignment.","tags":["PolicyAssignments"]},"get":{"description":"This operation retrieves a single policy assignment, given its name and the scope it was created at.","operationId":"PolicyAssignments_Get","parameters":[{"description":"The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'","in":"path","name":"scope","required":true,"x-ms-skip-url-encoding":true,"schema":{"type":"string"},"examples":{"Retrieve a policy assignment":{"value":"subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"},"Retrieve a policy assignment with a managed identity":{"value":"subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"}}},{"description":"The name of the policy assignment to get.","in":"path","name":"policyAssignmentName","required":true,"schema":{"type":"string"},"examples":{"Retrieve a policy assignment":{"value":"EnforceNaming"},"Retrieve a policy assignment with a managed identity":{"value":"EnforceNaming"}}},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"OK - Returns information about the policy assignment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyAssignment"},"examples":{"Retrieve a policy assignment":{"$ref":"#/components/examples/Retrieve_a_policy_assignment"},"Retrieve a policy assignment with a managed identity":{"$ref":"#/components/examples/Retrieve_a_policy_assignment_with_a_managed_identity"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Retrieves a policy assignment.","tags":["PolicyAssignments"]},"put":{"description":" This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.","operationId":"PolicyAssignments_Create","parameters":[{"description":"The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'","in":"path","name":"scope","required":true,"x-ms-skip-url-encoding":true,"schema":{"type":"string"},"examples":{"Create or update a policy assignment":{"value":"subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"},"Create or update a policy assignment with a managed identity":{"value":"subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"},"Create or update a policy assignment without enforcing policy effect during resource creation or update.":{"value":"subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"}}},{"description":"The name of the policy assignment.","in":"path","name":"policyAssignmentName","required":true,"schema":{"type":"string"},"examples":{"Create or update a policy assignment":{"value":"EnforceNaming"},"Create or update a policy assignment with a managed identity":{"value":"EnforceNaming"},"Create or update a policy assignment without enforcing policy effect during resource creation or update.":{"value":"EnforceNaming"}}},{"$ref":"#/components/parameters/ApiVersionParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyAssignment"}}},"description":"Parameters for the policy assignment.","required":true},"responses":{"201":{"description":"Created - Returns information about the new policy assignment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyAssignment"},"examples":{"Create or update a policy assignment":{"$ref":"#/components/examples/Create_or_update_a_policy_assignment"},"Create or update a policy assignment with a managed identity":{"$ref":"#/components/examples/Create_or_update_a_policy_assignment_with_a_managed_identity"},"Create or update a policy assignment without enforcing policy effect during resource creation or update.":{"$ref":"#/components/examples/Create_or_update_a_policy_assignment_without_enforcing_policy_effect_during_resource_creation_or_update."}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Creates or updates a policy assignment.","tags":["PolicyAssignments"]}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"List_policy_assignments_that_apply_to_a_subscription":{"value":{"value":[{"id":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement","identity":{"principalId":"e6d23f8d-af97-4fbc-bda6-00604e4e3d0a","tenantId":"4bee2b8a-1bee-47c2-90e9-404241551135","type":"SystemAssigned"},"location":"eastus","name":"CostManagement","properties":{"description":"Minimize the risk of accidental cost overruns","displayName":"Storage Cost Management","metadata":{"category":"Cost Management"},"notScopes":[],"parameters":{"allowedSkus":{"type":"Array"}},"policyDefinitionId":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/storageSkus","scope":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"},"sku":{"name":"A0","tier":"Free"},"type":"Microsoft.Authorization/policyAssignments"},{"id":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/TagEnforcement","name":"TagEnforcement","properties":{"description":"Ensure a given tag key and value are present on all resources","displayName":"Enforces a tag key and value","notScopes":[],"policyDefinitionId":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/TagKeyValue","scope":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"},"sku":{"name":"A0","tier":"Free"},"type":"Microsoft.Authorization/policyAssignments"}]}},"List_policy_assignments_that_apply_to_a_resource_group":{"value":{"value":[{"id":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/TestResourceGroup/providers/Microsoft.Authorization/policyAssignments/TestCostManagement","identity":{"principalId":"e6d23f8d-af97-4fbc-bda6-00604e4e3d0a","tenantId":"4bee2b8a-1bee-47c2-90e9-404241551135","type":"SystemAssigned"},"location":"eastus","name":"TestCostManagement","properties":{"description":"Minimize the risk of accidental cost overruns","displayName":"Storage Cost Management","metadata":{"category":"Cost Management"},"notScopes":[],"parameters":{"allowedSkus":{"type":"Array"}},"policyDefinitionId":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/storageSkus","scope":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/TestResourceGroup"},"sku":{"name":"A0","tier":"Free"},"type":"Microsoft.Authorization/policyAssignments"},{"id":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/TestResourceGroup/providers/Microsoft.Authorization/policyAssignments/TestTagEnforcement","name":"TestTagEnforcement","properties":{"description":"Ensure a given tag key and value are present on all resources","displayName":"Enforces a tag key and value","notScopes":[],"policyDefinitionId":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/TagKeyValue","scope":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/TestResourceGroup"},"sku":{"name":"A0","tier":"Free"},"type":"Microsoft.Authorization/policyAssignments"}]}},"List_all_policy_assignments_that_apply_to_a_resource":{"value":{"value":[{"id":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/TestResourceGroup/providers/Microsoft.Authorization/policyAssignments/TestCostManagement","identity":{"principalId":"e6d23f8d-af97-4fbc-bda6-00604e4e3d0a","tenantId":"4bee2b8a-1bee-47c2-90e9-404241551135","type":"SystemAssigned"},"location":"eastus","name":"TestCostManagement","properties":{"description":"Minimize the risk of accidental cost overruns","displayName":"VM Cost Management","metadata":{"category":"Cost Management"},"notScopes":[],"parameters":{"allowedSkus":{"type":"Array"}},"policyDefinitionId":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/vmSkus","scope":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/TestResourceGroup"},"sku":{"name":"A0","tier":"Free"},"type":"Microsoft.Authorization/policyAssignments"},{"id":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/TestResourceGroup/providers/Microsoft.Authorization/policyAssignments/TestTagEnforcement","name":"TestTagEnforcement","properties":{"description":"Ensure a given tag key and value are present on all resources","displayName":"Enforces a tag key and value","notScopes":[],"policyDefinitionId":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/TagKeyValue","scope":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/TestResourceGroup"},"sku":{"name":"A0","tier":"Free"},"type":"Microsoft.Authorization/policyAssignments"}]}},"Delete_a_policy_assignment_by_ID":{"value":{"id":"/providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage","name":"LowCostStorage","properties":{"description":"Allow only storage accounts of SKU Standard_GRS or Standard_LRS to be created","displayName":"Enforce storage account SKU","metadata":{"assignedBy":"Cheapskate Boss"},"notScopes":[],"parameters":{"listOfAllowedSKUs":{"value":["Standard_GRS","Standard_LRS"]}},"policyDefinitionId":"/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"},"type":"Microsoft.Authorization/policyAssignments"}},"Retrieve_a_policy_assignment_by_ID":{"value":{"id":"/providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage","name":"LowCostStorage","properties":{"description":"Allow only storage accounts of SKU Standard_GRS or Standard_LRS to be created","displayName":"Enforce storage account SKU","enforcementMode":"Default","metadata":{"assignedBy":"Cheapskate Boss"},"notScopes":[],"parameters":{"listOfAllowedSKUs":{"value":["Standard_GRS","Standard_LRS"]}},"policyDefinitionId":"/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"},"type":"Microsoft.Authorization/policyAssignments"}},"Retrieve_a_policy_assignment_with_a_managed_identity_by_ID":{"value":{"id":"/providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage","identity":{"principalId":"e6d23f8d-af97-4fbc-bda6-00604e4e3d0a","tenantId":"4bee2b8a-1bee-47c2-90e9-404241551135","type":"SystemAssigned"},"location":"westus","name":"LowCostStorage","properties":{"description":"Allow only storage accounts of SKU Standard_GRS or Standard_LRS to be created","displayName":"Enforce storage account SKU","enforcementMode":"Default","metadata":{"assignedBy":"Cheapskate Boss"},"notScopes":[],"parameters":{"listOfAllowedSKUs":{"value":["Standard_GRS","Standard_LRS"]}},"policyDefinitionId":"/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"},"type":"Microsoft.Authorization/policyAssignments"}},"Create_or_update_policy_assignment_by_ID":{"value":{"id":"/providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage","name":"LowCostStorage","properties":{"description":"Allow only storage accounts of SKU Standard_GRS or Standard_LRS to be created","displayName":"Enforce storage account SKU","enforcementMode":"Default","metadata":{"assignedBy":"Cheapskate Boss"},"notScopes":[],"parameters":{"listOfAllowedSKUs":{"value":["Standard_GRS","Standard_LRS"]}},"policyDefinitionId":"/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"},"type":"Microsoft.Authorization/policyAssignments"}},"Create_or_update_policy_assignment_with_a_managed_identity_by_ID":{"value":{"id":"/providers/Microsoft.Management/managementGroups/MyManagementGroup/providers/Microsoft.Authorization/policyAssignments/LowCostStorage","identity":{"principalId":"e6d23f8d-af97-4fbc-bda6-00604e4e3d0a","tenantId":"4bee2b8a-1bee-47c2-90e9-404241551135","type":"SystemAssigned"},"location":"eastus","name":"LowCostStorage","properties":{"description":"Allow only storage accounts of SKU Standard_GRS or Standard_LRS to be created","displayName":"Enforce storage account SKU","enforcementMode":"Default","metadata":{"assignedBy":"Cheapskate Boss"},"notScopes":[],"parameters":{"listOfAllowedSKUs":{"value":["Standard_GRS","Standard_LRS"]}},"policyDefinitionId":"/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1"},"type":"Microsoft.Authorization/policyAssignments"}},"Delete_a_policy_assignment":{"value":{"id":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming","name":"EnforceNaming","properties":{"description":"Force resource names to begin with given DeptA and end with -LC","displayName":"Enforce resource naming rules","metadata":{"assignedBy":"Special Someone"},"notScopes":[],"parameters":{"prefix":{"value":"DeptA"},"suffix":{"value":"-LC"}},"policyDefinitionId":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming","scope":"subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"},"type":"Microsoft.Authorization/policyAssignments"}},"Retrieve_a_policy_assignment":{"value":{"id":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming","name":"EnforceNaming","properties":{"description":"Force resource names to begin with given DeptA and end with -LC","displayName":"Enforce resource naming rules","enforcementMode":"Default","metadata":{"assignedBy":"Special Someone"},"notScopes":[],"parameters":{"prefix":{"value":"DeptA"},"suffix":{"value":"-LC"}},"policyDefinitionId":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming","scope":"subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"},"type":"Microsoft.Authorization/policyAssignments"}},"Retrieve_a_policy_assignment_with_a_managed_identity":{"value":{"id":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming","identity":{"principalId":"e6d23f8d-af97-4fbc-bda6-00604e4e3d0a","tenantId":"4bee2b8a-1bee-47c2-90e9-404241551135","type":"SystemAssigned"},"location":"westus","name":"EnforceNaming","properties":{"description":"Force resource names to begin with given DeptA and end with -LC","displayName":"Enforce resource naming rules","enforcementMode":"Default","metadata":{"assignedBy":"Special Someone"},"notScopes":[],"parameters":{"prefix":{"value":"DeptA"},"suffix":{"value":"-LC"}},"policyDefinitionId":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming","scope":"subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"},"type":"Microsoft.Authorization/policyAssignments"}},"Create_or_update_a_policy_assignment":{"value":{"id":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming","name":"EnforceNaming","properties":{"description":"Force resource names to begin with given DeptA and end with -LC","displayName":"Enforce resource naming rules","enforcementMode":"Default","metadata":{"assignedBy":"Special Someone"},"notScopes":[],"parameters":{"prefix":{"value":"DeptA"},"suffix":{"value":"-LC"}},"policyDefinitionId":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming","scope":"subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"},"type":"Microsoft.Authorization/policyAssignments"}},"Create_or_update_a_policy_assignment_with_a_managed_identity":{"value":{"id":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming","identity":{"principalId":"e6d23f8d-af97-4fbc-bda6-00604e4e3d0a","tenantId":"4bee2b8a-1bee-47c2-90e9-404241551135","type":"SystemAssigned"},"location":"eastus","name":"EnforceNaming","properties":{"description":"Force resource names to begin with given DeptA and end with -LC","displayName":"Enforce resource naming rules","enforcementMode":"Default","metadata":{"assignedBy":"Special Someone"},"notScopes":[],"parameters":{"prefix":{"value":"DeptA"},"suffix":{"value":"-LC"}},"policyDefinitionId":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming","scope":"subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"},"type":"Microsoft.Authorization/policyAssignments"}},"Create_or_update_a_policy_assignment_without_enforcing_policy_effect_during_resource_creation_or_update.":{"value":{"id":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/EnforceNaming","name":"EnforceNaming","properties":{"description":"Force resource names to begin with given DeptA and end with -LC","displayName":"Enforce resource naming rules","enforcementMode":"DoNotEnforce","metadata":{"assignedBy":"Special Someone"},"notScopes":[],"parameters":{"prefix":{"value":"DeptA"},"suffix":{"value":"-LC"}},"policyDefinitionId":"/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming","scope":"subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2"},"type":"Microsoft.Authorization/policyAssignments"}}},"parameters":{"ApiVersionParameter":{"description":"The API version to use for the operation.","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"List policy assignments that apply to a subscription":{"value":"2019-06-01"},"List policy assignments that apply to a resource group":{"value":"2019-06-01"},"List all policy assignments that apply to a resource":{"value":"2019-06-01"},"Delete a policy assignment by ID":{"value":"2019-06-01"},"Retrieve a policy assignment by ID":{"value":"2019-06-01"},"Retrieve a policy assignment with a managed identity by ID":{"value":"2019-06-01"},"Create or update policy assignment by ID":{"value":"2019-06-01"},"Create or update policy assignment with a managed identity by ID":{"value":"2019-06-01"},"Delete a policy assignment":{"value":"2019-06-01"},"Retrieve a policy assignment":{"value":"2019-06-01"},"Retrieve a policy assignment with a managed identity":{"value":"2019-06-01"},"Create or update a policy assignment":{"value":"2019-06-01"},"Create or update a policy assignment with a managed identity":{"value":"2019-06-01"},"Create or update a policy assignment without enforcing policy effect during resource creation or update.":{"value":"2019-06-01"}}},"SubscriptionIdParameter":{"description":"The ID of the target subscription.","in":"path","name":"subscriptionId","required":true,"schema":{"type":"string"},"examples":{"List policy assignments that apply to a subscription":{"value":"ae640e6b-ba3e-4256-9d62-2993eecfa6f2"},"List policy assignments that apply to a resource group":{"value":"ae640e6b-ba3e-4256-9d62-2993eecfa6f2"},"List all policy assignments that apply to a resource":{"value":"ae640e6b-ba3e-4256-9d62-2993eecfa6f2"}}}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}},"schemas":{"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"},"Identity":{"description":"Identity for the resource.","properties":{"principalId":{"description":"The principal ID of the resource identity.","readOnly":true,"type":"string"},"tenantId":{"description":"The tenant ID of the resource identity.","readOnly":true,"type":"string"},"type":{"description":"The identity type.","enum":["SystemAssigned","None"],"type":"string","x-ms-enum":{"modelAsString":false,"name":"ResourceIdentityType"}}}},"PolicyAssignment":{"description":"The policy assignment.","properties":{"id":{"description":"The ID of the policy assignment.","readOnly":true,"type":"string"},"identity":{"$ref":"#/components/schemas/Identity"},"location":{"description":"The location of the policy assignment. Only required when utilizing managed identity.","type":"string"},"name":{"description":"The name of the policy assignment.","readOnly":true,"type":"string"},"properties":{"$ref":"#/components/schemas/PolicyAssignmentProperties"},"sku":{"$ref":"#/components/schemas/PolicySku"},"type":{"description":"The type of the policy assignment.","readOnly":true,"type":"string"}},"x-ms-azure-resource":true},"PolicyAssignmentListResult":{"description":"List of policy assignments.","properties":{"nextLink":{"description":"The URL to use for getting the next set of results.","type":"string"},"value":{"description":"An array of policy assignments.","items":{"$ref":"#/components/schemas/PolicyAssignment"},"type":"array"}}},"PolicyAssignmentProperties":{"description":"The policy assignment properties.","properties":{"description":{"description":"This message will be part of response in case of policy violation.","type":"string"},"displayName":{"description":"The display name of the policy assignment.","type":"string"},"enforcementMode":{"description":"The policy assignment enforcement mode. Possible values are Default and DoNotEnforce.","enum":["Default","DoNotEnforce"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"enforcementMode","values":[{"description":"The policy effect is enforced during resource creation or update.","value":"Default"},{"description":"The policy effect is not enforced during resource creation or update.","value":"DoNotEnforce"}]}},"metadata":{"description":"The policy assignment metadata.","type":"object"},"notScopes":{"description":"The policy's excluded scopes.","items":{"type":"string"},"type":"array"},"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 being assigned.","type":"string"},"scope":{"description":"The scope for the policy assignment.","type":"string"}}},"PolicySku":{"description":"The policy sku. This property is optional, obsolete, and will be ignored.","properties":{"name":{"description":"The name of the policy sku. Possible values are A0 and A1.","type":"string"},"tier":{"description":"The policy sku tier. Possible values are Free and Standard.","type":"string"}},"required":["name"]}}}}