Create Permission

Last Updated on : 2023-10-09 08:06:39download

Create a permission.

  • Note: A maximum of 1,000 permissions can be created for each project.

API address

POST: /v2.0/cloud/iam/permission

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
nameString trueThe name of the specified permission.
descriptionString trueThe description of the specified permission.

Return parameter

Parameter nameTypeDescription
successBooleanIndicates whether the operation is successful. Valid values:
  • true: The operation succeeded.
  • false: The operation failed.
error_codeStringThe error code. For more information, see the error codes.
error_msgStringThe message that is returned if the request fails. It is empty if the request is successful.
resultObjectThe returned result, that is, the ID of the specified permission.

Request example

POST: /v2.0/cloud/iam/permission
{
  "name":"Permission name",
  "description":"Permission description",
}

Return example

{
    "tid": "44b298320b2a11eeae100efb7ec85579",
    "result": 5002,
    "t": 1686798666453,
    "success": true
}

Error code

For more information, see error code.