Modifies the parameters of a topic.


By default, only Alibaba Cloud accounts can call this operation. RAM users can call this operation only after these RAM users are granted related permissions. The following table describes the authorization information of this operation. For more information, see Permission policies and examples.

Item Value
API operation SetTopicAttributes
Action mns:SetTopicAttributes
Resource acs:mns:$region:$accountid:/topics/$topicName


A request consists of the following parts:

  • Request line

    PUT /topics/$TopicName?metaoverride=true HTTP/1.1

  • Operation-specific URI parameters

    To modify the parameters of a topic, specify metaoverride=true in the URI.

  • Operation-specific request headers


  • Request body

    The request body is in the XML format. The request body contains the following parameters that are used to modify the topic.

    Parameter Type Required Example Description
    MaximumMessageSize Integer No 65536 The maximum size of a message body that can be sent to the topic.

    Valid values: 1024 to 65536. Unit: bytes.

    Default value: 65536.

    LoggingEnabled Boolean No True Specifies whether to enable the log management feature.
    Valid values:
    • True: enables the log management feature.
    • False: disables the log management feature.

    Default value: False.


A response consists of the following parts:

  • HTTP status code

    HTTP/1.1 204 No Content

  • Operation-specific response headers


  • Response body



Sample requests

PUT /topics/$TopicName?metaoverride=true HTTP/1.1
Host: $
x-mns-version: 2015-06-06
Date: Tue, 08 Dec 2015 06:01:00 GMT
Authorization:MNS 15B4D3461F177624206A:SeIRcZk3lKiP7bl19WB9Uz07****

<?xml version="1.0" encoding="utf-8"?>
<Topic xmlns="">

Sample success responses

HTTP/1.1 204 No Content
x-mns-version: 2015-06-06

Error codes

Error code Error message HTTP status code Description
TopicNotExist The topic you provided does not exist. 404 The error message returned because the topic does not exist. Create a topic.