All Products
Search
Document Center

Quota Center:UpdateQuotaAlarm

Last Updated:Sep 06, 2024

Modifies a quota alert rule.

Operation description

In this example, the operation is called to modify the information about a quota alert whose ID is a2efa7fc-832f-47bb-8054-39e28012**** and whose name is rules. The alert threshold is changed from 150 to 160.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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

Request parameters

ParameterTypeRequiredDescriptionExample
AlarmIdstringYes

The ID of the quota alert.

Note You can call the ListQuotaAlarms operation to obtain the ID of a quota alert.
a2efa7fc-832f-47bb-8054-39e28012****
AlarmNamestringYes

The name of the quota alert.

Note You can call the ListQuotaAlarms operation to obtain the name of a quota alert.
rules
ThresholdTypestringNo

The type of the quota alert. Valid values:

  • used (default): The alert is created for the used quota.
  • usable: The alert is created for the available quota.
usable
ThresholdfloatNo

The numeric value of the alert threshold. Valid values:

  • If you set the ThresholdType parameter to used, you will receive an alert notification when the used quota is greater than or equal to the preset alert threshold. The alert threshold must be greater than the current used quota.
  • If you set the ThresholdType parameter to usable, you will receive an alert notification when the available quota is less than or equal to the preset alert threshold. The alert threshold must be less than the current available quota.
Note You must set one of the Threshold and ThresholdPercent parameters.
160
ThresholdPercentfloatNo

The percentage of the alert threshold. Valid values:

  • If you set ThresholdType to used, you receive an alert notification when the used quota is greater than or equal to the preset percentage of the alert threshold. Value range: (50%, 100%].
  • If you set ThresholdType to usable, you receive an alert notification when the available quota is less than or equal to the preset percentage of the alert threshold. Value range: (0%, 50%].
Note You must set one of Threshold and ThresholdPercent.
51
WebHookstringNo

The webhook URL. Quota Center sends alert notifications to the specified URL by using HTTP POST requests.

https://alert.aliyun.com/callback

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

A95C65B3-7CF4-469E-B1D5-1CA0628A6411

Examples

Sample success responses

JSONformat

{
  "RequestId": "A95C65B3-7CF4-469E-B1D5-1CA0628A6411"
}

Error codes

HTTP status codeError codeError messageDescription
400RAM.PERMISSION.DENIEDYou are not authorized to do this action or the API input parameter is invalid.-
400UNSUPPORTED.ALARM.TYPEUnified alarm does not support alarm types for used quantity alarms, and does not support numerical threshold types of quota alarms.Unified alarm does not support alarm types for used quantity alarms, and does not support numerical threshold types of quota alarms.

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

Change history

Change timeSummary of changesOperation
2023-10-12The Error code has changedView Change Details
2023-09-22API Description Update. The Error code has changedView Change Details
2023-09-04The Error code has changedView Change Details