tccli 3.0.1215.1__py2.py3-none-any.whl → 3.0.1216.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 (99) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/configure.py +46 -1
  3. tccli/services/__init__.py +0 -3
  4. tccli/services/apm/v20210622/api.json +20 -0
  5. tccli/services/asr/v20190614/api.json +3 -3
  6. tccli/services/bi/v20220105/api.json +32 -4
  7. tccli/services/bi/v20220105/examples.json +1 -1
  8. tccli/services/billing/billing_client.py +53 -0
  9. tccli/services/billing/v20180709/api.json +304 -0
  10. tccli/services/billing/v20180709/examples.json +8 -0
  11. tccli/services/bsca/v20210811/api.json +222 -17
  12. tccli/services/bsca/v20210811/examples.json +4 -4
  13. tccli/services/ccc/ccc_client.py +53 -0
  14. tccli/services/ccc/v20200210/api.json +167 -18
  15. tccli/services/ccc/v20200210/examples.json +11 -3
  16. tccli/services/cdb/v20170320/api.json +13 -4
  17. tccli/services/cdb/v20170320/examples.json +1 -1
  18. tccli/services/cdn/v20180606/api.json +5 -3
  19. tccli/services/cdwdoris/v20211228/api.json +12 -2
  20. tccli/services/cfw/v20190904/api.json +81 -47
  21. tccli/services/cfw/v20190904/examples.json +46 -40
  22. tccli/services/ciam/v20220331/api.json +316 -315
  23. tccli/services/ciam/v20220331/examples.json +49 -49
  24. tccli/services/cloudaudit/cloudaudit_client.py +30 -30
  25. tccli/services/cloudaudit/v20190319/api.json +215 -186
  26. tccli/services/cloudaudit/v20190319/examples.json +13 -13
  27. tccli/services/cls/v20201016/api.json +365 -66
  28. tccli/services/cls/v20201016/examples.json +9 -3
  29. tccli/services/csip/v20221121/api.json +4 -4
  30. tccli/services/cvm/v20170312/api.json +42 -0
  31. tccli/services/cwp/v20180228/api.json +217 -163
  32. tccli/services/cwp/v20180228/examples.json +53 -65
  33. tccli/services/cynosdb/v20190107/api.json +77 -29
  34. tccli/services/cynosdb/v20190107/examples.json +22 -22
  35. tccli/services/dasb/v20191018/api.json +77 -0
  36. tccli/services/dasb/v20191018/examples.json +5 -5
  37. tccli/services/domain/v20180808/api.json +3 -3
  38. tccli/services/domain/v20180808/examples.json +3 -3
  39. tccli/services/eb/v20210416/api.json +15 -15
  40. tccli/services/eb/v20210416/examples.json +1 -1
  41. tccli/services/es/es_client.py +249 -37
  42. tccli/services/es/v20180416/api.json +521 -0
  43. tccli/services/es/v20180416/examples.json +32 -0
  44. tccli/services/ess/ess_client.py +53 -0
  45. tccli/services/ess/v20201111/api.json +145 -9
  46. tccli/services/ess/v20201111/examples.json +15 -1
  47. tccli/services/essbasic/essbasic_client.py +106 -0
  48. tccli/services/essbasic/v20210526/api.json +234 -12
  49. tccli/services/essbasic/v20210526/examples.json +22 -0
  50. tccli/services/gaap/v20180529/api.json +44 -26
  51. tccli/services/gaap/v20180529/examples.json +24 -30
  52. tccli/services/iotexplorer/v20190423/api.json +40 -0
  53. tccli/services/live/v20180801/api.json +35 -9
  54. tccli/services/mongodb/v20190725/api.json +6 -8
  55. tccli/services/ocr/v20181119/api.json +2 -2
  56. tccli/services/organization/organization_client.py +352 -34
  57. tccli/services/organization/v20210331/api.json +451 -0
  58. tccli/services/organization/v20210331/examples.json +48 -0
  59. tccli/services/region/v20220627/api.json +1 -1
  60. tccli/services/scf/scf_client.py +269 -4
  61. tccli/services/scf/v20180416/api.json +554 -0
  62. tccli/services/scf/v20180416/examples.json +46 -0
  63. tccli/services/ssl/v20191205/api.json +1 -1
  64. tccli/services/tat/v20201028/api.json +27 -25
  65. tccli/services/tat/v20201028/examples.json +4 -4
  66. tccli/services/tcss/v20201101/api.json +13 -13
  67. tccli/services/tcss/v20201101/examples.json +5 -5
  68. tccli/services/tdmq/v20200217/api.json +64 -63
  69. tccli/services/tdmq/v20200217/examples.json +2 -2
  70. tccli/services/tem/v20210701/api.json +144 -103
  71. tccli/services/tem/v20210701/examples.json +27 -27
  72. tccli/services/teo/teo_client.py +277 -12
  73. tccli/services/teo/v20220901/api.json +1020 -143
  74. tccli/services/teo/v20220901/examples.json +71 -1
  75. tccli/services/tke/tke_client.py +53 -0
  76. tccli/services/tke/v20180525/api.json +43 -0
  77. tccli/services/tke/v20180525/examples.json +8 -0
  78. tccli/services/tms/tms_client.py +4 -57
  79. tccli/services/tms/v20201229/api.json +0 -354
  80. tccli/services/tms/v20201229/examples.json +0 -8
  81. tccli/services/trtc/v20190722/api.json +221 -22
  82. tccli/services/vpc/v20170312/api.json +105 -30
  83. tccli/services/vpc/v20170312/examples.json +10 -2
  84. tccli/services/vpc/vpc_client.py +107 -54
  85. tccli/services/waf/v20180125/api.json +61 -0
  86. tccli/services/waf/v20180125/examples.json +8 -0
  87. tccli/services/waf/waf_client.py +53 -0
  88. tccli/services/wedata/v20210820/api.json +686 -0
  89. tccli/services/wedata/v20210820/examples.json +16 -0
  90. tccli/services/wedata/wedata_client.py +106 -0
  91. {tccli-3.0.1215.1.dist-info → tccli-3.0.1216.1.dist-info}/METADATA +6 -2
  92. {tccli-3.0.1215.1.dist-info → tccli-3.0.1216.1.dist-info}/RECORD +95 -99
  93. tccli/services/cr/__init__.py +0 -4
  94. tccli/services/cr/cr_client.py +0 -1626
  95. tccli/services/cr/v20180321/api.json +0 -2829
  96. tccli/services/cr/v20180321/examples.json +0 -235
  97. {tccli-3.0.1215.1.dist-info → tccli-3.0.1216.1.dist-info}/WHEEL +0 -0
  98. {tccli-3.0.1215.1.dist-info → tccli-3.0.1216.1.dist-info}/entry_points.txt +0 -0
  99. {tccli-3.0.1215.1.dist-info → tccli-3.0.1216.1.dist-info}/license_files/LICENSE +0 -0
@@ -745,6 +745,58 @@ def doUpdateNamespace(args, parsed_globals):
745
745
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
746
 
747
747
 
748
+ def doListCustomDomains(args, parsed_globals):
749
+ g_param = parse_global_arg(parsed_globals)
750
+
751
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
752
+ cred = credential.CVMRoleCredential()
753
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
754
+ cred = credential.STSAssumeRoleCredential(
755
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
756
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
757
+ )
758
+ 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):
759
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
760
+ else:
761
+ cred = credential.Credential(
762
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
763
+ )
764
+ http_profile = HttpProfile(
765
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
766
+ reqMethod="POST",
767
+ endpoint=g_param[OptionsDefine.Endpoint],
768
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
769
+ )
770
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
771
+ if g_param[OptionsDefine.Language]:
772
+ profile.language = g_param[OptionsDefine.Language]
773
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
774
+ client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
775
+ client._sdkVersion += ("_CLI_" + __version__)
776
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
+ model = models.ListCustomDomainsRequest()
778
+ model.from_json_string(json.dumps(args))
779
+ start_time = time.time()
780
+ while True:
781
+ rsp = client.ListCustomDomains(model)
782
+ result = rsp.to_json_string()
783
+ try:
784
+ json_obj = json.loads(result)
785
+ except TypeError as e:
786
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
787
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
788
+ break
789
+ cur_time = time.time()
790
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
791
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
792
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
793
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
794
+ else:
795
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
796
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
797
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
+
799
+
748
800
  def doDeleteProvisionedConcurrencyConfig(args, parsed_globals):
749
801
  g_param = parse_global_arg(parsed_globals)
750
802
 
@@ -1265,6 +1317,58 @@ def doTerminateAsyncEvent(args, parsed_globals):
1265
1317
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1266
1318
 
1267
1319
 
1320
+ def doDeleteCustomDomain(args, parsed_globals):
1321
+ g_param = parse_global_arg(parsed_globals)
1322
+
1323
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1324
+ cred = credential.CVMRoleCredential()
1325
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1326
+ cred = credential.STSAssumeRoleCredential(
1327
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1328
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1329
+ )
1330
+ 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):
1331
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1332
+ else:
1333
+ cred = credential.Credential(
1334
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1335
+ )
1336
+ http_profile = HttpProfile(
1337
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1338
+ reqMethod="POST",
1339
+ endpoint=g_param[OptionsDefine.Endpoint],
1340
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1341
+ )
1342
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1343
+ if g_param[OptionsDefine.Language]:
1344
+ profile.language = g_param[OptionsDefine.Language]
1345
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1346
+ client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
1347
+ client._sdkVersion += ("_CLI_" + __version__)
1348
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1349
+ model = models.DeleteCustomDomainRequest()
1350
+ model.from_json_string(json.dumps(args))
1351
+ start_time = time.time()
1352
+ while True:
1353
+ rsp = client.DeleteCustomDomain(model)
1354
+ result = rsp.to_json_string()
1355
+ try:
1356
+ json_obj = json.loads(result)
1357
+ except TypeError as e:
1358
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1359
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1360
+ break
1361
+ cur_time = time.time()
1362
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1363
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1364
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1365
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1366
+ else:
1367
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1368
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1369
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1370
+
1371
+
1268
1372
  def doUpdateFunctionEventInvokeConfig(args, parsed_globals):
1269
1373
  g_param = parse_global_arg(parsed_globals)
1270
1374
 
@@ -1629,7 +1733,7 @@ def doGetAccount(args, parsed_globals):
1629
1733
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1630
1734
 
1631
1735
 
1632
- def doGetReservedConcurrencyConfig(args, parsed_globals):
1736
+ def doCreateCustomDomain(args, parsed_globals):
1633
1737
  g_param = parse_global_arg(parsed_globals)
1634
1738
 
1635
1739
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1658,11 +1762,11 @@ def doGetReservedConcurrencyConfig(args, parsed_globals):
1658
1762
  client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
1659
1763
  client._sdkVersion += ("_CLI_" + __version__)
1660
1764
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1661
- model = models.GetReservedConcurrencyConfigRequest()
1765
+ model = models.CreateCustomDomainRequest()
1662
1766
  model.from_json_string(json.dumps(args))
1663
1767
  start_time = time.time()
1664
1768
  while True:
1665
- rsp = client.GetReservedConcurrencyConfig(model)
1769
+ rsp = client.CreateCustomDomain(model)
1666
1770
  result = rsp.to_json_string()
1667
1771
  try:
1668
1772
  json_obj = json.loads(result)
@@ -2149,6 +2253,58 @@ def doGetAlias(args, parsed_globals):
2149
2253
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2150
2254
 
2151
2255
 
2256
+ def doGetReservedConcurrencyConfig(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.ScfClient(cred, g_param[OptionsDefine.Region], profile)
2283
+ client._sdkVersion += ("_CLI_" + __version__)
2284
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2285
+ model = models.GetReservedConcurrencyConfigRequest()
2286
+ model.from_json_string(json.dumps(args))
2287
+ start_time = time.time()
2288
+ while True:
2289
+ rsp = client.GetReservedConcurrencyConfig(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
+
2152
2308
  def doPutTotalConcurrencyConfig(args, parsed_globals):
2153
2309
  g_param = parse_global_arg(parsed_globals)
2154
2310
 
@@ -2201,6 +2357,110 @@ def doPutTotalConcurrencyConfig(args, parsed_globals):
2201
2357
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2202
2358
 
2203
2359
 
2360
+ def doGetCustomDomain(args, parsed_globals):
2361
+ g_param = parse_global_arg(parsed_globals)
2362
+
2363
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2364
+ cred = credential.CVMRoleCredential()
2365
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2366
+ cred = credential.STSAssumeRoleCredential(
2367
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2368
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2369
+ )
2370
+ 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):
2371
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2372
+ else:
2373
+ cred = credential.Credential(
2374
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2375
+ )
2376
+ http_profile = HttpProfile(
2377
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2378
+ reqMethod="POST",
2379
+ endpoint=g_param[OptionsDefine.Endpoint],
2380
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2381
+ )
2382
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2383
+ if g_param[OptionsDefine.Language]:
2384
+ profile.language = g_param[OptionsDefine.Language]
2385
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2386
+ client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
2387
+ client._sdkVersion += ("_CLI_" + __version__)
2388
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2389
+ model = models.GetCustomDomainRequest()
2390
+ model.from_json_string(json.dumps(args))
2391
+ start_time = time.time()
2392
+ while True:
2393
+ rsp = client.GetCustomDomain(model)
2394
+ result = rsp.to_json_string()
2395
+ try:
2396
+ json_obj = json.loads(result)
2397
+ except TypeError as e:
2398
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2399
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2400
+ break
2401
+ cur_time = time.time()
2402
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2403
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2404
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2405
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2406
+ else:
2407
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2408
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2409
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2410
+
2411
+
2412
+ def doUpdateCustomDomain(args, parsed_globals):
2413
+ g_param = parse_global_arg(parsed_globals)
2414
+
2415
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2416
+ cred = credential.CVMRoleCredential()
2417
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2418
+ cred = credential.STSAssumeRoleCredential(
2419
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2420
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2421
+ )
2422
+ 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):
2423
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2424
+ else:
2425
+ cred = credential.Credential(
2426
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2427
+ )
2428
+ http_profile = HttpProfile(
2429
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2430
+ reqMethod="POST",
2431
+ endpoint=g_param[OptionsDefine.Endpoint],
2432
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2433
+ )
2434
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2435
+ if g_param[OptionsDefine.Language]:
2436
+ profile.language = g_param[OptionsDefine.Language]
2437
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2438
+ client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
2439
+ client._sdkVersion += ("_CLI_" + __version__)
2440
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2441
+ model = models.UpdateCustomDomainRequest()
2442
+ model.from_json_string(json.dumps(args))
2443
+ start_time = time.time()
2444
+ while True:
2445
+ rsp = client.UpdateCustomDomain(model)
2446
+ result = rsp.to_json_string()
2447
+ try:
2448
+ json_obj = json.loads(result)
2449
+ except TypeError as e:
2450
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2451
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2452
+ break
2453
+ cur_time = time.time()
2454
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2455
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2456
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2457
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2458
+ else:
2459
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2460
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2461
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2462
+
2463
+
2204
2464
  def doCreateFunction(args, parsed_globals):
2205
2465
  g_param = parse_global_arg(parsed_globals)
2206
2466
 
@@ -2434,6 +2694,7 @@ ACTION_MAP = {
2434
2694
  "DeleteTrigger": doDeleteTrigger,
2435
2695
  "GetProvisionedConcurrencyConfig": doGetProvisionedConcurrencyConfig,
2436
2696
  "UpdateNamespace": doUpdateNamespace,
2697
+ "ListCustomDomains": doListCustomDomains,
2437
2698
  "DeleteProvisionedConcurrencyConfig": doDeleteProvisionedConcurrencyConfig,
2438
2699
  "PublishVersion": doPublishVersion,
2439
2700
  "DeleteLayerVersion": doDeleteLayerVersion,
@@ -2444,6 +2705,7 @@ ACTION_MAP = {
2444
2705
  "ListAsyncEvents": doListAsyncEvents,
2445
2706
  "CreateAlias": doCreateAlias,
2446
2707
  "TerminateAsyncEvent": doTerminateAsyncEvent,
2708
+ "DeleteCustomDomain": doDeleteCustomDomain,
2447
2709
  "UpdateFunctionEventInvokeConfig": doUpdateFunctionEventInvokeConfig,
2448
2710
  "ListVersionByFunction": doListVersionByFunction,
2449
2711
  "ListLayers": doListLayers,
@@ -2451,7 +2713,7 @@ ACTION_MAP = {
2451
2713
  "ListLayerVersions": doListLayerVersions,
2452
2714
  "UpdateTrigger": doUpdateTrigger,
2453
2715
  "GetAccount": doGetAccount,
2454
- "GetReservedConcurrencyConfig": doGetReservedConcurrencyConfig,
2716
+ "CreateCustomDomain": doCreateCustomDomain,
2455
2717
  "ListFunctions": doListFunctions,
2456
2718
  "UpdateFunctionConfiguration": doUpdateFunctionConfiguration,
2457
2719
  "PutReservedConcurrencyConfig": doPutReservedConcurrencyConfig,
@@ -2461,7 +2723,10 @@ ACTION_MAP = {
2461
2723
  "GetFunctionAddress": doGetFunctionAddress,
2462
2724
  "PutProvisionedConcurrencyConfig": doPutProvisionedConcurrencyConfig,
2463
2725
  "GetAlias": doGetAlias,
2726
+ "GetReservedConcurrencyConfig": doGetReservedConcurrencyConfig,
2464
2727
  "PutTotalConcurrencyConfig": doPutTotalConcurrencyConfig,
2728
+ "GetCustomDomain": doGetCustomDomain,
2729
+ "UpdateCustomDomain": doUpdateCustomDomain,
2465
2730
  "CreateFunction": doCreateFunction,
2466
2731
  "ListNamespaces": doListNamespaces,
2467
2732
  "UpdateFunctionCode": doUpdateFunctionCode,