Updated on 2025-12-29 GMT+08:00

Modifying an ACL Account Role

Function

This API is used to modify the role of an ACL account.

URI

PUT /v2/{project_id}/instances/{instance_id}/accounts/{account_id}/role

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID.

account_id

Yes

String

ACL account ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

account_role

No

String

Account permission. Options: read (read-only) and write (read/write).

account_read_policy

No

String

Definition:

Read requests are routed to master or replica nodes.

Constraints:

  • This parameter can be set only for Proxy Cluster and read/write splitting instances except for Proxy Cluster instances without read/write splitting enabled.

  • For details about read/write splitting, see the backend-master-only parameter in section "Managing Instances" > "Modifying Configuration Parameters of a DCS Instance" in the User Guide.

  • master: Read requests are routed to the master node.

  • replica: Read requests are routed to the replica node.

  • master-replica: Read requests are routed to the master and replica nodes.

  • For details about the complete read/write splitting configuration, see parameter read-only-slave-when-wr-split in User Guide > "Managing Instances" > "Modifying Configuration Parameters of a DCS Instance".

  • Proxy Cluster instance

    • By default, read/write splitting is disabled, and read requests are forwarded to the master node.

    • Read/Write splitting is enabled:

      • By default, complete read/write splitting is enabled, and read requests are forwarded to the replica node.

      • If complete read/write splitting is disabled, read requests are randomly forwarded to the master and replica nodes.

  • Read/Write splitting instance

    • Read/Write splitting is supported by default.

      • By default, complete read/write splitting is enabled, and read requests are forwarded to the replica node.

      • If complete read/write splitting is disabled, read requests are randomly forwarded to the master and replica nodes.

Range:

Default Value:

By default, this parameter is not set. If this parameter is not set, read requests are forwarded based on the read/write splitting configuration of the instance.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

instance_id

String

ID of the instance to which the account belongs.

job_id

String

ID of the job for modifying the access permission of an ACL account.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_msg

String

Definition:

Error message.

Range:

N/A

error_code

String

Definition:

Error code.

Range:

For details, see Error Codes.

error_ext_msg

String

Definition:

Extended error information. This parameter is not used currently and is set to null.

Range:

N/A

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Definition:

Error message.

Range:

N/A

error_code

String

Definition:

Error code.

Range:

For details, see Error Codes.

error_ext_msg

String

Definition:

Extended error information. This parameter is not used currently and is set to null.

Range:

N/A

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Definition:

Error message.

Range:

N/A

error_code

String

Definition:

Error code.

Range:

For details, see Error Codes.

error_ext_msg

String

Definition:

Extended error information. This parameter is not used currently and is set to null.

Range:

N/A

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Definition:

Error message.

Range:

N/A

error_code

String

Definition:

Error code.

Range:

For details, see Error Codes.

error_ext_msg

String

Definition:

Extended error information. This parameter is not used currently and is set to null.

Range:

N/A

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_msg

String

Definition:

Error message.

Range:

N/A

error_code

String

Definition:

Error code.

Range:

For details, see Error Codes.

error_ext_msg

String

Definition:

Extended error information. This parameter is not used currently and is set to null.

Range:

N/A

Example Requests

PUT  https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/accounts/{account_id}/role

{
  "account_role" : "read"
}

Example Responses

Status code: 200

Password reset.

{
  "job_id" : "ff80808284d4c6d50184e8cff10248bd",
  "instance_id" : "10fda556-51c3-4cfa-ab6f-37667428da6e"
}

Status code: 400

Invalid request.

{
  "error_code" : "DCS.4961",
  "error_msg" : "Acl account request param invalid."
}

Status Codes

Status Code

Description

200

Password reset.

400

Invalid request.

401

Invalid authentication information.

403

Request rejected.

404

The requested resource could not be found.

500

Internal service error.

Error Codes

See Error Codes.