Compartilhar via


CapacityReservationCollection Class

Definition

A class representing a collection of CapacityReservationResource and their operations. Each CapacityReservationResource in the collection will belong to the same instance of CapacityReservationGroupResource. To get a CapacityReservationCollection instance call the GetCapacityReservations method from an instance of CapacityReservationGroupResource.

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

Constructors

CapacityReservationCollection()

Initializes a new instance of the CapacityReservationCollection 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, CapacityReservationData, CancellationToken)

The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}
  • Operation Id: CapacityReservations_CreateOrUpdate
  • Default Api Version: 2024-07-01
  • Resource: CapacityReservationResource
CreateOrUpdateAsync(WaitUntil, String, CapacityReservationData, CancellationToken)

The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}
  • Operation Id: CapacityReservations_CreateOrUpdate
  • Default Api Version: 2024-07-01
  • Resource: CapacityReservationResource
Exists(String, Nullable<CapacityReservationInstanceViewType>, CancellationToken)

Checks to see if the resource exists in azure.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}
  • Operation Id: CapacityReservations_Get
  • Default Api Version: 2024-07-01
  • Resource: CapacityReservationResource
ExistsAsync(String, Nullable<CapacityReservationInstanceViewType>, CancellationToken)

Checks to see if the resource exists in azure.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}
  • Operation Id: CapacityReservations_Get
  • Default Api Version: 2024-07-01
  • Resource: CapacityReservationResource
Get(String, Nullable<CapacityReservationInstanceViewType>, CancellationToken)

The operation that retrieves information about the capacity reservation.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}
  • Operation Id: CapacityReservations_Get
  • Default Api Version: 2024-07-01
  • Resource: CapacityReservationResource
GetAll(CancellationToken)

Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations
  • Operation Id: CapacityReservations_ListByCapacityReservationGroup
  • Default Api Version: 2024-07-01
  • Resource: CapacityReservationResource
GetAllAsync(CancellationToken)

Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations
  • Operation Id: CapacityReservations_ListByCapacityReservationGroup
  • Default Api Version: 2024-07-01
  • Resource: CapacityReservationResource
GetAsync(String, Nullable<CapacityReservationInstanceViewType>, CancellationToken)

The operation that retrieves information about the capacity reservation.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}
  • Operation Id: CapacityReservations_Get
  • Default Api Version: 2024-07-01
  • Resource: CapacityReservationResource
GetIfExists(String, Nullable<CapacityReservationInstanceViewType>, CancellationToken)

Tries to get details for this resource from the service.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}
  • Operation Id: CapacityReservations_Get
  • Default Api Version: 2024-07-01
  • Resource: CapacityReservationResource
GetIfExistsAsync(String, Nullable<CapacityReservationInstanceViewType>, CancellationToken)

Tries to get details for this resource from the service.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}
  • Operation Id: CapacityReservations_Get
  • Default Api Version: 2024-07-01
  • Resource: CapacityReservationResource
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<CapacityReservationResource>.GetAsyncEnumerator(CancellationToken)

Returns an enumerator that iterates asynchronously through the collection.

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

IEnumerable<CapacityReservationResource>.GetEnumerator()

Returns an enumerator that iterates through the collection.

Applies to