tccli 3.0.1103.1__py2.py3-none-any.whl → 3.0.1104.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 (72) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/aiart/v20221229/ImageToImage.md +1 -1
  3. tccli/examples/csip/v20221121/DescribeDbAssets.md +7 -0
  4. tccli/examples/csip/v20221121/DescribeOrganizationUserInfo.md +12 -1
  5. tccli/examples/cwp/v20180228/DescribePublicProxyInstallCommand.md +4 -4
  6. tccli/examples/cynosdb/v20190107/CreateCLSDelivery.md +18 -0
  7. tccli/examples/cynosdb/v20190107/DeleteCLSDelivery.md +18 -0
  8. tccli/examples/cynosdb/v20190107/DescribeInstanceCLSLogDelivery.md +18 -0
  9. tccli/examples/cynosdb/v20190107/StartCLSDelivery.md +18 -0
  10. tccli/examples/cynosdb/v20190107/StopCLSDelivery.md +18 -0
  11. tccli/examples/ess/v20201111/CreateUserVerifyUrl.md +29 -0
  12. tccli/examples/ess/v20201111/DescribeUserVerifyStatus.md +23 -0
  13. tccli/examples/hai/v20230812/DescribeInstances.md +3 -2
  14. tccli/examples/hunyuan/v20230901/QueryHunyuanImageJob.md +33 -0
  15. tccli/examples/hunyuan/v20230901/SubmitHunyuanImageJob.md +21 -0
  16. tccli/examples/live/v20180801/DescribeLivePadProcessorList.md +25 -0
  17. tccli/examples/live/v20180801/StopLivePadProcessor.md +23 -0
  18. tccli/examples/mrs/v20200910/DrugInstructionObject.md +98 -0
  19. tccli/examples/ssl/v20191205/DescribeDownloadCertificateUrl.md +23 -0
  20. tccli/examples/tke/v20220501/CreateNodePool.md +33 -0
  21. tccli/examples/tke/v20220501/DeleteNodePool.md +21 -0
  22. tccli/examples/tke/v20220501/DescribeNodePools.md +9 -3
  23. tccli/examples/tke/v20220501/ModifyNodePool.md +32 -0
  24. tccli/services/aiart/v20221229/api.json +3 -3
  25. tccli/services/aiart/v20221229/examples.json +1 -1
  26. tccli/services/apm/v20210622/api.json +1 -1
  27. tccli/services/batch/v20170312/api.json +1 -1
  28. tccli/services/billing/v20180709/api.json +2 -2
  29. tccli/services/cdb/v20170320/api.json +2 -2
  30. tccli/services/clb/v20180317/api.json +1 -1
  31. tccli/services/cls/v20201016/api.json +1 -1
  32. tccli/services/csip/v20221121/api.json +80 -2
  33. tccli/services/csip/v20221121/examples.json +4 -4
  34. tccli/services/cvm/v20170312/api.json +1 -1
  35. tccli/services/cwp/v20180228/api.json +17 -5
  36. tccli/services/cwp/v20180228/examples.json +2 -2
  37. tccli/services/cynosdb/cynosdb_client.py +269 -4
  38. tccli/services/cynosdb/v20190107/api.json +131 -0
  39. tccli/services/cynosdb/v20190107/examples.json +40 -0
  40. tccli/services/ess/ess_client.py +110 -4
  41. tccli/services/ess/v20201111/api.json +185 -5
  42. tccli/services/ess/v20201111/examples.json +16 -0
  43. tccli/services/essbasic/v20210526/api.json +4 -4
  44. tccli/services/faceid/v20180301/api.json +1 -1
  45. tccli/services/hai/v20230812/api.json +2 -2
  46. tccli/services/hai/v20230812/examples.json +1 -1
  47. tccli/services/hunyuan/hunyuan_client.py +110 -4
  48. tccli/services/hunyuan/v20230901/api.json +188 -4
  49. tccli/services/hunyuan/v20230901/examples.json +16 -0
  50. tccli/services/lighthouse/v20200324/api.json +15 -5
  51. tccli/services/live/live_client.py +114 -8
  52. tccli/services/live/v20180801/api.json +124 -0
  53. tccli/services/live/v20180801/examples.json +16 -0
  54. tccli/services/lke/v20231130/api.json +108 -2
  55. tccli/services/mrs/v20200910/api.json +1 -1
  56. tccli/services/mrs/v20200910/examples.json +1 -1
  57. tccli/services/ssl/ssl_client.py +57 -4
  58. tccli/services/ssl/v20191205/api.json +63 -0
  59. tccli/services/ssl/v20191205/examples.json +8 -0
  60. tccli/services/ssm/v20190923/api.json +1 -1
  61. tccli/services/tdmq/v20200217/api.json +10 -10
  62. tccli/services/teo/v20220901/api.json +34 -0
  63. tccli/services/tke/tke_client.py +171 -12
  64. tccli/services/tke/v20220501/api.json +1403 -86
  65. tccli/services/tke/v20220501/examples.json +25 -1
  66. tccli/services/trtc/v20190722/api.json +5 -8
  67. tccli/services/vpc/v20170312/api.json +1 -0
  68. {tccli-3.0.1103.1.dist-info → tccli-3.0.1104.1.dist-info}/METADATA +2 -2
  69. {tccli-3.0.1103.1.dist-info → tccli-3.0.1104.1.dist-info}/RECORD +72 -57
  70. {tccli-3.0.1103.1.dist-info → tccli-3.0.1104.1.dist-info}/WHEEL +0 -0
  71. {tccli-3.0.1103.1.dist-info → tccli-3.0.1104.1.dist-info}/entry_points.txt +0 -0
  72. {tccli-3.0.1103.1.dist-info → tccli-3.0.1104.1.dist-info}/license_files/LICENSE +0 -0
@@ -329,7 +329,7 @@ def doDeleteManager(args, parsed_globals):
329
329
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
330
 
331
331
 
332
- def doUploadConfirmLetter(args, parsed_globals):
332
+ def doDescribeDownloadCertificateUrl(args, parsed_globals):
333
333
  g_param = parse_global_arg(parsed_globals)
334
334
 
335
335
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -358,11 +358,11 @@ def doUploadConfirmLetter(args, parsed_globals):
358
358
  client = mod.SslClient(cred, g_param[OptionsDefine.Region], profile)
359
359
  client._sdkVersion += ("_CLI_" + __version__)
360
360
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
361
- model = models.UploadConfirmLetterRequest()
361
+ model = models.DescribeDownloadCertificateUrlRequest()
362
362
  model.from_json_string(json.dumps(args))
363
363
  start_time = time.time()
364
364
  while True:
365
- rsp = client.UploadConfirmLetter(model)
365
+ rsp = client.DescribeDownloadCertificateUrl(model)
366
366
  result = rsp.to_json_string()
367
367
  try:
368
368
  json_obj = json.loads(result)
@@ -2253,6 +2253,58 @@ def doCreateCertificate(args, parsed_globals):
2253
2253
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2254
2254
 
2255
2255
 
2256
+ def doUploadConfirmLetter(args, parsed_globals):
2257
+ g_param = parse_global_arg(parsed_globals)
2258
+
2259
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2260
+ cred = credential.CVMRoleCredential()
2261
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2262
+ cred = credential.STSAssumeRoleCredential(
2263
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2264
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2265
+ )
2266
+ 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):
2267
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2268
+ else:
2269
+ cred = credential.Credential(
2270
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2271
+ )
2272
+ http_profile = HttpProfile(
2273
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2274
+ reqMethod="POST",
2275
+ endpoint=g_param[OptionsDefine.Endpoint],
2276
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2277
+ )
2278
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2279
+ if g_param[OptionsDefine.Language]:
2280
+ profile.language = g_param[OptionsDefine.Language]
2281
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2282
+ client = mod.SslClient(cred, g_param[OptionsDefine.Region], profile)
2283
+ client._sdkVersion += ("_CLI_" + __version__)
2284
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2285
+ model = models.UploadConfirmLetterRequest()
2286
+ model.from_json_string(json.dumps(args))
2287
+ start_time = time.time()
2288
+ while True:
2289
+ rsp = client.UploadConfirmLetter(model)
2290
+ result = rsp.to_json_string()
2291
+ try:
2292
+ json_obj = json.loads(result)
2293
+ except TypeError as e:
2294
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2295
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2296
+ break
2297
+ cur_time = time.time()
2298
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2299
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2300
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2301
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2302
+ else:
2303
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2304
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2305
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2306
+
2307
+
2256
2308
  def doDescribeHostLighthouseInstanceList(args, parsed_globals):
2257
2309
  g_param = parse_global_arg(parsed_globals)
2258
2310
 
@@ -2998,7 +3050,7 @@ ACTION_MAP = {
2998
3050
  "DescribeHostTkeInstanceList": doDescribeHostTkeInstanceList,
2999
3051
  "UploadRevokeLetter": doUploadRevokeLetter,
3000
3052
  "DeleteManager": doDeleteManager,
3001
- "UploadConfirmLetter": doUploadConfirmLetter,
3053
+ "DescribeDownloadCertificateUrl": doDescribeDownloadCertificateUrl,
3002
3054
  "DeployCertificateInstance": doDeployCertificateInstance,
3003
3055
  "SubmitAuditManager": doSubmitAuditManager,
3004
3056
  "DescribePackages": doDescribePackages,
@@ -3035,6 +3087,7 @@ ACTION_MAP = {
3035
3087
  "DescribeHostUpdateRecordDetail": doDescribeHostUpdateRecordDetail,
3036
3088
  "DescribeHostUpdateRecord": doDescribeHostUpdateRecord,
3037
3089
  "CreateCertificate": doCreateCertificate,
3090
+ "UploadConfirmLetter": doUploadConfirmLetter,
3038
3091
  "DescribeHostLighthouseInstanceList": doDescribeHostLighthouseInstanceList,
3039
3092
  "UpdateCertificateRecordRollback": doUpdateCertificateRecordRollback,
3040
3093
  "DescribeHostVodInstanceList": doDescribeHostVodInstanceList,
@@ -161,6 +161,13 @@
161
161
  "output": "DescribeDeployedResourcesResponse",
162
162
  "status": "online"
163
163
  },
164
+ "DescribeDownloadCertificateUrl": {
165
+ "document": "获取下载证书链接",
166
+ "input": "DescribeDownloadCertificateUrlRequest",
167
+ "name": "获取下载证书链接",
168
+ "output": "DescribeDownloadCertificateUrlResponse",
169
+ "status": "online"
170
+ },
164
171
  "DescribeHostApiGatewayInstanceList": {
165
172
  "document": "查询证书apiGateway云资源部署实例列表",
166
173
  "input": "DescribeHostApiGatewayInstanceListRequest",
@@ -4558,6 +4565,62 @@
4558
4565
  ],
4559
4566
  "type": "object"
4560
4567
  },
4568
+ "DescribeDownloadCertificateUrlRequest": {
4569
+ "document": "DescribeDownloadCertificateUrl请求参数结构体",
4570
+ "members": [
4571
+ {
4572
+ "disabled": false,
4573
+ "document": "证书ID",
4574
+ "example": "s2dyw1",
4575
+ "member": "string",
4576
+ "name": "CertificateId",
4577
+ "required": true,
4578
+ "type": "string"
4579
+ },
4580
+ {
4581
+ "disabled": false,
4582
+ "document": "下载的服务类型: nginx tomcat apache iis jks other root",
4583
+ "example": "nginx",
4584
+ "member": "string",
4585
+ "name": "ServiceType",
4586
+ "required": false,
4587
+ "type": "string"
4588
+ }
4589
+ ],
4590
+ "type": "object"
4591
+ },
4592
+ "DescribeDownloadCertificateUrlResponse": {
4593
+ "document": "DescribeDownloadCertificateUrl返回参数结构体",
4594
+ "members": [
4595
+ {
4596
+ "disabled": false,
4597
+ "document": "下载链接",
4598
+ "example": "https://xxxxx.zip",
4599
+ "member": "string",
4600
+ "name": "DownloadCertificateUrl",
4601
+ "required": true,
4602
+ "type": "string",
4603
+ "value_allowed_null": false
4604
+ },
4605
+ {
4606
+ "disabled": false,
4607
+ "document": "下载文件的名称",
4608
+ "example": "xxx.com_nginx.zip",
4609
+ "member": "string",
4610
+ "name": "DownloadFilename",
4611
+ "required": true,
4612
+ "type": "string",
4613
+ "value_allowed_null": false
4614
+ },
4615
+ {
4616
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
4617
+ "member": "string",
4618
+ "name": "RequestId",
4619
+ "type": "string"
4620
+ }
4621
+ ],
4622
+ "type": "object"
4623
+ },
4561
4624
  "DescribeHostApiGatewayInstanceListRequest": {
4562
4625
  "document": "DescribeHostApiGatewayInstanceList请求参数结构体",
4563
4626
  "members": [
@@ -202,6 +202,14 @@
202
202
  "title": "证书查询关联资源"
203
203
  }
204
204
  ],
205
+ "DescribeDownloadCertificateUrl": [
206
+ {
207
+ "document": "",
208
+ "input": "POST / HTTP/1.1\nHost: ssl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDownloadCertificateUrl\n<公共请求参数>\n\n{\n \"CertificateId\": \"sduwd123\",\n \"ServiceType\": \"nginx\"\n}",
209
+ "output": "{\n \"Response\": {\n \"RequestId\": \"xxx-xxx-xxx-xxx\",\n \"DownloadCertificateUrl\": \"http://xxx.zip\",\n \"DownloadFilename\": \"xxx.com_nginx.zip\"\n }\n}",
210
+ "title": "返回成功"
211
+ }
212
+ ],
205
213
  "DescribeHostApiGatewayInstanceList": [
206
214
  {
207
215
  "document": "查询证书ddos云资源部署实例列表",
@@ -1787,7 +1787,7 @@
1787
1787
  "example": "1",
1788
1788
  "member": "int64",
1789
1789
  "name": "FlowID",
1790
- "required": true,
1790
+ "output_required": true,
1791
1791
  "type": "int",
1792
1792
  "value_allowed_null": false
1793
1793
  },
@@ -10483,7 +10483,7 @@
10483
10483
  "example": "test",
10484
10484
  "member": "string",
10485
10485
  "name": "EnvironmentId",
10486
- "required": true,
10486
+ "output_required": true,
10487
10487
  "type": "string",
10488
10488
  "value_allowed_null": false
10489
10489
  },
@@ -10493,7 +10493,7 @@
10493
10493
  "example": "test",
10494
10494
  "member": "string",
10495
10495
  "name": "Remark",
10496
- "required": true,
10496
+ "output_required": true,
10497
10497
  "type": "string",
10498
10498
  "value_allowed_null": false
10499
10499
  },
@@ -10503,7 +10503,7 @@
10503
10503
  "example": "2",
10504
10504
  "member": "int64",
10505
10505
  "name": "MsgTTL",
10506
- "required": true,
10506
+ "output_required": true,
10507
10507
  "type": "int",
10508
10508
  "value_allowed_null": false
10509
10509
  },
@@ -10513,7 +10513,7 @@
10513
10513
  "example": "2020-02-17 00:00:00",
10514
10514
  "member": "datetime",
10515
10515
  "name": "CreateTime",
10516
- "required": true,
10516
+ "output_required": true,
10517
10517
  "type": "string",
10518
10518
  "value_allowed_null": false
10519
10519
  },
@@ -10523,7 +10523,7 @@
10523
10523
  "example": "2020-02-17 00:00:00",
10524
10524
  "member": "datetime",
10525
10525
  "name": "UpdateTime",
10526
- "required": true,
10526
+ "output_required": true,
10527
10527
  "type": "string",
10528
10528
  "value_allowed_null": false
10529
10529
  },
@@ -10533,7 +10533,7 @@
10533
10533
  "example": "test",
10534
10534
  "member": "string",
10535
10535
  "name": "NamespaceId",
10536
- "required": true,
10536
+ "output_required": true,
10537
10537
  "type": "string",
10538
10538
  "value_allowed_null": false
10539
10539
  },
@@ -10543,7 +10543,7 @@
10543
10543
  "example": "test",
10544
10544
  "member": "string",
10545
10545
  "name": "NamespaceName",
10546
- "required": true,
10546
+ "output_required": true,
10547
10547
  "type": "string",
10548
10548
  "value_allowed_null": false
10549
10549
  },
@@ -10553,7 +10553,7 @@
10553
10553
  "example": "2",
10554
10554
  "member": "int64",
10555
10555
  "name": "TopicNum",
10556
- "required": true,
10556
+ "output_required": true,
10557
10557
  "type": "int",
10558
10558
  "value_allowed_null": true
10559
10559
  },
@@ -10563,7 +10563,7 @@
10563
10563
  "example": "无",
10564
10564
  "member": "RetentionPolicy",
10565
10565
  "name": "RetentionPolicy",
10566
- "required": true,
10566
+ "output_required": true,
10567
10567
  "type": "object",
10568
10568
  "value_allowed_null": true
10569
10569
  },
@@ -10573,7 +10573,7 @@
10573
10573
  "example": "true",
10574
10574
  "member": "bool",
10575
10575
  "name": "AutoSubscriptionCreation",
10576
- "required": false,
10576
+ "output_required": true,
10577
10577
  "type": "bool",
10578
10578
  "value_allowed_null": true
10579
10579
  }
@@ -2761,6 +2761,21 @@
2761
2761
  ],
2762
2762
  "usage": "both"
2763
2763
  },
2764
+ "CacheTag": {
2765
+ "document": "节点缓存清除类型取值为 purge_cache_tag 时附带的信息。",
2766
+ "members": [
2767
+ {
2768
+ "disabled": false,
2769
+ "document": "待清除缓存的域名列表。",
2770
+ "example": "[\"www.qq.com\"]",
2771
+ "member": "string",
2772
+ "name": "Domains",
2773
+ "required": true,
2774
+ "type": "list"
2775
+ }
2776
+ ],
2777
+ "usage": "in"
2778
+ },
2764
2779
  "CertificateInfo": {
2765
2780
  "document": "https 服务端证书配置",
2766
2781
  "members": [
@@ -4068,6 +4083,15 @@
4068
4083
  "name": "EncodeUrl",
4069
4084
  "required": false,
4070
4085
  "type": "bool"
4086
+ },
4087
+ {
4088
+ "disabled": false,
4089
+ "document": "节点缓存清除类型取值为 purge_cache_tag 时附带的信息。",
4090
+ "example": "无",
4091
+ "member": "CacheTag",
4092
+ "name": "CacheTag",
4093
+ "required": false,
4094
+ "type": "object"
4071
4095
  }
4072
4096
  ],
4073
4097
  "type": "object"
@@ -15364,6 +15388,16 @@
15364
15388
  "type": "string",
15365
15389
  "value_allowed_null": false
15366
15390
  },
15391
+ {
15392
+ "disabled": false,
15393
+ "document": "节点缓存清除方法,取值有:\n<li>invalidate:标记过期,用户请求时触发回源校验,即发送带有 If-None-Match 和 If-Modified-Since 头部的 HTTP 条件请求。若源站响应 200,则节点会回源拉取新的资源并更新缓存;若源站响应 304,则节点不会更新缓存;</li>\n<li>delete:直接删除节点缓存,用户请求时触发回源拉取资源。</li>\n注意:此字段可能返回 null,表示取不到有效值。",
15394
+ "example": "invalidate",
15395
+ "member": "string",
15396
+ "name": "Method",
15397
+ "output_required": false,
15398
+ "type": "string",
15399
+ "value_allowed_null": true
15400
+ },
15367
15401
  {
15368
15402
  "disabled": false,
15369
15403
  "document": "状态。取值有:\n<li>processing:处理中;</li>\n<li>success:成功;</li>\n<li> failed:失败;</li>\n<li>timeout:超时。</li>",
@@ -2307,7 +2307,7 @@ def doModifyClusterVirtualNodePool(args, parsed_globals):
2307
2307
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2308
2308
 
2309
2309
 
2310
- def doInstallEdgeLogAgent(args, parsed_globals):
2310
+ def doUpdateImageCache(args, parsed_globals):
2311
2311
  g_param = parse_global_arg(parsed_globals)
2312
2312
 
2313
2313
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2336,11 +2336,11 @@ def doInstallEdgeLogAgent(args, parsed_globals):
2336
2336
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
2337
2337
  client._sdkVersion += ("_CLI_" + __version__)
2338
2338
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2339
- model = models.InstallEdgeLogAgentRequest()
2339
+ model = models.UpdateImageCacheRequest()
2340
2340
  model.from_json_string(json.dumps(args))
2341
2341
  start_time = time.time()
2342
2342
  while True:
2343
- rsp = client.InstallEdgeLogAgent(model)
2343
+ rsp = client.UpdateImageCache(model)
2344
2344
  result = rsp.to_json_string()
2345
2345
  try:
2346
2346
  json_obj = json.loads(result)
@@ -2463,6 +2463,58 @@ def doDescribeClusterPendingReleases(args, parsed_globals):
2463
2463
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2464
2464
 
2465
2465
 
2466
+ def doDescribeTKEEdgeClusterStatus(args, parsed_globals):
2467
+ g_param = parse_global_arg(parsed_globals)
2468
+
2469
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2470
+ cred = credential.CVMRoleCredential()
2471
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2472
+ cred = credential.STSAssumeRoleCredential(
2473
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2474
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2475
+ )
2476
+ 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):
2477
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2478
+ else:
2479
+ cred = credential.Credential(
2480
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2481
+ )
2482
+ http_profile = HttpProfile(
2483
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2484
+ reqMethod="POST",
2485
+ endpoint=g_param[OptionsDefine.Endpoint],
2486
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2487
+ )
2488
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2489
+ if g_param[OptionsDefine.Language]:
2490
+ profile.language = g_param[OptionsDefine.Language]
2491
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2492
+ client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
2493
+ client._sdkVersion += ("_CLI_" + __version__)
2494
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2495
+ model = models.DescribeTKEEdgeClusterStatusRequest()
2496
+ model.from_json_string(json.dumps(args))
2497
+ start_time = time.time()
2498
+ while True:
2499
+ rsp = client.DescribeTKEEdgeClusterStatus(model)
2500
+ result = rsp.to_json_string()
2501
+ try:
2502
+ json_obj = json.loads(result)
2503
+ except TypeError as e:
2504
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2505
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2506
+ break
2507
+ cur_time = time.time()
2508
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2509
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2510
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2511
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2512
+ else:
2513
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2514
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2515
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2516
+
2517
+
2466
2518
  def doCreateEdgeLogConfig(args, parsed_globals):
2467
2519
  g_param = parse_global_arg(parsed_globals)
2468
2520
 
@@ -5687,6 +5739,58 @@ def doDescribeImageCaches(args, parsed_globals):
5687
5739
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5688
5740
 
5689
5741
 
5742
+ def doCreateNodePool(args, parsed_globals):
5743
+ g_param = parse_global_arg(parsed_globals)
5744
+
5745
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5746
+ cred = credential.CVMRoleCredential()
5747
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5748
+ cred = credential.STSAssumeRoleCredential(
5749
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5750
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5751
+ )
5752
+ 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):
5753
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5754
+ else:
5755
+ cred = credential.Credential(
5756
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5757
+ )
5758
+ http_profile = HttpProfile(
5759
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5760
+ reqMethod="POST",
5761
+ endpoint=g_param[OptionsDefine.Endpoint],
5762
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5763
+ )
5764
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5765
+ if g_param[OptionsDefine.Language]:
5766
+ profile.language = g_param[OptionsDefine.Language]
5767
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5768
+ client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
5769
+ client._sdkVersion += ("_CLI_" + __version__)
5770
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5771
+ model = models.CreateNodePoolRequest()
5772
+ model.from_json_string(json.dumps(args))
5773
+ start_time = time.time()
5774
+ while True:
5775
+ rsp = client.CreateNodePool(model)
5776
+ result = rsp.to_json_string()
5777
+ try:
5778
+ json_obj = json.loads(result)
5779
+ except TypeError as e:
5780
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5781
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5782
+ break
5783
+ cur_time = time.time()
5784
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5785
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5786
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5787
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5788
+ else:
5789
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5790
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5791
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5792
+
5793
+
5690
5794
  def doModifyClusterAsGroupAttribute(args, parsed_globals):
5691
5795
  g_param = parse_global_arg(parsed_globals)
5692
5796
 
@@ -8859,7 +8963,7 @@ def doDescribePrometheusOverviews(args, parsed_globals):
8859
8963
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
8860
8964
 
8861
8965
 
8862
- def doDescribeTKEEdgeClusterStatus(args, parsed_globals):
8966
+ def doDeleteNodePool(args, parsed_globals):
8863
8967
  g_param = parse_global_arg(parsed_globals)
8864
8968
 
8865
8969
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -8888,11 +8992,11 @@ def doDescribeTKEEdgeClusterStatus(args, parsed_globals):
8888
8992
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
8889
8993
  client._sdkVersion += ("_CLI_" + __version__)
8890
8994
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
8891
- model = models.DescribeTKEEdgeClusterStatusRequest()
8995
+ model = models.DeleteNodePoolRequest()
8892
8996
  model.from_json_string(json.dumps(args))
8893
8997
  start_time = time.time()
8894
8998
  while True:
8895
- rsp = client.DescribeTKEEdgeClusterStatus(model)
8999
+ rsp = client.DeleteNodePool(model)
8896
9000
  result = rsp.to_json_string()
8897
9001
  try:
8898
9002
  json_obj = json.loads(result)
@@ -9847,7 +9951,7 @@ def doRollbackClusterRelease(args, parsed_globals):
9847
9951
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
9848
9952
 
9849
9953
 
9850
- def doUpdateImageCache(args, parsed_globals):
9954
+ def doInstallEdgeLogAgent(args, parsed_globals):
9851
9955
  g_param = parse_global_arg(parsed_globals)
9852
9956
 
9853
9957
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -9876,11 +9980,11 @@ def doUpdateImageCache(args, parsed_globals):
9876
9980
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
9877
9981
  client._sdkVersion += ("_CLI_" + __version__)
9878
9982
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
9879
- model = models.UpdateImageCacheRequest()
9983
+ model = models.InstallEdgeLogAgentRequest()
9880
9984
  model.from_json_string(json.dumps(args))
9881
9985
  start_time = time.time()
9882
9986
  while True:
9883
- rsp = client.UpdateImageCache(model)
9987
+ rsp = client.InstallEdgeLogAgent(model)
9884
9988
  result = rsp.to_json_string()
9885
9989
  try:
9886
9990
  json_obj = json.loads(result)
@@ -10315,6 +10419,58 @@ def doDescribePrometheusAlertRule(args, parsed_globals):
10315
10419
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
10316
10420
 
10317
10421
 
10422
+ def doModifyNodePool(args, parsed_globals):
10423
+ g_param = parse_global_arg(parsed_globals)
10424
+
10425
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
10426
+ cred = credential.CVMRoleCredential()
10427
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
10428
+ cred = credential.STSAssumeRoleCredential(
10429
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
10430
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
10431
+ )
10432
+ 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):
10433
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
10434
+ else:
10435
+ cred = credential.Credential(
10436
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
10437
+ )
10438
+ http_profile = HttpProfile(
10439
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
10440
+ reqMethod="POST",
10441
+ endpoint=g_param[OptionsDefine.Endpoint],
10442
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
10443
+ )
10444
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
10445
+ if g_param[OptionsDefine.Language]:
10446
+ profile.language = g_param[OptionsDefine.Language]
10447
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
10448
+ client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
10449
+ client._sdkVersion += ("_CLI_" + __version__)
10450
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
10451
+ model = models.ModifyNodePoolRequest()
10452
+ model.from_json_string(json.dumps(args))
10453
+ start_time = time.time()
10454
+ while True:
10455
+ rsp = client.ModifyNodePool(model)
10456
+ result = rsp.to_json_string()
10457
+ try:
10458
+ json_obj = json.loads(result)
10459
+ except TypeError as e:
10460
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
10461
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
10462
+ break
10463
+ cur_time = time.time()
10464
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
10465
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
10466
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
10467
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
10468
+ else:
10469
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
10470
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
10471
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
10472
+
10473
+
10318
10474
  def doForwardTKEEdgeApplicationRequestV3(args, parsed_globals):
10319
10475
  g_param = parse_global_arg(parsed_globals)
10320
10476
 
@@ -11568,9 +11724,10 @@ ACTION_MAP = {
11568
11724
  "EnableClusterAudit": doEnableClusterAudit,
11569
11725
  "CreateBackupStorageLocation": doCreateBackupStorageLocation,
11570
11726
  "ModifyClusterVirtualNodePool": doModifyClusterVirtualNodePool,
11571
- "InstallEdgeLogAgent": doInstallEdgeLogAgent,
11727
+ "UpdateImageCache": doUpdateImageCache,
11572
11728
  "CreateClusterNodePool": doCreateClusterNodePool,
11573
11729
  "DescribeClusterPendingReleases": doDescribeClusterPendingReleases,
11730
+ "DescribeTKEEdgeClusterStatus": doDescribeTKEEdgeClusterStatus,
11574
11731
  "CreateEdgeLogConfig": doCreateEdgeLogConfig,
11575
11732
  "DescribeAvailableClusterVersion": doDescribeAvailableClusterVersion,
11576
11733
  "DeleteImageCaches": doDeleteImageCaches,
@@ -11633,6 +11790,7 @@ ACTION_MAP = {
11633
11790
  "UpdateClusterKubeconfig": doUpdateClusterKubeconfig,
11634
11791
  "DescribeVpcCniPodLimits": doDescribeVpcCniPodLimits,
11635
11792
  "DescribeImageCaches": doDescribeImageCaches,
11793
+ "CreateNodePool": doCreateNodePool,
11636
11794
  "ModifyClusterAsGroupAttribute": doModifyClusterAsGroupAttribute,
11637
11795
  "CreatePrometheusTemp": doCreatePrometheusTemp,
11638
11796
  "CreateClusterRoute": doCreateClusterRoute,
@@ -11694,7 +11852,7 @@ ACTION_MAP = {
11694
11852
  "CheckInstancesUpgradeAble": doCheckInstancesUpgradeAble,
11695
11853
  "CreatePrometheusDashboard": doCreatePrometheusDashboard,
11696
11854
  "DescribePrometheusOverviews": doDescribePrometheusOverviews,
11697
- "DescribeTKEEdgeClusterStatus": doDescribeTKEEdgeClusterStatus,
11855
+ "DeleteNodePool": doDeleteNodePool,
11698
11856
  "CreatePrometheusAlertPolicy": doCreatePrometheusAlertPolicy,
11699
11857
  "DescribeImages": doDescribeImages,
11700
11858
  "ModifyClusterAuthenticationOptions": doModifyClusterAuthenticationOptions,
@@ -11713,7 +11871,7 @@ ACTION_MAP = {
11713
11871
  "DescribeEdgeClusterInstances": doDescribeEdgeClusterInstances,
11714
11872
  "DescribeClusterAsGroupOption": doDescribeClusterAsGroupOption,
11715
11873
  "RollbackClusterRelease": doRollbackClusterRelease,
11716
- "UpdateImageCache": doUpdateImageCache,
11874
+ "InstallEdgeLogAgent": doInstallEdgeLogAgent,
11717
11875
  "UpdateClusterVersion": doUpdateClusterVersion,
11718
11876
  "CreatePrometheusRecordRuleYaml": doCreatePrometheusRecordRuleYaml,
11719
11877
  "DescribeClusterStatus": doDescribeClusterStatus,
@@ -11722,6 +11880,7 @@ ACTION_MAP = {
11722
11880
  "DeletePrometheusConfig": doDeletePrometheusConfig,
11723
11881
  "DescribeEnableVpcCniProgress": doDescribeEnableVpcCniProgress,
11724
11882
  "DescribePrometheusAlertRule": doDescribePrometheusAlertRule,
11883
+ "ModifyNodePool": doModifyNodePool,
11725
11884
  "ForwardTKEEdgeApplicationRequestV3": doForwardTKEEdgeApplicationRequestV3,
11726
11885
  "SyncPrometheusTemplate": doSyncPrometheusTemplate,
11727
11886
  "DescribeClusterReleases": doDescribeClusterReleases,