Share via


SubscriptionPolicyDefinitionCollection Class

Definition

A class representing a collection of SubscriptionPolicyDefinitionResource and their operations. Each SubscriptionPolicyDefinitionResource in the collection will belong to the same instance of SubscriptionResource. To get a SubscriptionPolicyDefinitionCollection instance call the GetSubscriptionPolicyDefinitions method from an instance of SubscriptionResource.

public class SubscriptionPolicyDefinitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable<Azure.ResourceManager.Resources.SubscriptionPolicyDefinitionResource>, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Resources.SubscriptionPolicyDefinitionResource>
type SubscriptionPolicyDefinitionCollection = class
    inherit ArmCollection
    interface seq<SubscriptionPolicyDefinitionResource>
    interface IEnumerable
    interface IAsyncEnumerable<SubscriptionPolicyDefinitionResource>
Public Class SubscriptionPolicyDefinitionCollection
Inherits ArmCollection
Implements IAsyncEnumerable(Of SubscriptionPolicyDefinitionResource), IEnumerable(Of SubscriptionPolicyDefinitionResource)
Inheritance
SubscriptionPolicyDefinitionCollection
Implements

Constructors

SubscriptionPolicyDefinitionCollection()

Initializes a new instance of the SubscriptionPolicyDefinitionCollection class for mocking.

Properties

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

CreateOrUpdate(WaitUntil, String, PolicyDefinitionData, CancellationToken)

This operation creates or updates a policy definition in the given subscription with the given name.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}
  • Operation Id: PolicyDefinitions_CreateOrUpdate
  • Default Api Version: 2021-06-01
  • Resource: SubscriptionPolicyDefinitionResource
CreateOrUpdateAsync(WaitUntil, String, PolicyDefinitionData, CancellationToken)

This operation creates or updates a policy definition in the given subscription with the given name.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}
  • Operation Id: PolicyDefinitions_CreateOrUpdate
  • Default Api Version: 2021-06-01
  • Resource: SubscriptionPolicyDefinitionResource
Exists(String, CancellationToken)

Checks to see if the resource exists in azure.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}
  • Operation Id: PolicyDefinitions_Get
  • Default Api Version: 2021-06-01
  • Resource: SubscriptionPolicyDefinitionResource
ExistsAsync(String, CancellationToken)

Checks to see if the resource exists in azure.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}
  • Operation Id: PolicyDefinitions_Get
  • Default Api Version: 2021-06-01
  • Resource: SubscriptionPolicyDefinitionResource
Get(String, CancellationToken)

This operation retrieves the policy definition in the given subscription with the given name.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}
  • Operation Id: PolicyDefinitions_Get
  • Default Api Version: 2021-06-01
  • Resource: SubscriptionPolicyDefinitionResource
GetAll(String, Nullable<Int32>, CancellationToken)

This operation retrieves a list of all the policy definitions in a given subscription that match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered list includes all policy definitions associated with the subscription, including those that apply directly or from management groups that contain the given subscription. If $filter=atExactScope() is provided, the returned list only includes all policy definitions that at the given subscription. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy definitions whose category match the {value}.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions
  • Operation Id: PolicyDefinitions_List
  • Default Api Version: 2021-06-01
  • Resource: SubscriptionPolicyDefinitionResource
GetAllAsync(String, Nullable<Int32>, CancellationToken)

This operation retrieves a list of all the policy definitions in a given subscription that match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}''. If $filter is not provided, the unfiltered list includes all policy definitions associated with the subscription, including those that apply directly or from management groups that contain the given subscription. If $filter=atExactScope() is provided, the returned list only includes all policy definitions that at the given subscription. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy definitions whose category match the {value}.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions
  • Operation Id: PolicyDefinitions_List
  • Default Api Version: 2021-06-01
  • Resource: SubscriptionPolicyDefinitionResource
GetAsync(String, CancellationToken)

This operation retrieves the policy definition in the given subscription with the given name.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}
  • Operation Id: PolicyDefinitions_Get
  • Default Api Version: 2021-06-01
  • Resource: SubscriptionPolicyDefinitionResource
GetIfExists(String, CancellationToken)

Tries to get details for this resource from the service.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}
  • Operation Id: PolicyDefinitions_Get
  • Default Api Version: 2021-06-01
  • Resource: SubscriptionPolicyDefinitionResource
GetIfExistsAsync(String, CancellationToken)

Tries to get details for this resource from the service.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}
  • Operation Id: PolicyDefinitions_Get
  • Default Api Version: 2021-06-01
  • Resource: SubscriptionPolicyDefinitionResource
TryGetApiVersion(ResourceType, String)

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

(Inherited from ArmCollection)

Explicit Interface Implementations

IAsyncEnumerable<SubscriptionPolicyDefinitionResource>.GetAsyncEnumerator(CancellationToken)

Returns an enumerator that iterates asynchronously through the collection.

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

IEnumerable<SubscriptionPolicyDefinitionResource>.GetEnumerator()

Returns an enumerator that iterates through the collection.

Applies to