Share via


MockableBillingTenantResource.GetBillingSubscriptionAsync Method

Definition

Gets a subscription by its ID. The operation is currently supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement and Microsoft Online Services Program.

  • Request Path: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}
  • Operation Id: BillingSubscriptions_Get
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Billing.BillingSubscriptionResource>> GetBillingSubscriptionAsync (string billingAccountName, string billingSubscriptionName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetBillingSubscriptionAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Billing.BillingSubscriptionResource>>
override this.GetBillingSubscriptionAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Billing.BillingSubscriptionResource>>
Public Overridable Function GetBillingSubscriptionAsync (billingAccountName As String, billingSubscriptionName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BillingSubscriptionResource))

Parameters

billingAccountName
String

The ID that uniquely identifies a billing account.

billingSubscriptionName
String

The ID that uniquely identifies a subscription.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

billingAccountName or billingSubscriptionName is null.

billingAccountName or billingSubscriptionName is an empty string, and was expected to be non-empty.

Applies to