tccli 3.0.1147.1__py2.py3-none-any.whl → 3.0.1148.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/aiart_client.py +53 -0
  3. tccli/services/aiart/v20221229/api.json +80 -0
  4. tccli/services/aiart/v20221229/examples.json +8 -0
  5. tccli/services/asr/v20190614/api.json +6 -6
  6. tccli/services/clb/v20180317/api.json +1 -1
  7. tccli/services/dcdb/v20180411/api.json +2 -0
  8. tccli/services/dnspod/v20210323/api.json +9 -0
  9. tccli/services/lighthouse/v20200324/api.json +33 -31
  10. tccli/services/lighthouse/v20200324/examples.json +3 -3
  11. tccli/services/lke/lke_client.py +53 -0
  12. tccli/services/lke/v20231130/api.json +160 -1
  13. tccli/services/lke/v20231130/examples.json +8 -0
  14. tccli/services/mna/mna_client.py +485 -8
  15. tccli/services/mna/v20210119/api.json +743 -21
  16. tccli/services/mna/v20210119/examples.json +72 -0
  17. tccli/services/mps/v20190612/api.json +31 -10
  18. tccli/services/tdmq/v20200217/api.json +8 -8
  19. tccli/services/tdmq/v20200217/examples.json +1 -1
  20. tccli/services/tke/v20180525/api.json +3 -3
  21. tccli/services/tsf/tsf_client.py +110 -4
  22. tccli/services/tsf/v20180326/api.json +142 -0
  23. tccli/services/tsf/v20180326/examples.json +16 -0
  24. tccli/services/vpc/v20170312/api.json +1 -1
  25. {tccli-3.0.1147.1.dist-info → tccli-3.0.1148.1.dist-info}/METADATA +2 -2
  26. {tccli-3.0.1147.1.dist-info → tccli-3.0.1148.1.dist-info}/RECORD +29 -29
  27. {tccli-3.0.1147.1.dist-info → tccli-3.0.1148.1.dist-info}/WHEEL +0 -0
  28. {tccli-3.0.1147.1.dist-info → tccli-3.0.1148.1.dist-info}/entry_points.txt +0 -0
  29. {tccli-3.0.1147.1.dist-info → tccli-3.0.1148.1.dist-info}/license_files/LICENSE +0 -0
@@ -16,6 +16,14 @@
16
16
  "title": "新建设备"
17
17
  }
18
18
  ],
19
+ "AddGroup": [
20
+ {
21
+ "document": "",
22
+ "input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddGroup\n<公共请求参数>\n\n{\n \"GroupName\": \"xxx\",\n \"Description\": \"xxx\"\n}",
23
+ "output": "{\n \"Response\": {\n \"RequestId\": \"xxx\",\n \"GroupId\": \"1a2b3c4d5e\"\n }\n}",
24
+ "title": "示例1"
25
+ }
26
+ ],
19
27
  "AddHardware": [
20
28
  {
21
29
  "document": "批量新建硬件设备",
@@ -48,6 +56,14 @@
48
56
  "title": "删除设备接口"
49
57
  }
50
58
  ],
59
+ "DeleteGroup": [
60
+ {
61
+ "document": "",
62
+ "input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteGroup\n<公共请求参数>\n\n{\n \"GroupId\": \"xxx\"\n}",
63
+ "output": "{\n \"Response\": {\n \"RequestId\": \"xxx\"\n }\n}",
64
+ "title": "示例1"
65
+ }
66
+ ],
51
67
  "DeleteQos": [
52
68
  {
53
69
  "document": "",
@@ -126,6 +142,30 @@
126
142
  "title": "根据分组获取用量统计信息"
127
143
  }
128
144
  ],
145
+ "GetFlowStatisticByRegion": [
146
+ {
147
+ "document": "",
148
+ "input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetFlowStatisticByRegion\n<公共请求参数>\n\n{\n \"BeginTime\": 0,\n \"EndTime\": 0,\n \"Type\": 0,\n \"TimeGranularity\": 0,\n \"AccessRegion\": \"MC\",\n \"GatewayType\": 0\n}",
149
+ "output": "{\n \"Response\": {\n \"NetDetails\": [\n {\n \"Current\": 0,\n \"Time\": \"abc\"\n }\n ],\n \"MaxValue\": 0,\n \"AvgValue\": 0,\n \"TotalValue\": 0,\n \"RequestId\": \"abc\"\n }\n}",
150
+ "title": "正常场景"
151
+ }
152
+ ],
153
+ "GetGroupDetail": [
154
+ {
155
+ "document": "",
156
+ "input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetGroupDetail\n<公共请求参数>\n\n{\n \"GroupId\": \"xxx\",\n \"PageSize\": \"10\",\n \"PageNumber\": \"1\"\n}",
157
+ "output": "{\n \"Response\": {\n \"GroupInfo\": {\n \"GroupId\": \"abc\",\n \"GroupName\": \"abc\",\n \"CreateTime\": \"abc\",\n \"UpdateTime\": \"abc\",\n \"Description\": \"abc\",\n \"DeviceNum\": 0\n },\n \"DeviceInfos\": [\n {\n \"DeviceId\": \"abc\",\n \"DeviceName\": \"abc\",\n \"CreateTime\": \"abc\",\n \"LastTime\": \"abc\",\n \"Remark\": \"abc\",\n \"AccessScope\": 0,\n \"LicensePayMode\": 0,\n \"Payer\": 0,\n \"GroupId\": \"abc\",\n \"GroupName\": \"abc\"\n }\n ],\n \"Length\": 0,\n \"TotalPage\": 0,\n \"RequestId\": \"abc\"\n }\n}",
158
+ "title": "示例1"
159
+ }
160
+ ],
161
+ "GetGroupList": [
162
+ {
163
+ "document": "",
164
+ "input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetGroupList\n<公共请求参数>\n\n{\n \"PageSize\": \"10\",\n \"PageNumber\": \"1\",\n \"Keyword\": \"test\"\n}",
165
+ "output": "{\n \"Response\": {\n \"GroupInfos\": [\n {\n \"GroupId\": \"abc\",\n \"GroupName\": \"abc\",\n \"CreateTime\": \"abc\",\n \"UpdateTime\": \"abc\",\n \"Description\": \"abc\",\n \"DeviceNum\": 5\n }\n ],\n \"Length\": 0,\n \"TotalPage\": 0,\n \"RequestId\": \"abc\"\n }\n}",
166
+ "title": "示例1"
167
+ }
168
+ ],
129
169
  "GetHardwareList": [
130
170
  {
131
171
  "document": "硬件信息列表",
@@ -186,6 +226,22 @@
186
226
  "title": "获取厂商设备列表"
187
227
  }
188
228
  ],
229
+ "GroupAddDevice": [
230
+ {
231
+ "document": "",
232
+ "input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GroupAddDevice\n<公共请求参数>\n\n{\n \"DeviceList\": [\n \"mna-test1\",\n \"mna-test2\"\n ],\n \"GroupId\": \"xxx\"\n}",
233
+ "output": "{\n \"Response\": {\n \"DeviceNum\": 5,\n \"RequestId\": \"abc\"\n }\n}",
234
+ "title": "示例1"
235
+ }
236
+ ],
237
+ "GroupDeleteDevice": [
238
+ {
239
+ "document": "",
240
+ "input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GroupDeleteDevice\n<公共请求参数>\n\n{\n \"DeviceList\": [\n \"mna-test1\",\n \"mna-test2\"\n ],\n \"GroupId\": \"xxx\"\n}",
241
+ "output": "{\n \"Response\": {\n \"DeviceNum\": 5,\n \"RequestId\": \"abc\"\n }\n}",
242
+ "title": "示例1"
243
+ }
244
+ ],
189
245
  "ModifyPackageRenewFlag": [
190
246
  {
191
247
  "document": "",
@@ -202,6 +258,14 @@
202
258
  "title": "示例1"
203
259
  }
204
260
  ],
261
+ "SetNotifyUrl": [
262
+ {
263
+ "document": "",
264
+ "input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SetNotifyUrl\n<公共请求参数>\n\n{\n \"AlarmValue\": 20,\n \"NotifyUrl\": \"http://ip:port/callurl\",\n \"CallbackKey\": \"xd23y5cb89bx23432\"\n}",
265
+ "output": "{\n \"Response\": {\n \"RequestId\": \"1206563f-f13f-4647-aaa8-37fa86954cc4-1\"\n }\n}",
266
+ "title": "示例1"
267
+ }
268
+ ],
205
269
  "UpdateDevice": [
206
270
  {
207
271
  "document": "更新设备",
@@ -210,6 +274,14 @@
210
274
  "title": "更新设备"
211
275
  }
212
276
  ],
277
+ "UpdateGroup": [
278
+ {
279
+ "document": "",
280
+ "input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateGroup\n<公共请求参数>\n\n{\n \"GroupId\": \"xxx\",\n \"Description\": \"xxx\"\n}",
281
+ "output": "{\n \"Response\": {\n \"RequestId\": \"xxx\"\n }\n}",
282
+ "title": "示例1"
283
+ }
284
+ ],
213
285
  "UpdateHardware": [
214
286
  {
215
287
  "document": "更新硬件信息",
@@ -17044,52 +17044,62 @@
17044
17044
  {
17045
17045
  "disabled": false,
17046
17046
  "document": "识别的物体名称。",
17047
- "example": "",
17047
+ "example": "",
17048
17048
  "member": "string",
17049
17049
  "name": "Name",
17050
- "required": true,
17050
+ "output_required": true,
17051
17051
  "type": "string",
17052
17052
  "value_allowed_null": false
17053
17053
  },
17054
17054
  {
17055
17055
  "disabled": false,
17056
17056
  "document": "识别片段起始的 PTS 时间,单位:秒。",
17057
- "example": "",
17057
+ "example": "",
17058
17058
  "member": "float",
17059
17059
  "name": "StartPtsOffset",
17060
- "required": true,
17060
+ "output_required": true,
17061
17061
  "type": "float",
17062
17062
  "value_allowed_null": false
17063
17063
  },
17064
17064
  {
17065
17065
  "disabled": false,
17066
17066
  "document": "识别片段终止的 PTS 时间,单位:秒。",
17067
- "example": "",
17067
+ "example": "",
17068
17068
  "member": "float",
17069
17069
  "name": "EndPtsOffset",
17070
- "required": true,
17070
+ "output_required": true,
17071
17071
  "type": "float",
17072
17072
  "value_allowed_null": false
17073
17073
  },
17074
17074
  {
17075
17075
  "disabled": false,
17076
17076
  "document": "识别片段置信度。取值:0~100。",
17077
- "example": "",
17077
+ "example": "",
17078
17078
  "member": "float",
17079
17079
  "name": "Confidence",
17080
- "required": true,
17080
+ "output_required": true,
17081
17081
  "type": "float",
17082
17082
  "value_allowed_null": false
17083
17083
  },
17084
17084
  {
17085
17085
  "disabled": false,
17086
17086
  "document": "识别结果的区域坐标。数组包含 4 个元素 [x1,y1,x2,y2],依次表示区域左上点、右下点的横纵坐标。",
17087
- "example": "",
17087
+ "example": "",
17088
17088
  "member": "int64",
17089
17089
  "name": "AreaCoordSet",
17090
- "required": true,
17090
+ "output_required": true,
17091
17091
  "type": "list",
17092
17092
  "value_allowed_null": false
17093
+ },
17094
+ {
17095
+ "disabled": false,
17096
+ "document": "截图链接。\n注意:此字段可能返回 null,表示取不到有效值。",
17097
+ "example": "无",
17098
+ "member": "string",
17099
+ "name": "Url",
17100
+ "output_required": false,
17101
+ "type": "string",
17102
+ "value_allowed_null": true
17093
17103
  }
17094
17104
  ],
17095
17105
  "usage": "out"
@@ -17428,6 +17438,17 @@
17428
17438
  "required": false,
17429
17439
  "type": "string",
17430
17440
  "value_allowed_null": false
17441
+ },
17442
+ {
17443
+ "disabled": false,
17444
+ "document": "用于生成回调签名的 Key。\n注意:此字段可能返回 null,表示取不到有效值。",
17445
+ "example": "无",
17446
+ "member": "string",
17447
+ "name": "NotifyKey",
17448
+ "output_required": false,
17449
+ "required": false,
17450
+ "type": "string",
17451
+ "value_allowed_null": true
17431
17452
  }
17432
17453
  ],
17433
17454
  "usage": "both"
@@ -890,7 +890,7 @@
890
890
  "status": "online"
891
891
  },
892
892
  "ReceiveMessage": {
893
- "document": "当前 ReceiveMessage 接口只支持 Partitioned 类型的 Topic。该接口用于接收发送到指定 Partitioned Topic 中的消息,当 Partitioned Topic 中没有消息但还去尝试调用该接口时,会抛出 ReceiveTimeout 的异常。\n\n如何使用 BatchReceivePolicy:\n\nBatchReceive 接口提供了如下三个参数:\n\n● MaxNumMessages: 即每次使用 BatchReceive 的时候,最多一次Receive接口返回多少条消息。\n● MaxNumBytes:即每次使用 BatchReceive 的时候,最多一次Receive接口返回多大内容的消息,单位是:bytes。\n● Timeout:即每次使用 BatchReceive 的时候,最多一次 Receive 接口的超时时间是多久,单位是:MS。\n\n默认如果上述三个参数都不指定,即关闭 BatchReceive 的特性。如果三个参数中的任意一个参数指定的数值大于 0,即开启 BatchReceive。BatchReceive 的结束条件为到达上述三个参数中任意一个指定的阈值。\n\n注意:MaxNumMessages 和 MaxNumBytes 每一次接收的最大消息同时受限于 ReceiveQueueSize 的大小,如果 ReceiveQueueSize 的大小设置为 5,MaxNumMessages 设置为10,那么一次 BatchReceive 接收的最多的消息是 5条,而不是10条。\n\n\n\nBatchReceivePolicy 的接口会一次性返回多条消息:\n\n1. 多条消息的内容之间使用特殊字符 '###' 来进行分割,业务侧接收到消息之后,可以利用不同语言提供的 Split 工具分割不同的消息。\n2. 多条消息的 MessageID 之间使用特殊字符 '###' 来进行分割,业务侧接收到消息之后,可以利用不同语言提供的 Split 工具分割不同的消息。(用于在调用 AcknowledgeMessage 接口中填入所需要的 MessageID 字段信息)\n",
893
+ "document": "当前 ReceiveMessage 接口只支持 Partitioned 类型的 Topic。该接口用于接收发送到指定 Partitioned Topic 中的消息,当 Partitioned Topic 中没有消息但还去尝试调用该接口时,会抛出 ReceiveTimeout 的异常。\n\n如何使用 BatchReceivePolicy:\n\nBatchReceive 接口提供了如下三个参数:\n\n● MaxNumMessages: 即每次使用 BatchReceive 的时候,最多一次Receive接口返回多少条消息。\n● MaxNumBytes:即每次使用 BatchReceive 的时候,最多一次Receive接口返回多大内容的消息,单位是:bytes。\n● Timeout:即每次使用 BatchReceive 的时候,最多一次 Receive 接口的超时时间是多久,单位是:MS。\n\n默认如果上述三个参数都不指定,即关闭 BatchReceive 的特性。如果三个参数中的任意一个参数指定的数值大于 0,即开启 BatchReceive。BatchReceive 的结束条件为到达上述三个参数中任意一个指定的阈值。\n\n注意:MaxNumMessages 和 MaxNumBytes 每一次接收的最大消息同时受限于 ReceiveQueueSize 的大小,如果 ReceiveQueueSize 的大小设置为 5,MaxNumMessages 设置为10,那么一次 BatchReceive 接收的最多的消息是 5条,而不是10条。\n\n\n\nBatchReceivePolicy 的接口会一次性返回多条消息:\n\n1. 多条消息的内容之间使用特殊字符 '###' 来进行分割,业务侧接收到消息之后,可以利用不同语言提供的 Split 工具分割不同的消息。\n2. 多条消息的 MessageID 之间使用特殊字符 '###' 来进行分割,业务侧接收到消息之后,可以利用不同语言提供的 Split 工具分割不同的消息。(用于在调用 AcknowledgeMessage 接口中填入所需要的 MessageID 字段信息)",
894
894
  "input": "ReceiveMessageRequest",
895
895
  "name": "接收消息",
896
896
  "output": "ReceiveMessageResponse",
@@ -15937,7 +15937,7 @@
15937
15937
  "example": "{\"Response\":{\"MessageId\":\"26365:1475:0\"}}",
15938
15938
  "member": "string",
15939
15939
  "name": "MessageID",
15940
- "required": true,
15940
+ "output_required": true,
15941
15941
  "type": "string",
15942
15942
  "value_allowed_null": false
15943
15943
  },
@@ -15947,7 +15947,7 @@
15947
15947
  "example": "my-payload",
15948
15948
  "member": "string",
15949
15949
  "name": "MessagePayload",
15950
- "required": true,
15950
+ "output_required": true,
15951
15951
  "type": "string",
15952
15952
  "value_allowed_null": false
15953
15953
  },
@@ -15957,7 +15957,7 @@
15957
15957
  "example": "my-topic",
15958
15958
  "member": "string",
15959
15959
  "name": "AckTopic",
15960
- "required": true,
15960
+ "output_required": true,
15961
15961
  "type": "string",
15962
15962
  "value_allowed_null": false
15963
15963
  },
@@ -15967,7 +15967,7 @@
15967
15967
  "example": "sssss",
15968
15968
  "member": "string",
15969
15969
  "name": "ErrorMsg",
15970
- "required": true,
15970
+ "output_required": true,
15971
15971
  "type": "string",
15972
15972
  "value_allowed_null": true
15973
15973
  },
@@ -15977,7 +15977,7 @@
15977
15977
  "example": "my-sub",
15978
15978
  "member": "string",
15979
15979
  "name": "SubName",
15980
- "required": true,
15980
+ "output_required": true,
15981
15981
  "type": "string",
15982
15982
  "value_allowed_null": true
15983
15983
  },
@@ -15987,7 +15987,7 @@
15987
15987
  "example": " \"71:12:0:0###71:13:0:0###71:16:0:0\"",
15988
15988
  "member": "string",
15989
15989
  "name": "MessageIDList",
15990
- "required": true,
15990
+ "output_required": true,
15991
15991
  "type": "string",
15992
15992
  "value_allowed_null": true
15993
15993
  },
@@ -15997,7 +15997,7 @@
15997
15997
  "example": "\"hello-1###hello-2###hello-3\"",
15998
15998
  "member": "string",
15999
15999
  "name": "MessagesPayload",
16000
- "required": true,
16000
+ "output_required": true,
16001
16001
  "type": "string",
16002
16002
  "value_allowed_null": true
16003
16003
  },
@@ -1056,7 +1056,7 @@
1056
1056
  {
1057
1057
  "document": "",
1058
1058
  "input": "POST / HTTP/1.1\nHost: tdmq.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ReceiveMessage\n<公共请求参数>\n\n{\n \"Topic\": \"tenant/namespace/topic\",\n \"SubscriptionName\": \"\\\"test-sub\\\"\"\n}",
1059
- "output": "{\n \"Response\": {\n \"RequestId\": \"36713f94-d07d-4b96-babf-42d139276f23\",\n \"MessageID\": \"71:12:0:0\",\n \"MessageIDList\": \"\",\n \"MessagesPayload\": \"\",\n \"MessagePayload\": \"hello TDMQ\",\n \"SubName\": \"xx\",\n \"AckTopic\": \"persistent://tenant/namespace/topic\",\n \"ErrorMsg\": \"xx\"\n }\n}",
1059
+ "output": "{\n \"Response\": {\n \"MessageID\": \"abc\",\n \"MessagePayload\": \"abc\",\n \"AckTopic\": \"abc\",\n \"ErrorMsg\": \"abc\",\n \"SubName\": \"abc\",\n \"MessageIDList\": \"abc\",\n \"MessagesPayload\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
1060
1060
  "title": "接收消息"
1061
1061
  }
1062
1062
  ],
@@ -8317,7 +8317,7 @@
8317
8317
  "example": "[\"1.14.1\",\"1.16.1\"]",
8318
8318
  "member": "string",
8319
8319
  "name": "Versions",
8320
- "required": true,
8320
+ "output_required": true,
8321
8321
  "type": "list",
8322
8322
  "value_allowed_null": false
8323
8323
  },
@@ -8327,7 +8327,7 @@
8327
8327
  "example": "1.0.1",
8328
8328
  "member": "string",
8329
8329
  "name": "EdgeVersionLatest",
8330
- "required": true,
8330
+ "output_required": true,
8331
8331
  "type": "string",
8332
8332
  "value_allowed_null": true
8333
8333
  },
@@ -8337,7 +8337,7 @@
8337
8337
  "example": "1.0.1",
8338
8338
  "member": "string",
8339
8339
  "name": "EdgeVersionCurrent",
8340
- "required": true,
8340
+ "output_required": true,
8341
8341
  "type": "string",
8342
8342
  "value_allowed_null": true
8343
8343
  },
@@ -7505,6 +7505,58 @@ def doDescribePathRewrites(args, parsed_globals):
7505
7505
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
7506
7506
 
7507
7507
 
7508
+ def doDescribeGatewayApis(args, parsed_globals):
7509
+ g_param = parse_global_arg(parsed_globals)
7510
+
7511
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
7512
+ cred = credential.CVMRoleCredential()
7513
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
7514
+ cred = credential.STSAssumeRoleCredential(
7515
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
7516
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
7517
+ )
7518
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
7519
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
7520
+ else:
7521
+ cred = credential.Credential(
7522
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
7523
+ )
7524
+ http_profile = HttpProfile(
7525
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
7526
+ reqMethod="POST",
7527
+ endpoint=g_param[OptionsDefine.Endpoint],
7528
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
7529
+ )
7530
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
7531
+ if g_param[OptionsDefine.Language]:
7532
+ profile.language = g_param[OptionsDefine.Language]
7533
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
7534
+ client = mod.TsfClient(cred, g_param[OptionsDefine.Region], profile)
7535
+ client._sdkVersion += ("_CLI_" + __version__)
7536
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
7537
+ model = models.DescribeGatewayApisRequest()
7538
+ model.from_json_string(json.dumps(args))
7539
+ start_time = time.time()
7540
+ while True:
7541
+ rsp = client.DescribeGatewayApis(model)
7542
+ result = rsp.to_json_string()
7543
+ try:
7544
+ json_obj = json.loads(result)
7545
+ except TypeError as e:
7546
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
7547
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
7548
+ break
7549
+ cur_time = time.time()
7550
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
7551
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
7552
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
7553
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
7554
+ else:
7555
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
7556
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
7557
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
7558
+
7559
+
7508
7560
  def doDescribeDeliveryConfigs(args, parsed_globals):
7509
7561
  g_param = parse_global_arg(parsed_globals)
7510
7562
 
@@ -9845,7 +9897,7 @@ def doDraftApiGroup(args, parsed_globals):
9845
9897
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
9846
9898
 
9847
9899
 
9848
- def doDescribeGatewayApis(args, parsed_globals):
9900
+ def doModifyProgram(args, parsed_globals):
9849
9901
  g_param = parse_global_arg(parsed_globals)
9850
9902
 
9851
9903
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -9874,11 +9926,11 @@ def doDescribeGatewayApis(args, parsed_globals):
9874
9926
  client = mod.TsfClient(cred, g_param[OptionsDefine.Region], profile)
9875
9927
  client._sdkVersion += ("_CLI_" + __version__)
9876
9928
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
9877
- model = models.DescribeGatewayApisRequest()
9929
+ model = models.ModifyProgramRequest()
9878
9930
  model.from_json_string(json.dumps(args))
9879
9931
  start_time = time.time()
9880
9932
  while True:
9881
- rsp = client.DescribeGatewayApis(model)
9933
+ rsp = client.ModifyProgram(model)
9882
9934
  result = rsp.to_json_string()
9883
9935
  try:
9884
9936
  json_obj = json.loads(result)
@@ -10313,6 +10365,58 @@ def doDeleteConfig(args, parsed_globals):
10313
10365
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
10314
10366
 
10315
10367
 
10368
+ def doCreateProgram(args, parsed_globals):
10369
+ g_param = parse_global_arg(parsed_globals)
10370
+
10371
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
10372
+ cred = credential.CVMRoleCredential()
10373
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
10374
+ cred = credential.STSAssumeRoleCredential(
10375
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
10376
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
10377
+ )
10378
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
10379
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
10380
+ else:
10381
+ cred = credential.Credential(
10382
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
10383
+ )
10384
+ http_profile = HttpProfile(
10385
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
10386
+ reqMethod="POST",
10387
+ endpoint=g_param[OptionsDefine.Endpoint],
10388
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
10389
+ )
10390
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
10391
+ if g_param[OptionsDefine.Language]:
10392
+ profile.language = g_param[OptionsDefine.Language]
10393
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
10394
+ client = mod.TsfClient(cred, g_param[OptionsDefine.Region], profile)
10395
+ client._sdkVersion += ("_CLI_" + __version__)
10396
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
10397
+ model = models.CreateProgramRequest()
10398
+ model.from_json_string(json.dumps(args))
10399
+ start_time = time.time()
10400
+ while True:
10401
+ rsp = client.CreateProgram(model)
10402
+ result = rsp.to_json_string()
10403
+ try:
10404
+ json_obj = json.loads(result)
10405
+ except TypeError as e:
10406
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
10407
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
10408
+ break
10409
+ cur_time = time.time()
10410
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
10411
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
10412
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
10413
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
10414
+ else:
10415
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
10416
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
10417
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
10418
+
10419
+
10316
10420
  def doModifyContainerReplicas(args, parsed_globals):
10317
10421
  g_param = parse_global_arg(parsed_globals)
10318
10422
 
@@ -11664,6 +11768,7 @@ ACTION_MAP = {
11664
11768
  "StopGroup": doStopGroup,
11665
11769
  "DescribeGatewayMonitorOverview": doDescribeGatewayMonitorOverview,
11666
11770
  "DescribePathRewrites": doDescribePathRewrites,
11771
+ "DescribeGatewayApis": doDescribeGatewayApis,
11667
11772
  "DescribeDeliveryConfigs": doDescribeDeliveryConfigs,
11668
11773
  "UpdateApiGroup": doUpdateApiGroup,
11669
11774
  "ChangeApiUsableStatus": doChangeApiUsableStatus,
@@ -11709,7 +11814,7 @@ ACTION_MAP = {
11709
11814
  "DeleteUnitNamespaces": doDeleteUnitNamespaces,
11710
11815
  "DescribeInstances": doDescribeInstances,
11711
11816
  "DraftApiGroup": doDraftApiGroup,
11712
- "DescribeGatewayApis": doDescribeGatewayApis,
11817
+ "ModifyProgram": doModifyProgram,
11713
11818
  "DescribeMicroservices": doDescribeMicroservices,
11714
11819
  "DescribeApiVersions": doDescribeApiVersions,
11715
11820
  "DescribeGroup": doDescribeGroup,
@@ -11718,6 +11823,7 @@ ACTION_MAP = {
11718
11823
  "DescribeDeliveryConfig": doDescribeDeliveryConfig,
11719
11824
  "DescribeEnabledUnitRule": doDescribeEnabledUnitRule,
11720
11825
  "DeleteConfig": doDeleteConfig,
11826
+ "CreateProgram": doCreateProgram,
11721
11827
  "ModifyContainerReplicas": doModifyContainerReplicas,
11722
11828
  "UpdateHealthCheckSettings": doUpdateHealthCheckSettings,
11723
11829
  "DescribeInvocationMetricDataDimension": doDescribeInvocationMetricDataDimension,
@@ -210,6 +210,13 @@
210
210
  "output": "CreatePathRewritesWithDetailRespResponse",
211
211
  "status": "online"
212
212
  },
213
+ "CreateProgram": {
214
+ "document": "创建数据集",
215
+ "input": "CreateProgramRequest",
216
+ "name": "创建数据集",
217
+ "output": "CreateProgramResponse",
218
+ "status": "online"
219
+ },
213
220
  "CreatePublicConfig": {
214
221
  "document": "创建公共配置项",
215
222
  "input": "CreatePublicConfigRequest",
@@ -1274,6 +1281,13 @@
1274
1281
  "output": "ModifyPathRewriteResponse",
1275
1282
  "status": "online"
1276
1283
  },
1284
+ "ModifyProgram": {
1285
+ "document": "更新数据集",
1286
+ "input": "ModifyProgramRequest",
1287
+ "name": "更新数据集",
1288
+ "output": "ModifyProgramResponse",
1289
+ "status": "online"
1290
+ },
1277
1291
  "ModifyTask": {
1278
1292
  "document": "修改任务",
1279
1293
  "input": "ModifyTaskRequest",
@@ -8386,6 +8400,61 @@
8386
8400
  ],
8387
8401
  "type": "object"
8388
8402
  },
8403
+ "CreateProgramRequest": {
8404
+ "document": "CreateProgram请求参数结构体",
8405
+ "members": [
8406
+ {
8407
+ "disabled": false,
8408
+ "document": "数据集名称",
8409
+ "example": "无",
8410
+ "member": "string",
8411
+ "name": "ProgramName",
8412
+ "required": true,
8413
+ "type": "string"
8414
+ },
8415
+ {
8416
+ "disabled": false,
8417
+ "document": "数据集描述",
8418
+ "example": "无",
8419
+ "member": "string",
8420
+ "name": "ProgramDesc",
8421
+ "required": false,
8422
+ "type": "string"
8423
+ },
8424
+ {
8425
+ "disabled": false,
8426
+ "document": "数据项列表,传入null或空数组时不新增",
8427
+ "example": "无",
8428
+ "member": "ProgramItem",
8429
+ "name": "ProgramItemList",
8430
+ "required": false,
8431
+ "type": "list"
8432
+ }
8433
+ ],
8434
+ "type": "object"
8435
+ },
8436
+ "CreateProgramResponse": {
8437
+ "document": "CreateProgram返回参数结构体",
8438
+ "members": [
8439
+ {
8440
+ "disabled": false,
8441
+ "document": "true: 创建成功;false: 创建失败",
8442
+ "example": "无",
8443
+ "member": "bool",
8444
+ "name": "Result",
8445
+ "output_required": true,
8446
+ "type": "bool",
8447
+ "value_allowed_null": false
8448
+ },
8449
+ {
8450
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
8451
+ "member": "string",
8452
+ "name": "RequestId",
8453
+ "type": "string"
8454
+ }
8455
+ ],
8456
+ "type": "object"
8457
+ },
8389
8458
  "CreatePublicConfigRequest": {
8390
8459
  "document": "CreatePublicConfig请求参数结构体",
8391
8460
  "members": [
@@ -22582,6 +22651,79 @@
22582
22651
  ],
22583
22652
  "type": "object"
22584
22653
  },
22654
+ "ModifyProgramRequest": {
22655
+ "document": "ModifyProgram请求参数结构体",
22656
+ "members": [
22657
+ {
22658
+ "disabled": false,
22659
+ "document": "数据集ID",
22660
+ "example": "无",
22661
+ "member": "string",
22662
+ "name": "ProgramId",
22663
+ "required": true,
22664
+ "type": "string"
22665
+ },
22666
+ {
22667
+ "disabled": false,
22668
+ "document": "数据集名称,不传入时不更新",
22669
+ "example": "无",
22670
+ "member": "string",
22671
+ "name": "ProgramName",
22672
+ "required": false,
22673
+ "type": "string"
22674
+ },
22675
+ {
22676
+ "disabled": false,
22677
+ "document": "数据集描述,不传入时不更新",
22678
+ "example": "无",
22679
+ "member": "string",
22680
+ "name": "ProgramDesc",
22681
+ "required": false,
22682
+ "type": "string"
22683
+ },
22684
+ {
22685
+ "disabled": false,
22686
+ "document": "数据项列表,传入null不更新,传入空数组全量删除",
22687
+ "example": "无",
22688
+ "member": "ProgramItem",
22689
+ "name": "ProgramItemList",
22690
+ "required": false,
22691
+ "type": "list"
22692
+ },
22693
+ {
22694
+ "disabled": false,
22695
+ "document": "ProgramItemList是否是空数组",
22696
+ "example": "无",
22697
+ "member": "bool",
22698
+ "name": "EmptyProgramItemList",
22699
+ "required": false,
22700
+ "type": "bool"
22701
+ }
22702
+ ],
22703
+ "type": "object"
22704
+ },
22705
+ "ModifyProgramResponse": {
22706
+ "document": "ModifyProgram返回参数结构体",
22707
+ "members": [
22708
+ {
22709
+ "disabled": false,
22710
+ "document": "true: 更新成功;false: 更新失败",
22711
+ "example": "1",
22712
+ "member": "bool",
22713
+ "name": "Result",
22714
+ "output_required": true,
22715
+ "type": "bool",
22716
+ "value_allowed_null": false
22717
+ },
22718
+ {
22719
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
22720
+ "member": "string",
22721
+ "name": "RequestId",
22722
+ "type": "string"
22723
+ }
22724
+ ],
22725
+ "type": "object"
22726
+ },
22585
22727
  "ModifyTaskRequest": {
22586
22728
  "document": "ModifyTask请求参数结构体",
22587
22729
  "members": [