tccli 3.0.1351.1__py2.py3-none-any.whl → 3.0.1353.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/ai3d/v20250513/api.json +1 -1
- tccli/services/ai3d/v20250513/examples.json +1 -1
- tccli/services/aiart/v20221229/api.json +3 -3
- tccli/services/apm/v20210622/api.json +1 -1
- tccli/services/ccc/v20200210/api.json +1 -1
- tccli/services/cdb/v20170320/api.json +2 -2
- tccli/services/cdn/v20180606/api.json +0 -3
- tccli/services/cdn/v20180606/examples.json +2 -2
- tccli/services/cfg/v20210820/api.json +11 -0
- tccli/services/cfs/v20190719/api.json +46 -0
- tccli/services/csip/v20221121/api.json +21 -3
- tccli/services/csip/v20221121/examples.json +1 -1
- tccli/services/ctem/ctem_client.py +212 -0
- tccli/services/ctem/v20231128/api.json +1609 -633
- tccli/services/ctem/v20231128/examples.json +32 -0
- tccli/services/cwp/v20180228/api.json +11 -1
- tccli/services/cynosdb/v20190107/api.json +28 -0
- tccli/services/cynosdb/v20190107/examples.json +4 -4
- tccli/services/eb/v20210416/api.json +17 -8
- tccli/services/eb/v20210416/examples.json +1 -1
- tccli/services/ess/ess_client.py +114 -8
- tccli/services/ess/v20201111/api.json +212 -0
- tccli/services/ess/v20201111/examples.json +16 -0
- tccli/services/iai/v20180301/api.json +143 -135
- tccli/services/iai/v20180301/examples.json +18 -12
- tccli/services/iai/v20200303/api.json +4 -4
- tccli/services/igtm/v20231024/api.json +139 -139
- tccli/services/iotvideo/v20191126/api.json +1 -1
- tccli/services/iotvideo/v20201215/api.json +1 -1
- tccli/services/iotvideo/v20211125/api.json +1 -1
- tccli/services/iss/v20230517/api.json +9 -9
- tccli/services/lighthouse/v20200324/api.json +10 -0
- tccli/services/live/v20180801/api.json +299 -3
- tccli/services/live/v20180801/examples.json +6 -6
- tccli/services/lke/v20231130/api.json +2 -2
- tccli/services/lkeap/v20240522/api.json +96 -19
- tccli/services/lkeap/v20240522/examples.json +2 -2
- tccli/services/mongodb/v20190725/api.json +2 -2
- tccli/services/mongodb/v20190725/examples.json +1 -1
- tccli/services/monitor/v20180724/api.json +45 -31
- tccli/services/monitor/v20180724/examples.json +2 -2
- tccli/services/mps/mps_client.py +53 -0
- tccli/services/mps/v20190612/api.json +580 -279
- tccli/services/mps/v20190612/examples.json +18 -4
- tccli/services/ocr/v20181119/api.json +24 -4
- tccli/services/ocr/v20181119/examples.json +1 -1
- tccli/services/omics/v20221128/api.json +9 -0
- tccli/services/pts/v20210728/api.json +1 -1
- tccli/services/tcbr/v20220217/api.json +10 -0
- tccli/services/teo/teo_client.py +777 -35
- tccli/services/teo/v20220901/api.json +1026 -3
- tccli/services/teo/v20220901/examples.json +154 -0
- tccli/services/tione/v20211111/api.json +9 -0
- tccli/services/tke/v20180525/api.json +49 -1
- tccli/services/trro/v20220325/api.json +1 -1
- tccli/services/trtc/trtc_client.py +459 -35
- tccli/services/trtc/v20190722/api.json +1068 -81
- tccli/services/trtc/v20190722/examples.json +64 -0
- tccli/services/tts/v20190823/api.json +1 -1
- tccli/services/vod/v20180717/api.json +60 -60
- tccli/services/vod/v20180717/examples.json +37 -37
- tccli/services/wedata/v20210820/api.json +501 -3
- tccli/services/wedata/v20210820/examples.json +86 -0
- tccli/services/wedata/wedata_client.py +440 -69
- {tccli-3.0.1351.1.dist-info → tccli-3.0.1353.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1351.1.dist-info → tccli-3.0.1353.1.dist-info}/RECORD +70 -70
- {tccli-3.0.1351.1.dist-info → tccli-3.0.1353.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1351.1.dist-info → tccli-3.0.1353.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1351.1.dist-info → tccli-3.0.1353.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/teo/teo_client.py
CHANGED
@@ -331,6 +331,58 @@ def doCreatePurgeTask(args, parsed_globals):
|
|
331
331
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
332
332
|
|
333
333
|
|
334
|
+
def doDescribeMultiPathGatewayRegions(args, parsed_globals):
|
335
|
+
g_param = parse_global_arg(parsed_globals)
|
336
|
+
|
337
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
338
|
+
cred = credential.CVMRoleCredential()
|
339
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
340
|
+
cred = credential.STSAssumeRoleCredential(
|
341
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
342
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
343
|
+
)
|
344
|
+
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):
|
345
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
346
|
+
else:
|
347
|
+
cred = credential.Credential(
|
348
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
349
|
+
)
|
350
|
+
http_profile = HttpProfile(
|
351
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
352
|
+
reqMethod="POST",
|
353
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
354
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
355
|
+
)
|
356
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
357
|
+
if g_param[OptionsDefine.Language]:
|
358
|
+
profile.language = g_param[OptionsDefine.Language]
|
359
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
360
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
361
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
362
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
363
|
+
model = models.DescribeMultiPathGatewayRegionsRequest()
|
364
|
+
model.from_json_string(json.dumps(args))
|
365
|
+
start_time = time.time()
|
366
|
+
while True:
|
367
|
+
rsp = client.DescribeMultiPathGatewayRegions(model)
|
368
|
+
result = rsp.to_json_string()
|
369
|
+
try:
|
370
|
+
json_obj = json.loads(result)
|
371
|
+
except TypeError as e:
|
372
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
373
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
374
|
+
break
|
375
|
+
cur_time = time.time()
|
376
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
377
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
378
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
379
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
380
|
+
else:
|
381
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
382
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
383
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
384
|
+
|
385
|
+
|
334
386
|
def doDownloadL4Logs(args, parsed_globals):
|
335
387
|
g_param = parse_global_arg(parsed_globals)
|
336
388
|
|
@@ -1215,6 +1267,58 @@ def doModifyL7AccSetting(args, parsed_globals):
|
|
1215
1267
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1216
1268
|
|
1217
1269
|
|
1270
|
+
def doModifyMultiPathGatewayLine(args, parsed_globals):
|
1271
|
+
g_param = parse_global_arg(parsed_globals)
|
1272
|
+
|
1273
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1274
|
+
cred = credential.CVMRoleCredential()
|
1275
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1276
|
+
cred = credential.STSAssumeRoleCredential(
|
1277
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1278
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1279
|
+
)
|
1280
|
+
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):
|
1281
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1282
|
+
else:
|
1283
|
+
cred = credential.Credential(
|
1284
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1285
|
+
)
|
1286
|
+
http_profile = HttpProfile(
|
1287
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1288
|
+
reqMethod="POST",
|
1289
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1290
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1291
|
+
)
|
1292
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1293
|
+
if g_param[OptionsDefine.Language]:
|
1294
|
+
profile.language = g_param[OptionsDefine.Language]
|
1295
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1296
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
1297
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1298
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1299
|
+
model = models.ModifyMultiPathGatewayLineRequest()
|
1300
|
+
model.from_json_string(json.dumps(args))
|
1301
|
+
start_time = time.time()
|
1302
|
+
while True:
|
1303
|
+
rsp = client.ModifyMultiPathGatewayLine(model)
|
1304
|
+
result = rsp.to_json_string()
|
1305
|
+
try:
|
1306
|
+
json_obj = json.loads(result)
|
1307
|
+
except TypeError as e:
|
1308
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1309
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1310
|
+
break
|
1311
|
+
cur_time = time.time()
|
1312
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1313
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1314
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1315
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1316
|
+
else:
|
1317
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1318
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1319
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1320
|
+
|
1321
|
+
|
1218
1322
|
def doModifyL4ProxyStatus(args, parsed_globals):
|
1219
1323
|
g_param = parse_global_arg(parsed_globals)
|
1220
1324
|
|
@@ -1527,7 +1631,7 @@ def doCheckCnameStatus(args, parsed_globals):
|
|
1527
1631
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1528
1632
|
|
1529
1633
|
|
1530
|
-
def
|
1634
|
+
def doCreateMultiPathGateway(args, parsed_globals):
|
1531
1635
|
g_param = parse_global_arg(parsed_globals)
|
1532
1636
|
|
1533
1637
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1556,11 +1660,11 @@ def doModifyZone(args, parsed_globals):
|
|
1556
1660
|
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
1557
1661
|
client._sdkVersion += ("_CLI_" + __version__)
|
1558
1662
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1559
|
-
model = models.
|
1663
|
+
model = models.CreateMultiPathGatewayRequest()
|
1560
1664
|
model.from_json_string(json.dumps(args))
|
1561
1665
|
start_time = time.time()
|
1562
1666
|
while True:
|
1563
|
-
rsp = client.
|
1667
|
+
rsp = client.CreateMultiPathGateway(model)
|
1564
1668
|
result = rsp.to_json_string()
|
1565
1669
|
try:
|
1566
1670
|
json_obj = json.loads(result)
|
@@ -1787,6 +1891,110 @@ def doCreateAccelerationDomain(args, parsed_globals):
|
|
1787
1891
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1788
1892
|
|
1789
1893
|
|
1894
|
+
def doCreateMultiPathGatewayLine(args, parsed_globals):
|
1895
|
+
g_param = parse_global_arg(parsed_globals)
|
1896
|
+
|
1897
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1898
|
+
cred = credential.CVMRoleCredential()
|
1899
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1900
|
+
cred = credential.STSAssumeRoleCredential(
|
1901
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1902
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1903
|
+
)
|
1904
|
+
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):
|
1905
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1906
|
+
else:
|
1907
|
+
cred = credential.Credential(
|
1908
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1909
|
+
)
|
1910
|
+
http_profile = HttpProfile(
|
1911
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1912
|
+
reqMethod="POST",
|
1913
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1914
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1915
|
+
)
|
1916
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1917
|
+
if g_param[OptionsDefine.Language]:
|
1918
|
+
profile.language = g_param[OptionsDefine.Language]
|
1919
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1920
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
1921
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1922
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1923
|
+
model = models.CreateMultiPathGatewayLineRequest()
|
1924
|
+
model.from_json_string(json.dumps(args))
|
1925
|
+
start_time = time.time()
|
1926
|
+
while True:
|
1927
|
+
rsp = client.CreateMultiPathGatewayLine(model)
|
1928
|
+
result = rsp.to_json_string()
|
1929
|
+
try:
|
1930
|
+
json_obj = json.loads(result)
|
1931
|
+
except TypeError as e:
|
1932
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1933
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1934
|
+
break
|
1935
|
+
cur_time = time.time()
|
1936
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1937
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1938
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1939
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1940
|
+
else:
|
1941
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1942
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1943
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1944
|
+
|
1945
|
+
|
1946
|
+
def doDescribeZones(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.DescribeZonesRequest()
|
1976
|
+
model.from_json_string(json.dumps(args))
|
1977
|
+
start_time = time.time()
|
1978
|
+
while True:
|
1979
|
+
rsp = client.DescribeZones(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
|
+
|
1790
1998
|
def doDescribeConfigGroupVersionDetail(args, parsed_globals):
|
1791
1999
|
g_param = parse_global_arg(parsed_globals)
|
1792
2000
|
|
@@ -2411,6 +2619,58 @@ def doDeleteAccelerationDomains(args, parsed_globals):
|
|
2411
2619
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2412
2620
|
|
2413
2621
|
|
2622
|
+
def doRefreshMultiPathGatewaySecretKey(args, parsed_globals):
|
2623
|
+
g_param = parse_global_arg(parsed_globals)
|
2624
|
+
|
2625
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2626
|
+
cred = credential.CVMRoleCredential()
|
2627
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2628
|
+
cred = credential.STSAssumeRoleCredential(
|
2629
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2630
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2631
|
+
)
|
2632
|
+
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):
|
2633
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2634
|
+
else:
|
2635
|
+
cred = credential.Credential(
|
2636
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2637
|
+
)
|
2638
|
+
http_profile = HttpProfile(
|
2639
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2640
|
+
reqMethod="POST",
|
2641
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2642
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2643
|
+
)
|
2644
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2645
|
+
if g_param[OptionsDefine.Language]:
|
2646
|
+
profile.language = g_param[OptionsDefine.Language]
|
2647
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2648
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
2649
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2650
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2651
|
+
model = models.RefreshMultiPathGatewaySecretKeyRequest()
|
2652
|
+
model.from_json_string(json.dumps(args))
|
2653
|
+
start_time = time.time()
|
2654
|
+
while True:
|
2655
|
+
rsp = client.RefreshMultiPathGatewaySecretKey(model)
|
2656
|
+
result = rsp.to_json_string()
|
2657
|
+
try:
|
2658
|
+
json_obj = json.loads(result)
|
2659
|
+
except TypeError as e:
|
2660
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2661
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2662
|
+
break
|
2663
|
+
cur_time = time.time()
|
2664
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2665
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2666
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2667
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2668
|
+
else:
|
2669
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2670
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2671
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2672
|
+
|
2673
|
+
|
2414
2674
|
def doCreateRealtimeLogDeliveryTask(args, parsed_globals):
|
2415
2675
|
g_param = parse_global_arg(parsed_globals)
|
2416
2676
|
|
@@ -3399,7 +3659,7 @@ def doModifyRule(args, parsed_globals):
|
|
3399
3659
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3400
3660
|
|
3401
3661
|
|
3402
|
-
def
|
3662
|
+
def doDescribeMultiPathGateways(args, parsed_globals):
|
3403
3663
|
g_param = parse_global_arg(parsed_globals)
|
3404
3664
|
|
3405
3665
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3428,11 +3688,11 @@ def doDescribeTopL7AnalysisData(args, parsed_globals):
|
|
3428
3688
|
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
3429
3689
|
client._sdkVersion += ("_CLI_" + __version__)
|
3430
3690
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3431
|
-
model = models.
|
3691
|
+
model = models.DescribeMultiPathGatewaysRequest()
|
3432
3692
|
model.from_json_string(json.dumps(args))
|
3433
3693
|
start_time = time.time()
|
3434
3694
|
while True:
|
3435
|
-
rsp = client.
|
3695
|
+
rsp = client.DescribeMultiPathGateways(model)
|
3436
3696
|
result = rsp.to_json_string()
|
3437
3697
|
try:
|
3438
3698
|
json_obj = json.loads(result)
|
@@ -3451,7 +3711,59 @@ def doDescribeTopL7AnalysisData(args, parsed_globals):
|
|
3451
3711
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3452
3712
|
|
3453
3713
|
|
3454
|
-
def
|
3714
|
+
def doDescribeTopL7AnalysisData(args, parsed_globals):
|
3715
|
+
g_param = parse_global_arg(parsed_globals)
|
3716
|
+
|
3717
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3718
|
+
cred = credential.CVMRoleCredential()
|
3719
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3720
|
+
cred = credential.STSAssumeRoleCredential(
|
3721
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3722
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3723
|
+
)
|
3724
|
+
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):
|
3725
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3726
|
+
else:
|
3727
|
+
cred = credential.Credential(
|
3728
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3729
|
+
)
|
3730
|
+
http_profile = HttpProfile(
|
3731
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3732
|
+
reqMethod="POST",
|
3733
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3734
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3735
|
+
)
|
3736
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3737
|
+
if g_param[OptionsDefine.Language]:
|
3738
|
+
profile.language = g_param[OptionsDefine.Language]
|
3739
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3740
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
3741
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3742
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3743
|
+
model = models.DescribeTopL7AnalysisDataRequest()
|
3744
|
+
model.from_json_string(json.dumps(args))
|
3745
|
+
start_time = time.time()
|
3746
|
+
while True:
|
3747
|
+
rsp = client.DescribeTopL7AnalysisData(model)
|
3748
|
+
result = rsp.to_json_string()
|
3749
|
+
try:
|
3750
|
+
json_obj = json.loads(result)
|
3751
|
+
except TypeError as e:
|
3752
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3753
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3754
|
+
break
|
3755
|
+
cur_time = time.time()
|
3756
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3757
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3758
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3759
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3760
|
+
else:
|
3761
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3762
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3763
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3764
|
+
|
3765
|
+
|
3766
|
+
def doDeleteDnsRecords(args, parsed_globals):
|
3455
3767
|
g_param = parse_global_arg(parsed_globals)
|
3456
3768
|
|
3457
3769
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3555,7 +3867,7 @@ def doModifySecurityPolicy(args, parsed_globals):
|
|
3555
3867
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3556
3868
|
|
3557
3869
|
|
3558
|
-
def
|
3870
|
+
def doDescribeMultiPathGatewayLine(args, parsed_globals):
|
3559
3871
|
g_param = parse_global_arg(parsed_globals)
|
3560
3872
|
|
3561
3873
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3584,11 +3896,11 @@ def doModifyPlan(args, parsed_globals):
|
|
3584
3896
|
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
3585
3897
|
client._sdkVersion += ("_CLI_" + __version__)
|
3586
3898
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3587
|
-
model = models.
|
3899
|
+
model = models.DescribeMultiPathGatewayLineRequest()
|
3588
3900
|
model.from_json_string(json.dumps(args))
|
3589
3901
|
start_time = time.time()
|
3590
3902
|
while True:
|
3591
|
-
rsp = client.
|
3903
|
+
rsp = client.DescribeMultiPathGatewayLine(model)
|
3592
3904
|
result = rsp.to_json_string()
|
3593
3905
|
try:
|
3594
3906
|
json_obj = json.loads(result)
|
@@ -3711,7 +4023,7 @@ def doBindZoneToPlan(args, parsed_globals):
|
|
3711
4023
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3712
4024
|
|
3713
4025
|
|
3714
|
-
def
|
4026
|
+
def doDescribeDDoSAttackEvent(args, parsed_globals):
|
3715
4027
|
g_param = parse_global_arg(parsed_globals)
|
3716
4028
|
|
3717
4029
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3740,11 +4052,11 @@ def doDescribeOriginGroupHealthStatus(args, parsed_globals):
|
|
3740
4052
|
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
3741
4053
|
client._sdkVersion += ("_CLI_" + __version__)
|
3742
4054
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3743
|
-
model = models.
|
4055
|
+
model = models.DescribeDDoSAttackEventRequest()
|
3744
4056
|
model.from_json_string(json.dumps(args))
|
3745
4057
|
start_time = time.time()
|
3746
4058
|
while True:
|
3747
|
-
rsp = client.
|
4059
|
+
rsp = client.DescribeDDoSAttackEvent(model)
|
3748
4060
|
result = rsp.to_json_string()
|
3749
4061
|
try:
|
3750
4062
|
json_obj = json.loads(result)
|
@@ -4283,6 +4595,58 @@ def doDescribeApplicationProxies(args, parsed_globals):
|
|
4283
4595
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4284
4596
|
|
4285
4597
|
|
4598
|
+
def doModifyMultiPathGateway(args, parsed_globals):
|
4599
|
+
g_param = parse_global_arg(parsed_globals)
|
4600
|
+
|
4601
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4602
|
+
cred = credential.CVMRoleCredential()
|
4603
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4604
|
+
cred = credential.STSAssumeRoleCredential(
|
4605
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4606
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4607
|
+
)
|
4608
|
+
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):
|
4609
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4610
|
+
else:
|
4611
|
+
cred = credential.Credential(
|
4612
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4613
|
+
)
|
4614
|
+
http_profile = HttpProfile(
|
4615
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4616
|
+
reqMethod="POST",
|
4617
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4618
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4619
|
+
)
|
4620
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4621
|
+
if g_param[OptionsDefine.Language]:
|
4622
|
+
profile.language = g_param[OptionsDefine.Language]
|
4623
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4624
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
4625
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4626
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4627
|
+
model = models.ModifyMultiPathGatewayRequest()
|
4628
|
+
model.from_json_string(json.dumps(args))
|
4629
|
+
start_time = time.time()
|
4630
|
+
while True:
|
4631
|
+
rsp = client.ModifyMultiPathGateway(model)
|
4632
|
+
result = rsp.to_json_string()
|
4633
|
+
try:
|
4634
|
+
json_obj = json.loads(result)
|
4635
|
+
except TypeError as e:
|
4636
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4637
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4638
|
+
break
|
4639
|
+
cur_time = time.time()
|
4640
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4641
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4642
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4643
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4644
|
+
else:
|
4645
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4646
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4647
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4648
|
+
|
4649
|
+
|
4286
4650
|
def doCreateSharedCNAME(args, parsed_globals):
|
4287
4651
|
g_param = parse_global_arg(parsed_globals)
|
4288
4652
|
|
@@ -4959,6 +5323,58 @@ def doDisableOriginACL(args, parsed_globals):
|
|
4959
5323
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4960
5324
|
|
4961
5325
|
|
5326
|
+
def doModifyPlan(args, parsed_globals):
|
5327
|
+
g_param = parse_global_arg(parsed_globals)
|
5328
|
+
|
5329
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5330
|
+
cred = credential.CVMRoleCredential()
|
5331
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5332
|
+
cred = credential.STSAssumeRoleCredential(
|
5333
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5334
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5335
|
+
)
|
5336
|
+
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):
|
5337
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5338
|
+
else:
|
5339
|
+
cred = credential.Credential(
|
5340
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5341
|
+
)
|
5342
|
+
http_profile = HttpProfile(
|
5343
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5344
|
+
reqMethod="POST",
|
5345
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5346
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5347
|
+
)
|
5348
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5349
|
+
if g_param[OptionsDefine.Language]:
|
5350
|
+
profile.language = g_param[OptionsDefine.Language]
|
5351
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5352
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
5353
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5354
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5355
|
+
model = models.ModifyPlanRequest()
|
5356
|
+
model.from_json_string(json.dumps(args))
|
5357
|
+
start_time = time.time()
|
5358
|
+
while True:
|
5359
|
+
rsp = client.ModifyPlan(model)
|
5360
|
+
result = rsp.to_json_string()
|
5361
|
+
try:
|
5362
|
+
json_obj = json.loads(result)
|
5363
|
+
except TypeError as e:
|
5364
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5365
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5366
|
+
break
|
5367
|
+
cur_time = time.time()
|
5368
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5369
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5370
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5371
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5372
|
+
else:
|
5373
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5374
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5375
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5376
|
+
|
5377
|
+
|
4962
5378
|
def doDeleteContentIdentifier(args, parsed_globals):
|
4963
5379
|
g_param = parse_global_arg(parsed_globals)
|
4964
5380
|
|
@@ -5427,6 +5843,58 @@ def doDescribePurgeTasks(args, parsed_globals):
|
|
5427
5843
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5428
5844
|
|
5429
5845
|
|
5846
|
+
def doDescribeMultiPathGateway(args, parsed_globals):
|
5847
|
+
g_param = parse_global_arg(parsed_globals)
|
5848
|
+
|
5849
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5850
|
+
cred = credential.CVMRoleCredential()
|
5851
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5852
|
+
cred = credential.STSAssumeRoleCredential(
|
5853
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5854
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5855
|
+
)
|
5856
|
+
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):
|
5857
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5858
|
+
else:
|
5859
|
+
cred = credential.Credential(
|
5860
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5861
|
+
)
|
5862
|
+
http_profile = HttpProfile(
|
5863
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5864
|
+
reqMethod="POST",
|
5865
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5866
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5867
|
+
)
|
5868
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5869
|
+
if g_param[OptionsDefine.Language]:
|
5870
|
+
profile.language = g_param[OptionsDefine.Language]
|
5871
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5872
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
5873
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5874
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5875
|
+
model = models.DescribeMultiPathGatewayRequest()
|
5876
|
+
model.from_json_string(json.dumps(args))
|
5877
|
+
start_time = time.time()
|
5878
|
+
while True:
|
5879
|
+
rsp = client.DescribeMultiPathGateway(model)
|
5880
|
+
result = rsp.to_json_string()
|
5881
|
+
try:
|
5882
|
+
json_obj = json.loads(result)
|
5883
|
+
except TypeError as e:
|
5884
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5885
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5886
|
+
break
|
5887
|
+
cur_time = time.time()
|
5888
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5889
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5890
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5891
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5892
|
+
else:
|
5893
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5894
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5895
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5896
|
+
|
5897
|
+
|
5430
5898
|
def doDeleteRules(args, parsed_globals):
|
5431
5899
|
g_param = parse_global_arg(parsed_globals)
|
5432
5900
|
|
@@ -5531,7 +5999,7 @@ def doDescribeL4ProxyRules(args, parsed_globals):
|
|
5531
5999
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5532
6000
|
|
5533
6001
|
|
5534
|
-
def
|
6002
|
+
def doDeleteMultiPathGateway(args, parsed_globals):
|
5535
6003
|
g_param = parse_global_arg(parsed_globals)
|
5536
6004
|
|
5537
6005
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5560,11 +6028,11 @@ def doDeleteCustomErrorPage(args, parsed_globals):
|
|
5560
6028
|
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
5561
6029
|
client._sdkVersion += ("_CLI_" + __version__)
|
5562
6030
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5563
|
-
model = models.
|
6031
|
+
model = models.DeleteMultiPathGatewayRequest()
|
5564
6032
|
model.from_json_string(json.dumps(args))
|
5565
6033
|
start_time = time.time()
|
5566
6034
|
while True:
|
5567
|
-
rsp = client.
|
6035
|
+
rsp = client.DeleteMultiPathGateway(model)
|
5568
6036
|
result = rsp.to_json_string()
|
5569
6037
|
try:
|
5570
6038
|
json_obj = json.loads(result)
|
@@ -5583,7 +6051,7 @@ def doDeleteCustomErrorPage(args, parsed_globals):
|
|
5583
6051
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5584
6052
|
|
5585
6053
|
|
5586
|
-
def
|
6054
|
+
def doDescribeL4Proxy(args, parsed_globals):
|
5587
6055
|
g_param = parse_global_arg(parsed_globals)
|
5588
6056
|
|
5589
6057
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5612,11 +6080,11 @@ def doHandleFunctionRuntimeEnvironment(args, parsed_globals):
|
|
5612
6080
|
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
5613
6081
|
client._sdkVersion += ("_CLI_" + __version__)
|
5614
6082
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5615
|
-
model = models.
|
6083
|
+
model = models.DescribeL4ProxyRequest()
|
5616
6084
|
model.from_json_string(json.dumps(args))
|
5617
6085
|
start_time = time.time()
|
5618
6086
|
while True:
|
5619
|
-
rsp = client.
|
6087
|
+
rsp = client.DescribeL4Proxy(model)
|
5620
6088
|
result = rsp.to_json_string()
|
5621
6089
|
try:
|
5622
6090
|
json_obj = json.loads(result)
|
@@ -5635,7 +6103,7 @@ def doHandleFunctionRuntimeEnvironment(args, parsed_globals):
|
|
5635
6103
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5636
6104
|
|
5637
6105
|
|
5638
|
-
def
|
6106
|
+
def doModifyZone(args, parsed_globals):
|
5639
6107
|
g_param = parse_global_arg(parsed_globals)
|
5640
6108
|
|
5641
6109
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5664,11 +6132,63 @@ def doDescribeDDoSAttackEvent(args, parsed_globals):
|
|
5664
6132
|
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
5665
6133
|
client._sdkVersion += ("_CLI_" + __version__)
|
5666
6134
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5667
|
-
model = models.
|
6135
|
+
model = models.ModifyZoneRequest()
|
5668
6136
|
model.from_json_string(json.dumps(args))
|
5669
6137
|
start_time = time.time()
|
5670
6138
|
while True:
|
5671
|
-
rsp = client.
|
6139
|
+
rsp = client.ModifyZone(model)
|
6140
|
+
result = rsp.to_json_string()
|
6141
|
+
try:
|
6142
|
+
json_obj = json.loads(result)
|
6143
|
+
except TypeError as e:
|
6144
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6145
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6146
|
+
break
|
6147
|
+
cur_time = time.time()
|
6148
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6149
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6150
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6151
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6152
|
+
else:
|
6153
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6154
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6155
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6156
|
+
|
6157
|
+
|
6158
|
+
def doHandleFunctionRuntimeEnvironment(args, parsed_globals):
|
6159
|
+
g_param = parse_global_arg(parsed_globals)
|
6160
|
+
|
6161
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6162
|
+
cred = credential.CVMRoleCredential()
|
6163
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6164
|
+
cred = credential.STSAssumeRoleCredential(
|
6165
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6166
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6167
|
+
)
|
6168
|
+
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):
|
6169
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6170
|
+
else:
|
6171
|
+
cred = credential.Credential(
|
6172
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6173
|
+
)
|
6174
|
+
http_profile = HttpProfile(
|
6175
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6176
|
+
reqMethod="POST",
|
6177
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
6178
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6179
|
+
)
|
6180
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6181
|
+
if g_param[OptionsDefine.Language]:
|
6182
|
+
profile.language = g_param[OptionsDefine.Language]
|
6183
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6184
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
6185
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
6186
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6187
|
+
model = models.HandleFunctionRuntimeEnvironmentRequest()
|
6188
|
+
model.from_json_string(json.dumps(args))
|
6189
|
+
start_time = time.time()
|
6190
|
+
while True:
|
6191
|
+
rsp = client.HandleFunctionRuntimeEnvironment(model)
|
5672
6192
|
result = rsp.to_json_string()
|
5673
6193
|
try:
|
5674
6194
|
json_obj = json.loads(result)
|
@@ -5947,6 +6467,58 @@ def doModifySecurityIPGroup(args, parsed_globals):
|
|
5947
6467
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5948
6468
|
|
5949
6469
|
|
6470
|
+
def doModifyMultiPathGatewaySecretKey(args, parsed_globals):
|
6471
|
+
g_param = parse_global_arg(parsed_globals)
|
6472
|
+
|
6473
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6474
|
+
cred = credential.CVMRoleCredential()
|
6475
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6476
|
+
cred = credential.STSAssumeRoleCredential(
|
6477
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6478
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6479
|
+
)
|
6480
|
+
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):
|
6481
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6482
|
+
else:
|
6483
|
+
cred = credential.Credential(
|
6484
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6485
|
+
)
|
6486
|
+
http_profile = HttpProfile(
|
6487
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6488
|
+
reqMethod="POST",
|
6489
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
6490
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6491
|
+
)
|
6492
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6493
|
+
if g_param[OptionsDefine.Language]:
|
6494
|
+
profile.language = g_param[OptionsDefine.Language]
|
6495
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6496
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
6497
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
6498
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6499
|
+
model = models.ModifyMultiPathGatewaySecretKeyRequest()
|
6500
|
+
model.from_json_string(json.dumps(args))
|
6501
|
+
start_time = time.time()
|
6502
|
+
while True:
|
6503
|
+
rsp = client.ModifyMultiPathGatewaySecretKey(model)
|
6504
|
+
result = rsp.to_json_string()
|
6505
|
+
try:
|
6506
|
+
json_obj = json.loads(result)
|
6507
|
+
except TypeError as e:
|
6508
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6509
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6510
|
+
break
|
6511
|
+
cur_time = time.time()
|
6512
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6513
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6514
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6515
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6516
|
+
else:
|
6517
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6518
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6519
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6520
|
+
|
6521
|
+
|
5950
6522
|
def doDescribeRules(args, parsed_globals):
|
5951
6523
|
g_param = parse_global_arg(parsed_globals)
|
5952
6524
|
|
@@ -7351,7 +7923,7 @@ def doCreateApplicationProxyRule(args, parsed_globals):
|
|
7351
7923
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7352
7924
|
|
7353
7925
|
|
7354
|
-
def
|
7926
|
+
def doDescribeMultiPathGatewaySecretKey(args, parsed_globals):
|
7355
7927
|
g_param = parse_global_arg(parsed_globals)
|
7356
7928
|
|
7357
7929
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -7380,11 +7952,11 @@ def doDescribeZones(args, parsed_globals):
|
|
7380
7952
|
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
7381
7953
|
client._sdkVersion += ("_CLI_" + __version__)
|
7382
7954
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7383
|
-
model = models.
|
7955
|
+
model = models.DescribeMultiPathGatewaySecretKeyRequest()
|
7384
7956
|
model.from_json_string(json.dumps(args))
|
7385
7957
|
start_time = time.time()
|
7386
7958
|
while True:
|
7387
|
-
rsp = client.
|
7959
|
+
rsp = client.DescribeMultiPathGatewaySecretKey(model)
|
7388
7960
|
result = rsp.to_json_string()
|
7389
7961
|
try:
|
7390
7962
|
json_obj = json.loads(result)
|
@@ -7663,6 +8235,58 @@ def doImportZoneConfig(args, parsed_globals):
|
|
7663
8235
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7664
8236
|
|
7665
8237
|
|
8238
|
+
def doCreateMultiPathGatewaySecretKey(args, parsed_globals):
|
8239
|
+
g_param = parse_global_arg(parsed_globals)
|
8240
|
+
|
8241
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
8242
|
+
cred = credential.CVMRoleCredential()
|
8243
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8244
|
+
cred = credential.STSAssumeRoleCredential(
|
8245
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8246
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8247
|
+
)
|
8248
|
+
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):
|
8249
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
8250
|
+
else:
|
8251
|
+
cred = credential.Credential(
|
8252
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
8253
|
+
)
|
8254
|
+
http_profile = HttpProfile(
|
8255
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
8256
|
+
reqMethod="POST",
|
8257
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
8258
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
8259
|
+
)
|
8260
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
8261
|
+
if g_param[OptionsDefine.Language]:
|
8262
|
+
profile.language = g_param[OptionsDefine.Language]
|
8263
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
8264
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
8265
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
8266
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
8267
|
+
model = models.CreateMultiPathGatewaySecretKeyRequest()
|
8268
|
+
model.from_json_string(json.dumps(args))
|
8269
|
+
start_time = time.time()
|
8270
|
+
while True:
|
8271
|
+
rsp = client.CreateMultiPathGatewaySecretKey(model)
|
8272
|
+
result = rsp.to_json_string()
|
8273
|
+
try:
|
8274
|
+
json_obj = json.loads(result)
|
8275
|
+
except TypeError as e:
|
8276
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
8277
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
8278
|
+
break
|
8279
|
+
cur_time = time.time()
|
8280
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
8281
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
8282
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
8283
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
8284
|
+
else:
|
8285
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
8286
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
8287
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8288
|
+
|
8289
|
+
|
7666
8290
|
def doModifyCustomErrorPage(args, parsed_globals):
|
7667
8291
|
g_param = parse_global_arg(parsed_globals)
|
7668
8292
|
|
@@ -7871,7 +8495,7 @@ def doDescribeAliasDomains(args, parsed_globals):
|
|
7871
8495
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7872
8496
|
|
7873
8497
|
|
7874
|
-
def
|
8498
|
+
def doDeleteCustomErrorPage(args, parsed_globals):
|
7875
8499
|
g_param = parse_global_arg(parsed_globals)
|
7876
8500
|
|
7877
8501
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -7900,11 +8524,63 @@ def doDescribeL4Proxy(args, parsed_globals):
|
|
7900
8524
|
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
7901
8525
|
client._sdkVersion += ("_CLI_" + __version__)
|
7902
8526
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7903
|
-
model = models.
|
8527
|
+
model = models.DeleteCustomErrorPageRequest()
|
7904
8528
|
model.from_json_string(json.dumps(args))
|
7905
8529
|
start_time = time.time()
|
7906
8530
|
while True:
|
7907
|
-
rsp = client.
|
8531
|
+
rsp = client.DeleteCustomErrorPage(model)
|
8532
|
+
result = rsp.to_json_string()
|
8533
|
+
try:
|
8534
|
+
json_obj = json.loads(result)
|
8535
|
+
except TypeError as e:
|
8536
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
8537
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
8538
|
+
break
|
8539
|
+
cur_time = time.time()
|
8540
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
8541
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
8542
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
8543
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
8544
|
+
else:
|
8545
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
8546
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
8547
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8548
|
+
|
8549
|
+
|
8550
|
+
def doDeleteMultiPathGatewayLine(args, parsed_globals):
|
8551
|
+
g_param = parse_global_arg(parsed_globals)
|
8552
|
+
|
8553
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
8554
|
+
cred = credential.CVMRoleCredential()
|
8555
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8556
|
+
cred = credential.STSAssumeRoleCredential(
|
8557
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8558
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8559
|
+
)
|
8560
|
+
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):
|
8561
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
8562
|
+
else:
|
8563
|
+
cred = credential.Credential(
|
8564
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
8565
|
+
)
|
8566
|
+
http_profile = HttpProfile(
|
8567
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
8568
|
+
reqMethod="POST",
|
8569
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
8570
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
8571
|
+
)
|
8572
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
8573
|
+
if g_param[OptionsDefine.Language]:
|
8574
|
+
profile.language = g_param[OptionsDefine.Language]
|
8575
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
8576
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
8577
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
8578
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
8579
|
+
model = models.DeleteMultiPathGatewayLineRequest()
|
8580
|
+
model.from_json_string(json.dumps(args))
|
8581
|
+
start_time = time.time()
|
8582
|
+
while True:
|
8583
|
+
rsp = client.DeleteMultiPathGatewayLine(model)
|
7908
8584
|
result = rsp.to_json_string()
|
7909
8585
|
try:
|
7910
8586
|
json_obj = json.loads(result)
|
@@ -7975,6 +8651,58 @@ def doDescribeBillingData(args, parsed_globals):
|
|
7975
8651
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7976
8652
|
|
7977
8653
|
|
8654
|
+
def doDescribeOriginGroupHealthStatus(args, parsed_globals):
|
8655
|
+
g_param = parse_global_arg(parsed_globals)
|
8656
|
+
|
8657
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
8658
|
+
cred = credential.CVMRoleCredential()
|
8659
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8660
|
+
cred = credential.STSAssumeRoleCredential(
|
8661
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8662
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8663
|
+
)
|
8664
|
+
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):
|
8665
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
8666
|
+
else:
|
8667
|
+
cred = credential.Credential(
|
8668
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
8669
|
+
)
|
8670
|
+
http_profile = HttpProfile(
|
8671
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
8672
|
+
reqMethod="POST",
|
8673
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
8674
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
8675
|
+
)
|
8676
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
8677
|
+
if g_param[OptionsDefine.Language]:
|
8678
|
+
profile.language = g_param[OptionsDefine.Language]
|
8679
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
8680
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
8681
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
8682
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
8683
|
+
model = models.DescribeOriginGroupHealthStatusRequest()
|
8684
|
+
model.from_json_string(json.dumps(args))
|
8685
|
+
start_time = time.time()
|
8686
|
+
while True:
|
8687
|
+
rsp = client.DescribeOriginGroupHealthStatus(model)
|
8688
|
+
result = rsp.to_json_string()
|
8689
|
+
try:
|
8690
|
+
json_obj = json.loads(result)
|
8691
|
+
except TypeError as e:
|
8692
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
8693
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
8694
|
+
break
|
8695
|
+
cur_time = time.time()
|
8696
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
8697
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
8698
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
8699
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
8700
|
+
else:
|
8701
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
8702
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
8703
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8704
|
+
|
8705
|
+
|
7978
8706
|
CLIENT_MAP = {
|
7979
8707
|
"v20220901": teo_client_v20220901,
|
7980
8708
|
"v20220106": teo_client_v20220106,
|
@@ -7994,6 +8722,7 @@ ACTION_MAP = {
|
|
7994
8722
|
"DescribeContentIdentifiers": doDescribeContentIdentifiers,
|
7995
8723
|
"DeleteFunction": doDeleteFunction,
|
7996
8724
|
"CreatePurgeTask": doCreatePurgeTask,
|
8725
|
+
"DescribeMultiPathGatewayRegions": doDescribeMultiPathGatewayRegions,
|
7997
8726
|
"DownloadL4Logs": doDownloadL4Logs,
|
7998
8727
|
"CreatePlanForZone": doCreatePlanForZone,
|
7999
8728
|
"DescribeContentQuota": doDescribeContentQuota,
|
@@ -8011,17 +8740,20 @@ ACTION_MAP = {
|
|
8011
8740
|
"ModifyOriginGroup": doModifyOriginGroup,
|
8012
8741
|
"DeleteApplicationProxy": doDeleteApplicationProxy,
|
8013
8742
|
"ModifyL7AccSetting": doModifyL7AccSetting,
|
8743
|
+
"ModifyMultiPathGatewayLine": doModifyMultiPathGatewayLine,
|
8014
8744
|
"ModifyL4ProxyStatus": doModifyL4ProxyStatus,
|
8015
8745
|
"DownloadL7Logs": doDownloadL7Logs,
|
8016
8746
|
"DescribeEnvironments": doDescribeEnvironments,
|
8017
8747
|
"DescribeOriginACL": doDescribeOriginACL,
|
8018
8748
|
"DeleteApplicationProxyRule": doDeleteApplicationProxyRule,
|
8019
8749
|
"CheckCnameStatus": doCheckCnameStatus,
|
8020
|
-
"
|
8750
|
+
"CreateMultiPathGateway": doCreateMultiPathGateway,
|
8021
8751
|
"CreatePrefetchTask": doCreatePrefetchTask,
|
8022
8752
|
"DeleteAliasDomain": doDeleteAliasDomain,
|
8023
8753
|
"DescribeOverviewL7Data": doDescribeOverviewL7Data,
|
8024
8754
|
"CreateAccelerationDomain": doCreateAccelerationDomain,
|
8755
|
+
"CreateMultiPathGatewayLine": doCreateMultiPathGatewayLine,
|
8756
|
+
"DescribeZones": doDescribeZones,
|
8025
8757
|
"DescribeConfigGroupVersionDetail": doDescribeConfigGroupVersionDetail,
|
8026
8758
|
"DescribeL7AccRules": doDescribeL7AccRules,
|
8027
8759
|
"BindSecurityTemplateToEntity": doBindSecurityTemplateToEntity,
|
@@ -8034,6 +8766,7 @@ ACTION_MAP = {
|
|
8034
8766
|
"DescribeIPRegion": doDescribeIPRegion,
|
8035
8767
|
"ModifyLoadBalancer": doModifyLoadBalancer,
|
8036
8768
|
"DeleteAccelerationDomains": doDeleteAccelerationDomains,
|
8769
|
+
"RefreshMultiPathGatewaySecretKey": doRefreshMultiPathGatewaySecretKey,
|
8037
8770
|
"CreateRealtimeLogDeliveryTask": doCreateRealtimeLogDeliveryTask,
|
8038
8771
|
"ModifyL4Proxy": doModifyL4Proxy,
|
8039
8772
|
"ModifyL4ProxyRules": doModifyL4ProxyRules,
|
@@ -8053,13 +8786,14 @@ ACTION_MAP = {
|
|
8053
8786
|
"DescribeTimingL4Data": doDescribeTimingL4Data,
|
8054
8787
|
"DescribeTopL7CacheData": doDescribeTopL7CacheData,
|
8055
8788
|
"ModifyRule": doModifyRule,
|
8789
|
+
"DescribeMultiPathGateways": doDescribeMultiPathGateways,
|
8056
8790
|
"DescribeTopL7AnalysisData": doDescribeTopL7AnalysisData,
|
8057
8791
|
"DeleteDnsRecords": doDeleteDnsRecords,
|
8058
8792
|
"ModifySecurityPolicy": doModifySecurityPolicy,
|
8059
|
-
"
|
8793
|
+
"DescribeMultiPathGatewayLine": doDescribeMultiPathGatewayLine,
|
8060
8794
|
"DeleteL7AccRules": doDeleteL7AccRules,
|
8061
8795
|
"BindZoneToPlan": doBindZoneToPlan,
|
8062
|
-
"
|
8796
|
+
"DescribeDDoSAttackEvent": doDescribeDDoSAttackEvent,
|
8063
8797
|
"DeleteL4ProxyRules": doDeleteL4ProxyRules,
|
8064
8798
|
"CreateCustomizeErrorPage": doCreateCustomizeErrorPage,
|
8065
8799
|
"ModifyAccelerationDomain": doModifyAccelerationDomain,
|
@@ -8070,6 +8804,7 @@ ACTION_MAP = {
|
|
8070
8804
|
"DescribeTimingL7AnalysisData": doDescribeTimingL7AnalysisData,
|
8071
8805
|
"CreateFunction": doCreateFunction,
|
8072
8806
|
"DescribeApplicationProxies": doDescribeApplicationProxies,
|
8807
|
+
"ModifyMultiPathGateway": doModifyMultiPathGateway,
|
8073
8808
|
"CreateSharedCNAME": doCreateSharedCNAME,
|
8074
8809
|
"CreateRule": doCreateRule,
|
8075
8810
|
"CreateConfigGroupVersion": doCreateConfigGroupVersion,
|
@@ -8083,6 +8818,7 @@ ACTION_MAP = {
|
|
8083
8818
|
"DescribePlans": doDescribePlans,
|
8084
8819
|
"DeleteLoadBalancer": doDeleteLoadBalancer,
|
8085
8820
|
"DisableOriginACL": doDisableOriginACL,
|
8821
|
+
"ModifyPlan": doModifyPlan,
|
8086
8822
|
"DeleteContentIdentifier": doDeleteContentIdentifier,
|
8087
8823
|
"DescribeRulesSetting": doDescribeRulesSetting,
|
8088
8824
|
"ModifyAccelerationDomainStatuses": doModifyAccelerationDomainStatuses,
|
@@ -8092,16 +8828,19 @@ ACTION_MAP = {
|
|
8092
8828
|
"ModifyZoneStatus": doModifyZoneStatus,
|
8093
8829
|
"CreateL7AccRules": doCreateL7AccRules,
|
8094
8830
|
"DescribePurgeTasks": doDescribePurgeTasks,
|
8831
|
+
"DescribeMultiPathGateway": doDescribeMultiPathGateway,
|
8095
8832
|
"DeleteRules": doDeleteRules,
|
8096
8833
|
"DescribeL4ProxyRules": doDescribeL4ProxyRules,
|
8097
|
-
"
|
8834
|
+
"DeleteMultiPathGateway": doDeleteMultiPathGateway,
|
8835
|
+
"DescribeL4Proxy": doDescribeL4Proxy,
|
8836
|
+
"ModifyZone": doModifyZone,
|
8098
8837
|
"HandleFunctionRuntimeEnvironment": doHandleFunctionRuntimeEnvironment,
|
8099
|
-
"DescribeDDoSAttackEvent": doDescribeDDoSAttackEvent,
|
8100
8838
|
"ModifyContentIdentifier": doModifyContentIdentifier,
|
8101
8839
|
"DeleteWebSecurityTemplate": doDeleteWebSecurityTemplate,
|
8102
8840
|
"DescribeSecurityPolicy": doDescribeSecurityPolicy,
|
8103
8841
|
"ModifyFunctionRulePriority": doModifyFunctionRulePriority,
|
8104
8842
|
"ModifySecurityIPGroup": doModifySecurityIPGroup,
|
8843
|
+
"ModifyMultiPathGatewaySecretKey": doModifyMultiPathGatewaySecretKey,
|
8105
8844
|
"DescribeRules": doDescribeRules,
|
8106
8845
|
"CreateCLSIndex": doCreateCLSIndex,
|
8107
8846
|
"ConfirmOriginACLUpdate": doConfirmOriginACLUpdate,
|
@@ -8129,18 +8868,21 @@ ACTION_MAP = {
|
|
8129
8868
|
"CreateContentIdentifier": doCreateContentIdentifier,
|
8130
8869
|
"DeleteSecurityIPGroup": doDeleteSecurityIPGroup,
|
8131
8870
|
"CreateApplicationProxyRule": doCreateApplicationProxyRule,
|
8132
|
-
"
|
8871
|
+
"DescribeMultiPathGatewaySecretKey": doDescribeMultiPathGatewaySecretKey,
|
8133
8872
|
"DescribeFunctions": doDescribeFunctions,
|
8134
8873
|
"DeleteZone": doDeleteZone,
|
8135
8874
|
"DescribeSecurityIPGroupInfo": doDescribeSecurityIPGroupInfo,
|
8136
8875
|
"DescribeDnsRecords": doDescribeDnsRecords,
|
8137
8876
|
"ImportZoneConfig": doImportZoneConfig,
|
8877
|
+
"CreateMultiPathGatewaySecretKey": doCreateMultiPathGatewaySecretKey,
|
8138
8878
|
"ModifyCustomErrorPage": doModifyCustomErrorPage,
|
8139
8879
|
"DescribeDDoSAttackData": doDescribeDDoSAttackData,
|
8140
8880
|
"DeleteSharedCNAME": doDeleteSharedCNAME,
|
8141
8881
|
"DescribeAliasDomains": doDescribeAliasDomains,
|
8142
|
-
"
|
8882
|
+
"DeleteCustomErrorPage": doDeleteCustomErrorPage,
|
8883
|
+
"DeleteMultiPathGatewayLine": doDeleteMultiPathGatewayLine,
|
8143
8884
|
"DescribeBillingData": doDescribeBillingData,
|
8885
|
+
"DescribeOriginGroupHealthStatus": doDescribeOriginGroupHealthStatus,
|
8144
8886
|
|
8145
8887
|
}
|
8146
8888
|
|