# Dynamically toggle Redis fragmentation arrangement option - RegisterUMemDefrag

## Overview

Dynamically switch Redis fragmentation reorganization option






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `RegisterUMemDefrag`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.dezai.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**|
| **ResourceId** | string | Resource ID |**Yes**|
| **StartTime** | int | Start Timestamp |No|
| **EndTime** | int | End Timestamp |No|
| **OperateType** | string | Operation Type:<br />"Once": Represents a single execution,<br />"Open": Represents policy activation,<br />"Close": Represents policy deactivation (only 'Once' is supported for distributed instances). |No|
| **FragTime** | int | Task time period, in minutes. |No|
| **FragSize** | int | Defragmentation threshold, range is 100-200 (this parameter is invalid for distributed instances). |No|
| **StartHour** | int | Start integer value (this parameter is invalid for distributed instances). |No|
| **StartMin** | int | Start Minute (This parameter is invalid for distributed instances). |No|
| **EndHour** | int | End of the whole point value (this parameter is invalid for distributed instances). |No|
| **EndMin** | int | End Minute Count (This parameter is invalid for distributed instances). |No|
| **IsUnion** | boolean | AND logic field, indicating that both the threshold and the time period are satisfied (this parameter is invalid for distributed instances). |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|




## Example

### Request Example
    
```
https://api.dezai.com/?Action=RegisterUMemDefrag
&Region=cn-zj
&Zone=cn-zj-01
&ResourceId=KjIbMAJE
&OperateType=XgXNHDkJ
&OperateCycle=pzPrIRzl
&StartTime=2
&EndTime=2
&OperateType=zcMGnRxQ
&FragTime=1
&FragRatio=7.94436
&StartHour=4
&StartMin=5
&EndHour=9
&EndMin=1
&OperateType=LPmokZrJ
&FragTime=9
&FragRatio=3.48218
&StartHour=9
&StartMin=3
&EndHour=8
&EndMin=8
&IsUnion=false
```

### Response Example
    
```json
{
  "Action": "RegisterUMemDefragResponse",
  "RetCode": 0
}
```





