Share via


CostManagementExtensions.GetCostManagementAlertsAsync Method

Definition

Lists the Alerts for external cloud provider type defined.

  • Request Path: /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts
  • Operation Id: Alerts_ListExternal
public static Azure.AsyncPageable<Azure.ResourceManager.CostManagement.CostManagementAlertResource> GetCostManagementAlertsAsync (this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.CostManagement.Models.ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, System.Threading.CancellationToken cancellationToken = default);
static member GetCostManagementAlertsAsync : Azure.ResourceManager.Resources.TenantResource * Azure.ResourceManager.CostManagement.Models.ExternalCloudProviderType * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.CostManagement.CostManagementAlertResource>
<Extension()>
Public Function GetCostManagementAlertsAsync (tenantResource As TenantResource, externalCloudProviderType As ExternalCloudProviderType, externalCloudProviderId As String, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of CostManagementAlertResource)

Parameters

tenantResource
TenantResource

The TenantResource instance the method will execute against.

externalCloudProviderType
ExternalCloudProviderType

The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.

externalCloudProviderId
String

This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

externalCloudProviderId is an empty string, and was expected to be non-empty.

tenantResource or externalCloudProviderId is null.

Applies to