你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Quota interface
表示配额的接口。
方法
begin |
使用请求的值创建或更新指定资源的配额限制。 若要更新配额,请执行以下步骤: |
begin |
使用请求的值创建或更新指定资源的配额限制。 若要更新配额,请执行以下步骤: |
begin |
将特定资源的配额限制更新为指定值: |
begin |
将特定资源的配额限制更新为指定值: |
get(string, string, Quota |
获取资源的配额限制。 响应可用于确定剩余配额,以计算可以使用 PUT 请求提交的新配额限制。 |
list(string, Quota |
获取指定范围的所有资源的当前配额限制列表。 可以利用此 GET作的响应提交请求以更新配额。 |
方法详细信息
beginCreateOrUpdate(string, string, CurrentQuotaLimitBase, QuotaCreateOrUpdateOptionalParams)
使用请求的值创建或更新指定资源的配额限制。 若要更新配额,请执行以下步骤:
function beginCreateOrUpdate(resourceName: string, scope: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<CurrentQuotaLimitBase>, CurrentQuotaLimitBase>>
参数
- resourceName
-
string
给定资源提供程序的资源名称。 例如: - Microsoft.Compute 的 SKU 名称 - Microsoft.MachineLearningServices for Microsoft.Network PublicIPAddresses 的 SKU 或 TotalLowPriorityCores。
- scope
-
string
目标 Azure 资源 URI。 例如,/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/
。
这是列表 GET作的目标 Azure 资源 URI。 如果在 /quotas
后添加了 {resourceName}
,则它是特定资源的 GET作中的目标 Azure 资源 URI。
- createQuotaRequest
- CurrentQuotaLimitBase
配额请求有效负载。
选项参数。
返回
Promise<@azure/core-lro.SimplePollerLike<OperationState<CurrentQuotaLimitBase>, CurrentQuotaLimitBase>>
beginCreateOrUpdateAndWait(string, string, CurrentQuotaLimitBase, QuotaCreateOrUpdateOptionalParams)
使用请求的值创建或更新指定资源的配额限制。 若要更新配额,请执行以下步骤:
function beginCreateOrUpdateAndWait(resourceName: string, scope: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaCreateOrUpdateOptionalParams): Promise<CurrentQuotaLimitBase>
参数
- resourceName
-
string
给定资源提供程序的资源名称。 例如: - Microsoft.Compute 的 SKU 名称 - Microsoft.MachineLearningServices for Microsoft.Network PublicIPAddresses 的 SKU 或 TotalLowPriorityCores。
- scope
-
string
目标 Azure 资源 URI。 例如,/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/
。
这是列表 GET作的目标 Azure 资源 URI。 如果在 /quotas
后添加了 {resourceName}
,则它是特定资源的 GET作中的目标 Azure 资源 URI。
- createQuotaRequest
- CurrentQuotaLimitBase
配额请求有效负载。
选项参数。
返回
Promise<CurrentQuotaLimitBase>
beginUpdate(string, string, CurrentQuotaLimitBase, QuotaUpdateOptionalParams)
将特定资源的配额限制更新为指定值:
- 使用 Usages-GET 和 Quota-GET作来确定特定资源的剩余配额,并计算新的配额限制。 本示例 详细介绍这些步骤。
- 使用此 PUT作更新配额限制。 请检查位置标头中的 URI,了解请求的详细状态。
function beginUpdate(resourceName: string, scope: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaUpdateOptionalParams): Promise<SimplePollerLike<OperationState<CurrentQuotaLimitBase>, CurrentQuotaLimitBase>>
参数
- resourceName
-
string
给定资源提供程序的资源名称。 例如: - Microsoft.Compute 的 SKU 名称 - Microsoft.MachineLearningServices for Microsoft.Network PublicIPAddresses 的 SKU 或 TotalLowPriorityCores。
- scope
-
string
目标 Azure 资源 URI。 例如,/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/
。
这是列表 GET作的目标 Azure 资源 URI。 如果在 /quotas
后添加了 {resourceName}
,则它是特定资源的 GET作中的目标 Azure 资源 URI。
- createQuotaRequest
- CurrentQuotaLimitBase
配额请求有效负载。
- options
- QuotaUpdateOptionalParams
选项参数。
返回
Promise<@azure/core-lro.SimplePollerLike<OperationState<CurrentQuotaLimitBase>, CurrentQuotaLimitBase>>
beginUpdateAndWait(string, string, CurrentQuotaLimitBase, QuotaUpdateOptionalParams)
将特定资源的配额限制更新为指定值:
- 使用 Usages-GET 和 Quota-GET作来确定特定资源的剩余配额,并计算新的配额限制。 本示例 详细介绍这些步骤。
- 使用此 PUT作更新配额限制。 请检查位置标头中的 URI,了解请求的详细状态。
function beginUpdateAndWait(resourceName: string, scope: string, createQuotaRequest: CurrentQuotaLimitBase, options?: QuotaUpdateOptionalParams): Promise<CurrentQuotaLimitBase>
参数
- resourceName
-
string
给定资源提供程序的资源名称。 例如: - Microsoft.Compute 的 SKU 名称 - Microsoft.MachineLearningServices for Microsoft.Network PublicIPAddresses 的 SKU 或 TotalLowPriorityCores。
- scope
-
string
目标 Azure 资源 URI。 例如,/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/
。
这是列表 GET作的目标 Azure 资源 URI。 如果在 /quotas
后添加了 {resourceName}
,则它是特定资源的 GET作中的目标 Azure 资源 URI。
- createQuotaRequest
- CurrentQuotaLimitBase
配额请求有效负载。
- options
- QuotaUpdateOptionalParams
选项参数。
返回
Promise<CurrentQuotaLimitBase>
get(string, string, QuotaGetOptionalParams)
获取资源的配额限制。 响应可用于确定剩余配额,以计算可以使用 PUT 请求提交的新配额限制。
function get(resourceName: string, scope: string, options?: QuotaGetOptionalParams): Promise<QuotaGetResponse>
参数
- resourceName
-
string
给定资源提供程序的资源名称。 例如: - Microsoft.Compute 的 SKU 名称 - Microsoft.MachineLearningServices for Microsoft.Network PublicIPAddresses 的 SKU 或 TotalLowPriorityCores。
- scope
-
string
目标 Azure 资源 URI。 例如,/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/
。
这是列表 GET作的目标 Azure 资源 URI。 如果在 /quotas
后添加了 {resourceName}
,则它是特定资源的 GET作中的目标 Azure 资源 URI。
- options
- QuotaGetOptionalParams
选项参数。
返回
Promise<QuotaGetResponse>
list(string, QuotaListOptionalParams)
获取指定范围的所有资源的当前配额限制列表。 可以利用此 GET作的响应提交请求以更新配额。
function list(scope: string, options?: QuotaListOptionalParams): PagedAsyncIterableIterator<CurrentQuotaLimitBase, CurrentQuotaLimitBase[], PageSettings>
参数
- scope
-
string
目标 Azure 资源 URI。 例如,/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/
。
这是列表 GET作的目标 Azure 资源 URI。 如果在 /quotas
后添加了 {resourceName}
,则它是特定资源的 GET作中的目标 Azure 资源 URI。
- options
- QuotaListOptionalParams
选项参数。