All Products
Search
Document Center

ApsaraDB RDS:ModifyDBInstanceEndpoint

最終更新日:Apr 28, 2024

Modifies the weights of the nodes configured for the endpoint of an ApsaraDB RDS for MySQL instance that runs RDS Cluster Edition.

Operation description

Supported database engines

RDS MySQL

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
rds:ModifyDBInstanceEndpointWrite
  • DBInstance
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests.

The token can contain only ASCII characters and cannot exceed 64 characters in length.

6000170000591aed949d0f****
DBInstanceIdstringYes

The instance ID. You can call the DescribeDBInstances operation to query the ID of the instance.

rm-****
DBInstanceEndpointIdstringYes

The endpoint ID of the instance. You can call the DescribeDBInstanceEndpoints operation to query the endpoint ID of the instance.

ep-****
DBInstanceEndpointDescriptionstringNo

The user-defined description of the endpoint.

for readonly business
NodeItemsobject []No

The information about the node that is configured for the endpoint.

DBInstanceIdstringNo

The instance ID. You can call the DescribeDBInstances operation to query the ID of the instance.

rm-****
NodeIdstringNo

The node ID.

You can use one of the following methods to query the ID of the node:

  • Log on to the ApsaraDB RDS console, go to the instance details page, and then view the ID of the node in the instance topology section.
  • Call the DescribeDBInstanceAttribute operation to query the ID of the node.
rn-xxxx-****
WeightlongNo

The weight of the node. Read requests are distributed based on the weight.

Valid values: 0 to 100.

50

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Dataobject

The returned data.

DBInstanceNamestring

The ID of the instance.

rm-****
DBInstanceEndpointIdstring

The endpoint ID of the instance.

ep-****
RequestIdstring

The ID of the request.

F2911788-25E8-42E5-A3A3-1B38D263F01E

Examples

Sample success responses

JSONformat

{
  "Data": {
    "DBInstanceName": "rm-****",
    "DBInstanceEndpointId": "ep-****"
  },
  "RequestId": "F2911788-25E8-42E5-A3A3-1B38D263F01E"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidSourceCategoryspecified source category is invalid.The specified source category is invalid.
400InvalidDBInstanceConnType.FormatSpecified DB instance conn type is not valid.The operation failed. The operation is not supported for the connection type of the RDS instance.
400APICallingFailedMeta db calling failed.An internal error occurred.
400InvalidNodeItems.JsonFormatNodeItems is not a json string.The NodeItems parameter value must be a JSON string.
400EmptyEndpointNodeConfigSpecified endpoint has no nodes, add node to endpoint first.No nodes are attached to the endpoint. Attach nodes to the endpoint first.
400InvalidNodeItems.RONodeIdPrimaryReadOnly endpoint can not contain primary node.The read-only endpoint cannot contain the primary instance.
403IncorrectDBInstanceStateCurrent DB instance state does not support this operation.-
404IncorrectDBInstanceLockModeCurrent DB instance lock mode does not support this operation.The operation failed. The RDS instance is locked.
404InvalidDBInstanceName.NotFoundInvalid DBInstanceId NotFound.The instance ID cannot be found.
404Endpoint.NotFoundSpecified endpoint is not existed.-
404InvalidConnectionString.NotFoundSpecified connection string or net type is not found.The endpoint cannot be found. Check the endpoint.
404InvalidWeight.FormatThe Specified Weight format is not valid.The weight range is invalid.
404InvalidDBInstance.NotFoundSpecified instance does not exist or not support.The RDS instance cannot be found, is deleted, or does not support the operation.

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

Change history

Change timeSummary of changesOperation
2023-09-08The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404