GetResourceQuota
Queries the maximum quantity quota applicable to the current account for a specified product, resource type, business region, and billing method.
Operation description
This operation queries the maximum quantity quota. It does not query the used quota, remaining quota, or real-time resource inventory.
Parameter relationships:
ResourceTypeandProductTypeare required.BizRegionIdandChargeTypeare optional query conditions and can be specified at the same time. They must be consistent with subsequent purchase or authorization operations.If the region or billing method is omitted, the general quota for the corresponding dimension is queried. The quotas of different regions or billing methods are not added together.
If multiple quotas apply at the same time, the larger limit is returned.
Call sequence:
Select the resource type, product, business region, and billing method of the payer based on subsequent business needs.
Invoke this operation to read
Data. QueryAppInstanceGroupbefore creating a delivery group, queryAppAuthUserbefore authorizing an authorized user, and queryPoolNodeAmountbefore purchasing or scaling out nodes.Query the current usage in combination with resources, and then verify the current operation through subsequent creation, authorization, or scale-out operations. This query does not reserve quotas or guarantee the success of subsequent purchases.
Data=2147483647 indicates that no smaller quota limit is obtained in this query. It does not mean that the physical inventory is unlimited.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:GetResourceQuota |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceType |
string |
Yes |
The business resource type to query. Valid values:
Valid values:
|
AppInstanceGroup |
| ProductType |
string |
Yes |
The product type. Set this parameter to the following fixed value when you call the operation:
Valid values:
|
CloudApp |
| ChargeType |
string |
No |
The billing method query condition. If this parameter is omitted, the general quota that is not limited by billing method is queried, and the quotas of different billing methods are not added together. Valid values:
Valid values:
|
PrePaid |
| BizRegionId |
string |
No |
The business region ID. If this parameter is omitted, the general quota that is not limited by region is queried, and the quotas of different regions are not added together. This parameter must be consistent with the business region of What to do next. |
cn-hangzhou |
Keep the query conditions consistent with the business operations to be performed. For example, query the quantity quota for delivery groups of WUYING Cloud App in the China (Hangzhou) region under the subscription billing method.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response information for this call. |
||
| RequestId |
string |
The unique identifier of the request, which can be used to troubleshoot request issues. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
| Code |
string |
The error code returned when the call fails. A normal result is not guaranteed to contain this field. You should not use the return of a specific success code as a prerequisite for obtaining the quota. |
InvalidProductType.ValueNotSupported |
| Message |
string |
The error message returned when the call fails. It is used together with the error code to help locate the cause. |
The ProductType is not supported. |
| Data |
integer |
The maximum resource count quota applicable under the current query conditions. It is not the usage or remaining quota.
If no smaller limit is obtained, |
30 |
Read Data to obtain the maximum quota. Do not directly use it as the number of resources that can be added. The counting unit of the return value varies with ResourceType.
Examples
Success response
JSON format
{
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
"Code": "InvalidProductType.ValueNotSupported",
"Message": "The ProductType is not supported.",
"Data": 30
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.