Last Updated on : 2023-10-09 08:05:56download
Create a policy.
- Allow action rules and Deny action rules cannot both be empty.
- A maximum of 100 policies can be created for one tenant.
POST: /v2.0/cloud/iam/policy
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
name | String | true | The name of the specified policy. | |
allow_action | List | false | The Allow action, which describes the specific actions allowed. | |
deny_action | List | false | The Deny action, which describes the specific actions denied. | |
description | String | true | The description of the specified policy. |
Parameter name | Type | Description |
---|---|---|
result | Long | The ID of the created policy. |
success | Boolean | Indicates whether the request is successful. Valid values:
|
error_code | String | For more information, see the error codes. |
error_msg | String | The message that is returned if the request fails. It is empty if the request is successful. |
POST: /v2.0/cloud/iam/policy
{
"name": "Policy Name",
"description": "Policy description",
"allow_action": [
"device:get:state"
],
"deny_action": [
"device:get:shadow"
]
}
{
"tid": "16867994844221686799484422",
"result": 1,
"t": 1686799484422,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback