Edit Code Table Field Value
Function
Edit the values of the fields in the lookup table.
Calling Method
For details, see Calling APIs.
URI
PUT /v2/{project_id}/design/code-tables/{id}/values
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Project ID and Account ID. |
id |
Yes |
String |
Entity ID, which is a string |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
IAM token, which is obtained by calling the IAM API for obtaining a user token (value of X-Subject-Token in the response header). This field is mandatory for authentication using tokens. |
workspace |
Yes |
String |
Workspace ID. For details about how to obtain the workspace ID, see Instance ID and Workspace ID. |
X-Project-Id |
No |
String |
Project ID. For details about how to obtain the project ID, see Project ID and Account ID. This parameter is mandatory for API requests that use AK/SK authentication in multi-project scenarios. |
Content-Type |
No |
String |
Default value: application/json;charset=UTF-8 This parameter is optional. If the body is available, this parameter is mandatory. If the body is unavailable, you do not need to set this parameter or verify it. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
to_add |
No |
Array of CodeTableFieldVO objects |
The code table attribute and attribute value list are added. |
to_modify |
No |
Array of CodeTableFieldVO objects |
Edit the lookup table attribute value list. |
to_remove |
No |
Array of CodeTableFieldVO objects |
List of lookup table attribute IDs to be deleted. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
No |
String |
Lookup table field ID, which is a string |
code_table_id |
No |
String |
ID of the lookup table (mandatory for update), which is a string |
ordinal |
Yes |
Integer |
Sequence number. |
name_en |
Yes |
String |
Field name, in English. |
name_ch |
Yes |
String |
Field name, in Chinese. |
description |
No |
String |
Description. |
data_type |
Yes |
String |
Field type |
data_type_extend |
No |
String |
Extended field of the data type. |
is_unique_key |
No |
Boolean |
Whether the field is unique. |
code_table_field_values |
No |
Array of CodeTableFieldValueVO objects |
Code list attribute value. |
count_field_values |
No |
Integer |
Total number of lookup table attribute values. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
No |
String |
Lookup table field ID, which is a string |
fd_id |
No |
String |
Attribute ID of the lookup table, which is a string |
fd_value |
No |
String |
Code list attribute value. |
ordinal |
No |
Integer |
Sequence number. |
description |
No |
String |
Description. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
data |
data object |
data: unified outermost data structure of the returned result. |
Parameter |
Type |
Description |
---|---|---|
value |
Array of CodeTableFieldVO objects |
Code table field list information. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Lookup table field ID, which is a string |
code_table_id |
String |
ID of the lookup table (mandatory for update), which is a string |
ordinal |
Integer |
Sequence number. |
name_en |
String |
Field name, in English. |
name_ch |
String |
Field name, in Chinese. |
description |
String |
Description. |
data_type |
String |
Field type |
domain_type |
String |
Domain to which a field type belongs. Options:
|
data_type_extend |
String |
Extended field of the data type. |
is_unique_key |
Boolean |
Whether the field is unique. |
code_table_field_values |
Array of CodeTableFieldValueVO objects |
Code list attribute value. |
count_field_values |
Integer |
Total number of lookup table attribute values. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Lookup table field ID, which is a string |
fd_id |
String |
Attribute ID of the lookup table, which is a string |
fd_value |
String |
Code list attribute value. |
ordinal |
Integer |
Sequence number. |
description |
String |
Description. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code, for example, DS.6000, indicating that the request fails to be processed. |
error_msg |
String |
Error message |
data |
Object |
Returned data information. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code, for example, DS.6000, indicating that the request fails to be processed. |
error_msg |
String |
Error message |
data |
Object |
Returned data information. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code, for example, DS.6000, indicating that the request fails to be processed. |
error_msg |
String |
Error message |
data |
Object |
Returned data information. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code, for example, DS.6000, indicating that the request fails to be processed. |
error_msg |
String |
Error message |
data |
Object |
Returned data information. |
Example Requests
Edit the field values of the lookup table based on the request parameters, including adding fields to the lookup table.
PUT https://{endpoint}/v2/{project_id}/design/code-tables/1230204979835502592/values { "to_add" : [ { "id" : "178101", "code_table_id" : "1230204979835502592", "ordinal" : 1, "name_en" : "code", "name_ch" : "Message", "description" : "", "data_type" : "STRING", "domain_type" : null, "data_type_extend" : null, "is_unique_key" : false, "code_table_field_values" : [ { "fd_id" : "178101", "fd_value" : "4", "ordinal" : 4 } ], "count_field_values" : 3 }, { "id" : "178102", "code_table_id" : "1230204979835502592", "ordinal" : 2, "name_en" : "province", "name_ch" : "Economical", "description" : "", "data_type" : "STRING", "domain_type" : null, "data_type_extend" : null, "is_unique_key" : false, "code_table_field_values" : [ { "fd_id" : "178102", "fd_value" : "Chongqing Province", "ordinal" : 4 } ], "count_field_values" : 3 }, { "id" : "178103", "code_table_id" : "1230204979835502592", "ordinal" : 3, "name_en" : "city", "name_ch" : "Specifies the city where the customer is located.", "description" : "", "data_type" : "STRING", "domain_type" : null, "data_type_extend" : null, "is_unique_key" : false, "code_table_field_values" : [ { "fd_id" : "178103", "fd_value" : "Chongqing Province", "ordinal" : 4 } ], "count_field_values" : 3 }, { "id" : "178104", "code_table_id" : "1230204979835502592", "ordinal" : 4, "name_en" : "county", "name_ch" : "County", "description" : "", "data_type" : "STRING", "domain_type" : null, "data_type_extend" : null, "is_unique_key" : false, "code_table_field_values" : [ { "fd_id" : "178104", "fd_value" : "Yudong District", "ordinal" : 4 } ], "count_field_values" : 3 } ] }
Example Responses
Status code: 200
This operation succeeds, and the returned data is a CodeTableFieldVO array.
{ "data" : { "value" : [ { "id" : "178101", "code_table_id" : "1230204979835502592", "ordinal" : 1, "name_en" : "code", "name_ch" : "Message", "description" : "", "data_type" : "STRING", "domain_type" : null, "data_type_extend" : null, "is_unique_key" : false, "code_table_field_values" : [ { "id" : "19983446", "fd_id" : "178101", "fd_value" : "1", "ordinal" : 1, "description" : null }, { "id" : "19983450", "fd_id" : "178101", "fd_value" : "2", "ordinal" : 2, "description" : null }, { "id" : "19983454", "fd_id" : "178101", "fd_value" : "3", "ordinal" : 3, "description" : null }, { "id" : "19983554", "fd_id" : "178101", "fd_value" : "4", "ordinal" : 4, "description" : null } ], "count_field_values" : 4 }, { "id" : "178102", "code_table_id" : "1230204979835502592", "ordinal" : 2, "name_en" : "province", "name_ch" : "Economical", "description" : "", "data_type" : "STRING", "domain_type" : null, "data_type_extend" : null, "is_unique_key" : false, "code_table_field_values" : [ { "id" : "19983447", "fd_id" : "178102", "fd_value" : "Anhui", "ordinal" : 1, "description" : null }, { "id" : "19983451", "fd_id" : "178102", "fd_value" : "Jiangsu", "ordinal" : 2, "description" : null }, { "id" : "19983455", "fd_id" : "178102", "fd_value" : "Shanghai", "ordinal" : 3, "description" : null }, { "id" : "19983555", "fd_id" : "178102", "fd_value" : "Chongqing Province", "ordinal" : 4, "description" : null } ], "count_field_values" : 4 }, { "id" : "178103", "code_table_id" : "1230204979835502592", "ordinal" : 3, "name_en" : "city", "name_ch" : "Cities", "description" : "", "data_type" : "STRING", "domain_type" : null, "data_type_extend" : null, "is_unique_key" : false, "code_table_field_values" : [ { "id" : "19983448", "fd_id" : "178103", "fd_value" : "Hefei", "ordinal" : 1, "description" : null }, { "id" : "19983452", "fd_id" : "178103", "fd_value" : "Nanjing", "ordinal" : 2, "description" : null }, { "id" : "19983456", "fd_id" : "178103", "fd_value" : "Shanghai", "ordinal" : 3, "description" : null }, { "id" : "19983556", "fd_id" : "178103", "fd_value" : "Chongqing Province", "ordinal" : 4, "description" : null } ], "count_field_values" : 4 }, { "id" : "178104", "code_table_id" : "1230204979835502592", "ordinal" : 4, "name_en" : "county", "name_ch" : "County", "description" : "", "data_type" : "STRING", "domain_type" : null, "data_type_extend" : null, "is_unique_key" : false, "code_table_field_values" : [ { "id" : "19983449", "fd_id" : "178104", "fd_value" : "Yaohai District", "ordinal" : 1, "description" : null }, { "id" : "19983453", "fd_id" : "178104", "fd_value" : "Yuhuatai District", "ordinal" : 2, "description" : null }, { "id" : "19983457", "fd_id" : "178104", "fd_value" : "Pudong New Area", "ordinal" : 3, "description" : null }, { "id" : "19983557", "fd_id" : "178104", "fd_value" : "Yudong District", "ordinal" : 4, "description" : null } ], "count_field_values" : 4 } ] } }
Status code: 400
{ "error_code" : "DS.60xx", "error_msg" : "The user request is illegal." }
Status code: 401
{ "error_code" : "DS.60xx", "error_msg" : "User authentication failed." }
Status code: 403
{ "error_code" : "DS.60xx", "error_msg" : "The user does not have permission to call this API." }
Status code: 404
{ "error_code" : "DS.60xx", "error_msg" : "The User Request API does not exist." }
SDK Sample Code
The SDK sample code is as follows.
Edit the field values of the lookup table based on the request parameters, including adding fields to the lookup table.
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
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.dataartsstudio.v1.region.DataArtsStudioRegion; import com.huaweicloud.sdk.dataartsstudio.v1.*; import com.huaweicloud.sdk.dataartsstudio.v1.model.*; import java.util.List; import java.util.ArrayList; public class UpdateCodeTableValuesSolution { 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); DataArtsStudioClient client = DataArtsStudioClient.newBuilder() .withCredential(auth) .withRegion(DataArtsStudioRegion.valueOf("<YOUR REGION>")) .build(); UpdateCodeTableValuesRequest request = new UpdateCodeTableValuesRequest(); request.withId("{id}"); CodeTableFieldValueUpdateVO body = new CodeTableFieldValueUpdateVO(); List<CodeTableFieldValueVO> listToAddCodeTableFieldValues = new ArrayList<>(); listToAddCodeTableFieldValues.add( new CodeTableFieldValueVO() .withFdId("178104") .withFdValue("Yudong District") .withOrdinal(4) ); List<CodeTableFieldValueVO> listToAddCodeTableFieldValues1 = new ArrayList<>(); listToAddCodeTableFieldValues1.add( new CodeTableFieldValueVO() .withFdId("178103") .withFdValue("Chongqing Province") .withOrdinal(4) ); List<CodeTableFieldValueVO> listToAddCodeTableFieldValues2 = new ArrayList<>(); listToAddCodeTableFieldValues2.add( new CodeTableFieldValueVO() .withFdId("178102") .withFdValue("Chongqing Province") .withOrdinal(4) ); List<CodeTableFieldValueVO> listToAddCodeTableFieldValues3 = new ArrayList<>(); listToAddCodeTableFieldValues3.add( new CodeTableFieldValueVO() .withFdId("178101") .withFdValue("4") .withOrdinal(4) ); List<CodeTableFieldVO> listbodyToAdd = new ArrayList<>(); listbodyToAdd.add( new CodeTableFieldVO() .withId("178101") .withCodeTableId("1230204979835502592") .withOrdinal(1) .withNameEn("code") .withNameCh("Message") .withDescription("") .withDataType("STRING") .withIsUniqueKey(false) .withCodeTableFieldValues(listToAddCodeTableFieldValues3) .withCountFieldValues(3) ); listbodyToAdd.add( new CodeTableFieldVO() .withId("178102") .withCodeTableId("1230204979835502592") .withOrdinal(2) .withNameEn("province") .withNameCh("Economical") .withDescription("") .withDataType("STRING") .withIsUniqueKey(false) .withCodeTableFieldValues(listToAddCodeTableFieldValues2) .withCountFieldValues(3) ); listbodyToAdd.add( new CodeTableFieldVO() .withId("178103") .withCodeTableId("1230204979835502592") .withOrdinal(3) .withNameEn("city") .withNameCh("Specifies the city where the customer is located.") .withDescription("") .withDataType("STRING") .withIsUniqueKey(false) .withCodeTableFieldValues(listToAddCodeTableFieldValues1) .withCountFieldValues(3) ); listbodyToAdd.add( new CodeTableFieldVO() .withId("178104") .withCodeTableId("1230204979835502592") .withOrdinal(4) .withNameEn("county") .withNameCh("County") .withDescription("") .withDataType("STRING") .withIsUniqueKey(false) .withCodeTableFieldValues(listToAddCodeTableFieldValues) .withCountFieldValues(3) ); body.withToAdd(listbodyToAdd); request.withBody(body); try { UpdateCodeTableValuesResponse response = client.updateCodeTableValues(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()); } } } |
Edit the field values of the lookup table based on the request parameters, including adding fields to the lookup table.
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# coding: utf-8 import os from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkdataartsstudio.v1.region.dataartsstudio_region import DataArtsStudioRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkdataartsstudio.v1 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 = DataArtsStudioClient.new_builder() \ .with_credentials(credentials) \ .with_region(DataArtsStudioRegion.value_of("<YOUR REGION>")) \ .build() try: request = UpdateCodeTableValuesRequest() request.id = "{id}" listCodeTableFieldValuesToAdd = [ CodeTableFieldValueVO( fd_id="178104", fd_value="Yudong District", ordinal=4 ) ] listCodeTableFieldValuesToAdd1 = [ CodeTableFieldValueVO( fd_id="178103", fd_value="Chongqing Province", ordinal=4 ) ] listCodeTableFieldValuesToAdd2 = [ CodeTableFieldValueVO( fd_id="178102", fd_value="Chongqing Province", ordinal=4 ) ] listCodeTableFieldValuesToAdd3 = [ CodeTableFieldValueVO( fd_id="178101", fd_value="4", ordinal=4 ) ] listToAddbody = [ CodeTableFieldVO( id="178101", code_table_id="1230204979835502592", ordinal=1, name_en="code", name_ch="Message", description="", data_type="STRING", is_unique_key=False, code_table_field_values=listCodeTableFieldValuesToAdd3, count_field_values=3 ), CodeTableFieldVO( id="178102", code_table_id="1230204979835502592", ordinal=2, name_en="province", name_ch="Economical", description="", data_type="STRING", is_unique_key=False, code_table_field_values=listCodeTableFieldValuesToAdd2, count_field_values=3 ), CodeTableFieldVO( id="178103", code_table_id="1230204979835502592", ordinal=3, name_en="city", name_ch="Specifies the city where the customer is located.", description="", data_type="STRING", is_unique_key=False, code_table_field_values=listCodeTableFieldValuesToAdd1, count_field_values=3 ), CodeTableFieldVO( id="178104", code_table_id="1230204979835502592", ordinal=4, name_en="county", name_ch="County", description="", data_type="STRING", is_unique_key=False, code_table_field_values=listCodeTableFieldValuesToAdd, count_field_values=3 ) ] request.body = CodeTableFieldValueUpdateVO( to_add=listToAddbody ) response = client.update_code_table_values(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg) |
Edit the field values of the lookup table based on the request parameters, including adding fields to the lookup table.
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" dataartsstudio "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dataartsstudio/v1/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 := dataartsstudio.NewDataArtsStudioClient( dataartsstudio.DataArtsStudioClientBuilder(). WithRegion(region.ValueOf("<YOUR REGION>")). WithCredential(auth). Build()) request := &model.UpdateCodeTableValuesRequest{} request.Id = "{id}" fdIdCodeTableFieldValues:= "178104" fdValueCodeTableFieldValues:= "Yudong District" ordinalCodeTableFieldValues:= int32(4) var listCodeTableFieldValuesToAdd = []model.CodeTableFieldValueVo{ { FdId: &fdIdCodeTableFieldValues, FdValue: &fdValueCodeTableFieldValues, Ordinal: &ordinalCodeTableFieldValues, }, } fdIdCodeTableFieldValues1:= "178103" fdValueCodeTableFieldValues1:= "Chongqing Province" ordinalCodeTableFieldValues1:= int32(4) var listCodeTableFieldValuesToAdd1 = []model.CodeTableFieldValueVo{ { FdId: &fdIdCodeTableFieldValues1, FdValue: &fdValueCodeTableFieldValues1, Ordinal: &ordinalCodeTableFieldValues1, }, } fdIdCodeTableFieldValues2:= "178102" fdValueCodeTableFieldValues2:= "Chongqing Province" ordinalCodeTableFieldValues2:= int32(4) var listCodeTableFieldValuesToAdd2 = []model.CodeTableFieldValueVo{ { FdId: &fdIdCodeTableFieldValues2, FdValue: &fdValueCodeTableFieldValues2, Ordinal: &ordinalCodeTableFieldValues2, }, } fdIdCodeTableFieldValues3:= "178101" fdValueCodeTableFieldValues3:= "4" ordinalCodeTableFieldValues3:= int32(4) var listCodeTableFieldValuesToAdd3 = []model.CodeTableFieldValueVo{ { FdId: &fdIdCodeTableFieldValues3, FdValue: &fdValueCodeTableFieldValues3, Ordinal: &ordinalCodeTableFieldValues3, }, } idToAdd:= "178101" codeTableIdToAdd:= "1230204979835502592" descriptionToAdd:= "" isUniqueKeyToAdd:= false countFieldValuesToAdd:= int32(3) idToAdd1:= "178102" codeTableIdToAdd1:= "1230204979835502592" descriptionToAdd1:= "" isUniqueKeyToAdd1:= false countFieldValuesToAdd1:= int32(3) idToAdd2:= "178103" codeTableIdToAdd2:= "1230204979835502592" descriptionToAdd2:= "" isUniqueKeyToAdd2:= false countFieldValuesToAdd2:= int32(3) idToAdd3:= "178104" codeTableIdToAdd3:= "1230204979835502592" descriptionToAdd3:= "" isUniqueKeyToAdd3:= false countFieldValuesToAdd3:= int32(3) var listToAddbody = []model.CodeTableFieldVo{ { Id: &idToAdd, CodeTableId: &codeTableIdToAdd, Ordinal: int32(1), NameEn: "code", NameCh: "Message", Description: &descriptionToAdd, DataType: "STRING", IsUniqueKey: &isUniqueKeyToAdd, CodeTableFieldValues: &listCodeTableFieldValuesToAdd3, CountFieldValues: &countFieldValuesToAdd, }, { Id: &idToAdd1, CodeTableId: &codeTableIdToAdd1, Ordinal: int32(2), NameEn: "province", NameCh: "Economical", Description: &descriptionToAdd1, DataType: "STRING", IsUniqueKey: &isUniqueKeyToAdd1, CodeTableFieldValues: &listCodeTableFieldValuesToAdd2, CountFieldValues: &countFieldValuesToAdd1, }, { Id: &idToAdd2, CodeTableId: &codeTableIdToAdd2, Ordinal: int32(3), NameEn: "city", NameCh: "Specifies the city where the customer is located.", Description: &descriptionToAdd2, DataType: "STRING", IsUniqueKey: &isUniqueKeyToAdd2, CodeTableFieldValues: &listCodeTableFieldValuesToAdd1, CountFieldValues: &countFieldValuesToAdd2, }, { Id: &idToAdd3, CodeTableId: &codeTableIdToAdd3, Ordinal: int32(4), NameEn: "county", NameCh: "County", Description: &descriptionToAdd3, DataType: "STRING", IsUniqueKey: &isUniqueKeyToAdd3, CodeTableFieldValues: &listCodeTableFieldValuesToAdd, CountFieldValues: &countFieldValuesToAdd3, }, } request.Body = &model.CodeTableFieldValueUpdateVo{ ToAdd: &listToAddbody, } response, err := client.UpdateCodeTableValues(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 |
This operation succeeds, and the returned data is a CodeTableFieldVO array. |
400 |
BadRequest |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot