All Products
Search
Document Center

Quota Center:ListQuotaAlarms

Last Updated:Nov 14, 2024

Queries quota alerts.

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:ListQuotaAlarmsget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NextTokenstringNo

The token that marks the position from which you want to start the query.

Note An empty value indicates that the query starts from the beginning.
1
MaxResultsintegerNo

The maximum number of records that you want to return for the query.

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

20
ProductCodestringNo

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
AlarmNamestringNo

The name of the alert.

rules
QuotaActionCodestringNo

The quota ID.

Note
  • To obtain the quota ID of a cloud service, call the ListProductQuotas operation and check the value of QuotaActionCode in the response.

  • If you specify this parameter, you must specify ProductCode.

q_hvnoqv
QuotaDimensionsarray<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.

  • This parameter is required if you set the ProductCode parameter to ecs, ecs-spec, actiontrail, or ess.

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.

  • This parameter is required if you set the ProductCode parameter to ecs, ecs-spec, actiontrail, or ess.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

MaxResultsinteger

The maximum number of records that are returned for the query.

1
NextTokenstring

The token that marks the position at which the query ends.

Note An empty value indicates that all data is returned.
1
QuotaAlarmsarray<object>

The details about the quota alert rules.

QuotaAlarmobject

The details about the quota alert rule.

AlarmIdstring

The ID of the alert.

a2efa7fc-832f-47bb-8054-39e28012****
AlarmNamestring

The name of the alert event.

rules
CreateTimestring

The time when the quota alert was created.

2020-11-27T07:23:34Z
ExceedThresholdboolean

Indicates whether the alert threshold was reached. Valid values:

  • false
  • true
false
NotifyChannelsarray

The alert notification methods.

NotifyChannelsstring

The alert notification methods. Valid values:

  • sms
  • email
sms
NotifyTargetstring

The alert contact.

Note Valid value: accountContact. Only the account contact is supported.
accountContact
ProductCodestring

The abbreviation of the Alibaba Cloud service name.

config
QuotaActionCodestring

The ID of the quota.

q_hvnoqv
QuotaDimensionsobject

The quota dimensions.

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

The used quota.

73
QuotaValuefloat

The value of the quota.

200
Thresholdfloat

The numeric value of the alert threshold.

160
ThresholdPercentfloat

The percentage of the alert threshold.

80
ThresholdTypestring

The type of the quota alert. Valid values:

  • used: The alert is created for the used quota.
  • usable: The alert is created for the available quota.
used
WebHookstring

The webhook URL.

https://www.aliyun.com/webhook
RequestIdstring

The ID of the request.

87F3B755-3BD2-4C76-B36A-93247002918C
TotalCountinteger

The total number of quota alerts.

2

Examples

Sample success responses

JSONformat

{
  "MaxResults": 1,
  "NextToken": "1",
  "QuotaAlarms": [
    {
      "AlarmId": "a2efa7fc-832f-47bb-8054-39e28012****",
      "AlarmName": "rules\n",
      "CreateTime": "2020-11-27T07:23:34Z",
      "ExceedThreshold": false,
      "NotifyChannels": [
        "sms"
      ],
      "NotifyTarget": "accountContact",
      "ProductCode": "config",
      "QuotaActionCode": "q_hvnoqv",
      "QuotaDimensions": {
        "regionId": "cn-hangzhou"
      },
      "QuotaUsage": 73,
      "QuotaValue": 200,
      "Threshold": 160,
      "ThresholdPercent": 80,
      "ThresholdType": "used",
      "WebHook": "https://www.aliyun.com/webhook"
    }
  ],
  "RequestId": "87F3B755-3BD2-4C76-B36A-93247002918C",
  "TotalCount": 2
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history