tccli 3.0.1230.1__py2.py3-none-any.whl → 3.0.1231.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 (40) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/aiart_client.py +53 -0
  3. tccli/services/aiart/v20221229/api.json +98 -0
  4. tccli/services/aiart/v20221229/examples.json +8 -0
  5. tccli/services/batch/v20170312/api.json +4 -6
  6. tccli/services/cam/cam_client.py +53 -0
  7. tccli/services/cam/v20190116/api.json +125 -52
  8. tccli/services/cam/v20190116/examples.json +12 -4
  9. tccli/services/cfg/v20210820/api.json +9 -0
  10. tccli/services/cloudaudit/v20190319/api.json +39 -39
  11. tccli/services/cloudaudit/v20190319/examples.json +5 -5
  12. tccli/services/cvm/v20170312/api.json +53 -55
  13. tccli/services/cvm/v20170312/examples.json +3 -3
  14. tccli/services/es/v20180416/api.json +106 -8
  15. tccli/services/essbasic/v20210526/api.json +2 -2
  16. tccli/services/memcached/v20190318/api.json +20 -20
  17. tccli/services/mps/v20190612/api.json +11 -0
  18. tccli/services/mqtt/mqtt_client.py +283 -71
  19. tccli/services/mqtt/v20240516/api.json +312 -0
  20. tccli/services/mqtt/v20240516/examples.json +32 -0
  21. tccli/services/ocr/v20181119/api.json +143 -0
  22. tccli/services/ocr/v20181119/examples.json +1 -1
  23. tccli/services/postgres/v20170312/api.json +11 -9
  24. tccli/services/postgres/v20170312/examples.json +2 -2
  25. tccli/services/redis/v20180412/examples.json +2 -2
  26. tccli/services/ssl/v20191205/api.json +4 -4
  27. tccli/services/ssl/v20191205/examples.json +1 -1
  28. tccli/services/sts/v20180813/api.json +9 -9
  29. tccli/services/tse/tse_client.py +228 -16
  30. tccli/services/tse/v20201207/api.json +476 -0
  31. tccli/services/tse/v20201207/examples.json +32 -0
  32. tccli/services/vdb/v20230616/api.json +3 -3
  33. tccli/services/vdb/v20230616/examples.json +1 -1
  34. tccli/services/vpc/v20170312/api.json +17 -7
  35. tccli/services/vpc/v20170312/examples.json +1 -1
  36. {tccli-3.0.1230.1.dist-info → tccli-3.0.1231.1.dist-info}/METADATA +2 -2
  37. {tccli-3.0.1230.1.dist-info → tccli-3.0.1231.1.dist-info}/RECORD +40 -40
  38. {tccli-3.0.1230.1.dist-info → tccli-3.0.1231.1.dist-info}/WHEEL +0 -0
  39. {tccli-3.0.1230.1.dist-info → tccli-3.0.1231.1.dist-info}/entry_points.txt +0 -0
  40. {tccli-3.0.1230.1.dist-info → tccli-3.0.1231.1.dist-info}/license_files/LICENSE +0 -0
@@ -9324,7 +9324,7 @@
9324
9324
  {
9325
9325
  "disabled": false,
9326
9326
  "document": "实例名称",
9327
- "example": "test",
9327
+ "example": "user-data-db",
9328
9328
  "member": "string",
9329
9329
  "name": "DBInstanceName",
9330
9330
  "required": false,
@@ -10884,30 +10884,30 @@
10884
10884
  {
10885
10885
  "disabled": false,
10886
10886
  "document": "花费总时间",
10887
- "example": "",
10887
+ "example": "120.5",
10888
10888
  "member": "float",
10889
10889
  "name": "TotalTime",
10890
- "required": true,
10890
+ "output_required": true,
10891
10891
  "type": "float",
10892
10892
  "value_allowed_null": false
10893
10893
  },
10894
10894
  {
10895
10895
  "disabled": false,
10896
10896
  "document": "调用总次数",
10897
- "example": "",
10897
+ "example": "150",
10898
10898
  "member": "int64",
10899
10899
  "name": "TotalCalls",
10900
- "required": true,
10900
+ "output_required": true,
10901
10901
  "type": "int",
10902
10902
  "value_allowed_null": false
10903
10903
  },
10904
10904
  {
10905
10905
  "disabled": false,
10906
10906
  "document": "脱敏后的慢SQL列表",
10907
- "example": "",
10907
+ "example": "{ \"DatabaseName\": \"my_database\", \"UserName\": \"db_user\", \"NormalQuery\": \"SELECT * FROM users WHERE age > 30\", \"Calls\": 150, \"CallsGrids\": [ 10, 20, 30, 40, 50 ], \"CostTime\": 120.5, \"Rows\": 75, \"MinCostTime\": 0.5, \"MaxCostTime\": 5.0, \"FirstTime\": \"2024-10-01T10:00:00Z\", \"LastTime\": \"2024-10-01T10:05:00Z\", \"SharedReadBlks\": 300, \"SharedWriteBlks\": 50, \"ReadCostTime\": 100, \"WriteCostTime\": 20 }",
10908
10908
  "member": "NormalQueryItem",
10909
10909
  "name": "NormalQueries",
10910
- "required": true,
10910
+ "output_required": true,
10911
10911
  "type": "list",
10912
10912
  "value_allowed_null": false
10913
10913
  }
@@ -11165,9 +11165,10 @@
11165
11165
  {
11166
11166
  "disabled": false,
11167
11167
  "document": "标签键",
11168
- "example": "",
11168
+ "example": "env",
11169
11169
  "member": "string",
11170
11170
  "name": "TagKey",
11171
+ "output_required": true,
11171
11172
  "required": true,
11172
11173
  "type": "string",
11173
11174
  "value_allowed_null": false
@@ -11175,9 +11176,10 @@
11175
11176
  {
11176
11177
  "disabled": false,
11177
11178
  "document": "标签值",
11178
- "example": "",
11179
+ "example": "prod",
11179
11180
  "member": "string",
11180
11181
  "name": "TagValue",
11182
+ "output_required": true,
11181
11183
  "required": true,
11182
11184
  "type": "string",
11183
11185
  "value_allowed_null": false
@@ -515,8 +515,8 @@
515
515
  "DescribeParameterTemplates": [
516
516
  {
517
517
  "document": "无",
518
- "input": "POST / HTTP/1.1\nHost: postgres.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeParameterTemplates\n<公共请求参数>\n\n{\n \"Filters\": [\n {\n \"Name\": \"TemplateName\",\n \"Values\": [\n \"test\"\n ]\n }\n ],\n \"Limit\": 0,\n \"Offset\": 10,\n \"OrderBy\": \"CreateTime\",\n \"OrderByType\": \"desc\"\n}",
519
- "output": "{\n \"Response\": {\n \"ParameterTemplateSet\": [\n {\n \"DBEngine\": \"postgresql\",\n \"DBMajorVersion\": \"13\",\n \"TemplateDescription\": \"test1\",\n \"TemplateId\": \"674538e8-4a03-5103-896c-9785c960bf02\",\n \"TemplateName\": \"test1\"\n },\n {\n \"DBEngine\": \"postgresql\",\n \"DBMajorVersion\": \"13\",\n \"TemplateDescription\": \"test2\",\n \"TemplateId\": \"423984bb-97fe-5693-a74f-63cc8dfb6c5d\",\n \"TemplateName\": \"test2\"\n }\n ],\n \"RequestId\": \"6224e7ed-d7d8-494c-835f-e1612345383f\",\n \"TotalCount\": 2\n }\n}",
518
+ "input": "POST / HTTP/1.1\nHost: postgres.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeParameterTemplates\n<公共请求参数>\n\n{\n \"Filters\": [\n {\n \"Name\": \"TemplateName\",\n \"Values\": [\n \"my_custom_template\"\n ]\n }\n ],\n \"Limit\": 0,\n \"Offset\": 10,\n \"OrderBy\": \"CreateTime\",\n \"OrderByType\": \"desc\"\n}",
519
+ "output": "{\n \"Response\": {\n \"ParameterTemplateSet\": [\n {\n \"DBEngine\": \"postgresql\",\n \"DBMajorVersion\": \"13\",\n \"TemplateDescription\": \"my template1\",\n \"TemplateId\": \"674538e8-4a03-5103-896c-9785c960bf02\",\n \"TemplateName\": \"my_custom_template\"\n },\n {\n \"DBEngine\": \"postgresql\",\n \"DBMajorVersion\": \"13\",\n \"TemplateDescription\": \"my template2\",\n \"TemplateId\": \"423984bb-97fe-5693-a74f-63cc8dfb6c5d\",\n \"TemplateName\": \"my_custom_template\"\n }\n ],\n \"RequestId\": \"6224e7ed-d7d8-494c-835f-e1612345383f\",\n \"TotalCount\": 2\n }\n}",
520
520
  "title": "查询参数模板信息"
521
521
  }
522
522
  ],
@@ -400,10 +400,10 @@
400
400
  ],
401
401
  "DescribeMaintenanceWindow": [
402
402
  {
403
- "document": "修改实例的维护时间窗为03:00-06:00",
403
+ "document": "查询实例的维护时间窗,结果为03:00-06:00",
404
404
  "input": "https://redis.tencentcloudapi.com/?Action=DescribeMaintenanceWindow\n&InstanceId=crs-5a4p****\n&<公共请求参数>",
405
405
  "output": "{\n \"Response\": {\n \"StartTime\": \"03:00\",\n \"EndTime\": \"06:00\",\n \"RequestId\": \"0e728fa9-c2e5-4bf8-8d6b-c1c4fab7b6db\"\n }\n}",
406
- "title": "配置实例访问时间窗"
406
+ "title": "查询实例维护时间窗"
407
407
  }
408
408
  ],
409
409
  "DescribeParamTemplateInfo": [
@@ -5088,7 +5088,7 @@
5088
5088
  {
5089
5089
  "disabled": false,
5090
5090
  "document": "每页数量,默认10。\t",
5091
- "example": "10",
5091
+ "example": "\"10\"",
5092
5092
  "member": "uint64",
5093
5093
  "name": "Limit",
5094
5094
  "required": false,
@@ -5097,7 +5097,7 @@
5097
5097
  {
5098
5098
  "disabled": false,
5099
5099
  "document": "分页偏移量,从0开始。\t",
5100
- "example": "0",
5100
+ "example": "\"0\"",
5101
5101
  "member": "string",
5102
5102
  "name": "Offset",
5103
5103
  "required": false,
@@ -6222,7 +6222,7 @@
6222
6222
  {
6223
6223
  "disabled": false,
6224
6224
  "document": "每页数量,默认10。",
6225
- "example": "10",
6225
+ "example": "\"10\"",
6226
6226
  "member": "string",
6227
6227
  "name": "Limit",
6228
6228
  "required": false,
@@ -6231,7 +6231,7 @@
6231
6231
  {
6232
6232
  "disabled": false,
6233
6233
  "document": "分页偏移量,从0开始。",
6234
- "example": "0",
6234
+ "example": "\"0\"",
6235
6235
  "member": "string",
6236
6236
  "name": "Offset",
6237
6237
  "required": false,
@@ -325,7 +325,7 @@
325
325
  "DescribeHostUpdateRecordDetail": [
326
326
  {
327
327
  "document": "查询证书云资源更新记录详情列表",
328
- "input": "POST / HTTP/1.1\nHost: ssl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeHostUpdateRecordDetail\n<公共请求参数>\n\n{\n \"DeployRecordId\": \"748332\",\n \"Limit\": \"0\",\n \"Offset\": \"10\"\n}",
328
+ "input": "POST / HTTP/1.1\nHost: ssl.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeHostUpdateRecordDetail\n<公共请求参数>\n\n{\n \"DeployRecordId\": \"748332\",\n \"Limit\": \"10\",\n \"Offset\": \"0\"\n}",
329
329
  "output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"RecordDetailList\": [\n {\n \"ResourceType\": \"teo\",\n \"List\": [\n {\n \"Id\": 788838,\n \"CertId\": \"txhs***j\",\n \"OldCertId\": \"wjhs**jj\",\n \"Domains\": [\n \"www.test.com\"\n ],\n \"ResourceType\": \"teo\",\n \"Region\": \"ap-guangzhou\",\n \"Status\": 1,\n \"ErrorMsg\": \"\",\n \"CreateTime\": \"2023-12-12 12:00:00\",\n \"UpdateTime\": \"2023-12-12 12:00:00\",\n \"InstanceId\": \"eo-******\",\n \"InstanceName\": \"test\",\n \"ListenerId\": \"\",\n \"ListenerName\": \"\",\n \"Protocol\": \"\",\n \"SniSwitch\": 1,\n \"Bucket\": \"\",\n \"Port\": 0,\n \"Namespace\": \"\",\n \"SecretName\": \"test\",\n \"EnvId\": \"\",\n \"TCBType\": \"\"\n }\n ],\n \"TotalCount\": 1\n }\n ],\n \"SuccessTotalCount\": 0,\n \"FailedTotalCount\": 0,\n \"RunningTotalCount\": 0,\n \"RequestId\": \"14727a68-3b90-4408-99c9-dea6d7de9456\"\n }\n}",
330
330
  "title": "查询证书云资源更新记录详情列表"
331
331
  }
@@ -230,7 +230,7 @@
230
230
  {
231
231
  "disabled": false,
232
232
  "document": "会话名称",
233
- "example": "test",
233
+ "example": "readOnlySession",
234
234
  "member": "string",
235
235
  "name": "RoleSessionName",
236
236
  "required": true,
@@ -254,7 +254,7 @@
254
254
  {
255
255
  "disabled": false,
256
256
  "document": "对象里面包含 Token,TmpSecretId,TmpSecretKey 三元组",
257
- "example": "",
257
+ "example": "{\"Token\":\"1siMD***\",\"TmpSecretId\":\"AKID***\",\"TmpSecretKey\":\"q95K***\"}",
258
258
  "member": "Credentials",
259
259
  "name": "Credentials",
260
260
  "output_required": true,
@@ -389,30 +389,30 @@
389
389
  {
390
390
  "disabled": false,
391
391
  "document": "token。token长度和绑定的策略有关,最长不超过4096字节。",
392
- "example": "",
392
+ "example": "da1e***",
393
393
  "member": "string",
394
394
  "name": "Token",
395
- "required": true,
395
+ "output_required": true,
396
396
  "type": "string",
397
397
  "value_allowed_null": false
398
398
  },
399
399
  {
400
400
  "disabled": false,
401
401
  "document": "临时证书密钥ID。最长不超过1024字节。",
402
- "example": "",
402
+ "example": "AKID***",
403
403
  "member": "string",
404
404
  "name": "TmpSecretId",
405
- "required": true,
405
+ "output_required": true,
406
406
  "type": "string",
407
407
  "value_allowed_null": false
408
408
  },
409
409
  {
410
410
  "disabled": false,
411
411
  "document": "临时证书密钥Key。最长不超过1024字节。",
412
- "example": "",
412
+ "example": "q95K***",
413
413
  "member": "string",
414
414
  "name": "TmpSecretKey",
415
- "required": true,
415
+ "output_required": true,
416
416
  "type": "string",
417
417
  "value_allowed_null": false
418
418
  }
@@ -487,7 +487,7 @@
487
487
  {
488
488
  "disabled": false,
489
489
  "document": "您可以自定义调用方英文名称,由字母组成。",
490
- "example": "test",
490
+ "example": "readOnly",
491
491
  "member": "string",
492
492
  "name": "Name",
493
493
  "required": true,
@@ -1109,6 +1109,58 @@ def doDescribeAutoScalerResourceStrategies(args, parsed_globals):
1109
1109
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1110
1110
 
1111
1111
 
1112
+ def doModifyNativeGatewayServiceSource(args, parsed_globals):
1113
+ g_param = parse_global_arg(parsed_globals)
1114
+
1115
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1116
+ cred = credential.CVMRoleCredential()
1117
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1118
+ cred = credential.STSAssumeRoleCredential(
1119
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1120
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1121
+ )
1122
+ 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):
1123
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1124
+ else:
1125
+ cred = credential.Credential(
1126
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1127
+ )
1128
+ http_profile = HttpProfile(
1129
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1130
+ reqMethod="POST",
1131
+ endpoint=g_param[OptionsDefine.Endpoint],
1132
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1133
+ )
1134
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1135
+ if g_param[OptionsDefine.Language]:
1136
+ profile.language = g_param[OptionsDefine.Language]
1137
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1138
+ client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
1139
+ client._sdkVersion += ("_CLI_" + __version__)
1140
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1141
+ model = models.ModifyNativeGatewayServiceSourceRequest()
1142
+ model.from_json_string(json.dumps(args))
1143
+ start_time = time.time()
1144
+ while True:
1145
+ rsp = client.ModifyNativeGatewayServiceSource(model)
1146
+ result = rsp.to_json_string()
1147
+ try:
1148
+ json_obj = json.loads(result)
1149
+ except TypeError as e:
1150
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1151
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1152
+ break
1153
+ cur_time = time.time()
1154
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1155
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1156
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1157
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1158
+ else:
1159
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1160
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1161
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1162
+
1163
+
1112
1164
  def doUnbindAutoScalerResourceStrategyFromGroups(args, parsed_globals):
1113
1165
  g_param = parse_global_arg(parsed_globals)
1114
1166
 
@@ -1317,7 +1369,7 @@ def doUpdateCloudNativeAPIGatewayCertificateInfo(args, parsed_globals):
1317
1369
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1318
1370
 
1319
1371
 
1320
- def doUpdateCloudNativeAPIGatewaySpec(args, parsed_globals):
1372
+ def doDeleteNativeGatewayServiceSource(args, parsed_globals):
1321
1373
  g_param = parse_global_arg(parsed_globals)
1322
1374
 
1323
1375
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1346,11 +1398,11 @@ def doUpdateCloudNativeAPIGatewaySpec(args, parsed_globals):
1346
1398
  client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
1347
1399
  client._sdkVersion += ("_CLI_" + __version__)
1348
1400
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1349
- model = models.UpdateCloudNativeAPIGatewaySpecRequest()
1401
+ model = models.DeleteNativeGatewayServiceSourceRequest()
1350
1402
  model.from_json_string(json.dumps(args))
1351
1403
  start_time = time.time()
1352
1404
  while True:
1353
- rsp = client.UpdateCloudNativeAPIGatewaySpec(model)
1405
+ rsp = client.DeleteNativeGatewayServiceSource(model)
1354
1406
  result = rsp.to_json_string()
1355
1407
  try:
1356
1408
  json_obj = json.loads(result)
@@ -1785,6 +1837,58 @@ def doPublishConfigFiles(args, parsed_globals):
1785
1837
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1786
1838
 
1787
1839
 
1840
+ def doCreateNativeGatewayServiceSource(args, parsed_globals):
1841
+ g_param = parse_global_arg(parsed_globals)
1842
+
1843
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1844
+ cred = credential.CVMRoleCredential()
1845
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1846
+ cred = credential.STSAssumeRoleCredential(
1847
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1848
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1849
+ )
1850
+ 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):
1851
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1852
+ else:
1853
+ cred = credential.Credential(
1854
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1855
+ )
1856
+ http_profile = HttpProfile(
1857
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1858
+ reqMethod="POST",
1859
+ endpoint=g_param[OptionsDefine.Endpoint],
1860
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1861
+ )
1862
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1863
+ if g_param[OptionsDefine.Language]:
1864
+ profile.language = g_param[OptionsDefine.Language]
1865
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1866
+ client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
1867
+ client._sdkVersion += ("_CLI_" + __version__)
1868
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1869
+ model = models.CreateNativeGatewayServiceSourceRequest()
1870
+ model.from_json_string(json.dumps(args))
1871
+ start_time = time.time()
1872
+ while True:
1873
+ rsp = client.CreateNativeGatewayServiceSource(model)
1874
+ result = rsp.to_json_string()
1875
+ try:
1876
+ json_obj = json.loads(result)
1877
+ except TypeError as e:
1878
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1879
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1880
+ break
1881
+ cur_time = time.time()
1882
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1883
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1884
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1885
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1886
+ else:
1887
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1888
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1889
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1890
+
1891
+
1788
1892
  def doDescribeConfigFile(args, parsed_globals):
1789
1893
  g_param = parse_global_arg(parsed_globals)
1790
1894
 
@@ -2409,7 +2513,7 @@ def doCreateGovernanceInstances(args, parsed_globals):
2409
2513
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2410
2514
 
2411
2515
 
2412
- def doCreateOrUpdateConfigFileAndRelease(args, parsed_globals):
2516
+ def doDeleteCloudNativeAPIGatewayRouteRateLimit(args, parsed_globals):
2413
2517
  g_param = parse_global_arg(parsed_globals)
2414
2518
 
2415
2519
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2438,11 +2542,11 @@ def doCreateOrUpdateConfigFileAndRelease(args, parsed_globals):
2438
2542
  client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
2439
2543
  client._sdkVersion += ("_CLI_" + __version__)
2440
2544
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2441
- model = models.CreateOrUpdateConfigFileAndReleaseRequest()
2545
+ model = models.DeleteCloudNativeAPIGatewayRouteRateLimitRequest()
2442
2546
  model.from_json_string(json.dumps(args))
2443
2547
  start_time = time.time()
2444
2548
  while True:
2445
- rsp = client.CreateOrUpdateConfigFileAndRelease(model)
2549
+ rsp = client.DeleteCloudNativeAPIGatewayRouteRateLimit(model)
2446
2550
  result = rsp.to_json_string()
2447
2551
  try:
2448
2552
  json_obj = json.loads(result)
@@ -2565,7 +2669,7 @@ def doDeleteAutoScalerResourceStrategy(args, parsed_globals):
2565
2669
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2566
2670
 
2567
2671
 
2568
- def doDeleteCloudNativeAPIGatewayRouteRateLimit(args, parsed_globals):
2672
+ def doModifyCloudNativeAPIGatewayRoute(args, parsed_globals):
2569
2673
  g_param = parse_global_arg(parsed_globals)
2570
2674
 
2571
2675
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2594,11 +2698,11 @@ def doDeleteCloudNativeAPIGatewayRouteRateLimit(args, parsed_globals):
2594
2698
  client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
2595
2699
  client._sdkVersion += ("_CLI_" + __version__)
2596
2700
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2597
- model = models.DeleteCloudNativeAPIGatewayRouteRateLimitRequest()
2701
+ model = models.ModifyCloudNativeAPIGatewayRouteRequest()
2598
2702
  model.from_json_string(json.dumps(args))
2599
2703
  start_time = time.time()
2600
2704
  while True:
2601
- rsp = client.DeleteCloudNativeAPIGatewayRouteRateLimit(model)
2705
+ rsp = client.ModifyCloudNativeAPIGatewayRoute(model)
2602
2706
  result = rsp.to_json_string()
2603
2707
  try:
2604
2708
  json_obj = json.loads(result)
@@ -3033,6 +3137,58 @@ def doDescribeUpstreamHealthCheckConfig(args, parsed_globals):
3033
3137
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3034
3138
 
3035
3139
 
3140
+ def doDescribeNativeGatewayServiceSources(args, parsed_globals):
3141
+ g_param = parse_global_arg(parsed_globals)
3142
+
3143
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3144
+ cred = credential.CVMRoleCredential()
3145
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3146
+ cred = credential.STSAssumeRoleCredential(
3147
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3148
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3149
+ )
3150
+ 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):
3151
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3152
+ else:
3153
+ cred = credential.Credential(
3154
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3155
+ )
3156
+ http_profile = HttpProfile(
3157
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3158
+ reqMethod="POST",
3159
+ endpoint=g_param[OptionsDefine.Endpoint],
3160
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3161
+ )
3162
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3163
+ if g_param[OptionsDefine.Language]:
3164
+ profile.language = g_param[OptionsDefine.Language]
3165
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3166
+ client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
3167
+ client._sdkVersion += ("_CLI_" + __version__)
3168
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3169
+ model = models.DescribeNativeGatewayServiceSourcesRequest()
3170
+ model.from_json_string(json.dumps(args))
3171
+ start_time = time.time()
3172
+ while True:
3173
+ rsp = client.DescribeNativeGatewayServiceSources(model)
3174
+ result = rsp.to_json_string()
3175
+ try:
3176
+ json_obj = json.loads(result)
3177
+ except TypeError as e:
3178
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3179
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3180
+ break
3181
+ cur_time = time.time()
3182
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3183
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3184
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3185
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3186
+ else:
3187
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3188
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3189
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3190
+
3191
+
3036
3192
  def doModifyNativeGatewayServerGroup(args, parsed_globals):
3037
3193
  g_param = parse_global_arg(parsed_globals)
3038
3194
 
@@ -3553,6 +3709,58 @@ def doDescribeConfigFileReleaseVersions(args, parsed_globals):
3553
3709
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3554
3710
 
3555
3711
 
3712
+ def doCreateOrUpdateConfigFileAndRelease(args, parsed_globals):
3713
+ g_param = parse_global_arg(parsed_globals)
3714
+
3715
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3716
+ cred = credential.CVMRoleCredential()
3717
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3718
+ cred = credential.STSAssumeRoleCredential(
3719
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3720
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3721
+ )
3722
+ 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):
3723
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3724
+ else:
3725
+ cred = credential.Credential(
3726
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3727
+ )
3728
+ http_profile = HttpProfile(
3729
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3730
+ reqMethod="POST",
3731
+ endpoint=g_param[OptionsDefine.Endpoint],
3732
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3733
+ )
3734
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3735
+ if g_param[OptionsDefine.Language]:
3736
+ profile.language = g_param[OptionsDefine.Language]
3737
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3738
+ client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
3739
+ client._sdkVersion += ("_CLI_" + __version__)
3740
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3741
+ model = models.CreateOrUpdateConfigFileAndReleaseRequest()
3742
+ model.from_json_string(json.dumps(args))
3743
+ start_time = time.time()
3744
+ while True:
3745
+ rsp = client.CreateOrUpdateConfigFileAndRelease(model)
3746
+ result = rsp.to_json_string()
3747
+ try:
3748
+ json_obj = json.loads(result)
3749
+ except TypeError as e:
3750
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3751
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3752
+ break
3753
+ cur_time = time.time()
3754
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3755
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3756
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3757
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3758
+ else:
3759
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3760
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3761
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3762
+
3763
+
3556
3764
  def doDescribeSREInstances(args, parsed_globals):
3557
3765
  g_param = parse_global_arg(parsed_globals)
3558
3766
 
@@ -5373,7 +5581,7 @@ def doModifyConfigFiles(args, parsed_globals):
5373
5581
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5374
5582
 
5375
5583
 
5376
- def doModifyCloudNativeAPIGatewayRoute(args, parsed_globals):
5584
+ def doUpdateCloudNativeAPIGatewaySpec(args, parsed_globals):
5377
5585
  g_param = parse_global_arg(parsed_globals)
5378
5586
 
5379
5587
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -5402,11 +5610,11 @@ def doModifyCloudNativeAPIGatewayRoute(args, parsed_globals):
5402
5610
  client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
5403
5611
  client._sdkVersion += ("_CLI_" + __version__)
5404
5612
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
5405
- model = models.ModifyCloudNativeAPIGatewayRouteRequest()
5613
+ model = models.UpdateCloudNativeAPIGatewaySpecRequest()
5406
5614
  model.from_json_string(json.dumps(args))
5407
5615
  start_time = time.time()
5408
5616
  while True:
5409
- rsp = client.ModifyCloudNativeAPIGatewayRoute(model)
5617
+ rsp = client.UpdateCloudNativeAPIGatewaySpec(model)
5410
5618
  result = rsp.to_json_string()
5411
5619
  try:
5412
5620
  json_obj = json.loads(result)
@@ -5977,11 +6185,12 @@ ACTION_MAP = {
5977
6185
  "DescribeWafDomains": doDescribeWafDomains,
5978
6186
  "DescribeCloudNativeAPIGatewayCertificateDetails": doDescribeCloudNativeAPIGatewayCertificateDetails,
5979
6187
  "DescribeAutoScalerResourceStrategies": doDescribeAutoScalerResourceStrategies,
6188
+ "ModifyNativeGatewayServiceSource": doModifyNativeGatewayServiceSource,
5980
6189
  "UnbindAutoScalerResourceStrategyFromGroups": doUnbindAutoScalerResourceStrategyFromGroups,
5981
6190
  "DeleteCloudNativeAPIGatewayCertificate": doDeleteCloudNativeAPIGatewayCertificate,
5982
6191
  "DescribeGovernanceServiceContracts": doDescribeGovernanceServiceContracts,
5983
6192
  "UpdateCloudNativeAPIGatewayCertificateInfo": doUpdateCloudNativeAPIGatewayCertificateInfo,
5984
- "UpdateCloudNativeAPIGatewaySpec": doUpdateCloudNativeAPIGatewaySpec,
6193
+ "DeleteNativeGatewayServiceSource": doDeleteNativeGatewayServiceSource,
5985
6194
  "DescribeAllConfigFileTemplates": doDescribeAllConfigFileTemplates,
5986
6195
  "CreateNativeGatewayServerGroup": doCreateNativeGatewayServerGroup,
5987
6196
  "DescribeConfigFilesByGroup": doDescribeConfigFilesByGroup,
@@ -5990,6 +6199,7 @@ ACTION_MAP = {
5990
6199
  "ModifyAutoScalerResourceStrategy": doModifyAutoScalerResourceStrategy,
5991
6200
  "DescribeInstanceTagInfos": doDescribeInstanceTagInfos,
5992
6201
  "PublishConfigFiles": doPublishConfigFiles,
6202
+ "CreateNativeGatewayServiceSource": doCreateNativeGatewayServiceSource,
5993
6203
  "DescribeConfigFile": doDescribeConfigFile,
5994
6204
  "DescribeConfigFileReleases": doDescribeConfigFileReleases,
5995
6205
  "CloseWafProtection": doCloseWafProtection,
@@ -6002,10 +6212,10 @@ ACTION_MAP = {
6002
6212
  "UpdateUpstreamTargets": doUpdateUpstreamTargets,
6003
6213
  "CreateCloudNativeAPIGatewayRoute": doCreateCloudNativeAPIGatewayRoute,
6004
6214
  "CreateGovernanceInstances": doCreateGovernanceInstances,
6005
- "CreateOrUpdateConfigFileAndRelease": doCreateOrUpdateConfigFileAndRelease,
6215
+ "DeleteCloudNativeAPIGatewayRouteRateLimit": doDeleteCloudNativeAPIGatewayRouteRateLimit,
6006
6216
  "DeleteConfigFileReleases": doDeleteConfigFileReleases,
6007
6217
  "DeleteAutoScalerResourceStrategy": doDeleteAutoScalerResourceStrategy,
6008
- "DeleteCloudNativeAPIGatewayRouteRateLimit": doDeleteCloudNativeAPIGatewayRouteRateLimit,
6218
+ "ModifyCloudNativeAPIGatewayRoute": doModifyCloudNativeAPIGatewayRoute,
6009
6219
  "DeleteNativeGatewayServerGroup": doDeleteNativeGatewayServerGroup,
6010
6220
  "DescribeCloudNativeAPIGatewayPorts": doDescribeCloudNativeAPIGatewayPorts,
6011
6221
  "DescribeCloudNativeAPIGatewayCanaryRules": doDescribeCloudNativeAPIGatewayCanaryRules,
@@ -6014,6 +6224,7 @@ ACTION_MAP = {
6014
6224
  "ModifyConsoleNetwork": doModifyConsoleNetwork,
6015
6225
  "DescribeNacosReplicas": doDescribeNacosReplicas,
6016
6226
  "DescribeUpstreamHealthCheckConfig": doDescribeUpstreamHealthCheckConfig,
6227
+ "DescribeNativeGatewayServiceSources": doDescribeNativeGatewayServiceSources,
6017
6228
  "ModifyNativeGatewayServerGroup": doModifyNativeGatewayServerGroup,
6018
6229
  "DescribeCloudNativeAPIGatewayCertificates": doDescribeCloudNativeAPIGatewayCertificates,
6019
6230
  "ModifyCloudNativeAPIGatewayServiceRateLimit": doModifyCloudNativeAPIGatewayServiceRateLimit,
@@ -6024,6 +6235,7 @@ ACTION_MAP = {
6024
6235
  "DescribeGovernanceServices": doDescribeGovernanceServices,
6025
6236
  "DeleteCloudNativeAPIGatewayCanaryRule": doDeleteCloudNativeAPIGatewayCanaryRule,
6026
6237
  "DescribeConfigFileReleaseVersions": doDescribeConfigFileReleaseVersions,
6238
+ "CreateOrUpdateConfigFileAndRelease": doCreateOrUpdateConfigFileAndRelease,
6027
6239
  "DescribeSREInstances": doDescribeSREInstances,
6028
6240
  "DeleteCloudNativeAPIGatewayServiceRateLimit": doDeleteCloudNativeAPIGatewayServiceRateLimit,
6029
6241
  "DescribeWafProtection": doDescribeWafProtection,
@@ -6059,7 +6271,7 @@ ACTION_MAP = {
6059
6271
  "CreateCloudNativeAPIGatewayPublicNetwork": doCreateCloudNativeAPIGatewayPublicNetwork,
6060
6272
  "DescribeNacosServerInterfaces": doDescribeNacosServerInterfaces,
6061
6273
  "ModifyConfigFiles": doModifyConfigFiles,
6062
- "ModifyCloudNativeAPIGatewayRoute": doModifyCloudNativeAPIGatewayRoute,
6274
+ "UpdateCloudNativeAPIGatewaySpec": doUpdateCloudNativeAPIGatewaySpec,
6063
6275
  "CreateGovernanceServices": doCreateGovernanceServices,
6064
6276
  "DeleteGovernanceNamespaces": doDeleteGovernanceNamespaces,
6065
6277
  "ModifyGovernanceInstances": doModifyGovernanceInstances,