GetResourceQuota

Updated at:

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:

  • ResourceType and ProductType are required.

  • BizRegionId and ChargeType are 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:

  1. Select the resource type, product, business region, and billing method of the payer based on subsequent business needs.

  2. Invoke this operation to read Data. Query AppInstanceGroup before creating a delivery group, query AppAuthUser before authorizing an authorized user, and query PoolNodeAmount before purchasing or scaling out nodes.

  3. 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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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:

  • AppInstanceGroup: the quantity quota for delivery groups. Unit: groups.

  • AppAuthUser: the quantity quota for authorized users. Unit: users.

  • PoolNodeAmount: the quantity quota for purchased resource nodes. Unit: nodes.

Valid values:

  • PoolNodeAmount :

    The quantity quota for purchased resource nodes. Unit: nodes.

  • AppAuthUser :

    The quantity quota for authorized users. Unit: users.

  • AppInstanceGroup :

    The quantity quota for delivery groups. Unit: groups.

AppInstanceGroup

ProductType

string

Yes

The product type. Set this parameter to the following fixed value when you call the operation:

  • CloudApp: WUYING Cloud App.

Valid values:

  • CloudApp :

    WUYING Cloud App.

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:

  • PrePaid: subscription.

  • PostPaid: pay-as-you-go.

Valid values:

  • PostPaid :

    Pay-as-you-go.

  • PrePaid :

    Subscription.

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.

  • ResourceType=AppInstanceGroup: Unit: groups.

  • ResourceType=AppAuthUser: Unit: users.

  • ResourceType=PoolNodeAmount: Unit: nodes.

If no smaller limit is obtained, 2147483647 is returned. This does not mean that the resource inventory is unlimited.

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.