Condividi tramite


PolicyAssignmentCollection Class

Definition

A class representing a collection of PolicyAssignmentResource and their operations. Each PolicyAssignmentResource in the collection will belong to the same instance of ArmResource. To get a PolicyAssignmentCollection instance call the GetPolicyAssignments method from an instance of ArmResource.

public class PolicyAssignmentCollection : Azure.ResourceManager.ArmCollection
type PolicyAssignmentCollection = class
    inherit ArmCollection
Public Class PolicyAssignmentCollection
Inherits ArmCollection
Inheritance
PolicyAssignmentCollection

Constructors

Name Description
PolicyAssignmentCollection()

Initializes a new instance of PolicyAssignmentCollection for mocking.

Properties

Name Description
Client

Gets the ArmClient this resource client was created from.

(Inherited from ArmCollection)
Diagnostics

Gets the diagnostic options for this resource client.

(Inherited from ArmCollection)
Endpoint

Gets the base uri for this resource client.

(Inherited from ArmCollection)
Id

Gets the resource identifier.

(Inherited from ArmCollection)
Pipeline

Gets the pipeline for this resource client.

(Inherited from ArmCollection)

Methods

Name Description
CreateOrUpdate(WaitUntil, String, PolicyAssignmentData, CancellationToken)

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.

  • Request Path. : /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}.
  • Operation Id. : PolicyAssignments_Create.
  • Default Api Version. : 2025-12-01-preview.
CreateOrUpdateAsync(WaitUntil, String, PolicyAssignmentData, CancellationToken)

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.

  • Request Path. : /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}.
  • Operation Id. : PolicyAssignments_Create.
  • Default Api Version. : 2025-12-01-preview.
Exists(String, String, CancellationToken)

Checks to see if the resource exists in azure.

  • Request Path. : /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}.
  • Operation Id. : PolicyAssignments_Get.
  • Default Api Version. : 2025-12-01-preview.
ExistsAsync(String, String, CancellationToken)

Checks to see if the resource exists in azure.

  • Request Path. : /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}.
  • Operation Id. : PolicyAssignments_Get.
  • Default Api Version. : 2025-12-01-preview.
Get(String, String, CancellationToken)

This operation retrieves a single policy assignment, given its name and the scope it was created at.

  • Request Path. : /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}.
  • Operation Id. : PolicyAssignments_Get.
  • Default Api Version. : 2025-12-01-preview.
GetAsync(String, String, CancellationToken)

This operation retrieves a single policy assignment, given its name and the scope it was created at.

  • Request Path. : /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}.
  • Operation Id. : PolicyAssignments_Get.
  • Default Api Version. : 2025-12-01-preview.
GetIfExists(String, String, CancellationToken)

Tries to get details for this resource from the service.

  • Request Path. : /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}.
  • Operation Id. : PolicyAssignments_Get.
  • Default Api Version. : 2025-12-01-preview.
GetIfExistsAsync(String, String, CancellationToken)

Tries to get details for this resource from the service.

  • Request Path. : /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}.
  • Operation Id. : PolicyAssignments_Get.
  • Default Api Version. : 2025-12-01-preview.
TryGetApiVersion(ResourceType, String)

Gets the api version override if it has been set for the current client options.

(Inherited from ArmCollection)

Applies to