// This file is auto-generated, don't edit it. Thanks.
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Tea;
using Tea.Utils;
namespace AlibabaCloud.SDK.Sample
{
public class Sample
{
/// <term><b>Description:</b></term>
/// <description>
/// <para>Initialize the account Client with the Token</para>
/// </description>
///
/// <returns>
/// Client
/// </returns>
///
/// <term><b>Exception:</b></term>
/// Exception
public static AlibabaCloud.SDK.Dingtalknotable_1_0.Client CreateClient()
{
AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config();
config.Protocol = "https";
config.RegionId = "central";
return new AlibabaCloud.SDK.Dingtalknotable_1_0.Client(config);
}
public static void Main(string[] args)
{
AlibabaCloud.SDK.Dingtalknotable_1_0.Client client = CreateClient();
AlibabaCloud.SDK.Dingtalknotable_1_0.Models.UpdateRecordsHeaders updateRecordsHeaders = new AlibabaCloud.SDK.Dingtalknotable_1_0.Models.UpdateRecordsHeaders();
updateRecordsHeaders.XAcsDingtalkAccessToken = "<your access token>";
Dictionary<string, Dictionary<string, object>> records0Fields = new Dictionary<string, Dictionary<string, object>>
{
{"key", new Dictionary<string, object>(){}},
};
AlibabaCloud.SDK.Dingtalknotable_1_0.Models.UpdateRecordsRequest.UpdateRecordsRequestRecords records0 = new AlibabaCloud.SDK.Dingtalknotable_1_0.Models.UpdateRecordsRequest.UpdateRecordsRequestRecords
{
Id = "recxxx",
Fields = records0Fields,
};
AlibabaCloud.SDK.Dingtalknotable_1_0.Models.UpdateRecordsRequest updateRecordsRequest = new AlibabaCloud.SDK.Dingtalknotable_1_0.Models.UpdateRecordsRequest
{
OperatorId = "xxxxx",
Records = new List<AlibabaCloud.SDK.Dingtalknotable_1_0.Models.UpdateRecordsRequest.UpdateRecordsRequestRecords>
{
records0
},
};
try
{
client.UpdateRecordsWithOptions("xxxxx", "Table", updateRecordsRequest, updateRecordsHeaders, new AlibabaCloud.TeaUtil.Models.RuntimeOptions());
}
catch (TeaException err)
{
if (!AlibabaCloud.TeaUtil.Common.Empty(err.Code) && !AlibabaCloud.TeaUtil.Common.Empty(err.Message))
{
// err contains code and message attributes, which help locate the issue
}
}
catch (Exception _err)
{
TeaException err = new TeaException(new Dictionary<string, object>
{
{ "message", _err.Message }
});
if (!AlibabaCloud.TeaUtil.Common.Empty(err.Code) && !AlibabaCloud.TeaUtil.Common.Empty(err.Message))
{
// err contains code and message attributes, which help locate the issue
}
}
}
}
}