# Update decompression rules - UpdateUdsRule

## Overview

Automatically trigger decompression for files in object storage (US3).






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `UpdateUdsRule`.                      | **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 |
|:---|:---|:---|:---|
| **RuleId** | string | The unique Id of the rule |**Yes**|
| **RuleName** | string | Rule Name |**Yes**|
| **SrcBucket** | string | Source Bucket name, globally unique |**Yes**|
| **SrcTokenId** | string | One of the tokens' tokenId from the source bucket |**Yes**|
| **DstBucket** | string | Target Bucket name, globally unique |**Yes**|
| **DstTokenId** | string | One of the target bucket's tokenIds |**Yes**|
| **DstDirectory** | string | Destination directory after decompression |**Yes**|
| **KeepUS3Name** | boolean | Whether to use the prefix of the compressed file as the last directory layer |**Yes**|
| **Prefixes** | string | Prefix to trigger decompression |**Yes**|
| **Ops.N** | string | The ops array of operations, "Ops.0":"unzip" """. |No|
| **Events.N** | string | Array of notification events |No|
| **ContactGroupId** | string | Contacted User Group ID |No|
| **NotificationTypes.N** | string | Array of notification types |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|
| **RuleId** | string | Return the rule's rule ID |**Yes**|
| **Mesage** | string | Description of the success or failure of the request message |No|




## Example

### Request Example
    
```
https://api.scloudsg.com/?Action=UpdateUdsRule
&RuleId="RuleId"
&RuleName="name"
&SrcBucketName="SrcBucketName"
&SrcTokenId="SrcTokenId"
&DstBucketName=“DstBucketName”
&DstTokenId="DstTokenId"
&DstDirectory="KeepUS3Name"
&KeepUS3Name=false
&Prefixes="Prefixes"
&Ops.n="Ops.0"
&Events.n="Events.0"
&ContactGroupId="ContactGroupId"
&NotificationTypes.n="NotificationTypes.0"
&RuleName="RuleName"
```

### Response Example
    
```json
{
  "Action": "UpdateUdsRuleResponse",
  "Mesage": "fElcUBax",
  "RetCode": 0,
  "RuleId": "RuleId"
}
```





