BillingExtensions.GetBillingSubscriptionAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Billing.BillingSubscriptionResource>> GetBillingSubscriptionAsync (this Azure.ResourceManager.Resources.TenantResource tenantResource, string billingAccountName, string billingSubscriptionName, System.Threading.CancellationToken cancellationToken = default);
static member GetBillingSubscriptionAsync : Azure.ResourceManager.Resources.TenantResource * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Billing.BillingSubscriptionResource>>
<Extension()>
Public Function GetBillingSubscriptionAsync (tenantResource As TenantResource, billingAccountName As String, billingSubscriptionName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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
Azure SDK for .NET