UpdateMOQuotaAlertThreshold

更新时间:
复制 MD 格式

Updates the alert threshold percentage for one or more API keys.

Operation description

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

rds_copilot***_public_cn-*********6

Apikey

array<object>

Yes

A list of API keys and their alert thresholds.

object

No

Apikey

string

No

The API key.

sk-rds-*****

ThresholdPercent

integer

No

The alert threshold percentage. An alert is triggered when usage reaches this percentage of the quota. For example, a value of 80 triggers an alert at 80% usage. The alert is reset when usage falls below this percentage.

[0, 100],0 会清理告警设置

Response elements

Element

Type

Description

Example

object

The response schema.

RequestId

string

The request ID.

FE9C65D7-930F-57A5-A207-8C396329****

Success

boolean

Indicates whether the request was successful.

true

Results

array<object>

The list of results.

object

The result.

InstanceId

string

The instance ID.

rds_copilot***_public_cn-o*****1

KeyType

string

The key type.

system / custom

KeyName

string

The API key name.

api-*****

ThresholdPercent

integer

The alert threshold percentage. An alert is triggered when usage reaches this percentage of the quota. For example, a value of 80 triggers an alert at 80% usage. The alert is reset when usage falls below this percentage.

[0, 100],0 会清理告警设置

Apikey

string

The API key.

sk-rds-*****

Examples

Success response

JSON format

{
  "RequestId": "FE9C65D7-930F-57A5-A207-8C396329****",
  "Success": true,
  "Results": [
    {
      "InstanceId": "rds_copilot***_public_cn-o*****1",
      "KeyType": "system / custom",
      "KeyName": "api-*****",
      "ThresholdPercent": 0,
      "Apikey": "sk-rds-*****"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 QuotaAlertItemsRequiredError apikeys 参数不能为空
400 QuotaAlertBatchFailedError All quota alert operations failed.
403 InvalidUserOrder There is no valid order for this UID. There is no valid order for this UID

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.