@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api PolicyClient
@base https://management.azure.com
@version 2019-06-01
@auth OAuth2
@common_fields {api-version: any # The API version to use for the operation.}
@endpoints 9
@toc {scope}(3), subscriptions(3), {policyAssignmentId}(3)

@group {scope}
@endpoint DELETE /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}
@desc Deletes a policy assignment.
@required {scope: any # 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}', policyAssignmentName: any # The name of the policy assignment to delete.}
@returns(200) OK - Returns information about the deleted assignment.
@returns(204) No Content - the policy assignment doesn't exist.

@endpoint PUT /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}
@desc Creates or updates a policy assignment.
@required {scope: any # 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}', policyAssignmentName: any # The name of the policy assignment., parameters: any # Parameters for the policy assignment.}
@returns(201) Created - Returns information about the new policy assignment.

@endpoint GET /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}
@desc Retrieves a policy assignment.
@required {scope: any # 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}', policyAssignmentName: any # The name of the policy assignment to get.}
@returns(200) OK - Returns information about the policy assignment.

@endgroup

@group subscriptions
@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyAssignments
@desc Retrieves all policy assignments that apply to a resource group.
@required {resourceGroupName: any # The name of the resource group that contains policy assignments., subscriptionId: any # The ID of the target subscription.}
@optional {$filter: any # 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.}
@returns(200) OK - Returns an array of policy assignments.

@endpoint GET /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments
@desc Retrieves all policy assignments that apply to a resource.
@required {resourceGroupName: any # The name of the resource group containing the resource., resourceProviderNamespace: any # The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines), parentResourcePath: any # The parent resource path. Use empty string if there is none., resourceType: any # The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites)., resourceName: any # The name of the resource., subscriptionId: any # The ID of the target subscription.}
@optional {$filter: any # 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.}
@returns(200) OK - Returns an array of policy assignments.

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments
@desc Retrieves all policy assignments that apply to a subscription.
@required {subscriptionId: any # The ID of the target subscription.}
@optional {$filter: any # 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.}
@returns(200) OK - Returns an array of policy assignments.

@endgroup

@group {policyAssignmentId}
@endpoint DELETE /{policyAssignmentId}
@desc Deletes a policy assignment.
@required {policyAssignmentId: any # The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.}
@returns(200) OK - Returns information about the policy assignment.
@returns(204) No Content - the policy assignment doesn't exist.

@endpoint PUT /{policyAssignmentId}
@desc Creates or updates a policy assignment.
@required {policyAssignmentId: any # The ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'., parameters: any # Parameters for policy assignment.}
@returns(201) Created - Returns information about the policy assignment.

@endpoint GET /{policyAssignmentId}
@desc Retrieves the policy assignment with the given ID.
@required {policyAssignmentId: any # The ID of the policy assignment to get. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.}
@returns(200) OK - Returns information about the policy assignment.

@endgroup

@end
