# Create Role - CreateCharacter

## Overview

Create Role

 > 💡 Product List: Cloud Host UHOST, Physical Host UPHOST, Managed Cloud UHYBRID, Basic Network UNET, Load Balancing ULB, Cloud Database UDB, SSD Cloud Disk UDISK, Cloud Memory Storage UMEM, Object Storage UFILE, Distributed Data Processing UDDP, Managed HADOOP Cluster UHADOOP, Cloud Distribution UCDN, Cloud Video on Demand UVIDEO, Basic Security Protection USEC, Cloud Data Warehouse UDW, Distributed Messaging System UKAFKA, Private Zone Resource Pool UDSET, AI Online Service UAI, AI Training Service UAI-TRAINING, Cloud Live Broadcast ULIVE, Container Service UDOCKER, Public Image Repository UHUB, WEB Application Protection UWAF, Distributed Database UDDB, Database Audit DBAUDIT, Host Intrusion Detection UHIDS, Container Cloud UK8S, Key Management Service UKMS, Global Dynamic Acceleration Line PATHX, Elasticsearch Service UES.




## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `CreateCharacter`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.scloudsg.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **CharacterName** | string | Role name, must not be duplicated with existing roles. |**Yes**|
| **CharacterDescription** | string | Role Description |No|
| **Add.N** | string | Role's permission to the product (Add) |No|
| **Del.N** | string | Role's permissions on the product (Delete) |No|
| **Mod.N** | string | Modification of product permissions by role |No|
| **Get.N** | string | Role's permissions on the product (View) |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **CharacterId** | string | Role ID |**Yes**|




## Example

### Request Example
    
```
https://api.scloudsg.com/?Action=CreateCharacter
&CharacterName=PkUHnfTq
&CharacterDescription=sOLKZcSH
&Add.n=OKlGsPhP
&Del.n=cZzFveLT
&Mod.n=GrixHXoU
&Get.n=nAKRweHk
```

### Response Example
    
```json
{
  "Action": "CreateCharacterResponse",
  "CharacterId": "WDmuiLnc",
  "RetCode": 0
}
```





