All Products
Search
Document Center

Quota Center:ListProductQuotas

最終更新日:Nov 14, 2024

Queries the quotas of a specific Alibaba Cloud service.

Operation description

In this example, the operation is called to query the quotas whose instance type is ecs.g5.2xlarge. The quotas belong to Elastic Compute Service (ECS) Quotas by Instance Type. The query result includes the name, ID, unit, dimensions, and cycle of each quota.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
quotas:ListProductQuotaslist
  • Quota
    acs:quotas:{#regionId}:{#accountId}:quota/{#ProductCode}/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results.

  • You do not need to specify this parameter for the first and last requests.
  • You must specify the token that is obtained from the previous query as the value of NextToken.
1
MaxResultsintegerNo

The maximum number of records that can be returned for the query.

Valid values: 1 to 100. Default value: 30.

30
ProductCodestringYes

The abbreviation of the Alibaba Cloud service name.

Note To query the abbreviation of an Alibaba Cloud service name, call the ListProducts operation and check the value of the ProductCode parameter.
ecs-spec
QuotaActionCodestringNo

The quota ID.

ecs.g5.2xlarge
KeyWordstringNo

The keyword that you want to use to search for the quotas.

Note This parameter is available only for quotas that belong to ECS Quotas by Instance Type. The keyword is used to match the values of QuotaName and QuotaActionCode.
ecs-spec
SortFieldstringNo

The field based on which you want to sort the returned records.

Note This parameter is available only for quotas that belong to ECS Quotas by Instance Type. You can leave this parameter empty.

Valid values:

  • TOTAL: sorts the returned records based on the total quota.
  • TIME: sorts the returned records based on the time when the quota was last modified.
  • RESERVED: sorts the returned records based on the reserved quota.
TIME
SortOrderstringNo

The order in which you want to sort the returned records.

Note This parameter is available only for quotas that belong to ECS Quotas by Instance Type. You can leave this parameter empty.

Valid values:

  • Descending: sorts the returned records in descending order.
  • Ascending: sorts the returned records in ascending order.
Ascending
Dimensionsarray<object>No

The quota dimensions.

objectNo

The quota dimension.

KeystringNo

The key of the dimension.

Note The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
regionId
ValuestringNo

The value of the dimension.

Note The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
cn-hangzhou
QuotaCategorystringNo

The quota type.

Default value: CommonQuota.

Valid values:

  • FlowControl: API rate limit
  • WhiteListLabel: whitelist quota
  • CommonQuota: general quota
FlowControl
GroupCodestringNo

The code of the dimension group.

entconsole_w1j3msbo2g

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

MaxResultsinteger

The number of records that are returned for the query.

1
NextTokenstring

The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results.

  • If NextToken is empty, no next page exists.
  • If a value of NextToken is returned, the value indicates the token that is used for the next query.
AAAAAd98/tlL5GF2aM7UMKQGM8LZesIPr0CbfxASQvHV/pwcmVKNfdBbW8OPld3NvG9Cy8+dNcyFzyUttQA3IONfBhRGpXFyiVoTgK+dupBsP2mX
Quotasarray<object>

The details of the quotas.

Quotasobject

The details of the quota.

Adjustableboolean

Indicates whether the quota is adjustable.

Valid values:

  • true
  • false
true
ApplicableRangearray

The range of the quota value that can be requested for the quota item.

ApplicableRangefloat

The range of the quota value that can be requested for the current quota item.

The range excludes the existing quota values of the current Alibaba Cloud account. When you request a quota, you can use the range as a reference. Example: [1010,10000].

[802,10000]
ApplicableTypestring

The type of the adjustable value.

Valid values:

  • continuous
  • discontinuous
discontinuous
ApplyReasonTipsstring

The reason for submitting a quota increase request.

The business xxx is expected to grow by 50%.
Consumableboolean

Indicates whether the system shows the used value of the quota.

Valid values:

  • true
  • false
true
Dimensionsobject

The quota dimension. Format: {"regionId":"Region"}.

{"regionId":"cn-hangzhou"}
EffectiveTimestring

The start time of the validity period of the quota. The value is displayed in UTC.

2022-09-28T06:07:00Z
ExpireTimestring

The end time of the validity period of the quota. The value is displayed in UTC.

2022-09-29T06:07:00Z
GlobalQuotaboolean

Indicates whether the quota is a global quota.

Valid values:

  • true: The quota is shared in all regions.
  • false: The quota is independently used in a region.
true
Periodobject

The calculation cycle of the quota.

PeriodUnitstring

The unit of the calculation cycle.

Valid values:

  • week
  • hour
  • day
  • second
  • minute
day
PeriodValueinteger

The value of the calculation cycle.

1
ProductCodestring

The abbreviation of the Alibaba Cloud service name.

ecs-spec
QuotaActionCodestring

The quota ID.

ecs.g5.2xlarge
QuotaArnstring

The Alibaba Cloud Resource Name (ARN) of the quota.

acs:quotas:cn-hangzhou:107992689699****:quota/ecs/ecs.g5.2xlarge/postpaid/vpc/cn-hangzhou/instancetype/cn-hangzhou-i
QuotaCategorystring

The type of the quota.

Valid values:

  • FlowControl: API rate limit
  • WhiteListLabel: whitelist quota
  • CommonQuota: general quota
CommonQuota
QuotaDescriptionstring

The description of the quota.

ecs.g5.2xlarge
QuotaItemsarray<object>

The details of the quotas.

QuotaItemsobject

The details of the quota.

Quotastring

The value of the quota.

10
QuotaUnitstring

The unit of the quota.

AMOUNT
Typestring

The category of the quota.

Valid values:

  • BaseQuota: base quota
  • ReservedQuota: reserved quota
BaseQuota
Usagestring

The quota usage.

1
QuotaNamestring

The name of the quota.

ecs.g5.2xlarge
QuotaTypestring

The type of the quota.

Valid values:

  • normal
  • privilege
privilege
QuotaUnitstring

The unit of the quota.

AMOUNT
SupportedRangearray

The range of the quota value that can be requested for the current quota item. When you configure a quota template, you can use the range as a reference.

SupportedRangefloat

The range of the quota value that can be requested for the current quota item. When you configure a quota template, you can use the range as a reference.

  • If the value of ApplicableType is continuous and the value of ApplicableRange is [1009,10000], the quota value ranges from 1009 to 10000.
  • If the value of ApplicableType is discontinuous and the value of ApplicableRange is [10,20,50,100], the quota value is 10, 20, 50, or 100.
[802,1000]
TotalQuotafloat

The value of the quota.

200
TotalUsagefloat

The quota usage.

1
UnadjustableDetailstring

The reason why the quota is not adjustable.

Valid values:

  • limitReached: The quota limit is reached.
  • nonactivated: The service is not activated.
  • applicationProcess: The application is being processed.
applicationProcess
UsageMetricobject

The monitoring information of the quota in CloudMonitor.

Note If this parameter is empty, no monitoring data of the quota exists in CloudMonitor.
MetricDimensionsobject

The monitoring dimensions.

The value is a collection of key:value pairs. Example: {"productCode":"***","metricKey":"***","regionId":"***","label":"***"}.

string

The value of the monitoring dimension.

ecs
MetricNamestring

The monitoring metric.

Usage
MetricNamespacestring

The monitoring namespace.

acs_quotas_flowcontrol
RequestIdstring

The request ID.

D0131FD5-5397-44FE-BF5A-4B7165B813CC
TotalCountinteger

The total number of entries returned.

4

Examples

Sample success responses

JSONformat

{
  "MaxResults": 1,
  "NextToken": "AAAAAd98/tlL5GF2aM7UMKQGM8LZesIPr0CbfxASQvHV/pwcmVKNfdBbW8OPld3NvG9Cy8+dNcyFzyUttQA3IONfBhRGpXFyiVoTgK+dupBsP2mX",
  "Quotas": [
    {
      "Adjustable": true,
      "ApplicableRange": [
        0
      ],
      "ApplicableType": "discontinuous",
      "ApplyReasonTips": "The business xxx is expected to grow by 50%.\n",
      "Consumable": true,
      "Dimensions": {
        "regionId": "cn-hangzhou"
      },
      "EffectiveTime": "2022-09-28T06:07:00Z",
      "ExpireTime": "2022-09-29T06:07:00Z",
      "GlobalQuota": true,
      "Period": {
        "PeriodUnit": "day",
        "PeriodValue": 1
      },
      "ProductCode": "ecs-spec",
      "QuotaActionCode": "ecs.g5.2xlarge",
      "QuotaArn": "acs:quotas:cn-hangzhou:107992689699****:quota/ecs/ecs.g5.2xlarge/postpaid/vpc/cn-hangzhou/instancetype/cn-hangzhou-i",
      "QuotaCategory": "CommonQuota",
      "QuotaDescription": "ecs.g5.2xlarge",
      "QuotaItems": [
        {
          "Quota": "10",
          "QuotaUnit": "AMOUNT",
          "Type": "BaseQuota",
          "Usage": "1"
        }
      ],
      "QuotaName": "ecs.g5.2xlarge",
      "QuotaType": "privilege",
      "QuotaUnit": "AMOUNT",
      "SupportedRange": [
        0
      ],
      "TotalQuota": 200,
      "TotalUsage": 1,
      "UnadjustableDetail": "applicationProcess",
      "UsageMetric": {
        "MetricDimensions": {
          "key": "ecs"
        },
        "MetricName": "Usage",
        "MetricNamespace": "acs_quotas_flowcontrol"
      }
    }
  ],
  "RequestId": "D0131FD5-5397-44FE-BF5A-4B7165B813CC",
  "TotalCount": 4
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidSortOrderInvalid SortOrderThe specified SortOrder parameter is invalid.
400INVALID.MAX.RESULTSThe maxResults parameter is invalid. Use an integer ranging from 1 to 100.The maxResults value is invalid. It must be an integer within the range of 1 to 100.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-11-07The Error code has changed. The response structure of the API has changedView Change Details
2023-09-22API Description Update. The Error code has changedView Change Details
2023-06-28The Error code has changed. The response structure of the API has changedView Change Details
2022-12-02The Error code has changed. The response structure of the API has changedView Change Details