PolicyAssignmentsOperationsExtensions.DeleteByIdAsync 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> DeleteByIdAsync (this Microsoft.Azure.Management.ResourceManager.Fluent.IPolicyAssignmentsOperations operations, string policyAssignmentId, System.Threading.CancellationToken cancellationToken = default);
static member DeleteByIdAsync : Microsoft.Azure.Management.ResourceManager.Fluent.IPolicyAssignmentsOperations * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Management.ResourceManager.Fluent.Models.PolicyAssignmentInner>
<Extension()>
Public Function DeleteByIdAsync (operations As IPolicyAssignmentsOperations, policyAssignmentId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of PolicyAssignmentInner)
Parameters
- operations
- IPolicyAssignmentsOperations
The operations group for this extension method.
- policyAssignmentId
- String
The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
Remarks
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).
Applies to
Azure SDK for .NET
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for