Modifies the parameters of a topic.

Request

Each 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

    None.

  • 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 Required Description Value
    MaximumMessageSize No The maximum size of a message body that can be sent to the topic. Unit: bytes. Valid values: 1024 B to 65536 B. Data type: integer.
    LoggingEnabled No Indicates whether the log management feature is enabled for the queue. Valid values:
    • True: The log management feature is enabled.
    • False: The log management feature is disabled.

Response

Each response consists of the following parts:

  • HTTP Status Code

    HTTP/1.1 204 No Content

  • Operation-specific response headers

    None.

  • Response Body

    None.

Examples

Sample requests

PUT /topics/$TopicName? metaoverride=true HTTP/1.1
Host: $AccountId.mns.cn-hangzhou.aliyuncs.com
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="http://mns.aliyuncs.com/doc/v1/">
    <MaximumMessageSize>65536</MaximumMessageSize>
    <LoggingEnabled>True</LoggingEnabled>
</Topic>    

Sample success responses

HTTP/1.1 204 No Content
x-mns-request-id:5666721CB2B71C9C1600****
x-mns-version: 2015-06-06

Special error

Error code Error message HTTP status code
TopicNotExist The topic you provided does not exist. 404