v2

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

Creates or updates a policy assignment.

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

put/{policyAssignmentId}

Path parameters

policyAssignmentIdstring required

The ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.

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 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.