# Update UK8S Log Collection Config - UpdateUK8SULSConfig

## Overview

Updates a log collection rule in the specified UK8S cluster.






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `UpdateUK8SULSConfig`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.zosoc.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 the Region and Zone List: /docs/api/summary/regionlist |**Yes**|
| **Zone** | string | Availability zone. See the Region and Zone List: /docs/api/summary/regionlist |**Yes**|
| **ProjectId** | string | Project ID. Leave it blank to use the default project. This field is required for sub-accounts. See the GetProjectList API: /docs/api/summary/get_project_list |No|
| **Name** | string | Name of the log collection rule to update. The name must be no more than 253 characters, contain only lowercase letters, digits, hyphens, and periods, and start and end with a letter or digit. |**Yes**|
| **ClusterId** | string | UK8S cluster ID. |**Yes**|
| **TopicID** | string | Target Topic ID in the log service that receives logs. If omitted, the existing Topic ID remains unchanged. |No|
| **ExtractRule.CollectPolicy** | string | Collection policy. Valid values: full for full collection of existing logs and increment for incremental collection from the current time. Default: full. |No|
| **ExtractRule.Encode** | string | Encoding format of the raw log. Valid values: utf-8 and gbk. Default: utf-8. |No|
| **ExtractRule.LogType** | string | Log parsing type. Valid values: json, delimiter, full_regex, multi_line_full_regex, multi_line_delimiter, minimal_list, and multi_line. |**Yes**|
| **ExtractRule.BeginningRegex** | string | Beginning-of-line regular expression. For multi_line, multi_line_full_regex, or multi_line_delimiter, either BeginningRegex or BeginningRegexBase64 must be specified. |No|
| **ExtractRule.BeginningRegexBase64** | string | Base64-encoded beginning-of-line regular expression. When specified, it takes precedence over BeginningRegex. |No|
| **ExtractRule.LogRegex** | string | Log extraction regular expression. For full_regex or multi_line_full_regex, either LogRegex or LogRegexBase64 must be specified. |No|
| **ExtractRule.LogRegexBase64** | string | Base64-encoded log extraction regular expression. When specified, it takes precedence over LogRegex. |No|
| **ExtractRule.Delimiter** | string | Delimiter used for delimiter or multi_line_delimiter. Valid values: space, tab, \|, ;, and ,. |No|
| **ExtractRule.DelimiterBase64** | string | Base64-encoded delimiter. When specified, it takes precedence over Delimiter. |No|
| **ExtractRule.TimeKey** | string | Name of the field containing the log timestamp. |No|
| **ExtractRule.TimeFormat** | string | Time format corresponding to TimeKey. For json, full_regex, or multi_line_full_regex, TimeFormat is required when TimeKey is specified. |No|
| **ExtractRule.UnMatchUpload** | string | Whether to upload logs that fail parsing. The string true uploads them, while false discards them. Default: false. |No|
| **ExtractRule.UnMatchKey** | string | Key used to store raw logs that cannot be parsed. This field is required when UnMatchUpload is true. |No|
| **ExtractRule.Keys.N** | string | Name of an extracted field. This parameter is supported only for delimiter, full_regex, multi_line_full_regex, and multi_line_delimiter. |No|
| **InputDetail.Type** | string | Log input type. Valid values: container_file and container_stdout. |**Yes**|
| **InputDetail.Stream** | string | Container output stream type. This parameter applies only to container_stdout. Valid values: all, stdout, and stderr. Default: all. |No|
| **InputDetail.Metadata.Container** | string | Container metadata fields to attach to logs, separated by commas. Valid fields: container_name, namespace, pod_name, pod_ip, pod_uid, container_id, and image_name. Leave this parameter empty to collect no container metadata. |No|
| **InputDetail.Metadata.Labels** | string | Pod labels to collect. Use * to collect all labels, app,version to collect only the specified labels, or an empty string to collect no labels. |No|
| **InputDetail.FilePaths.N.Path** | string | Log collection path. This parameter applies only to container_file. |No|
| **InputDetail.FilePaths.N.File** | string | Name of the file to collect. This parameter applies only to container_file. |No|
| **MatchRule.Container** | string | Names of the containers to match, separated by commas. Use * to match all containers. |No|
| **MatchRule.ContainerOperator** | string | Container name matching operator. Valid values: in and notin. MatchRule.Container is required when this parameter is specified. |No|
| **MatchRule.Workloads.N.Namespace** | string | Namespace containing the workload. Workloads and PodLabels cannot be specified together. |No|
| **MatchRule.Workloads.N.Type** | string | Workload type. Valid values: deployment, statefulset, daemonset, job, and cronjob. |No|
| **MatchRule.Workloads.N.Name** | string | Name of the workload. |No|
| **MatchRule.PodLabels.NamespaceOperator** | string | Namespace matching operator used for Pod label matching. Valid values: in and notin. MatchRule.PodLabels.Namespace is required when this parameter is specified. PodLabels and Workloads cannot be specified together. |No|
| **MatchRule.PodLabels.Namespace** | string | Namespace to match when using Pod label matching. |No|
| **MatchRule.PodLabels.Labels.N.Key** | string | Key of the label to match when using Pod label matching. |No|
| **MatchRule.PodLabels.Labels.N.ValueOperator** | string | Label value matching operator. Valid values: in and notin. |No|
| **MatchRule.PodLabels.Labels.N.Value** | string | Value of the label to match. |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
    
None yet.

### Response Example
    
None yet.





