ComputeExtensions.GetCapacityReservationGroups Method

Definition

Overloads

GetCapacityReservationGroups(ResourceGroupResource)

Gets a collection of CapacityReservationGroupResources in the ResourceGroupResource. MockingTo mock this method, please mock GetCapacityReservationGroups() instead.

GetCapacityReservationGroups(SubscriptionResource, Nullable<CapacityReservationGroupGetExpand>, Nullable<ResourceIdOptionsForGetCapacityReservationGroup>, CancellationToken)

Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Compute/capacityReservationGroups
  • Operation Id: CapacityReservationGroups_ListBySubscription
  • Default Api Version: 2024-07-01
  • Resource: CapacityReservationGroupResource

GetCapacityReservationGroups(ResourceGroupResource)

Source:
ComputeExtensions.cs
Source:
ComputeExtensions.cs

Gets a collection of CapacityReservationGroupResources in the ResourceGroupResource. MockingTo mock this method, please mock GetCapacityReservationGroups() instead.

public static Azure.ResourceManager.Compute.CapacityReservationGroupCollection GetCapacityReservationGroups (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource);
static member GetCapacityReservationGroups : Azure.ResourceManager.Resources.ResourceGroupResource -> Azure.ResourceManager.Compute.CapacityReservationGroupCollection
<Extension()>
Public Function GetCapacityReservationGroups (resourceGroupResource As ResourceGroupResource) As CapacityReservationGroupCollection

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

Returns

An object representing collection of CapacityReservationGroupResources and their operations over a CapacityReservationGroupResource.

Exceptions

resourceGroupResource is null.

Applies to

GetCapacityReservationGroups(SubscriptionResource, Nullable<CapacityReservationGroupGetExpand>, Nullable<ResourceIdOptionsForGetCapacityReservationGroup>, CancellationToken)

Source:
ComputeExtensions.cs
Source:
ComputeExtensions.cs

Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Compute/capacityReservationGroups
  • Operation Id: CapacityReservationGroups_ListBySubscription
  • Default Api Version: 2024-07-01
  • Resource: CapacityReservationGroupResource
public static Azure.Pageable<Azure.ResourceManager.Compute.CapacityReservationGroupResource> GetCapacityReservationGroups (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Compute.Models.CapacityReservationGroupGetExpand? expand = default, Azure.ResourceManager.Compute.Models.ResourceIdOptionsForGetCapacityReservationGroup? resourceIdsOnly = default, System.Threading.CancellationToken cancellationToken = default);
static member GetCapacityReservationGroups : Azure.ResourceManager.Resources.SubscriptionResource * Nullable<Azure.ResourceManager.Compute.Models.CapacityReservationGroupGetExpand> * Nullable<Azure.ResourceManager.Compute.Models.ResourceIdOptionsForGetCapacityReservationGroup> * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Compute.CapacityReservationGroupResource>
<Extension()>
Public Function GetCapacityReservationGroups (subscriptionResource As SubscriptionResource, Optional expand As Nullable(Of CapacityReservationGroupGetExpand) = Nothing, Optional resourceIdsOnly As Nullable(Of ResourceIdOptionsForGetCapacityReservationGroup) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of CapacityReservationGroupResource)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

expand
Nullable<CapacityReservationGroupGetExpand>

The expand expression to apply on the operation. Based on the expand param(s) specified we return Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation group in the response.

resourceIdsOnly
Nullable<ResourceIdOptionsForGetCapacityReservationGroup>

The query option to fetch Capacity Reservation Group Resource Ids. <br> 'CreatedInSubscription' enables fetching Resource Ids for all capacity reservation group resources created in the subscription. <br> 'SharedWithSubscription' enables fetching Resource Ids for all capacity reservation group resources shared with the subscription. <br> 'All' enables fetching Resource Ids for all capacity reservation group resources shared with the subscription and created in the subscription.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of CapacityReservationGroupResource that may take multiple service requests to iterate over.

Exceptions

subscriptionResource is null.

Applies to