Last Updated on : 2023-10-09 08:08:53download
Based on the permission ID, link the specified permission with sub-permissions. Sub-permissions include resources and policies.
- Note: Each permission can be linked with a maximum of 10 sub-permissions.
POST: /v2.0/cloud/iam/permission/{permission_id}/item
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
permission_id | Long | uri | true | The ID of the specified permission. |
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
policy_id | Long | true | The ID of the specified policy. | |
resource_id | String | true | The ID of the specified resource. | |
resource_type | Integer | true | The type of the specified resource. | |
item_type | Integer | false | The type of the specified sub-permission. This field only takes effect on space resources. Valid values:
|
Parameter name | Type | Description |
---|---|---|
success | Boolean | Indicates whether the operation is successful. Valid values:
|
error_code | String | The error code. 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. |
result | QueryResourceAndPolicyListByPermissionRes | The returned result. |
Description of result
Parameter name | Type | Description |
---|---|---|
permission_id | Long | The ID of the specified permission. |
permission_item_list | List | The list of sub-permissions. |
Description of permission_item_list
Parameter name | Type | Description |
---|---|---|
item_id | Long | The ID of the specified sub-permission. |
policy_id | Long | The ID of the specified policy. |
policy_name | String | The name of the specified policy. |
resource_id | String | The ID of the specified resource. |
resource_type | Integer | The type of the specified resource. |
item_type | Integer | The type of the specified sub-permission. This field only takes effect on space resources. Valid values:
|
POST: /v2.0/cloud/iam/permission/1/item
{
"permission_item_list": [
{
"policy_id": "110001",
"resource_id": "*",
"resource_type": 11
}
]
}
{
"tid": "c7b8010c56b211ee801ef25dabf95fef",
"result": {
"role_id": 181044,
"permission_list": [
{
"policy_id": 110001,
"resource_type": 11,
"permission_id": 232371810,
"resource_id": "*"
}
]
},
"t": 1695103635065,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback