示例#1
0
 /// <summary>
 /// Gets the current service limits (quotas) and usage of a resource. The
 /// response from Get API can be leveraged to submit quota update requests.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// Azure subscription id.
 /// </param>
 /// <param name='providerId'>
 /// Azure resource provider id.
 /// </param>
 /// <param name='location'>
 /// Azure region.
 /// </param>
 /// <param name='resourceName'>
 /// The resource name for a resource provider, such as SKU name for
 /// Microsoft.Compute, Sku or TotalLowPriorityCores for
 /// Microsoft.MachineLearningServices
 /// </param>
 public static CurrentQuotaLimitBase Get(this IQuotaOperations operations, string subscriptionId, string providerId, string location, string resourceName)
 {
     return(operations.GetAsync(subscriptionId, providerId, location, resourceName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns the list of quotas for the server.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IQuotaOperations.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the database server to be queried.
 /// </param>
 /// <param name='quotaName'>
 /// Required. The name of the quota to retrieve.
 /// </param>
 /// <returns>
 /// The response structure for the Quota Get operation.
 /// </returns>
 public static Task <QuotaGetResponse> GetAsync(this IQuotaOperations operations, string serverName, string quotaName)
 {
     return(operations.GetAsync(serverName, quotaName, CancellationToken.None));
 }
示例#3
0
 /// <summary>
 /// Get the quota limit of a resource. The response can be used to determine
 /// the remaining quota to calculate a new quota limit that can be submitted
 /// with a PUT request.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceName'>
 /// Resource name for a given resource provider. For example:
 /// - SKU name for Microsoft.Compute
 /// - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices
 /// For Microsoft.Network PublicIPAddresses.
 /// </param>
 /// <param name='scope'>
 /// The target Azure resource URI. For example,
 /// `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`.
 /// This is the target Azure resource URI for the List GET operation. If a
 /// `{resourceName}` is added after `/quotas`, then it's the target Azure
 /// resource URI in the GET operation for the specific resource.
 /// </param>
 public static CurrentQuotaLimitBase Get(this IQuotaOperations operations, string resourceName, string scope)
 {
     return(operations.GetAsync(resourceName, scope).GetAwaiter().GetResult());
 }