tccli 3.0.1214.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 (112) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/configure.py +46 -1
  3. tccli/services/__init__.py +0 -3
  4. tccli/services/ams/v20201229/examples.json +2 -2
  5. tccli/services/apm/v20210622/api.json +20 -0
  6. tccli/services/asr/v20190614/api.json +3 -3
  7. tccli/services/bi/v20220105/api.json +32 -4
  8. tccli/services/bi/v20220105/examples.json +1 -1
  9. tccli/services/billing/billing_client.py +53 -0
  10. tccli/services/billing/v20180709/api.json +304 -0
  11. tccli/services/billing/v20180709/examples.json +8 -0
  12. tccli/services/bsca/v20210811/api.json +222 -17
  13. tccli/services/bsca/v20210811/examples.json +4 -4
  14. tccli/services/ccc/ccc_client.py +53 -0
  15. tccli/services/ccc/v20200210/api.json +176 -18
  16. tccli/services/ccc/v20200210/examples.json +11 -3
  17. tccli/services/cdb/v20170320/api.json +22 -4
  18. tccli/services/cdb/v20170320/examples.json +1 -1
  19. tccli/services/cdn/v20180606/api.json +5 -3
  20. tccli/services/cdwdoris/v20211228/api.json +23 -2
  21. tccli/services/cfs/v20190719/api.json +3 -3
  22. tccli/services/cfw/v20190904/api.json +86 -52
  23. tccli/services/cfw/v20190904/examples.json +68 -56
  24. tccli/services/ciam/v20220331/api.json +316 -315
  25. tccli/services/ciam/v20220331/examples.json +49 -49
  26. tccli/services/ckafka/v20190819/api.json +1 -1
  27. tccli/services/cloudaudit/cloudaudit_client.py +30 -30
  28. tccli/services/cloudaudit/v20190319/api.json +215 -186
  29. tccli/services/cloudaudit/v20190319/examples.json +13 -13
  30. tccli/services/cls/v20201016/api.json +365 -66
  31. tccli/services/cls/v20201016/examples.json +9 -3
  32. tccli/services/csip/v20221121/api.json +4 -4
  33. tccli/services/cvm/v20170312/api.json +42 -0
  34. tccli/services/cwp/v20180228/api.json +865 -809
  35. tccli/services/cwp/v20180228/examples.json +98 -110
  36. tccli/services/cynosdb/v20190107/api.json +77 -29
  37. tccli/services/cynosdb/v20190107/examples.json +22 -22
  38. tccli/services/dasb/v20191018/api.json +77 -0
  39. tccli/services/dasb/v20191018/examples.json +5 -5
  40. tccli/services/dbbrain/v20191016/examples.json +1 -1
  41. tccli/services/dlc/v20210125/api.json +11 -0
  42. tccli/services/domain/v20180808/api.json +3 -3
  43. tccli/services/domain/v20180808/examples.json +3 -3
  44. tccli/services/eb/v20210416/api.json +15 -15
  45. tccli/services/eb/v20210416/examples.json +1 -1
  46. tccli/services/emr/v20190103/api.json +9 -0
  47. tccli/services/es/es_client.py +249 -37
  48. tccli/services/es/v20180416/api.json +521 -0
  49. tccli/services/es/v20180416/examples.json +32 -0
  50. tccli/services/ess/ess_client.py +53 -0
  51. tccli/services/ess/v20201111/api.json +155 -10
  52. tccli/services/ess/v20201111/examples.json +15 -1
  53. tccli/services/essbasic/essbasic_client.py +106 -0
  54. tccli/services/essbasic/v20210526/api.json +244 -13
  55. tccli/services/essbasic/v20210526/examples.json +22 -0
  56. tccli/services/gaap/v20180529/api.json +44 -26
  57. tccli/services/gaap/v20180529/examples.json +24 -30
  58. tccli/services/hunyuan/v20230901/examples.json +6 -0
  59. tccli/services/iotexplorer/v20190423/api.json +40 -0
  60. tccli/services/iss/v20230517/api.json +19 -0
  61. tccli/services/live/v20180801/api.json +35 -9
  62. tccli/services/mongodb/v20190725/api.json +6 -8
  63. tccli/services/mqtt/v20240516/api.json +2 -2
  64. tccli/services/mqtt/v20240516/examples.json +1 -1
  65. tccli/services/ocr/v20181119/api.json +2 -2
  66. tccli/services/organization/organization_client.py +352 -34
  67. tccli/services/organization/v20210331/api.json +451 -0
  68. tccli/services/organization/v20210331/examples.json +48 -0
  69. tccli/services/partners/partners_client.py +57 -4
  70. tccli/services/partners/v20180321/api.json +44 -0
  71. tccli/services/partners/v20180321/examples.json +8 -0
  72. tccli/services/region/v20220627/api.json +1 -1
  73. tccli/services/scf/scf_client.py +269 -4
  74. tccli/services/scf/v20180416/api.json +554 -0
  75. tccli/services/scf/v20180416/examples.json +46 -0
  76. tccli/services/ssl/v20191205/api.json +34 -5
  77. tccli/services/tat/v20201028/api.json +27 -25
  78. tccli/services/tat/v20201028/examples.json +4 -4
  79. tccli/services/tcss/v20201101/api.json +256 -14
  80. tccli/services/tcss/v20201101/examples.json +7 -7
  81. tccli/services/tdmq/v20200217/api.json +64 -63
  82. tccli/services/tdmq/v20200217/examples.json +2 -2
  83. tccli/services/tem/v20210701/api.json +144 -103
  84. tccli/services/tem/v20210701/examples.json +27 -27
  85. tccli/services/teo/teo_client.py +277 -12
  86. tccli/services/teo/v20220901/api.json +1023 -146
  87. tccli/services/teo/v20220901/examples.json +71 -1
  88. tccli/services/tke/tke_client.py +53 -0
  89. tccli/services/tke/v20180525/api.json +43 -0
  90. tccli/services/tke/v20180525/examples.json +8 -0
  91. tccli/services/tms/tms_client.py +4 -57
  92. tccli/services/tms/v20201229/api.json +0 -354
  93. tccli/services/tms/v20201229/examples.json +0 -8
  94. tccli/services/trtc/v20190722/api.json +221 -22
  95. tccli/services/vpc/v20170312/api.json +111 -34
  96. tccli/services/vpc/v20170312/examples.json +11 -3
  97. tccli/services/vpc/vpc_client.py +107 -54
  98. tccli/services/waf/v20180125/api.json +61 -0
  99. tccli/services/waf/v20180125/examples.json +8 -0
  100. tccli/services/waf/waf_client.py +53 -0
  101. tccli/services/wedata/v20210820/api.json +686 -0
  102. tccli/services/wedata/v20210820/examples.json +16 -0
  103. tccli/services/wedata/wedata_client.py +106 -0
  104. {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/METADATA +6 -2
  105. {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/RECORD +108 -112
  106. tccli/services/cr/__init__.py +0 -4
  107. tccli/services/cr/cr_client.py +0 -1626
  108. tccli/services/cr/v20180321/api.json +0 -2829
  109. tccli/services/cr/v20180321/examples.json +0 -235
  110. {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/WHEEL +0 -0
  111. {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/entry_points.txt +0 -0
  112. {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/license_files/LICENSE +0 -0
@@ -71,6 +71,58 @@ def doDestroyPlan(args, parsed_globals):
71
71
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
72
72
 
73
73
 
74
+ def doDescribeOriginGroupHealthStatus(args, parsed_globals):
75
+ g_param = parse_global_arg(parsed_globals)
76
+
77
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
78
+ cred = credential.CVMRoleCredential()
79
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
80
+ cred = credential.STSAssumeRoleCredential(
81
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
82
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
83
+ )
84
+ 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):
85
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
86
+ else:
87
+ cred = credential.Credential(
88
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
89
+ )
90
+ http_profile = HttpProfile(
91
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
92
+ reqMethod="POST",
93
+ endpoint=g_param[OptionsDefine.Endpoint],
94
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
95
+ )
96
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
97
+ if g_param[OptionsDefine.Language]:
98
+ profile.language = g_param[OptionsDefine.Language]
99
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
100
+ client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
101
+ client._sdkVersion += ("_CLI_" + __version__)
102
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
103
+ model = models.DescribeOriginGroupHealthStatusRequest()
104
+ model.from_json_string(json.dumps(args))
105
+ start_time = time.time()
106
+ while True:
107
+ rsp = client.DescribeOriginGroupHealthStatus(model)
108
+ result = rsp.to_json_string()
109
+ try:
110
+ json_obj = json.loads(result)
111
+ except TypeError as e:
112
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
113
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
114
+ break
115
+ cur_time = time.time()
116
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
117
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
118
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
119
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
120
+ else:
121
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
122
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
123
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
124
+
125
+
74
126
  def doDeleteFunction(args, parsed_globals):
75
127
  g_param = parse_global_arg(parsed_globals)
76
128
 
@@ -1735,6 +1787,58 @@ def doDeleteOriginGroup(args, parsed_globals):
1735
1787
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1736
1788
 
1737
1789
 
1790
+ def doDescribeLoadBalancerList(args, parsed_globals):
1791
+ g_param = parse_global_arg(parsed_globals)
1792
+
1793
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1794
+ cred = credential.CVMRoleCredential()
1795
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1796
+ cred = credential.STSAssumeRoleCredential(
1797
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1798
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1799
+ )
1800
+ 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):
1801
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1802
+ else:
1803
+ cred = credential.Credential(
1804
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1805
+ )
1806
+ http_profile = HttpProfile(
1807
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1808
+ reqMethod="POST",
1809
+ endpoint=g_param[OptionsDefine.Endpoint],
1810
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1811
+ )
1812
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1813
+ if g_param[OptionsDefine.Language]:
1814
+ profile.language = g_param[OptionsDefine.Language]
1815
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1816
+ client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
1817
+ client._sdkVersion += ("_CLI_" + __version__)
1818
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1819
+ model = models.DescribeLoadBalancerListRequest()
1820
+ model.from_json_string(json.dumps(args))
1821
+ start_time = time.time()
1822
+ while True:
1823
+ rsp = client.DescribeLoadBalancerList(model)
1824
+ result = rsp.to_json_string()
1825
+ try:
1826
+ json_obj = json.loads(result)
1827
+ except TypeError as e:
1828
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1829
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1830
+ break
1831
+ cur_time = time.time()
1832
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1833
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1834
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1835
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1836
+ else:
1837
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1838
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1839
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1840
+
1841
+
1738
1842
  def doCreateSecurityIPGroup(args, parsed_globals):
1739
1843
  g_param = parse_global_arg(parsed_globals)
1740
1844
 
@@ -1839,6 +1943,58 @@ def doDescribeIPRegion(args, parsed_globals):
1839
1943
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1840
1944
 
1841
1945
 
1946
+ def doModifyLoadBalancer(args, parsed_globals):
1947
+ g_param = parse_global_arg(parsed_globals)
1948
+
1949
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1950
+ cred = credential.CVMRoleCredential()
1951
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1952
+ cred = credential.STSAssumeRoleCredential(
1953
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1954
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1955
+ )
1956
+ 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):
1957
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1958
+ else:
1959
+ cred = credential.Credential(
1960
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1961
+ )
1962
+ http_profile = HttpProfile(
1963
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1964
+ reqMethod="POST",
1965
+ endpoint=g_param[OptionsDefine.Endpoint],
1966
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1967
+ )
1968
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1969
+ if g_param[OptionsDefine.Language]:
1970
+ profile.language = g_param[OptionsDefine.Language]
1971
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1972
+ client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
1973
+ client._sdkVersion += ("_CLI_" + __version__)
1974
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1975
+ model = models.ModifyLoadBalancerRequest()
1976
+ model.from_json_string(json.dumps(args))
1977
+ start_time = time.time()
1978
+ while True:
1979
+ rsp = client.ModifyLoadBalancer(model)
1980
+ result = rsp.to_json_string()
1981
+ try:
1982
+ json_obj = json.loads(result)
1983
+ except TypeError as e:
1984
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1985
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1986
+ break
1987
+ cur_time = time.time()
1988
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1989
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1990
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1991
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1992
+ else:
1993
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1994
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1995
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1996
+
1997
+
1842
1998
  def doDeleteAccelerationDomains(args, parsed_globals):
1843
1999
  g_param = parse_global_arg(parsed_globals)
1844
2000
 
@@ -2359,6 +2515,58 @@ def doCreateL4ProxyRules(args, parsed_globals):
2359
2515
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2360
2516
 
2361
2517
 
2518
+ def doDescribeOriginGroup(args, parsed_globals):
2519
+ g_param = parse_global_arg(parsed_globals)
2520
+
2521
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2522
+ cred = credential.CVMRoleCredential()
2523
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2524
+ cred = credential.STSAssumeRoleCredential(
2525
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2526
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2527
+ )
2528
+ 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):
2529
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2530
+ else:
2531
+ cred = credential.Credential(
2532
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2533
+ )
2534
+ http_profile = HttpProfile(
2535
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2536
+ reqMethod="POST",
2537
+ endpoint=g_param[OptionsDefine.Endpoint],
2538
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2539
+ )
2540
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2541
+ if g_param[OptionsDefine.Language]:
2542
+ profile.language = g_param[OptionsDefine.Language]
2543
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2544
+ client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
2545
+ client._sdkVersion += ("_CLI_" + __version__)
2546
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2547
+ model = models.DescribeOriginGroupRequest()
2548
+ model.from_json_string(json.dumps(args))
2549
+ start_time = time.time()
2550
+ while True:
2551
+ rsp = client.DescribeOriginGroup(model)
2552
+ result = rsp.to_json_string()
2553
+ try:
2554
+ json_obj = json.loads(result)
2555
+ except TypeError as e:
2556
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2557
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2558
+ break
2559
+ cur_time = time.time()
2560
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2561
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2562
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2563
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2564
+ else:
2565
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2566
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2567
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2568
+
2569
+
2362
2570
  def doDescribeTimingL4Data(args, parsed_globals):
2363
2571
  g_param = parse_global_arg(parsed_globals)
2364
2572
 
@@ -3711,6 +3919,58 @@ def doDescribeCustomErrorPages(args, parsed_globals):
3711
3919
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3712
3920
 
3713
3921
 
3922
+ def doDeleteLoadBalancer(args, parsed_globals):
3923
+ g_param = parse_global_arg(parsed_globals)
3924
+
3925
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3926
+ cred = credential.CVMRoleCredential()
3927
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3928
+ cred = credential.STSAssumeRoleCredential(
3929
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3930
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3931
+ )
3932
+ 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):
3933
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3934
+ else:
3935
+ cred = credential.Credential(
3936
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3937
+ )
3938
+ http_profile = HttpProfile(
3939
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3940
+ reqMethod="POST",
3941
+ endpoint=g_param[OptionsDefine.Endpoint],
3942
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3943
+ )
3944
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3945
+ if g_param[OptionsDefine.Language]:
3946
+ profile.language = g_param[OptionsDefine.Language]
3947
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3948
+ client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
3949
+ client._sdkVersion += ("_CLI_" + __version__)
3950
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3951
+ model = models.DeleteLoadBalancerRequest()
3952
+ model.from_json_string(json.dumps(args))
3953
+ start_time = time.time()
3954
+ while True:
3955
+ rsp = client.DeleteLoadBalancer(model)
3956
+ result = rsp.to_json_string()
3957
+ try:
3958
+ json_obj = json.loads(result)
3959
+ except TypeError as e:
3960
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3961
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3962
+ break
3963
+ cur_time = time.time()
3964
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3965
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3966
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3967
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3968
+ else:
3969
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3970
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3971
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3972
+
3973
+
3714
3974
  def doDescribeRulesSetting(args, parsed_globals):
3715
3975
  g_param = parse_global_arg(parsed_globals)
3716
3976
 
@@ -3815,7 +4075,7 @@ def doModifyAccelerationDomainStatuses(args, parsed_globals):
3815
4075
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3816
4076
 
3817
4077
 
3818
- def doModifySecurityIPGroup(args, parsed_globals):
4078
+ def doDescribeFunctionRules(args, parsed_globals):
3819
4079
  g_param = parse_global_arg(parsed_globals)
3820
4080
 
3821
4081
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3844,11 +4104,11 @@ def doModifySecurityIPGroup(args, parsed_globals):
3844
4104
  client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
3845
4105
  client._sdkVersion += ("_CLI_" + __version__)
3846
4106
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3847
- model = models.ModifySecurityIPGroupRequest()
4107
+ model = models.DescribeFunctionRulesRequest()
3848
4108
  model.from_json_string(json.dumps(args))
3849
4109
  start_time = time.time()
3850
4110
  while True:
3851
- rsp = client.ModifySecurityIPGroup(model)
4111
+ rsp = client.DescribeFunctionRules(model)
3852
4112
  result = rsp.to_json_string()
3853
4113
  try:
3854
4114
  json_obj = json.loads(result)
@@ -4335,7 +4595,7 @@ def doModifyFunctionRulePriority(args, parsed_globals):
4335
4595
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4336
4596
 
4337
4597
 
4338
- def doDescribeFunctionRules(args, parsed_globals):
4598
+ def doModifySecurityIPGroup(args, parsed_globals):
4339
4599
  g_param = parse_global_arg(parsed_globals)
4340
4600
 
4341
4601
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4364,11 +4624,11 @@ def doDescribeFunctionRules(args, parsed_globals):
4364
4624
  client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
4365
4625
  client._sdkVersion += ("_CLI_" + __version__)
4366
4626
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4367
- model = models.DescribeFunctionRulesRequest()
4627
+ model = models.ModifySecurityIPGroupRequest()
4368
4628
  model.from_json_string(json.dumps(args))
4369
4629
  start_time = time.time()
4370
4630
  while True:
4371
- rsp = client.DescribeFunctionRules(model)
4631
+ rsp = client.ModifySecurityIPGroup(model)
4372
4632
  result = rsp.to_json_string()
4373
4633
  try:
4374
4634
  json_obj = json.loads(result)
@@ -4647,7 +4907,7 @@ def doModifyAliasDomain(args, parsed_globals):
4647
4907
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4648
4908
 
4649
4909
 
4650
- def doDescribeOriginGroup(args, parsed_globals):
4910
+ def doCreateLoadBalancer(args, parsed_globals):
4651
4911
  g_param = parse_global_arg(parsed_globals)
4652
4912
 
4653
4913
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4676,11 +4936,11 @@ def doDescribeOriginGroup(args, parsed_globals):
4676
4936
  client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
4677
4937
  client._sdkVersion += ("_CLI_" + __version__)
4678
4938
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4679
- model = models.DescribeOriginGroupRequest()
4939
+ model = models.CreateLoadBalancerRequest()
4680
4940
  model.from_json_string(json.dumps(args))
4681
4941
  start_time = time.time()
4682
4942
  while True:
4683
- rsp = client.DescribeOriginGroup(model)
4943
+ rsp = client.CreateLoadBalancer(model)
4684
4944
  result = rsp.to_json_string()
4685
4945
  try:
4686
4946
  json_obj = json.loads(result)
@@ -6117,6 +6377,7 @@ MODELS_MAP = {
6117
6377
 
6118
6378
  ACTION_MAP = {
6119
6379
  "DestroyPlan": doDestroyPlan,
6380
+ "DescribeOriginGroupHealthStatus": doDescribeOriginGroupHealthStatus,
6120
6381
  "DeleteFunction": doDeleteFunction,
6121
6382
  "CreatePurgeTask": doCreatePurgeTask,
6122
6383
  "DownloadL4Logs": doDownloadL4Logs,
@@ -6149,8 +6410,10 @@ ACTION_MAP = {
6149
6410
  "ModifyApplicationProxyRuleStatus": doModifyApplicationProxyRuleStatus,
6150
6411
  "CreatePlanForZone": doCreatePlanForZone,
6151
6412
  "DeleteOriginGroup": doDeleteOriginGroup,
6413
+ "DescribeLoadBalancerList": doDescribeLoadBalancerList,
6152
6414
  "CreateSecurityIPGroup": doCreateSecurityIPGroup,
6153
6415
  "DescribeIPRegion": doDescribeIPRegion,
6416
+ "ModifyLoadBalancer": doModifyLoadBalancer,
6154
6417
  "DeleteAccelerationDomains": doDeleteAccelerationDomains,
6155
6418
  "CreateRealtimeLogDeliveryTask": doCreateRealtimeLogDeliveryTask,
6156
6419
  "ModifyL4Proxy": doModifyL4Proxy,
@@ -6161,6 +6424,7 @@ ACTION_MAP = {
6161
6424
  "CreateAliasDomain": doCreateAliasDomain,
6162
6425
  "ModifyAliasDomainStatus": doModifyAliasDomainStatus,
6163
6426
  "CreateL4ProxyRules": doCreateL4ProxyRules,
6427
+ "DescribeOriginGroup": doDescribeOriginGroup,
6164
6428
  "DescribeTimingL4Data": doDescribeTimingL4Data,
6165
6429
  "DescribeTopL7CacheData": doDescribeTopL7CacheData,
6166
6430
  "ModifyRule": doModifyRule,
@@ -6187,9 +6451,10 @@ ACTION_MAP = {
6187
6451
  "ModifyFunctionRule": doModifyFunctionRule,
6188
6452
  "DescribeAvailablePlans": doDescribeAvailablePlans,
6189
6453
  "DescribeCustomErrorPages": doDescribeCustomErrorPages,
6454
+ "DeleteLoadBalancer": doDeleteLoadBalancer,
6190
6455
  "DescribeRulesSetting": doDescribeRulesSetting,
6191
6456
  "ModifyAccelerationDomainStatuses": doModifyAccelerationDomainStatuses,
6192
- "ModifySecurityIPGroup": doModifySecurityIPGroup,
6457
+ "DescribeFunctionRules": doDescribeFunctionRules,
6193
6458
  "DeleteRealtimeLogDeliveryTask": doDeleteRealtimeLogDeliveryTask,
6194
6459
  "DescribeDDoSAttackTopData": doDescribeDDoSAttackTopData,
6195
6460
  "ModifyZoneStatus": doModifyZoneStatus,
@@ -6199,13 +6464,13 @@ ACTION_MAP = {
6199
6464
  "DeleteCustomErrorPage": doDeleteCustomErrorPage,
6200
6465
  "HandleFunctionRuntimeEnvironment": doHandleFunctionRuntimeEnvironment,
6201
6466
  "ModifyFunctionRulePriority": doModifyFunctionRulePriority,
6202
- "DescribeFunctionRules": doDescribeFunctionRules,
6467
+ "ModifySecurityIPGroup": doModifySecurityIPGroup,
6203
6468
  "DescribeRules": doDescribeRules,
6204
6469
  "CreateCLSIndex": doCreateCLSIndex,
6205
6470
  "CreateApplicationProxy": doCreateApplicationProxy,
6206
6471
  "UpgradePlan": doUpgradePlan,
6207
6472
  "ModifyAliasDomain": doModifyAliasDomain,
6208
- "DescribeOriginGroup": doDescribeOriginGroup,
6473
+ "CreateLoadBalancer": doCreateLoadBalancer,
6209
6474
  "ModifyApplicationProxyRule": doModifyApplicationProxyRule,
6210
6475
  "CreateOriginGroup": doCreateOriginGroup,
6211
6476
  "ModifyHostsCertificate": doModifyHostsCertificate,