PolicyAssignmentsOperationsExtensions.DeleteAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Deletes a policy assignment.
public static System.Threading.Tasks.Task<Microsoft.Azure.Management.ResourceManager.Fluent.Models.PolicyAssignmentInner> DeleteAsync (this Microsoft.Azure.Management.ResourceManager.Fluent.IPolicyAssignmentsOperations operations, string scope, string policyAssignmentName, System.Threading.CancellationToken cancellationToken = default);
static member DeleteAsync : Microsoft.Azure.Management.ResourceManager.Fluent.IPolicyAssignmentsOperations * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Management.ResourceManager.Fluent.Models.PolicyAssignmentInner>
<Extension()>
Public Function DeleteAsync (operations As IPolicyAssignmentsOperations, scope As String, policyAssignmentName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of PolicyAssignmentInner)
Parameters
- operations
- IPolicyAssignmentsOperations
The operations group for this extension method.
- scope
- String
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
- String
The name of the policy assignment to delete.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
Remarks
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}'.
Applies to
Azure SDK for .NET