コード例 #1
0
 /// <summary>
 /// Get a single product by name.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/consumption/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='invoiceSectionName'>
 /// InvoiceSection Id.
 /// </param>
 /// <param name='productName'>
 /// Invoice Id.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ProductSummary> GetAsync(this IProductsOperations operations, string billingAccountName, string invoiceSectionName, string productName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(billingAccountName, invoiceSectionName, productName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
 /// <summary>
 /// Returns the specified product.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroup'>
 /// Name of the resource group.
 /// </param>
 /// <param name='registrationName'>
 /// Name of the Azure Stack registration.
 /// </param>
 /// <param name='productName'>
 /// Name of the product.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Product> GetAsync(this IProductsOperations operations, string resourceGroup, string registrationName, string productName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroup, registrationName, productName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }