Modifying a Topic
Function
This API is used to modify a topic.
URI
PUT /v2/{project_id}/mqs/instances/{instance_id}/topics
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Tenant's project ID. |
| instance_id | Yes | String | Instance ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| topics | Yes | Array of UpdateTopicObject objects | Topic list. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | Yes | String | Topic name. |
| retention_time | No | Integer | Message retention period. The default value is 72. Value range: 1 to 720, in hours |
| sync_replication | No | Boolean | Whether synchronous replication is enabled. |
| sync_message_flush | No | Boolean | Whether synchronous flushing is enabled. |
| description | No | String | Description. |
| sensitive_word | No | String | Sensitive fields. |
Response Parameters
None
Example Requests
PUT https://{endpoint}/v2/{project_id}/mqs/instances/{instance_id}/topics
{
"topics" : [ {
"name" : "topic-test",
"retention_time" : 72,
"sync_replication" : true,
"sync_message_flush" : true,
"description" : "",
"sensitive_word" : ""
} ]
} Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 204 | No Content |
| 206 | Partial Content |
| 400 | Bad Request |
| 403 | Forbidden |
Error Codes
See Error Codes.
Last Article: Creating a Topic
Next Article: Deleting Topics in Batches
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.