v2

latestSwagger 2.0raw.githubusercontent.com2019-08-289630.8 KB
PolicyAssignments

Creates or updates a policy assignment.

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.

put/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}

Path parameters

scopestring required

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}'

policyAssignmentNamestring required

The name of the policy assignment.

Query parameters

api-versionstring required

The API version to use for the operation.

Request body

idstring

The ID of the policy assignment.

typestring

The type of the policy assignment.

namestring

The name of the policy assignment.

locationstring

The location of the policy assignment. Only required when utilizing managed identity.

Response

Created - Returns information about the new policy assignment.

idstring

The ID of the policy assignment.

typestring

The type of the policy assignment.

namestring

The name of the policy assignment.

locationstring

The location of the policy assignment. Only required when utilizing managed identity.