# Create Memory Space - CreateUMemSpace

## Overview

Create UMem Memory Space






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `CreateUMemSpace`.                      | **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 |
|:---|:---|:---|:---|
| **Region** | string | Region. See [List of Regions and Availability Zones](/docs/api/summary/regionlist) |**Yes**|
| **Zone** | string | Availability Zone. See [Availability Zone List](/docs/api/summary/regionlist) |**Yes**|
| **ProjectId** | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the [GetProjectList interface](/docs/api/summary/get_project_list). |No|
| **Size** | int | Memory size, unit: GB, range [1\~1024] |**Yes**|
| **Name** | string | Space Name, Length (6<=size<=63) |**Yes**|
| **Protocol** | string | Protocol: memcache, redis (default is redis). Note: redis does not have a single type. |No|
| **Type** | string | Space Type: single (no hot backup), double (hot backup) (default: double) |No|
| **ChargeType** | string | Yearly , Monthly, Default: Monthly |No|
| **Quantity** | int | Purchase Duration Default: 1 |No|
| **VPCId** | string | ID of VPC |No|
| **SubnetId** | string | Subnet ID |No|
| **Tag** | string | Business Group Name |No|
| **Password** | string | URedis password. Please set the password according to the [field specification](api/uhost-api/specification). The password needs to be encoded with base64, as shown in the following example: # echo -n Password1 \| base64UGFzc3dvcmQx. |No|
| **SlaveZone** | string | Cross-IDC UDRedis, the availability zone of the slave (must be in the same Region as the Zone, and cannot be the same) |No|
| **BlockCnt** | int | Number of Shards |No|
| **ClusterMode** | string | RWMode": Indicates the creation of a read-write separation version; others are for creating a regular version. |No|
| **Version** | string | Distributed Sharding Version (the default version is 4.0, for other versions see DescribeUDRedisBlockVersion) |No|
| **HighPerformance** | boolean | Whether to create performance-enhanced type. The default is false, or not filled in, fill in true for performance-enhanced type. |No|
| **ProxySize** | int | Number of distributed proxy CPU cores, default to not create a proxy when not filled in or when 0 is passed. |No|
| **UlbMode** | boolean | Whether to create a load-balancing distributed proxy, true means to create a load-balancing proxy. |No|
| **Port** | int | Shard port, default is 6379 |No|
| **ProxyPort** | int | Proxy port, default is 6379 |No|
| **BackupId** | string | Backup ID, select to create a new cluster from this backup |No|
| **SpaceId** | string | Space ID, when creating a backup, you need to fill in the source space ID. |No|
| **RollbackSpaceId** | string | If created via rollback, the instance ID is not empty. |No|
| **RollbackTime** | int | Timestamp to Rollback |No|
| **CouponId** | string | ID of the voucher used |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|
| **SpaceId** | string | Create Memory Space ID List |No|




## Example

### Request Example
    
```
https://api.scloudsg.com/?Action=CreateUMemSpace
&Region=cn-bj2
&Zone=cn-bj2-04
&Size=16
&Name=memfbs_XXXXXX
&Tag=rWEhrBRd
&Password=EodyPYWL
&Password=VzEIaMAN
&SlaveZone=ptGhogJa
&VPCId=eKWChJCJ
&SubnetId=NBKWNfXD
&BlockCnt=4
&ClusterMode=FZTxNVzD
&Version=WWTSLAYj
&HighPerformance=false
&ProxySize=5
&Port=9
&ProxyPort=9
&UlbMode=true
&SpaceId=bvfrJZyE
&BackupId=XIvJdFGm
&SpaceId=BDxakGCB
&RollbackSpaceId=lOuLyfWD
&RollbackTime=3
```

### Response Example
    
```json
{
  "Action": "CreateUMemSpaceResponse",
  "RetCode": 0,
  "SpaceId": "umem-opqmXXXX"
}
```





