Condividi tramite


SubscriptionCollection Class

Definition

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

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

Constructors

SubscriptionCollection()

Initializes a new instance of the SubscriptionCollection 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

Exists(String, CancellationToken)

Checks to see if the resource exists in azure.

  • Request Path: /subscriptions/{subscriptionId}
  • Operation Id: Subscriptions_Get
  • Default Api Version: 2022-12-01
  • Resource: SubscriptionResource
ExistsAsync(String, CancellationToken)

Checks to see if the resource exists in azure.

  • Request Path: /subscriptions/{subscriptionId}
  • Operation Id: Subscriptions_Get
  • Default Api Version: 2022-12-01
  • Resource: SubscriptionResource
Get(String, CancellationToken)

Gets details about a specified subscription.

  • Request Path: /subscriptions/{subscriptionId}
  • Operation Id: Subscriptions_Get
  • Default Api Version: 2022-12-01
  • Resource: SubscriptionResource
GetAll(CancellationToken)

Gets all subscriptions for a tenant.

  • Request Path: /subscriptions
  • Operation Id: Subscriptions_List
  • Default Api Version: 2022-12-01
  • Resource: SubscriptionResource
GetAllAsync(CancellationToken)

Gets all subscriptions for a tenant.

  • Request Path: /subscriptions
  • Operation Id: Subscriptions_List
  • Default Api Version: 2022-12-01
  • Resource: SubscriptionResource
GetAsync(String, CancellationToken)

Gets details about a specified subscription.

  • Request Path: /subscriptions/{subscriptionId}
  • Operation Id: Subscriptions_Get
  • Default Api Version: 2022-12-01
  • Resource: SubscriptionResource
GetIfExists(String, CancellationToken)

Tries to get details for this resource from the service.

  • Request Path: /subscriptions/{subscriptionId}
  • Operation Id: Subscriptions_Get
  • Default Api Version: 2022-12-01
  • Resource: SubscriptionResource
GetIfExistsAsync(String, CancellationToken)

Tries to get details for this resource from the service.

  • Request Path: /subscriptions/{subscriptionId}
  • Operation Id: Subscriptions_Get
  • Default Api Version: 2022-12-01
  • Resource: SubscriptionResource
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<SubscriptionResource>.GetAsyncEnumerator(CancellationToken)

Returns an enumerator that iterates asynchronously through the collection.

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

IEnumerable<SubscriptionResource>.GetEnumerator()

Returns an enumerator that iterates through the collection.

Applies to