You need to enable JavaScript to run this app.
Cloud Native Message Engine

Cloud Native Message Engine

Copy page
Download PDF
Instance management
UpdateInstanceMessageRetention - Modify instance message retention period
Copy page
Download PDF
UpdateInstanceMessageRetention - Modify instance message retention period
Call the UpdateInstanceMessageRetention API to modify the default message retention period for all topics under the target instance.​
Description​
  • Request method: POST​
  • Request URL: https://open.volcengineapi.com?Action=UpdateInstanceMessageRetention&Version=2023-06-01​
Debug​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
Only the unique request parameters of this interface and some common parameters are listed below. For more information, see common parameters.​
Action string required Example value: UpdateInstanceMessageRetention​
The operation to perform. Value: UpdateInstanceMessageRetention.​
​
Version string required Example value: 2023-06-01​
API version. Value: 2023-06-01.​
​
Retention integer required Example value: 96​
The default message retention period for all topics under the instance, in hours.​
The supported retention range is 1–336 hours (14 days).​
​
InstanceId string required Example value: o-00c0****m46c​
BMQ instance ID.​
​
​
Response parameters​
Only the unique response parameters of this API are listed below. For more details, see response structure.​
Status string Example value: SUCCESS​
Operation status.​
​
Message string Example value: OK​
Operation message.​
​
​
Request example​
​
POST /?Action=UpdateInstanceMessageRetention&Version=2023-06-01 HTTP/1.1​
Host: bmq.volcengineapi.com​
Content-Type: application/json; charset=UTF-8​
X-Date: 20241104T134807Z​
X-Content-Sha256: 287e874e******d653b44d21e​
Authorization: HMAC-SHA256 Credential=AK********/20241104/cn-beijing/bmq/request, SignedHeaders=host;x-content-sha256;x-date, Signature=********​
​
{​
"Retention": 96,​
"InstanceId": "o-00c0****m46c"​
}​
​
Response example​
​
{​
"ResponseMetadata": {​
"RequestId": "2024110421481010518205812708****",​
"Action": "UpdateInstanceMessageRetention",​
"Version": "2023-06-01",​
"Service": "bmq",​
"Region": "cn-beijing"​
},​
"Result": {​
"Status": "SUCCESS",​
"Message": "OK"​
}​
}​
​
Error code​
The following table lists error codes related to this interface and business logic. Refer to the Public error codes section for common error codes.​
​
Status code​
Error code​
Error message​
Description​
200​
InvalidParameter​
parameter is invalid, pls check parameters​
Invalid parameter value.​
200​
Unauthorized​
authorized error​
Authorization error. Please authorize or switch accounts and try again.​
200​
InternalServiceError​
internal service error, please contact with admin​
Internal service error. Please contact technical support or submit a ticket.​
200​
DatabaseError​
database error​
Database error.​
200​
ParameterEncodingError​
Failure encoding object into query map​
Parameter encoding exception. Please contact technical support or submit a ticket.​
​
Last updated: 2026.01.26 15:48:12