Delen via


CostManagementExtensions.GetCostManagementAlerts Method

Definition

Overloads

GetCostManagementAlerts(TenantResource, ExternalCloudProviderType, String, CancellationToken)

Lists the Alerts for external cloud provider type defined.

  • Request Path: /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts
  • Operation Id: Alerts_ListExternal
GetCostManagementAlerts(ArmClient, ResourceIdentifier)

Gets a collection of CostManagementAlertResources in the ArmClient. MockingTo mock this method, please mock GetCostManagementAlerts(ResourceIdentifier) instead.

GetCostManagementAlerts(TenantResource, ExternalCloudProviderType, String, CancellationToken)

Source:
CostManagementExtensions.cs

Lists the Alerts for external cloud provider type defined.

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

A 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

GetCostManagementAlerts(ArmClient, ResourceIdentifier)

Source:
CostManagementExtensions.cs

Gets a collection of CostManagementAlertResources in the ArmClient. MockingTo mock this method, please mock GetCostManagementAlerts(ResourceIdentifier) instead.

public static Azure.ResourceManager.CostManagement.CostManagementAlertCollection GetCostManagementAlerts (this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope);
static member GetCostManagementAlerts : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier -> Azure.ResourceManager.CostManagement.CostManagementAlertCollection
<Extension()>
Public Function GetCostManagementAlerts (client As ArmClient, scope As ResourceIdentifier) As CostManagementAlertCollection

Parameters

client
ArmClient

The ArmClient instance the method will execute against.

scope
ResourceIdentifier

The scope that the resource will apply against.

Returns

An object representing collection of CostManagementAlertResources and their operations over a CostManagementAlertResource.

Exceptions

client is null.

Applies to