Share via


MockableConsumptionArmClient.GetConsumptionReservationRecommendationsAsync Method

Definition

List of recommendations for purchasing reserved instances.

  • Request Path: /{resourceScope}/providers/Microsoft.Consumption/reservationRecommendations
  • Operation Id: ReservationRecommendations_List
public virtual Azure.AsyncPageable<Azure.ResourceManager.Consumption.Models.ConsumptionReservationRecommendation> GetConsumptionReservationRecommendationsAsync (Azure.Core.ResourceIdentifier scope, string filter = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetConsumptionReservationRecommendationsAsync : Azure.Core.ResourceIdentifier * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Consumption.Models.ConsumptionReservationRecommendation>
override this.GetConsumptionReservationRecommendationsAsync : Azure.Core.ResourceIdentifier * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Consumption.Models.ConsumptionReservationRecommendation>
Public Overridable Function GetConsumptionReservationRecommendationsAsync (scope As ResourceIdentifier, Optional filter As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of ConsumptionReservationRecommendation)

Parameters

scope
ResourceIdentifier

The scope that the resource will apply against.

filter
String

May be used to filter reservationRecommendations by: properties/scope with allowed values ['Single', 'Shared'] and default value 'Single'; properties/resourceType with allowed values ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', 'MariaDB', 'RedisCache', 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', 'BlockBlob', 'AzureDataExplorer', 'VMwareCloudSimple'] and default value 'VirtualMachines'; and properties/lookBackPeriod with allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last7Days'.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

An async collection of ConsumptionReservationRecommendation that may take multiple service requests to iterate over.

Exceptions

scope is null.

Applies to