@ucloud-sdks/ucloud-sdk-js 0.2.34 → 0.2.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,6 +39,12 @@ export default class UK8SClient extends Client {
39
39
  * See also: https://docs.ucloud.cn/api/uk8s-api/create_uk8s_cluster_v2
40
40
  */
41
41
  createUK8SClusterV2(request?: CreateUK8SClusterV2Request): Promise<CreateUK8SClusterV2Response>;
42
+ /**
43
+ * CreateUK8SULSConfig - 创建 LogConfig 自定义资源,用于声明式地定义日志采集规则
44
+ *
45
+ * See also: https://docs.ucloud.cn/api/uk8s-api/create_uk8s_uls_config
46
+ */
47
+ createUK8SULSConfig(request?: CreateUK8SULSConfigRequest): Promise<CreateUK8SULSConfigResponse>;
42
48
  /**
43
49
  * DelUK8SCluster - 删除UK8S集群
44
50
  *
@@ -51,6 +57,12 @@ export default class UK8SClient extends Client {
51
57
  * See also: https://docs.ucloud.cn/api/uk8s-api/del_uk8s_cluster_node_v2
52
58
  */
53
59
  delUK8SClusterNodeV2(request?: DelUK8SClusterNodeV2Request): Promise<DelUK8SClusterNodeV2Response>;
60
+ /**
61
+ * DeleteUK8SULSConfig - 删除指定UK8S集群的日志采集规则。
62
+ *
63
+ * See also: https://docs.ucloud.cn/api/uk8s-api/delete_uk8s_uls_config
64
+ */
65
+ deleteUK8SULSConfig(request?: DeleteUK8SULSConfigRequest): Promise<DeleteUK8SULSConfigResponse>;
54
66
  /**
55
67
  * DescribeUK8SCluster - 获取集群信息
56
68
  *
@@ -99,12 +111,24 @@ export default class UK8SClient extends Client {
99
111
  * See also: https://docs.ucloud.cn/api/uk8s-api/list_uk8s_node_group
100
112
  */
101
113
  listUK8SNodeGroup(request?: ListUK8SNodeGroupRequest): Promise<ListUK8SNodeGroupResponse>;
114
+ /**
115
+ * ListUK8SULSConfig - 查询 UK8S 的 ULSConfig
116
+ *
117
+ * See also: https://docs.ucloud.cn/api/uk8s-api/list_uk8s_uls_config
118
+ */
119
+ listUK8SULSConfig(request?: ListUK8SULSConfigRequest): Promise<ListUK8SULSConfigResponse>;
102
120
  /**
103
121
  * RemoveUK8SNodeGroup - 删除UK8S节点池
104
122
  *
105
123
  * See also: https://docs.ucloud.cn/api/uk8s-api/remove_uk8s_node_group
106
124
  */
107
125
  removeUK8SNodeGroup(request?: RemoveUK8SNodeGroupRequest): Promise<RemoveUK8SNodeGroupResponse>;
126
+ /**
127
+ * UpdateUK8SULSConfig - 更新指定UK8S集群的日志采集规则。
128
+ *
129
+ * See also: https://docs.ucloud.cn/api/uk8s-api/update_uk8s_uls_config
130
+ */
131
+ updateUK8SULSConfig(request?: UpdateUK8SULSConfigRequest): Promise<UpdateUK8SULSConfigResponse>;
108
132
  }
109
133
  /**
110
134
  * AddUK8SExistingUHost - 将预先创建好的云主机加入到UK8S集群,需要注意的是,该云主机依然会执行重装系统的操作。
@@ -332,10 +356,6 @@ export interface AddUK8SUHostNodeRequest {
332
356
  * 创建Node节点数量,取值范围是[1,50]。
333
357
  */
334
358
  Count: number;
335
- /**
336
- * Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64
337
- */
338
- Password: string;
339
359
  /**
340
360
  * 内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192
341
361
  */
@@ -344,6 +364,10 @@ export interface AddUK8SUHostNodeRequest {
344
364
  * 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ 默认为月付
345
365
  */
346
366
  ChargeType: string;
367
+ /**
368
+ * Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64
369
+ */
370
+ Password?: string;
347
371
  /**
348
372
  * 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘
349
373
  */
@@ -461,7 +485,7 @@ export interface AddUK8SUHostNodeRequest {
461
485
  */
462
486
  ShareBandwidthId?: string;
463
487
  /**
464
- * 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International
488
+ * 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: InternationalBGP: Bgp。各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International
465
489
  */
466
490
  OperatorName?: string;
467
491
  /**
@@ -492,9 +516,31 @@ export interface AddUK8SUHostNodeRequest {
492
516
  Name?: string;
493
517
  }[];
494
518
  /**
495
- * UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game
519
+ * 主机规格族
496
520
  */
497
- UserLabels?: string;
521
+ UHostFamily?: string;
522
+ /**
523
+ *
524
+ */
525
+ UserLabels?: {
526
+ /**
527
+ * UK8S用户资源标签的键值
528
+ */
529
+ Key?: string;
530
+ /**
531
+ * UK8S用户资源标签的值
532
+ */
533
+ Value?: string;
534
+ }[];
535
+ /**
536
+ *
537
+ */
538
+ KubeletConfiguration?: {
539
+ /**
540
+ * 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup
541
+ */
542
+ ContainerLogMaxFiles?: string;
543
+ };
498
544
  }
499
545
  /**
500
546
  * AddUK8SUHostNode - 为UK8S集群添加一台Node节点,机型类型为云主机
@@ -798,6 +844,197 @@ export interface CreateUK8SClusterV2Response {
798
844
  */
799
845
  ClusterId: string;
800
846
  }
847
+ /**
848
+ * CreateUK8SULSConfig - 创建 LogConfig 自定义资源,用于声明式地定义日志采集规则
849
+ */
850
+ export interface CreateUK8SULSConfigRequest {
851
+ /**
852
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
853
+ */
854
+ Zone: string;
855
+ /**
856
+ * 日志服务中用于接收日志的目标 Topic ID。
857
+ */
858
+ TopicID: string;
859
+ /**
860
+ * UK8S 集群ID。
861
+ */
862
+ ClusterId: string;
863
+ /**
864
+ * 要创建的日志的采集规则的名称,不能重复。总长度不能超过 253个字符。字符类型:只能包含小写字母(a-z)、数字(0-9)、破折号(-)和点(.)。开头和结尾字符:必须以小写字母或数字开头,并且也必须以小写字母或数字结尾。不允许以 - 或 . 开头或结尾。连续特殊字符:不能连续出现点(.)或破折号(-)。
865
+ */
866
+ Name: string;
867
+ /**
868
+ *
869
+ */
870
+ ExtractRule?: {
871
+ /**
872
+ * 日志解析类型,决定了如何结构化日志。可选值: multi_line_delimiter:多行分隔符,delimiter:分隔符,full_regex:完全正则,multi_line_full_regex:多行完全正则,minimal_list:单行全文日志,multi_line:多行全文日志
873
+ */
874
+ LogType: string;
875
+ /**
876
+ * 采集策略。可选值: full (全量采集存量日志), increment (从当前时间点增量采集)。默认为 full。
877
+ */
878
+ CollectPolicy?: string;
879
+ /**
880
+ * 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。
881
+ */
882
+ Encode?: string;
883
+ /**
884
+ * 当LogType 为分隔符、正则、多行正则时可用
885
+ */
886
+ Keys?: string[];
887
+ /**
888
+ * 当 LogType 为delimiter 时可选,接收 "space"、"tab"、"|"、";"、","。
889
+ */
890
+ Delimiter?: string;
891
+ /**
892
+ * 行首正则表达式。当 logType 为多行模式 (如 multi_line 或 multi_line_full_regex) 时,用于标识一条新日志的开始。
893
+ */
894
+ BeginningRegex?: string;
895
+ /**
896
+ * 日志提取正则表达式。当 logType 为正则模式 (如 full_regex,multi_line_full_regex) 时,用于从日志中提取字段。
897
+ */
898
+ LogRegex?: string;
899
+ /**
900
+ *
901
+ */
902
+ ExtractRule?: {
903
+ /**
904
+ * Base64 编码的日志提取正则表达式。
905
+ */
906
+ LogRegexBase64?: string;
907
+ };
908
+ /**
909
+ * 当日志为 json 或正则提取时,指定包含日志时间的字段名 (Key)。
910
+ */
911
+ TimeKey?: string;
912
+ /**
913
+ * timeKey 对应的时间格式。
914
+ */
915
+ TimeFormat?: string;
916
+ /**
917
+ * 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。
918
+ */
919
+ UnMatchUpload?: string;
920
+ /**
921
+ * 没有设置默认值;UnMatchUpload="true" 时强制要求填写
922
+ */
923
+ UnMatchKey?: string;
924
+ /**
925
+ * Base64 编码的分隔符,优先级高于 Delimiter
926
+ */
927
+ DelimiterBase64?: string;
928
+ /**
929
+ * Base64 编码的行首正则,优先级高于 BeginningRegex
930
+ */
931
+ BeginningRegexBase64?: string;
932
+ };
933
+ /**
934
+ *
935
+ */
936
+ InputDetail?: {
937
+ /**
938
+ * 日志输入类型。支持 container_file 和 container_stdout
939
+ */
940
+ Type: string;
941
+ /**
942
+ *
943
+ */
944
+ Metadata?: {
945
+ /**
946
+ * 指定具体要采集元数据的容器名。如果留空,则不采集容器的元数据,可选字段:container_name,namespace,pod_name,pod_ip,pod_uid,container_id,image_name。Pod Label 元数据通过指定 InputDetail.Metadata.Labels字段。
947
+ */
948
+ Container?: string;
949
+ /**
950
+ * 定义要采集哪些 Pod 的标签 (Labels)。可选值: * (采集所有标签), "app,version" (仅采集 app 和 version), "" (不采集任何标签)。
951
+ */
952
+ Labels?: string;
953
+ };
954
+ /**
955
+ *
956
+ */
957
+ FilePaths?: {
958
+ /**
959
+ * 定义采集路径
960
+ */
961
+ Path?: string;
962
+ /**
963
+ * 定义采集路径的文件名
964
+ */
965
+ File?: string;
966
+ }[];
967
+ /**
968
+ * all、stdout、stderr,默认 all (用于 InputDetail.Type = container_stdout)
969
+ */
970
+ Stream?: string;
971
+ };
972
+ /**
973
+ *
974
+ */
975
+ MatchRule?: {
976
+ /**
977
+ * 容器名称匹配操作符。支持:in(包含),notin(不包含)
978
+ */
979
+ ContainerOperator?: string;
980
+ /**
981
+ * 要匹配的容器名称,*表示所有容器,用逗号分隔
982
+ */
983
+ Container?: string;
984
+ /**
985
+ *
986
+ */
987
+ Workloads?: {
988
+ /**
989
+ * 按工作负载匹配时,工作负载所在的命名空间。
990
+ */
991
+ Namespace?: string;
992
+ /**
993
+ * 按工作负载匹配时,工作负载的类型,例如 deployment, statefulset, daemonset,job, cronjob。
994
+ */
995
+ Type?: string;
996
+ /**
997
+ * 按工作负载匹配时,工作负载的名称。
998
+ */
999
+ Name?: string;
1000
+ }[];
1001
+ /**
1002
+ *
1003
+ */
1004
+ PodLabels?: {
1005
+ /**
1006
+ * 指定/排除命名空间, 可选值: in/notin
1007
+ */
1008
+ NamespaceOperator?: string;
1009
+ /**
1010
+ * 命名空间名称
1011
+ */
1012
+ Namespace?: string;
1013
+ /**
1014
+ *
1015
+ */
1016
+ Labels?: {
1017
+ /**
1018
+ * 按 Pod 标签匹配时,要匹配的标签的 Key。
1019
+ */
1020
+ Key?: string;
1021
+ /**
1022
+ * 按 Pod 标签匹配时,标签值的匹配操作符。可选值: in, notin。
1023
+ */
1024
+ ValueOperator?: string;
1025
+ /**
1026
+ * 按 Pod 标签匹配时,要匹配的标签的值。
1027
+ */
1028
+ Value?: string;
1029
+ }[];
1030
+ };
1031
+ };
1032
+ }
1033
+ /**
1034
+ * CreateUK8SULSConfig - 创建 LogConfig 自定义资源,用于声明式地定义日志采集规则
1035
+ */
1036
+ export interface CreateUK8SULSConfigResponse {
1037
+ }
801
1038
  /**
802
1039
  * DelUK8SCluster - 删除UK8S集群
803
1040
  */
@@ -838,6 +1075,28 @@ export interface DelUK8SClusterNodeV2Request {
838
1075
  */
839
1076
  export interface DelUK8SClusterNodeV2Response {
840
1077
  }
1078
+ /**
1079
+ * DeleteUK8SULSConfig - 删除指定UK8S集群的日志采集规则。
1080
+ */
1081
+ export interface DeleteUK8SULSConfigRequest {
1082
+ /**
1083
+ * 可用区。参见可用区列表。
1084
+ */
1085
+ Zone: string;
1086
+ /**
1087
+ * 要操作的 UK8S 集群的 ID。
1088
+ */
1089
+ ClusterId: string;
1090
+ /**
1091
+ * 要删除的日志的采集规则的名称。
1092
+ */
1093
+ Name: string;
1094
+ }
1095
+ /**
1096
+ * DeleteUK8SULSConfig - 删除指定UK8S集群的日志采集规则。
1097
+ */
1098
+ export interface DeleteUK8SULSConfigResponse {
1099
+ }
841
1100
  /**
842
1101
  * DescribeUK8SCluster - 获取集群信息
843
1102
  */
@@ -923,6 +1182,26 @@ export interface DescribeUK8SClusterResponse {
923
1182
  * 是否默认的弹性网卡的信息。true: 是默认弹性网卡;其他值:不是。
924
1183
  */
925
1184
  Default?: string;
1185
+ /**
1186
+ * IP 地址分配模式
1187
+ */
1188
+ IPMode?: string;
1189
+ /**
1190
+ * IP 所属的 VPC Id
1191
+ */
1192
+ VPCId?: string;
1193
+ /**
1194
+ * IP 所在的 子网 Id
1195
+ */
1196
+ SubnetId?: string;
1197
+ /**
1198
+ * 网卡的 MAC 地址
1199
+ */
1200
+ Mac?: string;
1201
+ /**
1202
+ * 虚拟网卡 Id
1203
+ */
1204
+ NetworkInterfaceId?: string;
926
1205
  }[];
927
1206
  /**
928
1207
  * 节点磁盘信息
@@ -993,6 +1272,47 @@ export interface DescribeUK8SClusterResponse {
993
1272
  * 节点类型:uhost表示云主机;uphost表示物理云主机
994
1273
  */
995
1274
  NodeType: string;
1275
+ /**
1276
+ * GPU 数量
1277
+ */
1278
+ GPU: number;
1279
+ /**
1280
+ * GPU 型号
1281
+ */
1282
+ GpuType: string;
1283
+ /**
1284
+ * 基础镜像名称
1285
+ */
1286
+ BasicImageName: string;
1287
+ /**
1288
+ * 操作系统类型
1289
+ */
1290
+ OsType: string;
1291
+ /**
1292
+ * 节点总磁盘空间
1293
+ */
1294
+ TotalDiskSpace: number;
1295
+ /**
1296
+ * 主机机型类别
1297
+ */
1298
+ MachineType: string;
1299
+ /**
1300
+ * 节点关联的安全组列表
1301
+ */
1302
+ SecGroupId: {
1303
+ /**
1304
+ * 安全组名称
1305
+ */
1306
+ Id?: string;
1307
+ /**
1308
+ * 安全组id
1309
+ */
1310
+ Name?: string;
1311
+ /**
1312
+ * 安全组优先级
1313
+ */
1314
+ Priority?: string;
1315
+ }[];
996
1316
  }[];
997
1317
  /**
998
1318
  * Node节点配置信息,具体参考UhostInfo
@@ -1038,6 +1358,26 @@ export interface DescribeUK8SClusterResponse {
1038
1358
  * 是否默认的弹性网卡的信息。true: 是默认弹性网卡;其他值:不是。
1039
1359
  */
1040
1360
  Default?: string;
1361
+ /**
1362
+ * IP 地址分配模式
1363
+ */
1364
+ IPMode?: string;
1365
+ /**
1366
+ * IP 所属的 VPC Id
1367
+ */
1368
+ VPCId?: string;
1369
+ /**
1370
+ * IP 所在的 子网 Id
1371
+ */
1372
+ SubnetId?: string;
1373
+ /**
1374
+ * 网卡的 MAC 地址
1375
+ */
1376
+ Mac?: string;
1377
+ /**
1378
+ * 虚拟网卡 Id
1379
+ */
1380
+ NetworkInterfaceId?: string;
1041
1381
  }[];
1042
1382
  /**
1043
1383
  * 节点磁盘信息
@@ -1108,6 +1448,47 @@ export interface DescribeUK8SClusterResponse {
1108
1448
  * 节点类型:uhost表示云主机;uphost表示物理云主机
1109
1449
  */
1110
1450
  NodeType: string;
1451
+ /**
1452
+ * GPU 数量
1453
+ */
1454
+ GPU: number;
1455
+ /**
1456
+ * GPU 型号
1457
+ */
1458
+ GpuType: string;
1459
+ /**
1460
+ * 基础镜像名称
1461
+ */
1462
+ BasicImageName: string;
1463
+ /**
1464
+ * 操作系统类型
1465
+ */
1466
+ OsType: string;
1467
+ /**
1468
+ * 节点总磁盘空间
1469
+ */
1470
+ TotalDiskSpace: number;
1471
+ /**
1472
+ * 主机机型类别
1473
+ */
1474
+ MachineType: string;
1475
+ /**
1476
+ * 节点关联的安全组列表
1477
+ */
1478
+ SecGroupId: {
1479
+ /**
1480
+ * 安全组名称
1481
+ */
1482
+ Id?: string;
1483
+ /**
1484
+ * 安全组id
1485
+ */
1486
+ Name?: string;
1487
+ /**
1488
+ * 安全组优先级
1489
+ */
1490
+ Priority?: string;
1491
+ }[];
1111
1492
  }[];
1112
1493
  /**
1113
1494
  * 创建时间
@@ -1162,22 +1543,144 @@ export interface DescribeUK8SClusterResponse {
1162
1543
  * Master配置预警:Normal正常;Warning 需要升级;Error 需要紧急升级;
1163
1544
  */
1164
1545
  MasterResourceStatus?: string;
1165
- }
1166
- /**
1167
- * DescribeUK8SImage - 获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像
1168
- */
1169
- export interface DescribeUK8SImageRequest {
1170
1546
  /**
1171
- * 可用区。参见 [可用区列表](../summary/regionlist.html)
1547
+ * CNI模式,可选值VPC/Calico
1172
1548
  */
1173
- Zone?: string;
1174
- }
1175
- /**
1176
- * DescribeUK8SImage - 获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像
1177
- */
1178
- export interface DescribeUK8SImageResponse {
1549
+ CNIMode?: string;
1179
1550
  /**
1180
- * 虚拟机可用镜像集合, 详见ImageInfo 数组
1551
+ * 集群的监控类型:no无监控;cloudwatch统一监控平台;prometheus内置监控
1552
+ */
1553
+ MonitorType?: string;
1554
+ /**
1555
+ * 集群的节点伸缩(CA)配置
1556
+ */
1557
+ Autoscaler?: {
1558
+ /**
1559
+ * 缩容触发延时
1560
+ */
1561
+ ScaleDownUnneededTime: string;
1562
+ /**
1563
+ * CPU缩容阈值
1564
+ */
1565
+ ScaleDownUtilizationThreshold: string;
1566
+ /**
1567
+ * 静默时间
1568
+ */
1569
+ ScaleDownDelayAfterAdd: string;
1570
+ /**
1571
+ * 打开/关闭
1572
+ */
1573
+ Enabled: number;
1574
+ /**
1575
+ * 伸缩器版本
1576
+ */
1577
+ Version: string;
1578
+ /**
1579
+ *
1580
+ */
1581
+ UpdateTime: number;
1582
+ /**
1583
+ * GPU缩容阈值
1584
+ */
1585
+ ScaleDownGpuUtilizationThreshold: string;
1586
+ };
1587
+ /**
1588
+ * 是否开启了授权管理功能
1589
+ */
1590
+ EnableUserAuth?: boolean;
1591
+ /**
1592
+ * Pod是否使用独立子网
1593
+ */
1594
+ DedicatedPodSubnet?: boolean;
1595
+ /**
1596
+ * Pod使用的独立子网列表
1597
+ */
1598
+ PodSubnetIds?: string[];
1599
+ /**
1600
+ * 删除保护开关。0表示不开启,1表示开启。默认不开启
1601
+ */
1602
+ DeleteProtection?: number;
1603
+ /**
1604
+ * Pod独立子网内的ip使用的安全组
1605
+ */
1606
+ PodSubnetSecGroups?: string[];
1607
+ /**
1608
+ * 节点网段
1609
+ */
1610
+ NodeCIDR?: string;
1611
+ /**
1612
+ * 外部 API Server 负载均衡实例 ID
1613
+ */
1614
+ ExternalUlb?: string;
1615
+ /**
1616
+ * 内部 API Server 负载均衡实例 ID
1617
+ */
1618
+ InternalUlb?: string;
1619
+ /**
1620
+ * 更新时间
1621
+ */
1622
+ UpdateTime?: number;
1623
+ /**
1624
+ * 负载均衡类型
1625
+ */
1626
+ LbClass?: string;
1627
+ /**
1628
+ * 容器运行时名称
1629
+ */
1630
+ RuntimeName?: string;
1631
+ /**
1632
+ * 容器运行时版本
1633
+ */
1634
+ RuntimeVersion?: string;
1635
+ /**
1636
+ * 集群版本
1637
+ */
1638
+ ClusterType?: string;
1639
+ /**
1640
+ * API Server 回环客户端证书
1641
+ */
1642
+ LoopbackClientCert?: {
1643
+ /**
1644
+ * 证书到期时间
1645
+ */
1646
+ ExpireTime?: number;
1647
+ /**
1648
+ * 证书是否进入过期告警状态
1649
+ */
1650
+ Warn?: boolean;
1651
+ };
1652
+ }
1653
+ /**
1654
+ * DescribeUK8SImage - 获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像
1655
+ */
1656
+ export interface DescribeUK8SImageRequest {
1657
+ /**
1658
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
1659
+ */
1660
+ Zone?: string;
1661
+ /**
1662
+ * 产品类型,可选值uhost、uphost,不填则返回所有
1663
+ */
1664
+ ProductType?: string;
1665
+ /**
1666
+ * 适用机型,如O、G、OPRO等,默认为O
1667
+ */
1668
+ MachineType?: string;
1669
+ /**
1670
+ * 适用GPU类型,如1080Ti、4090、V100、A800等,MachineType为G时必须提供
1671
+ */
1672
+ GPUType?: string;
1673
+ /**
1674
+ * k8s集群版本,如1.28.15
1675
+ */
1676
+ K8sVersion?: string;
1677
+ }
1678
+ /**
1679
+ * DescribeUK8SImage - 获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像
1680
+ */
1681
+ export interface DescribeUK8SImageResponse {
1682
+ /**
1683
+ * 虚拟机可用镜像集合, 详见ImageInfo 数组
1181
1684
  */
1182
1685
  ImageSet?: {
1183
1686
  /**
@@ -1196,9 +1699,33 @@ export interface DescribeUK8SImageResponse {
1196
1699
  * 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。
1197
1700
  */
1198
1701
  NotSupportGPU: boolean;
1702
+ /**
1703
+ * OS 类型
1704
+ */
1705
+ OsType: string;
1706
+ /**
1707
+ * OS 名称
1708
+ */
1709
+ OsName: string;
1710
+ /**
1711
+ * 镜像支持的特性
1712
+ */
1713
+ Features?: string[];
1714
+ /**
1715
+ * 镜像大小
1716
+ */
1717
+ ImageSize?: number;
1718
+ /**
1719
+ * 集成软件名称, 如NV驱动版本、cuda版本
1720
+ */
1721
+ IntegratedSoftware?: string;
1722
+ /**
1723
+ * 支持的GPU机型
1724
+ */
1725
+ SupportedGPUTypes?: string[];
1199
1726
  }[];
1200
1727
  /**
1201
- * 物理机可用镜像集合, 详见ImageInfo 数组
1728
+ * 裸金属可用镜像集合, 详见ImageInfo 数组
1202
1729
  */
1203
1730
  PHostImageSet?: {
1204
1731
  /**
@@ -1217,6 +1744,120 @@ export interface DescribeUK8SImageResponse {
1217
1744
  * 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。
1218
1745
  */
1219
1746
  NotSupportGPU: boolean;
1747
+ /**
1748
+ * OS 类型
1749
+ */
1750
+ OsType: string;
1751
+ /**
1752
+ * OS 名称
1753
+ */
1754
+ OsName: string;
1755
+ /**
1756
+ * 镜像支持的特性
1757
+ */
1758
+ Features?: string[];
1759
+ /**
1760
+ * 镜像大小
1761
+ */
1762
+ ImageSize?: number;
1763
+ /**
1764
+ * 集成软件名称, 如NV驱动版本、cuda版本
1765
+ */
1766
+ IntegratedSoftware?: string;
1767
+ /**
1768
+ * 支持的GPU机型
1769
+ */
1770
+ SupportedGPUTypes?: string[];
1771
+ }[];
1772
+ /**
1773
+ * 虚拟机自制可用镜像集合, 详见ImageInfo 数组
1774
+ */
1775
+ CustomImageSet?: {
1776
+ /**
1777
+ * 可用区 Id
1778
+ */
1779
+ ZoneId: number;
1780
+ /**
1781
+ * 镜像 Id
1782
+ */
1783
+ ImageId: string;
1784
+ /**
1785
+ * 镜像名称
1786
+ */
1787
+ ImageName: string;
1788
+ /**
1789
+ * 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。
1790
+ */
1791
+ NotSupportGPU: boolean;
1792
+ /**
1793
+ * OS 类型
1794
+ */
1795
+ OsType: string;
1796
+ /**
1797
+ * OS 名称
1798
+ */
1799
+ OsName: string;
1800
+ /**
1801
+ * 镜像支持的特性
1802
+ */
1803
+ Features?: string[];
1804
+ /**
1805
+ * 镜像大小
1806
+ */
1807
+ ImageSize?: number;
1808
+ /**
1809
+ * 集成软件名称, 如NV驱动版本、cuda版本
1810
+ */
1811
+ IntegratedSoftware?: string;
1812
+ /**
1813
+ * 支持的GPU机型
1814
+ */
1815
+ SupportedGPUTypes?: string[];
1816
+ }[];
1817
+ /**
1818
+ * 裸金属自制可用镜像集合, 详见ImageInfo 数组
1819
+ */
1820
+ CustomPHostImageSet?: {
1821
+ /**
1822
+ * 可用区 Id
1823
+ */
1824
+ ZoneId: number;
1825
+ /**
1826
+ * 镜像 Id
1827
+ */
1828
+ ImageId: string;
1829
+ /**
1830
+ * 镜像名称
1831
+ */
1832
+ ImageName: string;
1833
+ /**
1834
+ * 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。
1835
+ */
1836
+ NotSupportGPU: boolean;
1837
+ /**
1838
+ * OS 类型
1839
+ */
1840
+ OsType: string;
1841
+ /**
1842
+ * OS 名称
1843
+ */
1844
+ OsName: string;
1845
+ /**
1846
+ * 镜像支持的特性
1847
+ */
1848
+ Features?: string[];
1849
+ /**
1850
+ * 镜像大小
1851
+ */
1852
+ ImageSize?: number;
1853
+ /**
1854
+ * 集成软件名称, 如NV驱动版本、cuda版本
1855
+ */
1856
+ IntegratedSoftware?: string;
1857
+ /**
1858
+ * 支持的GPU机型
1859
+ */
1860
+ SupportedGPUTypes?: string[];
1220
1861
  }[];
1221
1862
  }
1222
1863
  /**
@@ -1435,6 +2076,10 @@ export interface ListUK8SClusterNodeV2Request {
1435
2076
  * UK8S集群ID
1436
2077
  */
1437
2078
  ClusterId: string;
2079
+ /**
2080
+ * 可传一个或多个节点id 不传或为空则返回所有节点
2081
+ */
2082
+ NodeIds?: string;
1438
2083
  }
1439
2084
  /**
1440
2085
  * ListUK8SClusterNodeV2 - 获取UK8S集群节点信息
@@ -1476,6 +2121,14 @@ export interface ListUK8SClusterNodeV2Response {
1476
2121
  * 机型类别,分别对应Uhost的MachineType或PHost的PHostType。
1477
2122
  */
1478
2123
  MachineType: string;
2124
+ /**
2125
+ * CPU平台
2126
+ */
2127
+ CPUPlatform: string;
2128
+ /**
2129
+ * 主机规格族
2130
+ */
2131
+ UHostFamily: string;
1479
2132
  /**
1480
2133
  * Node节点的操作系统类别,如Linux或Windows。
1481
2134
  */
@@ -1485,7 +2138,7 @@ export interface ListUK8SClusterNodeV2Response {
1485
2138
  */
1486
2139
  OsName: string;
1487
2140
  /**
1488
- * Node节点CPU核数,单位: 个。
2141
+ * Node节点CPU核数,单位: 核。
1489
2142
  */
1490
2143
  CPU: number;
1491
2144
  /**
@@ -1524,6 +2177,14 @@ export interface ListUK8SClusterNodeV2Response {
1524
2177
  * Mac地址
1525
2178
  */
1526
2179
  Mac?: string;
2180
+ /**
2181
+ * IP 协议类型
2182
+ */
2183
+ IPMode?: string;
2184
+ /**
2185
+ * 网络接口资源 ID
2186
+ */
2187
+ NetworkInterfaceId?: string;
1527
2188
  }[];
1528
2189
  /**
1529
2190
  * 节点创建时间
@@ -1554,10 +2215,102 @@ export interface ListUK8SClusterNodeV2Response {
1554
2215
  * 加节点时判断是否没有资源,如果返回NORESOURCE则代表没有资源了
1555
2216
  */
1556
2217
  NodeLogInfo: string;
2218
+ /**
2219
+ * 节点标签
2220
+ */
2221
+ Labels: string[];
2222
+ /**
2223
+ * Kubelet版本
2224
+ */
2225
+ KubeletVersion: string;
2226
+ /**
2227
+ * pod最大可用
2228
+ */
2229
+ MaxPod: number;
2230
+ /**
2231
+ * 内存最大可用
2232
+ */
2233
+ MaxMemory: number;
2234
+ /**
2235
+ * CPU最大可用
2236
+ */
2237
+ MaxCPU: number;
2238
+ /**
2239
+ * 已申请的pod
2240
+ */
2241
+ RequestPod: number;
2242
+ /**
2243
+ * 已申请的Memory
2244
+ */
2245
+ RequestMemory: number;
2246
+ /**
2247
+ * 已申请的CPU
2248
+ */
2249
+ RequestCPU: number;
2250
+ /**
2251
+ * Runtime 版本
2252
+ */
2253
+ RuntimeVersion: string;
2254
+ /**
2255
+ * Runtime 名字
2256
+ */
2257
+ RuntimeName: string;
2258
+ /**
2259
+ * 已使用的CPU
2260
+ */
2261
+ UsedCPU: number;
2262
+ /**
2263
+ * 已使用的Memory
2264
+ */
2265
+ UsedMemory: number;
2266
+ /**
2267
+ * 系统盘大小
2268
+ */
2269
+ BootDiskSize: number;
2270
+ /**
2271
+ * 数据盘大小,如果有多块数据盘会汇总展示,不包括PVC
2272
+ */
2273
+ DataDiskSize: number;
1557
2274
  /**
1558
2275
  * 节点的GPU颗数。
1559
2276
  */
1560
2277
  GPU?: number;
2278
+ /**
2279
+ * 节点池id
2280
+ */
2281
+ NodeGroupId?: string;
2282
+ /**
2283
+ * 边缘机房id
2284
+ */
2285
+ IDCId?: string;
2286
+ /**
2287
+ * 边缘机房
2288
+ */
2289
+ IDCName?: string;
2290
+ /**
2291
+ * 节点主机备注信息
2292
+ */
2293
+ Remark?: string;
2294
+ /**
2295
+ * 节点GPU型号(如果为GPU机型)
2296
+ */
2297
+ GPUType?: string;
2298
+ /**
2299
+ * 是否启用了容器镜像加速
2300
+ */
2301
+ ImageAccelable?: boolean;
2302
+ /**
2303
+ * 节点所属业务组
2304
+ */
2305
+ Tag?: string;
2306
+ /**
2307
+ * Pod CIDR
2308
+ */
2309
+ PodCIDR?: string;
2310
+ /**
2311
+ * 节点所属节点池名称
2312
+ */
2313
+ NodeGroupName?: string;
1561
2314
  }[];
1562
2315
  /**
1563
2316
  * 满足条件的节点数量,包括Master。
@@ -1617,6 +2370,10 @@ export interface ListUK8SClusterV2Response {
1617
2370
  * 服务网段
1618
2371
  */
1619
2372
  ServiceCIDR: string;
2373
+ /**
2374
+ * CNI网络模式
2375
+ */
2376
+ CNIMode: string;
1620
2377
  /**
1621
2378
  * Master 节点数量
1622
2379
  */
@@ -1629,6 +2386,35 @@ export interface ListUK8SClusterV2Response {
1629
2386
  * 集群版本
1630
2387
  */
1631
2388
  K8sVersion: string;
2389
+ /**
2390
+ * 删除保护开关。0表示不开启,1表示开启。默认不开启
2391
+ */
2392
+ DeleteProtection: number;
2393
+ /**
2394
+ * 容器运行时名称
2395
+ */
2396
+ RuntimeName: string;
2397
+ /**
2398
+ * 容器运行时版本号,docker 或 containerd 版本
2399
+ */
2400
+ RuntimeVersion: string;
2401
+ /**
2402
+ * 计费/管理形态,区分"专有版"和"托管版"两种售卖形态
2403
+ */
2404
+ ClusterType: string;
2405
+ /**
2406
+ * API Server 内部回环客户端证书
2407
+ */
2408
+ LoopbackClientCert: {
2409
+ /**
2410
+ * 证书到期时间
2411
+ */
2412
+ ExpireTime?: number;
2413
+ /**
2414
+ * 证书是否进入过期告警状态
2415
+ */
2416
+ Warn?: boolean;
2417
+ };
1632
2418
  /**
1633
2419
  * 创建集群时判断如果为NORESOURCE则为没资源,否则为空
1634
2420
  */
@@ -1650,6 +2436,10 @@ export interface ListUK8SClusterV2Response {
1650
2436
  */
1651
2437
  Status?: string;
1652
2438
  }[];
2439
+ /**
2440
+ * 总数
2441
+ */
2442
+ TotalCount?: number;
1653
2443
  }
1654
2444
  /**
1655
2445
  * ListUK8SNodeGroup - 列出UK8S节点池
@@ -1680,6 +2470,10 @@ export interface ListUK8SNodeGroupResponse {
1680
2470
  * 节点池名字
1681
2471
  */
1682
2472
  NodeGroupName?: string;
2473
+ /**
2474
+ * 自定义Uhost主机名前缀。完整的自定义Uhost主机名为{NodeNamePrefix}-{NodeIP}。
2475
+ */
2476
+ NodeNamePrefix?: string;
1683
2477
  /**
1684
2478
  * 镜像ID
1685
2479
  */
@@ -1692,6 +2486,10 @@ export interface ListUK8SNodeGroupResponse {
1692
2486
  * cpu平台
1693
2487
  */
1694
2488
  MinimalCpuPlatform?: string;
2489
+ /**
2490
+ * 主机规格族
2491
+ */
2492
+ UHostFamily?: string;
1695
2493
  /**
1696
2494
  * 虚拟CPU核数
1697
2495
  */
@@ -1747,7 +2545,7 @@ export interface ListUK8SNodeGroupResponse {
1747
2545
  /**
1748
2546
  * int默认110,生产环境建议小于等于110。
1749
2547
  */
1750
- MaxPods?: string;
2548
+ MaxPods?: number;
1751
2549
  /**
1752
2550
  * 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。
1753
2551
  */
@@ -1764,6 +2562,455 @@ export interface ListUK8SNodeGroupResponse {
1764
2562
  * Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game
1765
2563
  */
1766
2564
  Labels?: string;
2565
+ /**
2566
+ * Node所属的安全组id(最多5个)
2567
+ */
2568
+ SecGroupId?: {
2569
+ /**
2570
+ * 安全组名称
2571
+ */
2572
+ Id?: string;
2573
+ /**
2574
+ * 安全组id
2575
+ */
2576
+ Name?: string;
2577
+ /**
2578
+ * 安全组优先级
2579
+ */
2580
+ Priority?: string;
2581
+ }[];
2582
+ /**
2583
+ * 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。
2584
+ */
2585
+ SecurityMode?: string;
2586
+ /**
2587
+ * 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。
2588
+ */
2589
+ SecurityGroupId?: string;
2590
+ /**
2591
+ * Node节点网卡配置
2592
+ */
2593
+ NetworkInterface?: {
2594
+ /**
2595
+ * EIP
2596
+ */
2597
+ EIP?: {
2598
+ /**
2599
+ * 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800]
2600
+ */
2601
+ Bandwidth?: number;
2602
+ /**
2603
+ * 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth"
2604
+ */
2605
+ PayMode?: string;
2606
+ /**
2607
+ * 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效
2608
+ */
2609
+ ShareBandwidthId?: string;
2610
+ /**
2611
+ * 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International,BGP: Bgp。 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International
2612
+ */
2613
+ OperatorName?: string;
2614
+ /**
2615
+ * 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。
2616
+ */
2617
+ CouponId?: string;
2618
+ };
2619
+ }[];
2620
+ /**
2621
+ * KubeletConfiguration
2622
+ */
2623
+ KubeletConfiguration?: {
2624
+ /**
2625
+ * 最大日志文件数量
2626
+ */
2627
+ ContainerLogMaxFiles?: number;
2628
+ /**
2629
+ * 最大日志文件大小
2630
+ */
2631
+ ContainerLogMaxSize?: string;
2632
+ /**
2633
+ * 硬性驱逐条件,EvictionCondition类型
2634
+ */
2635
+ EvictionHard?: {
2636
+ /**
2637
+ * 内存相关驱逐条件或宽限时间。
2638
+ */
2639
+ MemoryAvailable?: string;
2640
+ /**
2641
+ * 镜像文件系统存储相关驱逐条件或宽限时间。
2642
+ */
2643
+ ImagefsAvailable?: string;
2644
+ /**
2645
+ * 节点存储余量相关驱逐条件或宽限时间。
2646
+ */
2647
+ NodefsAvailable?: string;
2648
+ /**
2649
+ * 节点剩余inodes驱逐条件或宽限时间。
2650
+ */
2651
+ NodefsInodesFree?: string;
2652
+ };
2653
+ /**
2654
+ * 软性驱逐条件,EvictionCondition类型
2655
+ */
2656
+ EvictionSoft?: {
2657
+ /**
2658
+ * 内存相关驱逐条件或宽限时间。
2659
+ */
2660
+ MemoryAvailable?: string;
2661
+ /**
2662
+ * 镜像文件系统存储相关驱逐条件或宽限时间。
2663
+ */
2664
+ ImagefsAvailable?: string;
2665
+ /**
2666
+ * 节点存储余量相关驱逐条件或宽限时间。
2667
+ */
2668
+ NodefsAvailable?: string;
2669
+ /**
2670
+ * 节点剩余inodes驱逐条件或宽限时间。
2671
+ */
2672
+ NodefsInodesFree?: string;
2673
+ };
2674
+ /**
2675
+ * 软性驱逐宽限时间,EvictionCondition类型
2676
+ */
2677
+ EvictionSoftGracePeriod?: {
2678
+ /**
2679
+ * 内存相关驱逐条件或宽限时间。
2680
+ */
2681
+ MemoryAvailable?: string;
2682
+ /**
2683
+ * 镜像文件系统存储相关驱逐条件或宽限时间。
2684
+ */
2685
+ ImagefsAvailable?: string;
2686
+ /**
2687
+ * 节点存储余量相关驱逐条件或宽限时间。
2688
+ */
2689
+ NodefsAvailable?: string;
2690
+ /**
2691
+ * 节点剩余inodes驱逐条件或宽限时间。
2692
+ */
2693
+ NodefsInodesFree?: string;
2694
+ };
2695
+ /**
2696
+ * 镜像垃圾收集阈值
2697
+ */
2698
+ ImageGCHighThresholdPercent?: number;
2699
+ /**
2700
+ * 停止镜像垃圾收集阈值
2701
+ */
2702
+ ImageGCLowThresholdPercent?: number;
2703
+ /**
2704
+ * kubelet预留资源,ReservedResource类型
2705
+ */
2706
+ KubeReserved?: {
2707
+ /**
2708
+ * CPU
2709
+ */
2710
+ CPU?: string;
2711
+ /**
2712
+ * 内存
2713
+ */
2714
+ Memory?: string;
2715
+ /**
2716
+ * 存储
2717
+ */
2718
+ EphemeralStorage?: string;
2719
+ /**
2720
+ * Pid
2721
+ */
2722
+ Pid?: string;
2723
+ };
2724
+ /**
2725
+ * 系统预留资源,ReservedResource类型
2726
+ */
2727
+ SystemReserved?: {
2728
+ /**
2729
+ * CPU
2730
+ */
2731
+ CPU?: string;
2732
+ /**
2733
+ * 内存
2734
+ */
2735
+ Memory?: string;
2736
+ /**
2737
+ * 存储
2738
+ */
2739
+ EphemeralStorage?: string;
2740
+ /**
2741
+ * Pid
2742
+ */
2743
+ Pid?: string;
2744
+ };
2745
+ /**
2746
+ * 最大Pod数量
2747
+ */
2748
+ MaxPods?: number;
2749
+ };
2750
+ /**
2751
+ * 镜像名称
2752
+ */
2753
+ ImageName?: string;
2754
+ /**
2755
+ * 镜像类型
2756
+ */
2757
+ ImageType?: string;
2758
+ /**
2759
+ * 操作系统类型
2760
+ */
2761
+ OsType?: string;
2762
+ /**
2763
+ * 操作系统名称
2764
+ */
2765
+ OsName?: string;
2766
+ /**
2767
+ * 网络配置
2768
+ */
2769
+ NetCapability?: string;
2770
+ /**
2771
+ * 是否启用 UNI 网络特性
2772
+ */
2773
+ UNIFeature?: boolean;
2774
+ /**
2775
+ * 磁盘列表
2776
+ */
2777
+ Disks?: {
2778
+ /**
2779
+ * 磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk
2780
+ */
2781
+ Type?: string;
2782
+ /**
2783
+ * 磁盘长ID
2784
+ */
2785
+ DiskId?: string;
2786
+ /**
2787
+ * UDisk名字(仅当磁盘是UDisk时返回)
2788
+ */
2789
+ Name?: string;
2790
+ /**
2791
+ * 磁盘盘符
2792
+ */
2793
+ Drive?: string;
2794
+ /**
2795
+ * 磁盘大小,单位: GB
2796
+ */
2797
+ Size?: number;
2798
+ /**
2799
+ * 备份方案,枚举类型:BASIC_SNAPSHOT,普通快照;DATAARK,方舟。无快照则不返回该字段。
2800
+ */
2801
+ BackupType?: string;
2802
+ /**
2803
+ * 当前主机的IOPS值
2804
+ */
2805
+ IOPS?: number;
2806
+ /**
2807
+ * Yes: 加密 No: 非加密
2808
+ */
2809
+ Encrypted?: string;
2810
+ /**
2811
+ * LOCAL_NOMAL| CLOUD_NORMAL| LOCAL_SSD| CLOUD_SSD|EXCLUSIVE_LOCAL_DISK
2812
+ */
2813
+ DiskType?: string;
2814
+ /**
2815
+ * True| False
2816
+ */
2817
+ IsBoot?: string;
2818
+ }[];
2819
+ /**
2820
+ * 节点池关联的弹性伸缩组ID
2821
+ */
2822
+ RelatedAsg?: string[];
2823
+ /**
2824
+ * 节点池创建时间
2825
+ */
2826
+ CreateTime?: number;
2827
+ /**
2828
+ * 节点池更新时间
2829
+ */
2830
+ UpdateTime?: number;
2831
+ }[];
2832
+ }
2833
+ /**
2834
+ * ListUK8SULSConfig - 查询 UK8S 的 ULSConfig
2835
+ */
2836
+ export interface ListUK8SULSConfigRequest {
2837
+ /**
2838
+ * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
2839
+ */
2840
+ Zone: string;
2841
+ /**
2842
+ * 日志服务中用于接收日志的目标 TopicId。
2843
+ */
2844
+ TopicID: string;
2845
+ /**
2846
+ * 集群 Id,如果不填,返回该账号该地域所有集群的 ULSConfig
2847
+ */
2848
+ ClusterId?: string;
2849
+ }
2850
+ /**
2851
+ * ListUK8SULSConfig - 查询 UK8S 的 ULSConfig
2852
+ */
2853
+ export interface ListUK8SULSConfigResponse {
2854
+ /**
2855
+ * 日志服务配置,见 ClusterLogConfig
2856
+ */
2857
+ LogConfig: {
2858
+ /**
2859
+ * uk8s集群id
2860
+ */
2861
+ ClusterId: string;
2862
+ /**
2863
+ * 机器组
2864
+ */
2865
+ MachineGroup: string;
2866
+ /**
2867
+ * 定义日志的提取、解析和格式化规则。见 ULSExtractRule
2868
+ */
2869
+ ExtractRule?: {
2870
+ /**
2871
+ * 采集策略。可选值: full (全量采集存量日志), increment (从当前时间点增量采集)。默认为 full。
2872
+ */
2873
+ CollectPolicy?: string;
2874
+ /**
2875
+ * 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。
2876
+ */
2877
+ Encode?: string;
2878
+ /**
2879
+ * 日志解析类型,决定了如何结构化日志。
2880
+ */
2881
+ LogType?: string;
2882
+ /**
2883
+ * 当 LogType 为delimiter_log 时可选,可选字段 ' ',' ','|',';',','
2884
+ */
2885
+ Delimiter?: string;
2886
+ /**
2887
+ * 行首正则表达式。当 logType 为多行模式 (如 multiline_log 或 multiline_fullregex_log) 时,用于标识一条新日志的开始。
2888
+ */
2889
+ BeginningRegex?: string;
2890
+ /**
2891
+ * 日志提取正则表达式。当 logType 为正则模式 (如 fullregex_log 或 multiline_fullregex_log) 时,用于从日志中提取字段。
2892
+ */
2893
+ LogRegex?: string;
2894
+ /**
2895
+ * 指定时间字段。
2896
+ */
2897
+ TimeKey?: string;
2898
+ /**
2899
+ * timeKey 对应的时间格式。如: %Y-%m-%d %H:%M:%S
2900
+ */
2901
+ TimeFormat?: string;
2902
+ /**
2903
+ * 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。
2904
+ */
2905
+ UnMatchUpload?: string;
2906
+ /**
2907
+ * 如果 unMatchUpload 为 true,无法解析的日志原文将被存放在此字段指定的 Key 下。默认为 LogParseFailure。
2908
+ */
2909
+ UnMatchKey?: string;
2910
+ };
2911
+ /**
2912
+ * 定义日志的输入来源(例如容器文件)。见 ULSInputDetail
2913
+ */
2914
+ InputDetail?: {
2915
+ /**
2916
+ * 采集路径,数组。
2917
+ */
2918
+ FilePaths?: {
2919
+ /**
2920
+ * 定义采集路径
2921
+ */
2922
+ Path?: string;
2923
+ /**
2924
+ * 采集文件
2925
+ */
2926
+ File?: string;
2927
+ }[];
2928
+ /**
2929
+ * 日志输入类型。当前主要支持 container_file,表示采集容器标准输出或文件。
2930
+ */
2931
+ Type?: string;
2932
+ /**
2933
+ * 定义哪些容器相关的元数据需要附加到日志中。
2934
+ */
2935
+ InputMetadata?: {
2936
+ /**
2937
+ * 指定具体要采集元数据的容器名。如果留空,则不采集容器的元数据,可选字段:container_name,namespace,pod_name,pod_ip,pod_uid,container_id,image_name。Pod Label 元数据通过指定 InputDetail.Metadata.Labels 字段。
2938
+ */
2939
+ Container?: string;
2940
+ /**
2941
+ * 定义要采集哪些 Pod 的标签 (Labels)。可选值:*:采集所有标签。app,version:仅采集 app 和 version 这两个标签。""(空字符串):不采集任何标签。
2942
+ */
2943
+ Labels?: string;
2944
+ };
2945
+ };
2946
+ /**
2947
+ * 定义此采集规则要匹配的目标 Pod 或工作负载。见 ULSMatchRule
2948
+ */
2949
+ MatchRule?: {
2950
+ /**
2951
+ * 容器名称匹配操作符。支持:in(包含),notin(不包含)
2952
+ */
2953
+ ContainerOperator: string;
2954
+ /**
2955
+ * 要匹配的容器名称,*表示所有容器,用逗号分隔
2956
+ */
2957
+ Container: string;
2958
+ /**
2959
+ * 按工作负载进行匹配。
2960
+ */
2961
+ Workloads?: {
2962
+ /**
2963
+ * 工作负载所在的命名空间。
2964
+ */
2965
+ Namespace?: string;
2966
+ /**
2967
+ * 工作负载的类型,例如 deployment, statefulset, daemonset,cronjob,job。
2968
+ */
2969
+ Type?: string;
2970
+ /**
2971
+ * 工作负载的名称。
2972
+ */
2973
+ Name?: string;
2974
+ }[];
2975
+ /**
2976
+ * 按 Pod 的标签进行匹配,提供更灵活的选择。
2977
+ */
2978
+ PodLabels?: {
2979
+ /**
2980
+ * 命名空间名称的匹配操作符。可选值: in, notin。
2981
+ */
2982
+ NamespaceOperator?: string;
2983
+ /**
2984
+ * 要匹配的命名空间。namespaceOperator 存在时必需。
2985
+ */
2986
+ Namespace?: string;
2987
+ /**
2988
+ * 一个标签选择器数组,用于定义匹配的标签条件。
2989
+ */
2990
+ Labels?: {
2991
+ /**
2992
+ * 要匹配的标签的 Key。
2993
+ */
2994
+ Key?: string;
2995
+ /**
2996
+ * 标签值的匹配操作符。可选值: in, notin。
2997
+ */
2998
+ ValueOperator?: string;
2999
+ /**
3000
+ * 要匹配的标签的值。
3001
+ */
3002
+ Value?: string;
3003
+ }[];
3004
+ };
3005
+ };
3006
+ /**
3007
+ * 日志服务中用于接收日志的目标 Topic ID。
3008
+ */
3009
+ TopicID?: string;
3010
+ /**
3011
+ * 采集配置规则名称
3012
+ */
3013
+ Name?: string;
1767
3014
  }[];
1768
3015
  }
1769
3016
  /**
@@ -1784,3 +3031,189 @@ export interface RemoveUK8SNodeGroupRequest {
1784
3031
  */
1785
3032
  export interface RemoveUK8SNodeGroupResponse {
1786
3033
  }
3034
+ /**
3035
+ * UpdateUK8SULSConfig - 更新指定UK8S集群的日志采集规则。
3036
+ */
3037
+ export interface UpdateUK8SULSConfigRequest {
3038
+ /**
3039
+ * 可用区。参见地域和可用区列表:https://docs.ucloud.cn/api/summary/regionlist
3040
+ */
3041
+ Zone: string;
3042
+ /**
3043
+ * 要修改的日志采集规则名称。名称长度不能超过253个字符,只能包含小写字母、数字、破折号和点,并且必须以字母或数字开头和结尾。
3044
+ */
3045
+ Name: string;
3046
+ /**
3047
+ * UK8S集群ID。
3048
+ */
3049
+ ClusterId: string;
3050
+ /**
3051
+ * 日志服务中用于接收日志的目标Topic ID。不填写时保持原Topic ID不变。
3052
+ */
3053
+ TopicID?: string;
3054
+ /**
3055
+ *
3056
+ */
3057
+ ExtractRule?: {
3058
+ /**
3059
+ * 采集策略。可选值:full(全量采集存量日志)、increment(从当前时间点增量采集)。默认为full。
3060
+ */
3061
+ CollectPolicy?: string;
3062
+ /**
3063
+ * 日志原文的编码格式。可选值:utf-8、gbk。默认为utf-8。
3064
+ */
3065
+ Encode?: string;
3066
+ /**
3067
+ * 日志解析类型。可选值:json、delimiter、full_regex、multi_line_full_regex、multi_line_delimiter、minimal_list、multi_line。
3068
+ */
3069
+ LogType: string;
3070
+ /**
3071
+ * 行首正则表达式。multi_line、multi_line_full_regex或multi_line_delimiter模式下,BeginningRegex和BeginningRegexBase64必须至少填写一个。
3072
+ */
3073
+ BeginningRegex?: string;
3074
+ /**
3075
+ * Base64编码的行首正则表达式。填写时优先于BeginningRegex。
3076
+ */
3077
+ BeginningRegexBase64?: string;
3078
+ /**
3079
+ * 日志提取正则表达式。full_regex或multi_line_full_regex模式下,LogRegex和LogRegexBase64必须至少填写一个。
3080
+ */
3081
+ LogRegex?: string;
3082
+ /**
3083
+ * Base64编码的日志提取正则表达式。填写时优先于LogRegex。
3084
+ */
3085
+ LogRegexBase64?: string;
3086
+ /**
3087
+ * 分隔符。delimiter或multi_line_delimiter模式下可用。可选值:space、tab、|、;、,。
3088
+ */
3089
+ Delimiter?: string;
3090
+ /**
3091
+ * Base64编码的分隔符。填写时优先于Delimiter。
3092
+ */
3093
+ DelimiterBase64?: string;
3094
+ /**
3095
+ * 包含日志时间的字段名。
3096
+ */
3097
+ TimeKey?: string;
3098
+ /**
3099
+ * TimeKey对应的时间格式。json、full_regex或multi_line_full_regex模式下,填写TimeKey时必须同时填写TimeFormat。
3100
+ */
3101
+ TimeFormat?: string;
3102
+ /**
3103
+ * 是否上传解析失败的日志。字符串true表示上传,false表示丢弃。默认为false。
3104
+ */
3105
+ UnMatchUpload?: string;
3106
+ /**
3107
+ * 存放无法解析的日志原文的Key。UnMatchUpload为true时必须填写。
3108
+ */
3109
+ UnMatchKey?: string;
3110
+ /**
3111
+ * 提取后的字段名。仅适用于delimiter、full_regex、multi_line_full_regex和multi_line_delimiter。
3112
+ */
3113
+ Keys?: string[];
3114
+ };
3115
+ /**
3116
+ *
3117
+ */
3118
+ InputDetail?: {
3119
+ /**
3120
+ * 日志输入类型。可选值:container_file、container_stdout。
3121
+ */
3122
+ Type: string;
3123
+ /**
3124
+ * 容器标准输出流类型。仅适用于container_stdout,可选值:all、stdout、stderr,默认为all。
3125
+ */
3126
+ Stream?: string;
3127
+ /**
3128
+ *
3129
+ */
3130
+ Metadata?: {
3131
+ /**
3132
+ * 要附加到日志中的容器元数据字段,多个字段使用逗号分隔。可选字段:container_name、namespace、pod_name、pod_ip、pod_uid、container_id、image_name。留空表示不采集容器元数据。
3133
+ */
3134
+ Container?: string;
3135
+ /**
3136
+ * 要采集的Pod标签。*表示采集所有标签,app,version表示仅采集指定标签,空字符串表示不采集标签。
3137
+ */
3138
+ Labels?: string;
3139
+ };
3140
+ /**
3141
+ *
3142
+ */
3143
+ FilePaths?: {
3144
+ /**
3145
+ * 日志采集路径。仅适用于container_file。
3146
+ */
3147
+ Path?: string;
3148
+ /**
3149
+ * 要采集的文件名。仅适用于container_file。
3150
+ */
3151
+ File?: string;
3152
+ }[];
3153
+ };
3154
+ /**
3155
+ *
3156
+ */
3157
+ MatchRule?: {
3158
+ /**
3159
+ * 要匹配的容器名称,*表示所有容器,多个名称使用逗号分隔。
3160
+ */
3161
+ Container?: string;
3162
+ /**
3163
+ * 容器名称匹配操作符。可选值:in、notin。填写该参数时必须同时填写MatchRule.Container。
3164
+ */
3165
+ ContainerOperator?: string;
3166
+ /**
3167
+ *
3168
+ */
3169
+ Workloads?: {
3170
+ /**
3171
+ * 按工作负载匹配时,工作负载所在的命名空间。Workloads和PodLabels不能同时设置。
3172
+ */
3173
+ Namespace?: string;
3174
+ /**
3175
+ * 工作负载类型。可选值:deployment、statefulset、daemonset、job、cronjob。
3176
+ */
3177
+ Type?: string;
3178
+ /**
3179
+ * 工作负载名称。
3180
+ */
3181
+ Name?: string;
3182
+ }[];
3183
+ /**
3184
+ *
3185
+ */
3186
+ PodLabels?: {
3187
+ /**
3188
+ * 按Pod标签匹配时,命名空间名称的匹配操作符。可选值:in、notin。填写该参数时必须同时填写MatchRule.PodLabels.Namespace。PodLabels和Workloads不能同时设置。
3189
+ */
3190
+ NamespaceOperator?: string;
3191
+ /**
3192
+ * 按Pod标签匹配时要匹配的命名空间。
3193
+ */
3194
+ Namespace?: string;
3195
+ /**
3196
+ *
3197
+ */
3198
+ Labels?: {
3199
+ /**
3200
+ * 按Pod标签匹配时,要匹配的标签Key。
3201
+ */
3202
+ Key?: string;
3203
+ /**
3204
+ * 标签值匹配操作符。可选值:in、notin。
3205
+ */
3206
+ ValueOperator?: string;
3207
+ /**
3208
+ * 要匹配的标签值。
3209
+ */
3210
+ Value?: string;
3211
+ }[];
3212
+ };
3213
+ };
3214
+ }
3215
+ /**
3216
+ * UpdateUK8SULSConfig - 更新指定UK8S集群的日志采集规则。
3217
+ */
3218
+ export interface UpdateUK8SULSConfigResponse {
3219
+ }