BillingExtensions.GetBillingSubscription 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 static Azure.Response<Azure.ResourceManager.Billing.BillingSubscriptionResource> GetBillingSubscription (this Azure.ResourceManager.Resources.TenantResource tenantResource, string billingAccountName, string billingSubscriptionName, System.Threading.CancellationToken cancellationToken = default);
static member GetBillingSubscription : Azure.ResourceManager.Resources.TenantResource * string * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Billing.BillingSubscriptionResource>
<Extension()>
Public Function GetBillingSubscription (tenantResource As TenantResource, billingAccountName As String, billingSubscriptionName As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of BillingSubscriptionResource)

Parameters

tenantResource
TenantResource

The TenantResource instance the method will execute against.

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

tenantResource, billingAccountName or billingSubscriptionName is null.

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

Applies to