All Products
Search
Document Center

ApsaraDB for SelectDB:ModifyElasticRule

Last Updated:Jan 20, 2025

Modifies a scheduled scaling rule.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
selectdb:ModifyElasticRuleupdate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProductstringNo

The cloud service.

selectdb
DbInstanceIdstringYes

The instance ID.

selectdb-cn-7213cjv****
RegionIdstringYes

The region ID.

cn-hangzhou
ClusterIdstringYes

The cluster ID.

selectdb-cn-nwy3jv1oa02-be
RuleIdlongYes

The rule ID.

5467
ElasticRuleStartTimestringNo

The time when you want to execute the scheduled scaling rule.

00:00
ExecutionPeriodstringNo

The execution cycle.

Valid value:

  • Day
Day
ClusterClassstringNo

The rule for computing resources of the required cluster.

selectdb.2xlarge

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

5ED62C81-9948-5612-81E1-EA3853752306
Dataobject

The data returned.

DbInstanceIdstring

The instance ID.

selectdb-cn-7213cjv****
ClusterIdstring

The cluster ID.

selectdb-cn-zpr3if5wq03-be
RuleIdlong

The rule ID.

29252
ExecutionPeriodstring

The execution cycle.

Valid value:

  • Day
Day
ElasticRuleStartTimestring

The time when the scheduled scaling rule is executed.

00:00
ClusterClassstring

The rule for computing resources of the required cluster.

selectdb.2xlarge

Examples

Sample success responses

JSONformat

{
  "RequestId": "5ED62C81-9948-5612-81E1-EA3853752306",
  "Data": {
    "DbInstanceId": "selectdb-cn-7213cjv****",
    "ClusterId": "selectdb-cn-zpr3if5wq03-be",
    "RuleId": 29252,
    "ExecutionPeriod": "Day",
    "ElasticRuleStartTime": "00:00",
    "ClusterClass": "selectdb.2xlarge"
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidClusterId.MalformedThe specified parameter "ClusterId" is not valid.-
400InvalidDBInstanceId.MalformedThe specified parameter "DBInstanceId" is not valid.The parameter "DBInstanceId" is illegal.
400InvalidRegionId.MalformedThe specified parameter "RegionId" is not valid.-
400InvalidRuleId.MalformedThe specified parameter "RuleId" is not valid.-
400DocumentConvertFailed.ExceedFileSizeLimitThe conversion has been failed, exceed file size limit.english description1
400ForbiddenUser not authorized to operate on the specified resource, or this API does not support RAM.english description1
400InvalidDBNameThe specified database name is not allowed.english description1
400CreateOrderFailedFailed to create order.Failed to create order.
403OperationDenied.GetResourceLockFailedthe operator is not permitted due to get resource lock failed.The request was denied because the resource lock failed to be obtained.
403OperationDenied.AdjacentRulesClusterIsTheSamethe operator is not permitted due to adjacent rules cluster class is the same.This operation is prohibited because the target computing resources of adjacent timesharing elasticity rules are the same.
403OperationDenied.AdjacentRulesIntervalLessThanOneHourthe operator is not permitted due to adjacent rules interval less than one hour.The operation is prohibited because the time interval between adjacent timesharing elasticity rules is less than 1 hour.
403DBClusterNotSupportedThe requested operation can not be performed while the cluster is not sale.The requested operation cannot be performed while the cluster is not running.
403IncorrectDBInstanceStateCurrent DB instance state does not support this operation.english description1
403InstanceEngineType.NotSupportThe instance engine and type does not support operations.english description1
403InvalidDBInstanceState.NotSupportThe specified instance state does't support this operation.The instance is in a state that does not support the current operation.
403MoneyLessThan100The Account Monet less Than 100.english description1
403OperationDenied.DBNameAndAccountPrivilegeCountThe operation is not permitted due to count of database or account privilege.english description1
403InsufficientResourceCapacityThe resource is out of usage.Not enough resources, please try again later.
404DBInstanceLockedThe current instance lock mode does not support this operation.english description1
404IncorrectVswitchIdThe specified parameter VSwitchId is not valid.english description1
404InvalidApi.NotFoundSpecified api is not found, please check your url and method.-
404InvalidDBInstance.NotFoundThe specified instance is not found.english description1
404InvalidDBInstanceClass.NotFoundThe specified instance classic does not exist.english description1
404InvalidRegionId.NotFoundThe provided RegionId does not exist in our records.english description1
404QueryPrice.FailedThe inquiry failed. Contact Alibaba Cloud customer service representatives.english description1
404InvalidElasticRuleId.NotFoundThe ElasticRuleId provided does not exist in our records.Time-sharing elasticity rule does not exist.
404InvalidDBClusterId.NotFoundThe DBClusterId provided does not exist in our records.The cluster does not exist.

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