Share via


MockableCostManagementTenantResource.UsageByExternalCloudProviderTypeQueryAsync Method

Definition

Query the usage data for external cloud provider type defined.

  • Request Path: /providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/query
  • Operation Id: Query_UsageByExternalCloudProviderType
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.CostManagement.Models.QueryResult>> UsageByExternalCloudProviderTypeQueryAsync (Azure.ResourceManager.CostManagement.Models.ExternalCloudProviderType externalCloudProviderType, string externalCloudProviderId, Azure.ResourceManager.CostManagement.Models.QueryDefinition queryDefinition, System.Threading.CancellationToken cancellationToken = default);
abstract member UsageByExternalCloudProviderTypeQueryAsync : Azure.ResourceManager.CostManagement.Models.ExternalCloudProviderType * string * Azure.ResourceManager.CostManagement.Models.QueryDefinition * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.CostManagement.Models.QueryResult>>
override this.UsageByExternalCloudProviderTypeQueryAsync : Azure.ResourceManager.CostManagement.Models.ExternalCloudProviderType * string * Azure.ResourceManager.CostManagement.Models.QueryDefinition * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.CostManagement.Models.QueryResult>>
Public Overridable Function UsageByExternalCloudProviderTypeQueryAsync (externalCloudProviderType As ExternalCloudProviderType, externalCloudProviderId As String, queryDefinition As QueryDefinition, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of QueryResult))

Parameters

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.

queryDefinition
QueryDefinition

Parameters supplied to the CreateOrUpdate Query Config operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

externalCloudProviderId or queryDefinition is null.

Applies to