All Products
Search
Document Center

Quota Center:GetProductQuota

更新時間:Nov 14, 2024

Queries the details of a quota of a cloud service.

Operation description

In this example, the operation is called to query the details of a quota whose ID is q_security-groups and whose name is Maximum Number of Security Groups. This quota belongs to Elastic Compute Service (ECS). The query result shows the details of the quota. The details include the name, ID, description, quota value, used quota, unit, and dimension of the quota. In this example, the quota name is Maximum Number of Security Groups. The quota ID is q_security-groups. The description is The maximum number of security groups that can be created for the current account. The quota value is 801. The used quota is 26. The quota unit is Number of security groups. The quota dimension is {"regionId":"cn-hangzhou"}.

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:GetProductQuotaget
  • Quota
    acs:quotas:{#regionId}:{#accountId}:quota/{#ProductCode}/{#QuotaActionCode}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
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 ProductCode in the response.
ecs
QuotaActionCodestringYes

The quota ID.

Note To query a quota ID of an Alibaba Cloud service, call the ListProductQuotas operation and check the value of QuotaActionCode in the response.
q_security-groups
Dimensionsarray<object>No

The quota dimensions.

{\"regionId\":\"cn-beijing\"}
objectNo

The quota dimension.

KeystringNo

The key of the dimension.

Note This parameter is required for cloud services that support dimensions. You must specify both Dimensions.N.Key and Dimensions.N.Value. The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service. The following cloud services support dimensions: ECS whose service code is ecs, Enterprise Distributed Application Service (EDAS) whose service code is edas, ECS Quotas by Instance Type whose service code is ecs-spec, and Auto Scaling whose service code is ess.
regionId
ValuestringNo

The value of the dimension.

Note This parameter is required for cloud services that support dimensions. You must specify both Dimensions.N.Key and Dimensions.N.Value. The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service. The following cloud services support dimensions: ECS whose service code is ecs, EDAS whose service code is edas, ECS Quotas by Instance Type whose service code is ecs-spec, and Auto Scaling whose service code is ess.
cn-hangzhou

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

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

8FF8CAF0-29D9-4F11-B6A4-FD2CBCA016D3
Quotaobject

The details of the quota.

QuotaUnitstring

The unit of the quota.

Note The unit of each quota is unique. For example, the quota whose ID is q_cbdch3 represents the maximum number of Container Service for Kubernetes (ACK) clusters. The unit of this quota is clusters. The quota whose ID is q_security-groups represents the maximum number of security groups. The unit of this quota is security groups.
Count
QuotaActionCodestring

The quota ID.

q_security-groups
TotalUsagefloat

The used quota.

26
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 quota item. Example: [802,10000].

802
SupportedRangearray

The range of the quota value.

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 the ApplicableType parameter is continuous and the value of the ApplicableRange parameter is [802,1000], the quota value ranges from 802 to 1,000.
  • If the value of the ApplicableType parameter is discontinuous and the value of the ApplicableRange parameter is [10,20,50,100], the quota value is 10, 20, 50, or 100.
[802,1000]
QuotaTypestring

The type of the quota. Valid values:

  • privilege
  • normal
normal
QuotaDescriptionstring

The description of the quota.

The maximum number of security groups that can be owned by the current account
Periodobject

The calculation cycle of the quota.

PeriodValueinteger

The value of the calculation cycle of the quota.

1
PeriodUnitstring

The unit of the calculation cycle of the quota. Valid values:

  • second
  • minute
  • hour
  • day
  • week
Day
QuotaArnstring

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

acs:quotas:cn-hangzhou:120886317861****:quota/ecs/q_security-groups/
ApplicableTypestring

The type of the adjustable value. Valid values:

  • continuous
  • discontinuous
continuous
QuotaItemsarray<object>

The details of the quota.

QuotaItemsobject

The category of the quota.

Typestring

The category of the quota. Valid values:

  • BaseQuota: base quota.
  • ReservedQuota: reserved quota.
BaseQuota
Quotastring

The value of the quota.

801
QuotaUnitstring

The unit of the quota.

Note The unit of each quota is unique. For example, the quota whose ID is q_cbdch3 represents the maximum number of ACK clusters. The unit of this quota is clusters. The quota whose ID is q_security-groups represents the maximum number of security groups. The unit of this quota is security groups.
Count
Usagestring

The used quota.

26
Dimensionsobject

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

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

Indicates whether the quota is adjustable. Valid values:

  • true
  • false
true
QuotaNamestring

The name of the quota.

Maximum Number of Security Groups
UnadjustableDetailstring

The reason why the quota is not adjustable. Valid values:

  • nonactivated: The service is not activated.
  • applicationProcess: The application is being processed.
  • limitReached: The quota limit is reached.
  • supportTicketRequired: The quota can be increased only by submitting a ticket.
limitReached
Consumableboolean

Indicates whether the system shows the used value of the quota. Valid values:

  • true
  • false
true
TotalQuotafloat

The value of the quota.

801
ProductCodestring

The abbreviation of the Alibaba Cloud service name.

ecs
EffectiveTimestring

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

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

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

2022-09-29T06:06:00Z
QuotaCategorystring

The type of the quota. Valid values:

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

The reason for submitting a quota increase request.

The business xxx is expected to grow by 50%.
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
UsageMetricobject

The monitoring information of the quota in CloudMonitor.

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

The monitoring namespace.

acs_quotas_flowcontrol
MetricNamestring

The monitoring metric.

Usage
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

Examples

Sample success responses

JSONformat

{
  "RequestId": "8FF8CAF0-29D9-4F11-B6A4-FD2CBCA016D3",
  "Quota": {
    "QuotaUnit": "Count\n",
    "QuotaActionCode": "q_security-groups",
    "TotalUsage": 26,
    "ApplicableRange": [
      802
    ],
    "SupportedRange": [
      0
    ],
    "QuotaType": "normal",
    "QuotaDescription": "The maximum number of security groups that can be owned by the current account\n",
    "Period": {
      "PeriodValue": 1,
      "PeriodUnit": "Day"
    },
    "QuotaArn": "acs:quotas:cn-hangzhou:120886317861****:quota/ecs/q_security-groups/",
    "ApplicableType": "continuous",
    "QuotaItems": [
      {
        "Type": "BaseQuota",
        "Quota": "801",
        "QuotaUnit": "Count\n",
        "Usage": "26"
      }
    ],
    "Dimensions": {
      "regionId": "cn-hangzhou"
    },
    "Adjustable": true,
    "QuotaName": "Maximum Number of Security Groups\n",
    "UnadjustableDetail": "limitReached",
    "Consumable": true,
    "TotalQuota": 801,
    "ProductCode": "ecs",
    "EffectiveTime": "2022-09-28T06:06:00Z",
    "ExpireTime": "2022-09-29T06:06:00Z",
    "QuotaCategory": "CommonQuota",
    "ApplyReasonTips": "The business xxx is expected to grow by 50%.\n",
    "GlobalQuota": true,
    "UsageMetric": {
      "MetricNamespace": "acs_quotas_flowcontrol",
      "MetricName": "Usage",
      "MetricDimensions": {
        "key": "ecs"
      }
    }
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-11-07The response structure of the API has changedView Change Details
2023-06-28The response structure of the API has changedView Change Details
2023-03-17The internal configuration of the API is changed, but the call is not affectedView Change Details