tencent cloud

ModifyAuthorizationPolicy
Last updated:2026-01-13 21:49:36
ModifyAuthorizationPolicy
Last updated: 2026-01-13 21:49:36

1. API Description

Domain name for API request: mqtt.intl.tencentcloudapi.com.

This API is used to modify policy rules. See the data plane authorization policy description (https://www.tencentcloud.com/document/product/1778/109715?from_cn_redirect=1).

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ModifyAuthorizationPolicy.
Version Yes String Common Params. The value used for this API: 2024-05-16.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Id Yes Integer Specifies the authorization policy ID, which can be obtained from the query authorization policy API (https://www.tencentcloud.com/document/product/1778/111074?from_cn_redirect=1).
InstanceId Yes String tencent cloud MQTT instance ID, obtained from the DescribeInstanceList api or console.
PolicyName No String Policy name, which cannot be empty, contains 3 to 64 characters, and supports chinese, letters, digits, "-", and "_".
PolicyVersion No Integer Policy version, defaults to 1. currently only support 1.
Priority No Integer Policy priority. a smaller value indicates a higher priority. must be unique.
Effect No String Specifies the decision.
allow. specifies the permission.
Denies.
Actions No String Operation, supports multiple selections separated by commas. see the data plane policy description (https://www.tencentcloud.com/document/product/1778/109715?from_cn_redirect=1).
Specifies the connection.
Specifies the publish action.
Sub. specifies the subscription.
Resources No String Specifies the resource and subscription to match. supports configuration of multiple match rules, separated by commas. see the data plane authorization policy description (https://www.tencentcloud.com/document/product/1778/109715?from_cn_redirect=1).
Username No String Specifies the condition-username.
Retain No Integer Condition - message retention.
Matches message retention.
Matches non-retention messages.
3. match retained and non-retained messages.
ClientId No String Client ID. supports regular expressions.
Ip No String Condition: client IP address. supports IP or CIDR.
Qos No String Condition: specifies the service quality.
0: at most once.
Minimum once.
2: exactly once.
Remark No String Specifies the remark information with a maximum length of 128 characters.

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Example

This example shows you the example.

Input Example

POST / HTTP/1.1
Host: mqtt.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyAuthorizationPolicy
<Common request parameters>

{
    "Id": 18,
    "InstanceId": "mqtt-jeredv33",
    "PolicyName": "policy-1"
}

Output Example

{
    "Error": null,
    "RequestId": null,
    "Response": {
        "RequestId": "657a771d-a70e-4c0d-a70a-eb7f82471000"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.DuplicatePolicy DuplicatePolicy
FailedOperation.DuplicatePriority DuplicatePriority
ResourceNotFound.Instance ResourceNotFound.Instance
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback