You can call this operation to configure the read/write mode for a topic.

By default, only Alibaba Cloud accounts can call this operation. Resource Access Management (RAM) users can call this operation only after being authorized.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes OnsTopicUpdate

The operation that you want to perform. Set the value to OnsTopicUpdate.

InstanceId String Yes MQ_INST_111111111111_DOxxxxxx

The ID of the Message Queue for Apache RocketMQ instance corresponding to the topic that you want to configure.

Perm Integer Yes 6

The read/write mode to be configured for the topic. Valid values:

  • 6: Both read and write operations are supported.
  • 4: Write operations are forbidden.
  • 2: Read operations are forbidden.
Topic String Yes test

The name of the topic that you want to configure. The value must be unique under one account even in different regions.

Response parameters

Parameter Type Example Description
RequestId String 81979ADA-4A78-4F64-9DEC-5700446DF952

The ID of the request. This is a common parameter.


Sample requests

http(s)://[Endpoint]/? Action=OnsTopicUpdate
&<Common request parameters>

Sample success responses

XML format


JSON format

    "RequestId": "81979ADA-4A78-4F64-9DEC-5700446DF952"