The "createRole" action creates a role that can be used to assign privileges to accounts, apis, and actions.
Request examples
Minimal
{
"action": "createRole",
"params":
{
"roleName": "role1",
"roleDescription": "",
"metadata": {}
}
}
Response examples
Minimal
{
"authToken": "",
"requestId": "",
"errorCode": 0,
"errorMessage": ""
}
Properties
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
metadata |
The "metadata" property contains user-defined properties that add keywords and tags about the role. The server indexes this field with a full-text index so you can search for any word or phrase to find code packages. |
Optional with default of {}
|
object | 0 or more key/value pairs |
roleDescription |
The "roleDescription" property defines the new role and provides notes for its use. |
Optional with default of ""
|
string | 1 to 64 bytes |
roleName |
The "roleName" property specifies the name of a role. |
Required - No default value | string | 1 to 30 bytes |