Updated on 2026-02-05 GMT+08:00

Modifying Table Details

Function

This API is used to modify table details.

Calling Method

For details, see Calling APIs.

URI

PUT /v2/{project_id}/workspaces/{workspace_id}/siem/tables/{table_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which is used to specify the project that a resource belongs to. You can query the resources of a project by project ID. You can obtain the project ID from the API or console. Obtaining the Project ID

Constraints

N/A

Range

N/A

Default Value

N/A

workspace_id

Yes

String

Workspace ID.

table_id

Yes

String

Table ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. Obtaining a User Token

Constraints

N/A

Range

N/A

Default Value

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

table_alias

No

String

Table alias.

table_alias_en

No

String

Table alias.

table_alias_fr

No

String

Table alias.

description

No

String

Table description.

description_en

No

String

Table description.

description_fr

No

String

Table description.

directory

No

String

Directory group.

directory_en

No

String

Directory group.

directory_fr

No

String

Directory group.

storage_setting

No

IsapTableStorageSettingDto object

Data transmission object for table storage settings.

display_setting

No

IsapTableDisplaySettingDto object

Data transmission object for table display settings.

Table 4 IsapTableStorageSettingDto

Parameter

Mandatory

Type

Description

application_index

No

String

Application index.

application_topic

No

String

Application theme.

application_data_class_id

No

String

Application data class ID.

streaming_bandwidth

No

Number

Streaming bandwidth (MB/s).

streaming_partition

No

Integer

Streaming partition.

streaming_dataspace_id

No

String

Streaming data space ID.

index_storage_period

No

Integer

Index storage period.

index_storage_size

No

Integer

Index storage size.

index_shards

No

Integer

Number of index shards.

lake_storage_period

No

Long

Data lake storage period.

lake_partition_setting

No

String

Definition

Data lake scheduled partition settings

  • MINUTE10: 10 minutes

  • HOUR: Hourly

  • DAY: daily

Constraints

N/A

Range

  • MINUTE

  • HOUR

  • DAY

Default Value

N/A

Table 5 IsapTableDisplaySettingDto

Parameter

Mandatory

Type

Description

columns

No

Array of IsapTableColumnDisplaySettingDto objects

Table column display list.

format

No

String

Definition

Table display settings.

  • Table: A table will be displayed.

  • RAW: Raw data will be displayed.

Constraints

N/A

Range

  • TABLE

  • RAW

Default Value

N/A

Table 6 IsapTableColumnDisplaySettingDto

Parameter

Mandatory

Type

Description

column_name

No

String

Table column name.

column_alias

No

String

Table column alias.

column_alias_en

No

String

Table column alias.

display_by_default

No

Boolean

Whether to use default display settings.

Response Parameters

Status code: 200

Table 7 Response body parameters

Parameter

Type

Description

project_id

String

Project ID.

workspace_id

String

Workspace ID.

table_id

String

UUID

pipe_id

String

UUID

table_name

String

Table name.

table_alias

String

Table alias.

description

String

Description.

directory

String

Directory group.

category

String

Definition

Directory type.

  • STREAMING real-time stream

  • INDEX: index

  • APPLICATION: application

  • TENANT_BUCKET: tenant bucket

  • LAKE: data lake

Constraints

N/A

Range

  • STREAMING

  • INDEX

  • APPLICATION

  • TENANT_BUCKET

  • LAKE

Default Value

N/A

lock_status

String

Definition

Table lock status.

  • LOCKED: locked

  • UNLOCKED: unlocked

Constraints

N/A

Range

  • LOCKED

  • UNLOCKED

Default Value

N/A

process_status

String

Definition

Handling status.

  • COMPLETED: completed.

  • CREATING: being created

  • UPDATING: being updated

  • DELETING: being deleted

  • TRUNCATING being cleared

  • UPGRADING: being upgraded

  • CREATE_FAILED: creation failed

  • UPDATE_FAILED: update failed

  • DELETE_FAILED: deletion failed

  • TRUNCATE_FAILED: clearing failed

  • UPGRADE_FAILED: upgrade failed

Constraints

N/A

Range

  • COMPLETED

  • CREATING

  • UPDATING

  • DELETING

  • TRUNCATING

  • UPGRADING

  • CREATE_FAILED

  • UPDATE_FAILED

  • DELETE_FAILED

  • TRUNCATE_FAILED

  • UPGRADE_FAILED

Default Value

N/A

process_error

String

Definition

Table processing error.

  • NONE

  • MISSING_ASSOCIATIONS: Association missing

  • FAILED_INIT_STORAGE_RESOURCES_WHEN_CREATING: failed to initialize storage resources during creation

  • FAILED_INIT_FLINK_RESOURCES_WHEN_CREATING: failed to initialize Flink resources during creation

  • FAILED_DELETE_FLINK_RESOURCES_WHEN_DELETING: failed to delete Flink resources during deletion

  • FAILED_DELETE_STORAGE_RESOURCES_WHEN_DELETING: failed to delete storage resources during deletion

  • FAILED_DELETE_ALL_RESOURCES_WHEN_DELETING: failed to delete all resources during deletion

  • FAILED_UPDATE_STORAGE_SETTING: failed to update the storage configuration

  • FAILED_UPDATE_FLINK_SCHEMA: failed to update the Flink schema

  • FAILED_UPDATE_STORAGE_SCHEMA: failed to update the storage schema

  • FAILED_TO_APPLY_RESOURCE: failed to apply the resource

  • FAILED_TO_UPGRADE_RESOURCE_MODEL: failed to upgrade the resource model

Constraints

N/A

Range

  • NONE

  • MISSING_ASSOCIATIONS

  • FAILED_INIT_STORAGE_RESOURCES_WHEN_CREATING

  • FAILED_INIT_FLINK_RESOURCES_WHEN_CREATING

  • FAILED_DELETE_FLINK_RESOURCES_WHEN_DELETING

  • FAILED_DELETE_STORAGE_RESOURCES_WHEN_DELETING

  • FAILED_DELETE_ALL_RESOURCES_WHEN_DELETING

  • FAILED_UPDATE_STORAGE_SETTING

  • FAILED_UPDATE_FLINK_SCHEMA

  • FAILED_UPDATE_STORAGE_SCHEMA

  • FAILED_TO_APPLY_RESOURCE

  • FAILED_TO_UPGRADE_RESOURCE_MODEL

Default Value

N/A

format

String

Definition

Table format.

  • JSON: JSON

  • CSV: CSV

  • PARQUET: PARQUET

  • ORC ORC

-DEBEZIUM_JSON: Debezium JSON

Constraints

N/A

Range

  • JSON

  • DEBEZIUM_JSON

  • CSV

  • PARQUET

  • ORC

Default Value

N/A

rw_type

String

Definition

Table read/write type.

  • READ_ONLY: read-only

  • READ_WRITE: read and write

  • WRITE_ONLY: write-only

Constraints

N/A

Range

  • READ_ONLY

  • READ_WRITE

  • WRITE_ONLY

Default Value

N/A

owner_type

String

Definition

Owner type.

  • SYSTEM: system

  • USER: user

  • SYSTEM_ALLOWED_DELETE: can be deleted by the system

  • USER_ALLOWED_DELETE: can be deleted by the user

Constraints

N/A

Range

  • SYSTEM

  • USER

  • SYSTEM_ALLOWED_DELETE

  • USER_ALLOWED_DELETE

Default Value

N/A

data_layering

String

Definition

Data layers.

  • ODS: operation data storage layer

  • DWS: data warehouse service layer

  • ADS: application data service layer

Constraints

N/A

Range

  • ODS

  • DWS

  • ADS

Default Value

N/A

data_classification

String

Definition

Data classification.

  • FACTUAL_DATA: factual data

  • DIMENSION_DATA: dimension data

Constraints

N/A

Range

  • FACTUAL_DATA

  • DIMENSION_DATA

Default Value

N/A

schema

IsapTableSchema object

Table structure.

storage_setting

TableStorageSetting object

Table storage settings.

display_setting

TableDisplaySetting object

Table display settings.

create_time

Integer

Timestamp, in ms.

update_time

Integer

Timestamp, in ms.

delete_time

Integer

Timestamp, in ms.

Table 8 IsapTableSchema

Parameter

Type

Description

columns

Array of IsapTableColumn objects

Table column list.

primary_key

Array of strings

Table primary key list.

partition

Array of strings

Table partition list.

watermark_column

String

Table watermark column element.

watermark_interval

Float

Table watermark delay interval.

time_filter

String

Table time filter column.

Table 9 IsapTableColumn

Parameter

Type

Description

column_name

String

Table column name.

column_type

String

Definition

Column field type.

  • PHYSICAL: physical field

  • METADATA: metadata field

  • VIRTUAL_METADATA: virtual metadata field

  • COMPUTED: computation field

Constraints

N/A

Range

  • PHYSICAL

  • METADATA

  • VIRTUAL_METADATA

  • COMPUTED

Default Value

N/A

column_type_setting

String

Table column type settings.

column_data_type

String

Definition

Column data type.

  • ROW: row type

  • MAP_STRING: string mapping type

  • MAP_DECIMAL: decimal mapping type

  • TINYINT: tiny integer

  • SMALLINT: small integer

  • INT: integer

  • BIGINT: long integer

  • DECIMAL: decimal data type

  • FLOAT: single-precision floating point

  • DOUBLE: double-precision floating point

  • CHAR: fixed-length string

  • VARCHAR: variable-length string

  • STRING: string type

  • KEYWORD: keyword type

  • BOOLEAN: boolean type

  • DATE: date type

  • TIME: time type

  • TIMESTAMP: timestamp type

  • TIMESTAMP_LTZ: local timestamp type

Constraints

N/A

Range

  • ROW

  • MAP_STRING

  • MAP_DECIMAL

  • TINYINT

  • SMALLINT

  • INT

  • BIGINT

  • DECIMAL

  • FLOAT

  • DOUBLE

  • CHAR

  • VARCHAR

  • STRING

  • KEYWORD

  • BOOLEAN

  • DATE

  • TIME

  • TIMESTAMP

  • TIMESTAMP_LTZ

Default Value

N/A

column_data_type_setting

String

Table column data type setting

nullable

Boolean

Empty or not.

array

Boolean

Array or not.

depth

Integer

Depth.

parent_name

String

Parent-level name.

own_name

String

Name.

column_display_setting

ColumnDisplaySetting object

Table column display settings.

column_sequence_number

Integer

Column No.

Table 10 ColumnDisplaySetting

Parameter

Type

Description

mapping_required

Boolean

Whether the mapping is mandatory.

group_sequence_number

Integer

Group sequence number.

intra_group_sequence_number

Integer

Group sequence number.

value_type

String

Value type.

value_qualified

String

Valid value.

display_name

String

Display name.

display_description

String

Display description.

group_name

String

Group name.

Table 11 TableStorageSetting

Parameter

Type

Description

application_index

String

Application index.

application_topic

String

Application theme.

application_data_class_id

String

Application data class ID.

streaming_bandwidth

Number

Streaming bandwidth (MB/s).

streaming_partition

Integer

Streaming partition.

streaming_retention_size

Integer

Streaming capacity.

streaming_dataspace_id

String

Streaming data space ID.

index_storage_period

Integer

Index storage period.

index_storage_size

Integer

Index storage size.

index_shards

Integer

Number of index shards.

index_replicas

Integer

Number of index replicas.

lake_storage_period

Long

Data lake storage period.

lake_partition_setting

String

Definition

Time unit.

  • MINUTE10: 10 minutes

  • HOUR

  • DAY

Constraints

N/A

Range

  • MINUTE

  • HOUR

  • DAY

Default Value

N/A

lake_expiration_status

String

Definition

Data lake expiration status.

  • NOT_EXPIRED: not expired

  • EXPIRED_PROCESSING: expired and being processed

  • EXPIRED_SUCCESS: expired and processed successfully

  • EXPIRED_FAILURE: expired but failed to be processed

Constraints

N/A

Range

  • NOT_EXPIRED

  • EXPIRED_PROCESSING

  • EXPIRED_SUCCESS

  • EXPIRED_FAILURE

Default Value

N/A

Table 12 TableDisplaySetting

Parameter

Type

Description

columns

Array of TableColumnDisplaySetting objects

Table column display list.

format

String

Definition

Table display settings.

  • Table: A table will be displayed.

  • RAW: Raw data will be displayed.

Constraints

N/A

Range

  • TABLE

  • RAW

Default Value

N/A

Table 13 TableColumnDisplaySetting

Parameter

Type

Description

column_name

String

Table column name.

column_alias

String

Table column alias.

display_by_default

Boolean

Whether to use default display settings.

Status code: 400

Table 14 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

Add "add_description" to table details.

https://{endpoint}/v2/{project_id}/workspaces/{workspace_id}/siem/tables/{table_id}

{
  "description" : "add_description"
}

Example Responses

Status code: 200

Successful.

{
  "category" : "STREAMING",
  "create_time" : 1767941191174,
  "data_classification" : "FACTUAL_DATA",
  "data_layering" : "ODS",
  "delete_time" : 0,
  "description" : "add_description",
  "directory" : "",
  "display_setting" : {
    "columns" : [ {
      "column_alias" : "",
      "column_name" : "test_update",
      "display_by_default" : true
    }, {
      "column_alias" : "",
      "column_name" : "test_timestamp",
      "display_by_default" : true
    }, {
      "column_alias" : "",
      "column_name" : "test_add_column",
      "display_by_default" : true
    } ],
    "format" : "TABLE"
  },
  "format" : "JSON",
  "lock_status" : "UNLOCKED",
  "owner_type" : "USER",
  "process_error" : "NONE",
  "process_status" : "COMPLETED",
  "project_id" : "f69081793d9e4ea8a2f479dcef961989",
  "rw_type" : "READ_WRITE",
  "schema" : {
    "columns" : [ {
      "array" : false,
      "column_data_type" : "INT",
      "column_data_type_setting" : "",
      "column_name" : "test_update",
      "column_sequence_number" : 0,
      "column_type" : "PHYSICAL",
      "column_type_setting" : "",
      "depth" : 0,
      "nullable" : true,
      "own_name" : "test_update",
      "parent_name" : ""
    }, {
      "array" : false,
      "column_data_type" : "TIMESTAMP",
      "column_data_type_setting" : "3",
      "column_name" : "test_timestamp",
      "column_sequence_number" : 0,
      "column_type" : "PHYSICAL",
      "column_type_setting" : "",
      "depth" : 0,
      "nullable" : false,
      "own_name" : "test_timestamp",
      "parent_name" : ""
    }, {
      "array" : false,
      "column_data_type" : "STRING",
      "column_data_type_setting" : "",
      "column_name" : "test_add_column",
      "column_sequence_number" : 0,
      "column_type" : "PHYSICAL",
      "column_type_setting" : "",
      "depth" : 0,
      "nullable" : false,
      "own_name" : "test_add_column",
      "parent_name" : ""
    } ],
    "partition" : [ ],
    "primary_key" : [ ],
    "time_filter" : "test_timestamp",
    "watermark_column" : "test_timestamp",
    "watermark_interval" : 6.0
  },
  "storage_setting" : {
    "streaming_bandwidth" : 5.0,
    "streaming_dataspace_id" : "153e3cb7-b8eb-40bc-a21a-11a8fe86afd7",
    "streaming_partition" : 1,
    "streaming_retention_size" : 1024
  },
  "table_alias" : "123",
  "table_id" : "5fd42918-2ff1-4b2b-be2a-4eb3077230e0",
  "table_name" : "s_test_update",
  "update_time" : 1767943009375,
  "workspace_id" : "885f11d0-256b-4f62-b494-1c1f8822a705"
}

SDK Sample Code

The SDK sample code is as follows.

Add "add_description" to table details.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package com.huaweicloud.sdk.test;

import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.secmaster.v2.region.SecMasterRegion;
import com.huaweicloud.sdk.secmaster.v2.*;
import com.huaweicloud.sdk.secmaster.v2.model.*;


public class UpdateTableSolution {

    public static void main(String[] args) {
        // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        String ak = System.getenv("CLOUD_SDK_AK");
        String sk = System.getenv("CLOUD_SDK_SK");
        String projectId = "{project_id}";

        ICredential auth = new BasicCredentials()
                .withProjectId(projectId)
                .withAk(ak)
                .withSk(sk);

        SecMasterClient client = SecMasterClient.newBuilder()
                .withCredential(auth)
                .withRegion(SecMasterRegion.valueOf("<YOUR REGION>"))
                .build();
        UpdateTableRequest request = new UpdateTableRequest();
        request.withWorkspaceId("{workspace_id}");
        request.withTableId("{table_id}");
        UpdateTableRequestBody body = new UpdateTableRequestBody();
        body.withDescription("add_description");
        request.withBody(body);
        try {
            UpdateTableResponse response = client.updateTable(request);
            System.out.println(response.toString());
        } catch (ConnectionException e) {
            e.printStackTrace();
        } catch (RequestTimeoutException e) {
            e.printStackTrace();
        } catch (ServiceResponseException e) {
            e.printStackTrace();
            System.out.println(e.getHttpStatusCode());
            System.out.println(e.getRequestId());
            System.out.println(e.getErrorCode());
            System.out.println(e.getErrorMsg());
        }
    }
}

Add "add_description" to table details.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# coding: utf-8

import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdksecmaster.v2.region.secmaster_region import SecMasterRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdksecmaster.v2 import *

if __name__ == "__main__":
    # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak = os.environ["CLOUD_SDK_AK"]
    sk = os.environ["CLOUD_SDK_SK"]
    projectId = "{project_id}"

    credentials = BasicCredentials(ak, sk, projectId)

    client = SecMasterClient.new_builder() \
        .with_credentials(credentials) \
        .with_region(SecMasterRegion.value_of("<YOUR REGION>")) \
        .build()

    try:
        request = UpdateTableRequest()
        request.workspace_id = "{workspace_id}"
        request.table_id = "{table_id}"
        request.body = UpdateTableRequestBody(
            description="add_description"
        )
        response = client.update_table(request)
        print(response)
    except exceptions.ClientRequestException as e:
        print(e.status_code)
        print(e.request_id)
        print(e.error_code)
        print(e.error_msg)

Add "add_description" to table details.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package main

import (
	"fmt"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
    secmaster "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/secmaster/v2"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/secmaster/v2/model"
    region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/secmaster/v2/region"
)

func main() {
    // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak := os.Getenv("CLOUD_SDK_AK")
    sk := os.Getenv("CLOUD_SDK_SK")
    projectId := "{project_id}"

    auth := basic.NewCredentialsBuilder().
        WithAk(ak).
        WithSk(sk).
        WithProjectId(projectId).
        Build()

    client := secmaster.NewSecMasterClient(
        secmaster.SecMasterClientBuilder().
            WithRegion(region.ValueOf("<YOUR REGION>")).
            WithCredential(auth).
            Build())

    request := &model.UpdateTableRequest{}
	request.WorkspaceId = "{workspace_id}"
	request.TableId = "{table_id}"
	descriptionUpdateTableRequestBody:= "add_description"
	request.Body = &model.UpdateTableRequestBody{
		Description: &descriptionUpdateTableRequestBody,
	}
	response, err := client.UpdateTable(request)
	if err == nil {
        fmt.Printf("%+v\n", response)
    } else {
        fmt.Println(err)
    }
}

For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.

Status Codes

Status Code

Description

200

Successful.

400

Error response.

Error Codes

See Error Codes.