tccli 3.0.1140.1__py2.py3-none-any.whl → 3.0.1142.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/services/csip/v20221121/api.json +158 -159
- tccli/services/csip/v20221121/examples.json +12 -12
- tccli/services/cynosdb/v20190107/api.json +113 -33
- tccli/services/cynosdb/v20190107/examples.json +3 -3
- tccli/services/dcdb/v20180411/api.json +21 -11
- tccli/services/domain/v20180808/api.json +30 -30
- tccli/services/dts/v20211206/api.json +11 -0
- tccli/services/emr/v20190103/api.json +2 -2
- tccli/services/ess/v20201111/api.json +13 -4
- tccli/services/ess/v20201111/examples.json +2 -2
- tccli/services/essbasic/v20210526/api.json +1 -1
- tccli/services/gaap/gaap_client.py +61 -8
- tccli/services/gaap/v20180529/api.json +52 -0
- tccli/services/gaap/v20180529/examples.json +8 -0
- tccli/services/ims/v20201229/api.json +2 -2
- tccli/services/mariadb/v20170312/api.json +21 -11
- tccli/services/mmps/v20200710/api.json +3 -3
- tccli/services/monitor/v20180724/api.json +10 -1
- tccli/services/ocr/v20181119/api.json +41 -4
- tccli/services/ocr/v20181119/examples.json +2 -2
- tccli/services/organization/v20210331/api.json +2 -2
- tccli/services/scf/v20180416/api.json +10 -11
- tccli/services/scf/v20180416/examples.json +1 -1
- tccli/services/ssl/v20191205/api.json +63 -22
- tccli/services/ssl/v20191205/examples.json +4 -4
- tccli/services/tdmq/v20200217/api.json +22 -3
- tccli/services/tdmq/v20200217/examples.json +2 -2
- tccli/services/teo/v20220901/api.json +61 -6
- tccli/services/teo/v20220901/examples.json +6 -0
- tccli/services/vpc/v20170312/api.json +2164 -214
- tccli/services/vpc/v20170312/examples.json +154 -4
- tccli/services/vpc/vpc_client.py +1180 -226
- tccli/services/waf/v20180125/api.json +51 -91
- tccli/services/waf/v20180125/examples.json +0 -8
- tccli/services/waf/waf_client.py +0 -53
- tccli/services/wedata/v20210820/api.json +360 -0
- tccli/services/wedata/v20210820/examples.json +28 -0
- tccli/services/wedata/wedata_client.py +114 -8
- {tccli-3.0.1140.1.dist-info → tccli-3.0.1142.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1140.1.dist-info → tccli-3.0.1142.1.dist-info}/RECORD +44 -44
- {tccli-3.0.1140.1.dist-info → tccli-3.0.1142.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1140.1.dist-info → tccli-3.0.1142.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1140.1.dist-info → tccli-3.0.1142.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/vpc/vpc_client.py
CHANGED
@@ -1213,7 +1213,7 @@ def doDescribeCcnAttachedInstances(args, parsed_globals):
|
|
1213
1213
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1214
1214
|
|
1215
1215
|
|
1216
|
-
def
|
1216
|
+
def doDescribePrivateNatGatewayRegions(args, parsed_globals):
|
1217
1217
|
g_param = parse_global_arg(parsed_globals)
|
1218
1218
|
|
1219
1219
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1242,11 +1242,11 @@ def doResetRoutes(args, parsed_globals):
|
|
1242
1242
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
1243
1243
|
client._sdkVersion += ("_CLI_" + __version__)
|
1244
1244
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1245
|
-
model = models.
|
1245
|
+
model = models.DescribePrivateNatGatewayRegionsRequest()
|
1246
1246
|
model.from_json_string(json.dumps(args))
|
1247
1247
|
start_time = time.time()
|
1248
1248
|
while True:
|
1249
|
-
rsp = client.
|
1249
|
+
rsp = client.DescribePrivateNatGatewayRegions(model)
|
1250
1250
|
result = rsp.to_json_string()
|
1251
1251
|
try:
|
1252
1252
|
json_obj = json.loads(result)
|
@@ -1265,7 +1265,7 @@ def doResetRoutes(args, parsed_globals):
|
|
1265
1265
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1266
1266
|
|
1267
1267
|
|
1268
|
-
def
|
1268
|
+
def doCreatePrivateNatGateway(args, parsed_globals):
|
1269
1269
|
g_param = parse_global_arg(parsed_globals)
|
1270
1270
|
|
1271
1271
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1294,11 +1294,11 @@ def doDeleteVpnGatewaySslServer(args, parsed_globals):
|
|
1294
1294
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
1295
1295
|
client._sdkVersion += ("_CLI_" + __version__)
|
1296
1296
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1297
|
-
model = models.
|
1297
|
+
model = models.CreatePrivateNatGatewayRequest()
|
1298
1298
|
model.from_json_string(json.dumps(args))
|
1299
1299
|
start_time = time.time()
|
1300
1300
|
while True:
|
1301
|
-
rsp = client.
|
1301
|
+
rsp = client.CreatePrivateNatGateway(model)
|
1302
1302
|
result = rsp.to_json_string()
|
1303
1303
|
try:
|
1304
1304
|
json_obj = json.loads(result)
|
@@ -2513,6 +2513,162 @@ def doAssociateNatGatewayAddress(args, parsed_globals):
|
|
2513
2513
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2514
2514
|
|
2515
2515
|
|
2516
|
+
def doCreatePrivateNatGatewayTranslationNatRule(args, parsed_globals):
|
2517
|
+
g_param = parse_global_arg(parsed_globals)
|
2518
|
+
|
2519
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2520
|
+
cred = credential.CVMRoleCredential()
|
2521
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2522
|
+
cred = credential.STSAssumeRoleCredential(
|
2523
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2524
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2525
|
+
)
|
2526
|
+
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):
|
2527
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2528
|
+
else:
|
2529
|
+
cred = credential.Credential(
|
2530
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2531
|
+
)
|
2532
|
+
http_profile = HttpProfile(
|
2533
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2534
|
+
reqMethod="POST",
|
2535
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2536
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2537
|
+
)
|
2538
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2539
|
+
if g_param[OptionsDefine.Language]:
|
2540
|
+
profile.language = g_param[OptionsDefine.Language]
|
2541
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2542
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
2543
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2544
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2545
|
+
model = models.CreatePrivateNatGatewayTranslationNatRuleRequest()
|
2546
|
+
model.from_json_string(json.dumps(args))
|
2547
|
+
start_time = time.time()
|
2548
|
+
while True:
|
2549
|
+
rsp = client.CreatePrivateNatGatewayTranslationNatRule(model)
|
2550
|
+
result = rsp.to_json_string()
|
2551
|
+
try:
|
2552
|
+
json_obj = json.loads(result)
|
2553
|
+
except TypeError as e:
|
2554
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2555
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2556
|
+
break
|
2557
|
+
cur_time = time.time()
|
2558
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2559
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2560
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2561
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2562
|
+
else:
|
2563
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2564
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2565
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2566
|
+
|
2567
|
+
|
2568
|
+
def doModifyPrivateNatGatewayDestinationIpPortTranslationNatRule(args, parsed_globals):
|
2569
|
+
g_param = parse_global_arg(parsed_globals)
|
2570
|
+
|
2571
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2572
|
+
cred = credential.CVMRoleCredential()
|
2573
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2574
|
+
cred = credential.STSAssumeRoleCredential(
|
2575
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2576
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2577
|
+
)
|
2578
|
+
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):
|
2579
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2580
|
+
else:
|
2581
|
+
cred = credential.Credential(
|
2582
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2583
|
+
)
|
2584
|
+
http_profile = HttpProfile(
|
2585
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2586
|
+
reqMethod="POST",
|
2587
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2588
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2589
|
+
)
|
2590
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2591
|
+
if g_param[OptionsDefine.Language]:
|
2592
|
+
profile.language = g_param[OptionsDefine.Language]
|
2593
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2594
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
2595
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2596
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2597
|
+
model = models.ModifyPrivateNatGatewayDestinationIpPortTranslationNatRuleRequest()
|
2598
|
+
model.from_json_string(json.dumps(args))
|
2599
|
+
start_time = time.time()
|
2600
|
+
while True:
|
2601
|
+
rsp = client.ModifyPrivateNatGatewayDestinationIpPortTranslationNatRule(model)
|
2602
|
+
result = rsp.to_json_string()
|
2603
|
+
try:
|
2604
|
+
json_obj = json.loads(result)
|
2605
|
+
except TypeError as e:
|
2606
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2607
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2608
|
+
break
|
2609
|
+
cur_time = time.time()
|
2610
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2611
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2612
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2613
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2614
|
+
else:
|
2615
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2616
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2617
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2618
|
+
|
2619
|
+
|
2620
|
+
def doModifyPrivateNatGatewayTranslationNatRule(args, parsed_globals):
|
2621
|
+
g_param = parse_global_arg(parsed_globals)
|
2622
|
+
|
2623
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2624
|
+
cred = credential.CVMRoleCredential()
|
2625
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2626
|
+
cred = credential.STSAssumeRoleCredential(
|
2627
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2628
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2629
|
+
)
|
2630
|
+
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):
|
2631
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2632
|
+
else:
|
2633
|
+
cred = credential.Credential(
|
2634
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2635
|
+
)
|
2636
|
+
http_profile = HttpProfile(
|
2637
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2638
|
+
reqMethod="POST",
|
2639
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2640
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2641
|
+
)
|
2642
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2643
|
+
if g_param[OptionsDefine.Language]:
|
2644
|
+
profile.language = g_param[OptionsDefine.Language]
|
2645
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2646
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
2647
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2648
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2649
|
+
model = models.ModifyPrivateNatGatewayTranslationNatRuleRequest()
|
2650
|
+
model.from_json_string(json.dumps(args))
|
2651
|
+
start_time = time.time()
|
2652
|
+
while True:
|
2653
|
+
rsp = client.ModifyPrivateNatGatewayTranslationNatRule(model)
|
2654
|
+
result = rsp.to_json_string()
|
2655
|
+
try:
|
2656
|
+
json_obj = json.loads(result)
|
2657
|
+
except TypeError as e:
|
2658
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2659
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2660
|
+
break
|
2661
|
+
cur_time = time.time()
|
2662
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2663
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2664
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2665
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2666
|
+
else:
|
2667
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2668
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2669
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2670
|
+
|
2671
|
+
|
2516
2672
|
def doModifyVpcEndPointAttribute(args, parsed_globals):
|
2517
2673
|
g_param = parse_global_arg(parsed_globals)
|
2518
2674
|
|
@@ -2565,7 +2721,7 @@ def doModifyVpcEndPointAttribute(args, parsed_globals):
|
|
2565
2721
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2566
2722
|
|
2567
2723
|
|
2568
|
-
def
|
2724
|
+
def doDescribeVpnGatewaySslServers(args, parsed_globals):
|
2569
2725
|
g_param = parse_global_arg(parsed_globals)
|
2570
2726
|
|
2571
2727
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2594,11 +2750,11 @@ def doDescribeVpnGatewayRoutes(args, parsed_globals):
|
|
2594
2750
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
2595
2751
|
client._sdkVersion += ("_CLI_" + __version__)
|
2596
2752
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2597
|
-
model = models.
|
2753
|
+
model = models.DescribeVpnGatewaySslServersRequest()
|
2598
2754
|
model.from_json_string(json.dumps(args))
|
2599
2755
|
start_time = time.time()
|
2600
2756
|
while True:
|
2601
|
-
rsp = client.
|
2757
|
+
rsp = client.DescribeVpnGatewaySslServers(model)
|
2602
2758
|
result = rsp.to_json_string()
|
2603
2759
|
try:
|
2604
2760
|
json_obj = json.loads(result)
|
@@ -3917,7 +4073,7 @@ def doDescribeNetworkAccountType(args, parsed_globals):
|
|
3917
4073
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3918
4074
|
|
3919
4075
|
|
3920
|
-
def
|
4076
|
+
def doCreatePrivateNatGatewayDestinationIpPortTranslationNatRule(args, parsed_globals):
|
3921
4077
|
g_param = parse_global_arg(parsed_globals)
|
3922
4078
|
|
3923
4079
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3946,11 +4102,11 @@ def doDeleteSecurityGroup(args, parsed_globals):
|
|
3946
4102
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
3947
4103
|
client._sdkVersion += ("_CLI_" + __version__)
|
3948
4104
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3949
|
-
model = models.
|
4105
|
+
model = models.CreatePrivateNatGatewayDestinationIpPortTranslationNatRuleRequest()
|
3950
4106
|
model.from_json_string(json.dumps(args))
|
3951
4107
|
start_time = time.time()
|
3952
4108
|
while True:
|
3953
|
-
rsp = client.
|
4109
|
+
rsp = client.CreatePrivateNatGatewayDestinationIpPortTranslationNatRule(model)
|
3954
4110
|
result = rsp.to_json_string()
|
3955
4111
|
try:
|
3956
4112
|
json_obj = json.loads(result)
|
@@ -4385,6 +4541,58 @@ def doLockCcnBandwidths(args, parsed_globals):
|
|
4385
4541
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4386
4542
|
|
4387
4543
|
|
4544
|
+
def doDescribePrivateNatGatewayDestinationIpPortTranslationNatRules(args, parsed_globals):
|
4545
|
+
g_param = parse_global_arg(parsed_globals)
|
4546
|
+
|
4547
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4548
|
+
cred = credential.CVMRoleCredential()
|
4549
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4550
|
+
cred = credential.STSAssumeRoleCredential(
|
4551
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4552
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4553
|
+
)
|
4554
|
+
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):
|
4555
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4556
|
+
else:
|
4557
|
+
cred = credential.Credential(
|
4558
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4559
|
+
)
|
4560
|
+
http_profile = HttpProfile(
|
4561
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4562
|
+
reqMethod="POST",
|
4563
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4564
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4565
|
+
)
|
4566
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4567
|
+
if g_param[OptionsDefine.Language]:
|
4568
|
+
profile.language = g_param[OptionsDefine.Language]
|
4569
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4570
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
4571
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4572
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4573
|
+
model = models.DescribePrivateNatGatewayDestinationIpPortTranslationNatRulesRequest()
|
4574
|
+
model.from_json_string(json.dumps(args))
|
4575
|
+
start_time = time.time()
|
4576
|
+
while True:
|
4577
|
+
rsp = client.DescribePrivateNatGatewayDestinationIpPortTranslationNatRules(model)
|
4578
|
+
result = rsp.to_json_string()
|
4579
|
+
try:
|
4580
|
+
json_obj = json.loads(result)
|
4581
|
+
except TypeError as e:
|
4582
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4583
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4584
|
+
break
|
4585
|
+
cur_time = time.time()
|
4586
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4587
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4588
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4589
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4590
|
+
else:
|
4591
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4592
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4593
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4594
|
+
|
4595
|
+
|
4388
4596
|
def doModifyAddressTemplateAttribute(args, parsed_globals):
|
4389
4597
|
g_param = parse_global_arg(parsed_globals)
|
4390
4598
|
|
@@ -5269,7 +5477,7 @@ def doAllocateAddresses(args, parsed_globals):
|
|
5269
5477
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5270
5478
|
|
5271
5479
|
|
5272
|
-
def
|
5480
|
+
def doCheckAssistantCidr(args, parsed_globals):
|
5273
5481
|
g_param = parse_global_arg(parsed_globals)
|
5274
5482
|
|
5275
5483
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5298,11 +5506,11 @@ def doDescribeSnapshotPolicies(args, parsed_globals):
|
|
5298
5506
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
5299
5507
|
client._sdkVersion += ("_CLI_" + __version__)
|
5300
5508
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5301
|
-
model = models.
|
5509
|
+
model = models.CheckAssistantCidrRequest()
|
5302
5510
|
model.from_json_string(json.dumps(args))
|
5303
5511
|
start_time = time.time()
|
5304
5512
|
while True:
|
5305
|
-
rsp = client.
|
5513
|
+
rsp = client.CheckAssistantCidr(model)
|
5306
5514
|
result = rsp.to_json_string()
|
5307
5515
|
try:
|
5308
5516
|
json_obj = json.loads(result)
|
@@ -5321,7 +5529,7 @@ def doDescribeSnapshotPolicies(args, parsed_globals):
|
|
5321
5529
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5322
5530
|
|
5323
5531
|
|
5324
|
-
def
|
5532
|
+
def doDeleteNetworkAclQuintupleEntries(args, parsed_globals):
|
5325
5533
|
g_param = parse_global_arg(parsed_globals)
|
5326
5534
|
|
5327
5535
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5350,11 +5558,11 @@ def doCheckAssistantCidr(args, parsed_globals):
|
|
5350
5558
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
5351
5559
|
client._sdkVersion += ("_CLI_" + __version__)
|
5352
5560
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5353
|
-
model = models.
|
5561
|
+
model = models.DeleteNetworkAclQuintupleEntriesRequest()
|
5354
5562
|
model.from_json_string(json.dumps(args))
|
5355
5563
|
start_time = time.time()
|
5356
5564
|
while True:
|
5357
|
-
rsp = client.
|
5565
|
+
rsp = client.DeleteNetworkAclQuintupleEntries(model)
|
5358
5566
|
result = rsp.to_json_string()
|
5359
5567
|
try:
|
5360
5568
|
json_obj = json.loads(result)
|
@@ -5373,7 +5581,7 @@ def doCheckAssistantCidr(args, parsed_globals):
|
|
5373
5581
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5374
5582
|
|
5375
5583
|
|
5376
|
-
def
|
5584
|
+
def doResetRoutes(args, parsed_globals):
|
5377
5585
|
g_param = parse_global_arg(parsed_globals)
|
5378
5586
|
|
5379
5587
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5402,11 +5610,11 @@ def doDeleteNetworkAclQuintupleEntries(args, parsed_globals):
|
|
5402
5610
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
5403
5611
|
client._sdkVersion += ("_CLI_" + __version__)
|
5404
5612
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5405
|
-
model = models.
|
5613
|
+
model = models.ResetRoutesRequest()
|
5406
5614
|
model.from_json_string(json.dumps(args))
|
5407
5615
|
start_time = time.time()
|
5408
5616
|
while True:
|
5409
|
-
rsp = client.
|
5617
|
+
rsp = client.ResetRoutes(model)
|
5410
5618
|
result = rsp.to_json_string()
|
5411
5619
|
try:
|
5412
5620
|
json_obj = json.loads(result)
|
@@ -5425,7 +5633,7 @@ def doDeleteNetworkAclQuintupleEntries(args, parsed_globals):
|
|
5425
5633
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5426
5634
|
|
5427
5635
|
|
5428
|
-
def
|
5636
|
+
def doDescribeIp6Addresses(args, parsed_globals):
|
5429
5637
|
g_param = parse_global_arg(parsed_globals)
|
5430
5638
|
|
5431
5639
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5454,11 +5662,11 @@ def doDescribeVpcIpv6Addresses(args, parsed_globals):
|
|
5454
5662
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
5455
5663
|
client._sdkVersion += ("_CLI_" + __version__)
|
5456
5664
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5457
|
-
model = models.
|
5665
|
+
model = models.DescribeIp6AddressesRequest()
|
5458
5666
|
model.from_json_string(json.dumps(args))
|
5459
5667
|
start_time = time.time()
|
5460
5668
|
while True:
|
5461
|
-
rsp = client.
|
5669
|
+
rsp = client.DescribeIp6Addresses(model)
|
5462
5670
|
result = rsp.to_json_string()
|
5463
5671
|
try:
|
5464
5672
|
json_obj = json.loads(result)
|
@@ -5477,7 +5685,7 @@ def doDescribeVpcIpv6Addresses(args, parsed_globals):
|
|
5477
5685
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5478
5686
|
|
5479
5687
|
|
5480
|
-
def
|
5688
|
+
def doUnlockCcnBandwidths(args, parsed_globals):
|
5481
5689
|
g_param = parse_global_arg(parsed_globals)
|
5482
5690
|
|
5483
5691
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5506,11 +5714,11 @@ def doDescribeIp6Addresses(args, parsed_globals):
|
|
5506
5714
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
5507
5715
|
client._sdkVersion += ("_CLI_" + __version__)
|
5508
5716
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5509
|
-
model = models.
|
5717
|
+
model = models.UnlockCcnBandwidthsRequest()
|
5510
5718
|
model.from_json_string(json.dumps(args))
|
5511
5719
|
start_time = time.time()
|
5512
5720
|
while True:
|
5513
|
-
rsp = client.
|
5721
|
+
rsp = client.UnlockCcnBandwidths(model)
|
5514
5722
|
result = rsp.to_json_string()
|
5515
5723
|
try:
|
5516
5724
|
json_obj = json.loads(result)
|
@@ -5529,7 +5737,7 @@ def doDescribeIp6Addresses(args, parsed_globals):
|
|
5529
5737
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5530
5738
|
|
5531
5739
|
|
5532
|
-
def
|
5740
|
+
def doModifyVpcAttribute(args, parsed_globals):
|
5533
5741
|
g_param = parse_global_arg(parsed_globals)
|
5534
5742
|
|
5535
5743
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5558,11 +5766,11 @@ def doUnlockCcnBandwidths(args, parsed_globals):
|
|
5558
5766
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
5559
5767
|
client._sdkVersion += ("_CLI_" + __version__)
|
5560
5768
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5561
|
-
model = models.
|
5769
|
+
model = models.ModifyVpcAttributeRequest()
|
5562
5770
|
model.from_json_string(json.dumps(args))
|
5563
5771
|
start_time = time.time()
|
5564
5772
|
while True:
|
5565
|
-
rsp = client.
|
5773
|
+
rsp = client.ModifyVpcAttribute(model)
|
5566
5774
|
result = rsp.to_json_string()
|
5567
5775
|
try:
|
5568
5776
|
json_obj = json.loads(result)
|
@@ -5581,7 +5789,7 @@ def doUnlockCcnBandwidths(args, parsed_globals):
|
|
5581
5789
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5582
5790
|
|
5583
5791
|
|
5584
|
-
def
|
5792
|
+
def doDisableSnapshotPolicies(args, parsed_globals):
|
5585
5793
|
g_param = parse_global_arg(parsed_globals)
|
5586
5794
|
|
5587
5795
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5610,11 +5818,11 @@ def doModifyVpcAttribute(args, parsed_globals):
|
|
5610
5818
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
5611
5819
|
client._sdkVersion += ("_CLI_" + __version__)
|
5612
5820
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5613
|
-
model = models.
|
5821
|
+
model = models.DisableSnapshotPoliciesRequest()
|
5614
5822
|
model.from_json_string(json.dumps(args))
|
5615
5823
|
start_time = time.time()
|
5616
5824
|
while True:
|
5617
|
-
rsp = client.
|
5825
|
+
rsp = client.DisableSnapshotPolicies(model)
|
5618
5826
|
result = rsp.to_json_string()
|
5619
5827
|
try:
|
5620
5828
|
json_obj = json.loads(result)
|
@@ -5633,7 +5841,7 @@ def doModifyVpcAttribute(args, parsed_globals):
|
|
5633
5841
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5634
5842
|
|
5635
5843
|
|
5636
|
-
def
|
5844
|
+
def doDeletePrivateNatGatewayTranslationNatRule(args, parsed_globals):
|
5637
5845
|
g_param = parse_global_arg(parsed_globals)
|
5638
5846
|
|
5639
5847
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5662,11 +5870,11 @@ def doDisableSnapshotPolicies(args, parsed_globals):
|
|
5662
5870
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
5663
5871
|
client._sdkVersion += ("_CLI_" + __version__)
|
5664
5872
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5665
|
-
model = models.
|
5873
|
+
model = models.DeletePrivateNatGatewayTranslationNatRuleRequest()
|
5666
5874
|
model.from_json_string(json.dumps(args))
|
5667
5875
|
start_time = time.time()
|
5668
5876
|
while True:
|
5669
|
-
rsp = client.
|
5877
|
+
rsp = client.DeletePrivateNatGatewayTranslationNatRule(model)
|
5670
5878
|
result = rsp.to_json_string()
|
5671
5879
|
try:
|
5672
5880
|
json_obj = json.loads(result)
|
@@ -5945,6 +6153,58 @@ def doDeleteSubnet(args, parsed_globals):
|
|
5945
6153
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5946
6154
|
|
5947
6155
|
|
6156
|
+
def doDeleteVpnGatewaySslServer(args, parsed_globals):
|
6157
|
+
g_param = parse_global_arg(parsed_globals)
|
6158
|
+
|
6159
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6160
|
+
cred = credential.CVMRoleCredential()
|
6161
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6162
|
+
cred = credential.STSAssumeRoleCredential(
|
6163
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6164
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6165
|
+
)
|
6166
|
+
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):
|
6167
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6168
|
+
else:
|
6169
|
+
cred = credential.Credential(
|
6170
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6171
|
+
)
|
6172
|
+
http_profile = HttpProfile(
|
6173
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6174
|
+
reqMethod="POST",
|
6175
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
6176
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6177
|
+
)
|
6178
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6179
|
+
if g_param[OptionsDefine.Language]:
|
6180
|
+
profile.language = g_param[OptionsDefine.Language]
|
6181
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6182
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
6183
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
6184
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6185
|
+
model = models.DeleteVpnGatewaySslServerRequest()
|
6186
|
+
model.from_json_string(json.dumps(args))
|
6187
|
+
start_time = time.time()
|
6188
|
+
while True:
|
6189
|
+
rsp = client.DeleteVpnGatewaySslServer(model)
|
6190
|
+
result = rsp.to_json_string()
|
6191
|
+
try:
|
6192
|
+
json_obj = json.loads(result)
|
6193
|
+
except TypeError as e:
|
6194
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6195
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6196
|
+
break
|
6197
|
+
cur_time = time.time()
|
6198
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6199
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6200
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6201
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6202
|
+
else:
|
6203
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6204
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6205
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6206
|
+
|
6207
|
+
|
5948
6208
|
def doAttachClassicLinkVpc(args, parsed_globals):
|
5949
6209
|
g_param = parse_global_arg(parsed_globals)
|
5950
6210
|
|
@@ -7037,7 +7297,7 @@ def doDetachNetworkInterface(args, parsed_globals):
|
|
7037
7297
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7038
7298
|
|
7039
7299
|
|
7040
|
-
def
|
7300
|
+
def doDeletePrivateNatGatewayDestinationIpPortTranslationNatRule(args, parsed_globals):
|
7041
7301
|
g_param = parse_global_arg(parsed_globals)
|
7042
7302
|
|
7043
7303
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -7066,11 +7326,11 @@ def doRejectAttachCcnInstances(args, parsed_globals):
|
|
7066
7326
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
7067
7327
|
client._sdkVersion += ("_CLI_" + __version__)
|
7068
7328
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7069
|
-
model = models.
|
7329
|
+
model = models.DeletePrivateNatGatewayDestinationIpPortTranslationNatRuleRequest()
|
7070
7330
|
model.from_json_string(json.dumps(args))
|
7071
7331
|
start_time = time.time()
|
7072
7332
|
while True:
|
7073
|
-
rsp = client.
|
7333
|
+
rsp = client.DeletePrivateNatGatewayDestinationIpPortTranslationNatRule(model)
|
7074
7334
|
result = rsp.to_json_string()
|
7075
7335
|
try:
|
7076
7336
|
json_obj = json.loads(result)
|
@@ -7921,7 +8181,7 @@ def doModifyGatewayFlowQos(args, parsed_globals):
|
|
7921
8181
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7922
8182
|
|
7923
8183
|
|
7924
|
-
def
|
8184
|
+
def doUnassignIpv6SubnetCidrBlock(args, parsed_globals):
|
7925
8185
|
g_param = parse_global_arg(parsed_globals)
|
7926
8186
|
|
7927
8187
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -7950,11 +8210,11 @@ def doDeleteNatGateway(args, parsed_globals):
|
|
7950
8210
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
7951
8211
|
client._sdkVersion += ("_CLI_" + __version__)
|
7952
8212
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7953
|
-
model = models.
|
8213
|
+
model = models.UnassignIpv6SubnetCidrBlockRequest()
|
7954
8214
|
model.from_json_string(json.dumps(args))
|
7955
8215
|
start_time = time.time()
|
7956
8216
|
while True:
|
7957
|
-
rsp = client.
|
8217
|
+
rsp = client.UnassignIpv6SubnetCidrBlock(model)
|
7958
8218
|
result = rsp.to_json_string()
|
7959
8219
|
try:
|
7960
8220
|
json_obj = json.loads(result)
|
@@ -8701,6 +8961,58 @@ def doCreateIp6Translators(args, parsed_globals):
|
|
8701
8961
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8702
8962
|
|
8703
8963
|
|
8964
|
+
def doDeletePrivateNatGateway(args, parsed_globals):
|
8965
|
+
g_param = parse_global_arg(parsed_globals)
|
8966
|
+
|
8967
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
8968
|
+
cred = credential.CVMRoleCredential()
|
8969
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8970
|
+
cred = credential.STSAssumeRoleCredential(
|
8971
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8972
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8973
|
+
)
|
8974
|
+
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):
|
8975
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
8976
|
+
else:
|
8977
|
+
cred = credential.Credential(
|
8978
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
8979
|
+
)
|
8980
|
+
http_profile = HttpProfile(
|
8981
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
8982
|
+
reqMethod="POST",
|
8983
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
8984
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
8985
|
+
)
|
8986
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
8987
|
+
if g_param[OptionsDefine.Language]:
|
8988
|
+
profile.language = g_param[OptionsDefine.Language]
|
8989
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
8990
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
8991
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
8992
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
8993
|
+
model = models.DeletePrivateNatGatewayRequest()
|
8994
|
+
model.from_json_string(json.dumps(args))
|
8995
|
+
start_time = time.time()
|
8996
|
+
while True:
|
8997
|
+
rsp = client.DeletePrivateNatGateway(model)
|
8998
|
+
result = rsp.to_json_string()
|
8999
|
+
try:
|
9000
|
+
json_obj = json.loads(result)
|
9001
|
+
except TypeError as e:
|
9002
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
9003
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
9004
|
+
break
|
9005
|
+
cur_time = time.time()
|
9006
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
9007
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
9008
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
9009
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
9010
|
+
else:
|
9011
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
9012
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
9013
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9014
|
+
|
9015
|
+
|
8704
9016
|
def doDescribeUsedIpAddress(args, parsed_globals):
|
8705
9017
|
g_param = parse_global_arg(parsed_globals)
|
8706
9018
|
|
@@ -9481,7 +9793,7 @@ def doDeleteVpcEndPointService(args, parsed_globals):
|
|
9481
9793
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9482
9794
|
|
9483
9795
|
|
9484
|
-
def
|
9796
|
+
def doDeletePrivateNatGatewayTranslationAclRule(args, parsed_globals):
|
9485
9797
|
g_param = parse_global_arg(parsed_globals)
|
9486
9798
|
|
9487
9799
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9510,11 +9822,11 @@ def doCreateNetworkAclQuintupleEntries(args, parsed_globals):
|
|
9510
9822
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
9511
9823
|
client._sdkVersion += ("_CLI_" + __version__)
|
9512
9824
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9513
|
-
model = models.
|
9825
|
+
model = models.DeletePrivateNatGatewayTranslationAclRuleRequest()
|
9514
9826
|
model.from_json_string(json.dumps(args))
|
9515
9827
|
start_time = time.time()
|
9516
9828
|
while True:
|
9517
|
-
rsp = client.
|
9829
|
+
rsp = client.DeletePrivateNatGatewayTranslationAclRule(model)
|
9518
9830
|
result = rsp.to_json_string()
|
9519
9831
|
try:
|
9520
9832
|
json_obj = json.loads(result)
|
@@ -9533,7 +9845,7 @@ def doCreateNetworkAclQuintupleEntries(args, parsed_globals):
|
|
9533
9845
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9534
9846
|
|
9535
9847
|
|
9536
|
-
def
|
9848
|
+
def doCreateNetworkAclQuintupleEntries(args, parsed_globals):
|
9537
9849
|
g_param = parse_global_arg(parsed_globals)
|
9538
9850
|
|
9539
9851
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9562,11 +9874,11 @@ def doDeleteVpcEndPoint(args, parsed_globals):
|
|
9562
9874
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
9563
9875
|
client._sdkVersion += ("_CLI_" + __version__)
|
9564
9876
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9565
|
-
model = models.
|
9877
|
+
model = models.CreateNetworkAclQuintupleEntriesRequest()
|
9566
9878
|
model.from_json_string(json.dumps(args))
|
9567
9879
|
start_time = time.time()
|
9568
9880
|
while True:
|
9569
|
-
rsp = client.
|
9881
|
+
rsp = client.CreateNetworkAclQuintupleEntries(model)
|
9570
9882
|
result = rsp.to_json_string()
|
9571
9883
|
try:
|
9572
9884
|
json_obj = json.loads(result)
|
@@ -9585,7 +9897,7 @@ def doDeleteVpcEndPoint(args, parsed_globals):
|
|
9585
9897
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9586
9898
|
|
9587
9899
|
|
9588
|
-
def
|
9900
|
+
def doDeleteVpcEndPoint(args, parsed_globals):
|
9589
9901
|
g_param = parse_global_arg(parsed_globals)
|
9590
9902
|
|
9591
9903
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9614,11 +9926,11 @@ def doDeleteVpnGateway(args, parsed_globals):
|
|
9614
9926
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
9615
9927
|
client._sdkVersion += ("_CLI_" + __version__)
|
9616
9928
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9617
|
-
model = models.
|
9929
|
+
model = models.DeleteVpcEndPointRequest()
|
9618
9930
|
model.from_json_string(json.dumps(args))
|
9619
9931
|
start_time = time.time()
|
9620
9932
|
while True:
|
9621
|
-
rsp = client.
|
9933
|
+
rsp = client.DeleteVpcEndPoint(model)
|
9622
9934
|
result = rsp.to_json_string()
|
9623
9935
|
try:
|
9624
9936
|
json_obj = json.loads(result)
|
@@ -9637,7 +9949,7 @@ def doDeleteVpnGateway(args, parsed_globals):
|
|
9637
9949
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9638
9950
|
|
9639
9951
|
|
9640
|
-
def
|
9952
|
+
def doDeleteVpnGateway(args, parsed_globals):
|
9641
9953
|
g_param = parse_global_arg(parsed_globals)
|
9642
9954
|
|
9643
9955
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9666,11 +9978,11 @@ def doDescribeTenantCcns(args, parsed_globals):
|
|
9666
9978
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
9667
9979
|
client._sdkVersion += ("_CLI_" + __version__)
|
9668
9980
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9669
|
-
model = models.
|
9981
|
+
model = models.DeleteVpnGatewayRequest()
|
9670
9982
|
model.from_json_string(json.dumps(args))
|
9671
9983
|
start_time = time.time()
|
9672
9984
|
while True:
|
9673
|
-
rsp = client.
|
9985
|
+
rsp = client.DeleteVpnGateway(model)
|
9674
9986
|
result = rsp.to_json_string()
|
9675
9987
|
try:
|
9676
9988
|
json_obj = json.loads(result)
|
@@ -9689,7 +10001,7 @@ def doDescribeTenantCcns(args, parsed_globals):
|
|
9689
10001
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9690
10002
|
|
9691
10003
|
|
9692
|
-
def
|
10004
|
+
def doDescribeTenantCcns(args, parsed_globals):
|
9693
10005
|
g_param = parse_global_arg(parsed_globals)
|
9694
10006
|
|
9695
10007
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9718,11 +10030,11 @@ def doCreateServiceTemplate(args, parsed_globals):
|
|
9718
10030
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
9719
10031
|
client._sdkVersion += ("_CLI_" + __version__)
|
9720
10032
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9721
|
-
model = models.
|
10033
|
+
model = models.DescribeTenantCcnsRequest()
|
9722
10034
|
model.from_json_string(json.dumps(args))
|
9723
10035
|
start_time = time.time()
|
9724
10036
|
while True:
|
9725
|
-
rsp = client.
|
10037
|
+
rsp = client.DescribeTenantCcns(model)
|
9726
10038
|
result = rsp.to_json_string()
|
9727
10039
|
try:
|
9728
10040
|
json_obj = json.loads(result)
|
@@ -9741,7 +10053,7 @@ def doCreateServiceTemplate(args, parsed_globals):
|
|
9741
10053
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9742
10054
|
|
9743
10055
|
|
9744
|
-
def
|
10056
|
+
def doCreateServiceTemplate(args, parsed_globals):
|
9745
10057
|
g_param = parse_global_arg(parsed_globals)
|
9746
10058
|
|
9747
10059
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9770,11 +10082,11 @@ def doCreateSnapshotPolicies(args, parsed_globals):
|
|
9770
10082
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
9771
10083
|
client._sdkVersion += ("_CLI_" + __version__)
|
9772
10084
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9773
|
-
model = models.
|
10085
|
+
model = models.CreateServiceTemplateRequest()
|
9774
10086
|
model.from_json_string(json.dumps(args))
|
9775
10087
|
start_time = time.time()
|
9776
10088
|
while True:
|
9777
|
-
rsp = client.
|
10089
|
+
rsp = client.CreateServiceTemplate(model)
|
9778
10090
|
result = rsp.to_json_string()
|
9779
10091
|
try:
|
9780
10092
|
json_obj = json.loads(result)
|
@@ -9793,7 +10105,7 @@ def doCreateSnapshotPolicies(args, parsed_globals):
|
|
9793
10105
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9794
10106
|
|
9795
10107
|
|
9796
|
-
def
|
10108
|
+
def doCreateSnapshotPolicies(args, parsed_globals):
|
9797
10109
|
g_param = parse_global_arg(parsed_globals)
|
9798
10110
|
|
9799
10111
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9822,11 +10134,11 @@ def doDeleteRoutes(args, parsed_globals):
|
|
9822
10134
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
9823
10135
|
client._sdkVersion += ("_CLI_" + __version__)
|
9824
10136
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9825
|
-
model = models.
|
10137
|
+
model = models.CreateSnapshotPoliciesRequest()
|
9826
10138
|
model.from_json_string(json.dumps(args))
|
9827
10139
|
start_time = time.time()
|
9828
10140
|
while True:
|
9829
|
-
rsp = client.
|
10141
|
+
rsp = client.CreateSnapshotPolicies(model)
|
9830
10142
|
result = rsp.to_json_string()
|
9831
10143
|
try:
|
9832
10144
|
json_obj = json.loads(result)
|
@@ -9845,7 +10157,7 @@ def doDeleteRoutes(args, parsed_globals):
|
|
9845
10157
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9846
10158
|
|
9847
10159
|
|
9848
|
-
def
|
10160
|
+
def doRejectAttachCcnInstances(args, parsed_globals):
|
9849
10161
|
g_param = parse_global_arg(parsed_globals)
|
9850
10162
|
|
9851
10163
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9874,11 +10186,11 @@ def doModifyDirectConnectGatewayAttribute(args, parsed_globals):
|
|
9874
10186
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
9875
10187
|
client._sdkVersion += ("_CLI_" + __version__)
|
9876
10188
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9877
|
-
model = models.
|
10189
|
+
model = models.RejectAttachCcnInstancesRequest()
|
9878
10190
|
model.from_json_string(json.dumps(args))
|
9879
10191
|
start_time = time.time()
|
9880
10192
|
while True:
|
9881
|
-
rsp = client.
|
10193
|
+
rsp = client.RejectAttachCcnInstances(model)
|
9882
10194
|
result = rsp.to_json_string()
|
9883
10195
|
try:
|
9884
10196
|
json_obj = json.loads(result)
|
@@ -9897,7 +10209,7 @@ def doModifyDirectConnectGatewayAttribute(args, parsed_globals):
|
|
9897
10209
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9898
10210
|
|
9899
10211
|
|
9900
|
-
def
|
10212
|
+
def doDeleteRoutes(args, parsed_globals):
|
9901
10213
|
g_param = parse_global_arg(parsed_globals)
|
9902
10214
|
|
9903
10215
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9926,11 +10238,11 @@ def doModifySubnetAttribute(args, parsed_globals):
|
|
9926
10238
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
9927
10239
|
client._sdkVersion += ("_CLI_" + __version__)
|
9928
10240
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9929
|
-
model = models.
|
10241
|
+
model = models.DeleteRoutesRequest()
|
9930
10242
|
model.from_json_string(json.dumps(args))
|
9931
10243
|
start_time = time.time()
|
9932
10244
|
while True:
|
9933
|
-
rsp = client.
|
10245
|
+
rsp = client.DeleteRoutes(model)
|
9934
10246
|
result = rsp.to_json_string()
|
9935
10247
|
try:
|
9936
10248
|
json_obj = json.loads(result)
|
@@ -9949,7 +10261,7 @@ def doModifySubnetAttribute(args, parsed_globals):
|
|
9949
10261
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9950
10262
|
|
9951
10263
|
|
9952
|
-
def
|
10264
|
+
def doModifyDirectConnectGatewayAttribute(args, parsed_globals):
|
9953
10265
|
g_param = parse_global_arg(parsed_globals)
|
9954
10266
|
|
9955
10267
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9978,11 +10290,11 @@ def doDescribeSgSnapshotFileContent(args, parsed_globals):
|
|
9978
10290
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
9979
10291
|
client._sdkVersion += ("_CLI_" + __version__)
|
9980
10292
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9981
|
-
model = models.
|
10293
|
+
model = models.ModifyDirectConnectGatewayAttributeRequest()
|
9982
10294
|
model.from_json_string(json.dumps(args))
|
9983
10295
|
start_time = time.time()
|
9984
10296
|
while True:
|
9985
|
-
rsp = client.
|
10297
|
+
rsp = client.ModifyDirectConnectGatewayAttribute(model)
|
9986
10298
|
result = rsp.to_json_string()
|
9987
10299
|
try:
|
9988
10300
|
json_obj = json.loads(result)
|
@@ -10001,7 +10313,7 @@ def doDescribeSgSnapshotFileContent(args, parsed_globals):
|
|
10001
10313
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10002
10314
|
|
10003
10315
|
|
10004
|
-
def
|
10316
|
+
def doModifySubnetAttribute(args, parsed_globals):
|
10005
10317
|
g_param = parse_global_arg(parsed_globals)
|
10006
10318
|
|
10007
10319
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10030,11 +10342,11 @@ def doDescribeNetworkInterfaces(args, parsed_globals):
|
|
10030
10342
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10031
10343
|
client._sdkVersion += ("_CLI_" + __version__)
|
10032
10344
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10033
|
-
model = models.
|
10345
|
+
model = models.ModifySubnetAttributeRequest()
|
10034
10346
|
model.from_json_string(json.dumps(args))
|
10035
10347
|
start_time = time.time()
|
10036
10348
|
while True:
|
10037
|
-
rsp = client.
|
10349
|
+
rsp = client.ModifySubnetAttribute(model)
|
10038
10350
|
result = rsp.to_json_string()
|
10039
10351
|
try:
|
10040
10352
|
json_obj = json.loads(result)
|
@@ -10053,7 +10365,7 @@ def doDescribeNetworkInterfaces(args, parsed_globals):
|
|
10053
10365
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10054
10366
|
|
10055
10367
|
|
10056
|
-
def
|
10368
|
+
def doDescribeSgSnapshotFileContent(args, parsed_globals):
|
10057
10369
|
g_param = parse_global_arg(parsed_globals)
|
10058
10370
|
|
10059
10371
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10082,11 +10394,11 @@ def doInquiryPriceRenewVpnGateway(args, parsed_globals):
|
|
10082
10394
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10083
10395
|
client._sdkVersion += ("_CLI_" + __version__)
|
10084
10396
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10085
|
-
model = models.
|
10397
|
+
model = models.DescribeSgSnapshotFileContentRequest()
|
10086
10398
|
model.from_json_string(json.dumps(args))
|
10087
10399
|
start_time = time.time()
|
10088
10400
|
while True:
|
10089
|
-
rsp = client.
|
10401
|
+
rsp = client.DescribeSgSnapshotFileContent(model)
|
10090
10402
|
result = rsp.to_json_string()
|
10091
10403
|
try:
|
10092
10404
|
json_obj = json.loads(result)
|
@@ -10105,7 +10417,7 @@ def doInquiryPriceRenewVpnGateway(args, parsed_globals):
|
|
10105
10417
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10106
10418
|
|
10107
10419
|
|
10108
|
-
def
|
10420
|
+
def doDescribeNetworkInterfaces(args, parsed_globals):
|
10109
10421
|
g_param = parse_global_arg(parsed_globals)
|
10110
10422
|
|
10111
10423
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10134,11 +10446,11 @@ def doDisableCcnRoutes(args, parsed_globals):
|
|
10134
10446
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10135
10447
|
client._sdkVersion += ("_CLI_" + __version__)
|
10136
10448
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10137
|
-
model = models.
|
10449
|
+
model = models.DescribeNetworkInterfacesRequest()
|
10138
10450
|
model.from_json_string(json.dumps(args))
|
10139
10451
|
start_time = time.time()
|
10140
10452
|
while True:
|
10141
|
-
rsp = client.
|
10453
|
+
rsp = client.DescribeNetworkInterfaces(model)
|
10142
10454
|
result = rsp.to_json_string()
|
10143
10455
|
try:
|
10144
10456
|
json_obj = json.loads(result)
|
@@ -10157,7 +10469,7 @@ def doDisableCcnRoutes(args, parsed_globals):
|
|
10157
10469
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10158
10470
|
|
10159
10471
|
|
10160
|
-
def
|
10472
|
+
def doInquiryPriceRenewVpnGateway(args, parsed_globals):
|
10161
10473
|
g_param = parse_global_arg(parsed_globals)
|
10162
10474
|
|
10163
10475
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10186,11 +10498,11 @@ def doDescribeVpcEndPointServiceWhiteList(args, parsed_globals):
|
|
10186
10498
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10187
10499
|
client._sdkVersion += ("_CLI_" + __version__)
|
10188
10500
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10189
|
-
model = models.
|
10501
|
+
model = models.InquiryPriceRenewVpnGatewayRequest()
|
10190
10502
|
model.from_json_string(json.dumps(args))
|
10191
10503
|
start_time = time.time()
|
10192
10504
|
while True:
|
10193
|
-
rsp = client.
|
10505
|
+
rsp = client.InquiryPriceRenewVpnGateway(model)
|
10194
10506
|
result = rsp.to_json_string()
|
10195
10507
|
try:
|
10196
10508
|
json_obj = json.loads(result)
|
@@ -10209,7 +10521,7 @@ def doDescribeVpcEndPointServiceWhiteList(args, parsed_globals):
|
|
10209
10521
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10210
10522
|
|
10211
10523
|
|
10212
|
-
def
|
10524
|
+
def doDisableCcnRoutes(args, parsed_globals):
|
10213
10525
|
g_param = parse_global_arg(parsed_globals)
|
10214
10526
|
|
10215
10527
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10238,11 +10550,11 @@ def doReleaseIp6AddressesBandwidth(args, parsed_globals):
|
|
10238
10550
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10239
10551
|
client._sdkVersion += ("_CLI_" + __version__)
|
10240
10552
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10241
|
-
model = models.
|
10553
|
+
model = models.DisableCcnRoutesRequest()
|
10242
10554
|
model.from_json_string(json.dumps(args))
|
10243
10555
|
start_time = time.time()
|
10244
10556
|
while True:
|
10245
|
-
rsp = client.
|
10557
|
+
rsp = client.DisableCcnRoutes(model)
|
10246
10558
|
result = rsp.to_json_string()
|
10247
10559
|
try:
|
10248
10560
|
json_obj = json.loads(result)
|
@@ -10261,7 +10573,7 @@ def doReleaseIp6AddressesBandwidth(args, parsed_globals):
|
|
10261
10573
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10262
10574
|
|
10263
10575
|
|
10264
|
-
def
|
10576
|
+
def doDescribeVpcEndPointServiceWhiteList(args, parsed_globals):
|
10265
10577
|
g_param = parse_global_arg(parsed_globals)
|
10266
10578
|
|
10267
10579
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10290,11 +10602,11 @@ def doModifySecurityGroupPolicies(args, parsed_globals):
|
|
10290
10602
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10291
10603
|
client._sdkVersion += ("_CLI_" + __version__)
|
10292
10604
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10293
|
-
model = models.
|
10605
|
+
model = models.DescribeVpcEndPointServiceWhiteListRequest()
|
10294
10606
|
model.from_json_string(json.dumps(args))
|
10295
10607
|
start_time = time.time()
|
10296
10608
|
while True:
|
10297
|
-
rsp = client.
|
10609
|
+
rsp = client.DescribeVpcEndPointServiceWhiteList(model)
|
10298
10610
|
result = rsp.to_json_string()
|
10299
10611
|
try:
|
10300
10612
|
json_obj = json.loads(result)
|
@@ -10313,7 +10625,7 @@ def doModifySecurityGroupPolicies(args, parsed_globals):
|
|
10313
10625
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10314
10626
|
|
10315
10627
|
|
10316
|
-
def
|
10628
|
+
def doDeleteSecurityGroup(args, parsed_globals):
|
10317
10629
|
g_param = parse_global_arg(parsed_globals)
|
10318
10630
|
|
10319
10631
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10342,11 +10654,11 @@ def doResetVpnConnection(args, parsed_globals):
|
|
10342
10654
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10343
10655
|
client._sdkVersion += ("_CLI_" + __version__)
|
10344
10656
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10345
|
-
model = models.
|
10657
|
+
model = models.DeleteSecurityGroupRequest()
|
10346
10658
|
model.from_json_string(json.dumps(args))
|
10347
10659
|
start_time = time.time()
|
10348
10660
|
while True:
|
10349
|
-
rsp = client.
|
10661
|
+
rsp = client.DeleteSecurityGroup(model)
|
10350
10662
|
result = rsp.to_json_string()
|
10351
10663
|
try:
|
10352
10664
|
json_obj = json.loads(result)
|
@@ -10365,7 +10677,7 @@ def doResetVpnConnection(args, parsed_globals):
|
|
10365
10677
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10366
10678
|
|
10367
10679
|
|
10368
|
-
def
|
10680
|
+
def doReleaseIp6AddressesBandwidth(args, parsed_globals):
|
10369
10681
|
g_param = parse_global_arg(parsed_globals)
|
10370
10682
|
|
10371
10683
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10394,11 +10706,11 @@ def doCreateCustomerGateway(args, parsed_globals):
|
|
10394
10706
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10395
10707
|
client._sdkVersion += ("_CLI_" + __version__)
|
10396
10708
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10397
|
-
model = models.
|
10709
|
+
model = models.ReleaseIp6AddressesBandwidthRequest()
|
10398
10710
|
model.from_json_string(json.dumps(args))
|
10399
10711
|
start_time = time.time()
|
10400
10712
|
while True:
|
10401
|
-
rsp = client.
|
10713
|
+
rsp = client.ReleaseIp6AddressesBandwidth(model)
|
10402
10714
|
result = rsp.to_json_string()
|
10403
10715
|
try:
|
10404
10716
|
json_obj = json.loads(result)
|
@@ -10417,7 +10729,7 @@ def doCreateCustomerGateway(args, parsed_globals):
|
|
10417
10729
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10418
10730
|
|
10419
10731
|
|
10420
|
-
def
|
10732
|
+
def doModifySecurityGroupPolicies(args, parsed_globals):
|
10421
10733
|
g_param = parse_global_arg(parsed_globals)
|
10422
10734
|
|
10423
10735
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10446,11 +10758,11 @@ def doDescribeCrossBorderCompliance(args, parsed_globals):
|
|
10446
10758
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10447
10759
|
client._sdkVersion += ("_CLI_" + __version__)
|
10448
10760
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10449
|
-
model = models.
|
10761
|
+
model = models.ModifySecurityGroupPoliciesRequest()
|
10450
10762
|
model.from_json_string(json.dumps(args))
|
10451
10763
|
start_time = time.time()
|
10452
10764
|
while True:
|
10453
|
-
rsp = client.
|
10765
|
+
rsp = client.ModifySecurityGroupPolicies(model)
|
10454
10766
|
result = rsp.to_json_string()
|
10455
10767
|
try:
|
10456
10768
|
json_obj = json.loads(result)
|
@@ -10469,7 +10781,7 @@ def doDescribeCrossBorderCompliance(args, parsed_globals):
|
|
10469
10781
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10470
10782
|
|
10471
10783
|
|
10472
|
-
def
|
10784
|
+
def doResetVpnConnection(args, parsed_globals):
|
10473
10785
|
g_param = parse_global_arg(parsed_globals)
|
10474
10786
|
|
10475
10787
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10498,11 +10810,11 @@ def doSetVpnGatewaysRenewFlag(args, parsed_globals):
|
|
10498
10810
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10499
10811
|
client._sdkVersion += ("_CLI_" + __version__)
|
10500
10812
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10501
|
-
model = models.
|
10813
|
+
model = models.ResetVpnConnectionRequest()
|
10502
10814
|
model.from_json_string(json.dumps(args))
|
10503
10815
|
start_time = time.time()
|
10504
10816
|
while True:
|
10505
|
-
rsp = client.
|
10817
|
+
rsp = client.ResetVpnConnection(model)
|
10506
10818
|
result = rsp.to_json_string()
|
10507
10819
|
try:
|
10508
10820
|
json_obj = json.loads(result)
|
@@ -10521,7 +10833,7 @@ def doSetVpnGatewaysRenewFlag(args, parsed_globals):
|
|
10521
10833
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10522
10834
|
|
10523
10835
|
|
10524
|
-
def
|
10836
|
+
def doCreateCustomerGateway(args, parsed_globals):
|
10525
10837
|
g_param = parse_global_arg(parsed_globals)
|
10526
10838
|
|
10527
10839
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10550,11 +10862,11 @@ def doReturnNormalAddresses(args, parsed_globals):
|
|
10550
10862
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10551
10863
|
client._sdkVersion += ("_CLI_" + __version__)
|
10552
10864
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10553
|
-
model = models.
|
10865
|
+
model = models.CreateCustomerGatewayRequest()
|
10554
10866
|
model.from_json_string(json.dumps(args))
|
10555
10867
|
start_time = time.time()
|
10556
10868
|
while True:
|
10557
|
-
rsp = client.
|
10869
|
+
rsp = client.CreateCustomerGateway(model)
|
10558
10870
|
result = rsp.to_json_string()
|
10559
10871
|
try:
|
10560
10872
|
json_obj = json.loads(result)
|
@@ -10573,7 +10885,7 @@ def doReturnNormalAddresses(args, parsed_globals):
|
|
10573
10885
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10574
10886
|
|
10575
10887
|
|
10576
|
-
def
|
10888
|
+
def doDescribePrivateNatGatewayLimits(args, parsed_globals):
|
10577
10889
|
g_param = parse_global_arg(parsed_globals)
|
10578
10890
|
|
10579
10891
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10602,11 +10914,11 @@ def doAuditCrossBorderCompliance(args, parsed_globals):
|
|
10602
10914
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10603
10915
|
client._sdkVersion += ("_CLI_" + __version__)
|
10604
10916
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10605
|
-
model = models.
|
10917
|
+
model = models.DescribePrivateNatGatewayLimitsRequest()
|
10606
10918
|
model.from_json_string(json.dumps(args))
|
10607
10919
|
start_time = time.time()
|
10608
10920
|
while True:
|
10609
|
-
rsp = client.
|
10921
|
+
rsp = client.DescribePrivateNatGatewayLimits(model)
|
10610
10922
|
result = rsp.to_json_string()
|
10611
10923
|
try:
|
10612
10924
|
json_obj = json.loads(result)
|
@@ -10625,7 +10937,7 @@ def doAuditCrossBorderCompliance(args, parsed_globals):
|
|
10625
10937
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10626
10938
|
|
10627
10939
|
|
10628
|
-
def
|
10940
|
+
def doDescribeCrossBorderCompliance(args, parsed_globals):
|
10629
10941
|
g_param = parse_global_arg(parsed_globals)
|
10630
10942
|
|
10631
10943
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10654,11 +10966,11 @@ def doModifyNetworkInterfaceAttribute(args, parsed_globals):
|
|
10654
10966
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10655
10967
|
client._sdkVersion += ("_CLI_" + __version__)
|
10656
10968
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10657
|
-
model = models.
|
10969
|
+
model = models.DescribeCrossBorderComplianceRequest()
|
10658
10970
|
model.from_json_string(json.dumps(args))
|
10659
10971
|
start_time = time.time()
|
10660
10972
|
while True:
|
10661
|
-
rsp = client.
|
10973
|
+
rsp = client.DescribeCrossBorderCompliance(model)
|
10662
10974
|
result = rsp.to_json_string()
|
10663
10975
|
try:
|
10664
10976
|
json_obj = json.loads(result)
|
@@ -10677,7 +10989,7 @@ def doModifyNetworkInterfaceAttribute(args, parsed_globals):
|
|
10677
10989
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10678
10990
|
|
10679
10991
|
|
10680
|
-
def
|
10992
|
+
def doSetVpnGatewaysRenewFlag(args, parsed_globals):
|
10681
10993
|
g_param = parse_global_arg(parsed_globals)
|
10682
10994
|
|
10683
10995
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10706,11 +11018,11 @@ def doDescribeVpnGateways(args, parsed_globals):
|
|
10706
11018
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10707
11019
|
client._sdkVersion += ("_CLI_" + __version__)
|
10708
11020
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10709
|
-
model = models.
|
11021
|
+
model = models.SetVpnGatewaysRenewFlagRequest()
|
10710
11022
|
model.from_json_string(json.dumps(args))
|
10711
11023
|
start_time = time.time()
|
10712
11024
|
while True:
|
10713
|
-
rsp = client.
|
11025
|
+
rsp = client.SetVpnGatewaysRenewFlag(model)
|
10714
11026
|
result = rsp.to_json_string()
|
10715
11027
|
try:
|
10716
11028
|
json_obj = json.loads(result)
|
@@ -10729,7 +11041,7 @@ def doDescribeVpnGateways(args, parsed_globals):
|
|
10729
11041
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10730
11042
|
|
10731
11043
|
|
10732
|
-
def
|
11044
|
+
def doModifyPrivateNatGatewayAttribute(args, parsed_globals):
|
10733
11045
|
g_param = parse_global_arg(parsed_globals)
|
10734
11046
|
|
10735
11047
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10758,11 +11070,11 @@ def doDisableFlowLogs(args, parsed_globals):
|
|
10758
11070
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10759
11071
|
client._sdkVersion += ("_CLI_" + __version__)
|
10760
11072
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10761
|
-
model = models.
|
11073
|
+
model = models.ModifyPrivateNatGatewayAttributeRequest()
|
10762
11074
|
model.from_json_string(json.dumps(args))
|
10763
11075
|
start_time = time.time()
|
10764
11076
|
while True:
|
10765
|
-
rsp = client.
|
11077
|
+
rsp = client.ModifyPrivateNatGatewayAttribute(model)
|
10766
11078
|
result = rsp.to_json_string()
|
10767
11079
|
try:
|
10768
11080
|
json_obj = json.loads(result)
|
@@ -10781,7 +11093,7 @@ def doDisableFlowLogs(args, parsed_globals):
|
|
10781
11093
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10782
11094
|
|
10783
11095
|
|
10784
|
-
def
|
11096
|
+
def doCreateSecurityGroup(args, parsed_globals):
|
10785
11097
|
g_param = parse_global_arg(parsed_globals)
|
10786
11098
|
|
10787
11099
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10810,11 +11122,323 @@ def doDownloadCustomerGatewayConfiguration(args, parsed_globals):
|
|
10810
11122
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10811
11123
|
client._sdkVersion += ("_CLI_" + __version__)
|
10812
11124
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10813
|
-
model = models.
|
11125
|
+
model = models.CreateSecurityGroupRequest()
|
10814
11126
|
model.from_json_string(json.dumps(args))
|
10815
11127
|
start_time = time.time()
|
10816
11128
|
while True:
|
10817
|
-
rsp = client.
|
11129
|
+
rsp = client.CreateSecurityGroup(model)
|
11130
|
+
result = rsp.to_json_string()
|
11131
|
+
try:
|
11132
|
+
json_obj = json.loads(result)
|
11133
|
+
except TypeError as e:
|
11134
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
11135
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
11136
|
+
break
|
11137
|
+
cur_time = time.time()
|
11138
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
11139
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
11140
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
11141
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
11142
|
+
else:
|
11143
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
11144
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
11145
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11146
|
+
|
11147
|
+
|
11148
|
+
def doAuditCrossBorderCompliance(args, parsed_globals):
|
11149
|
+
g_param = parse_global_arg(parsed_globals)
|
11150
|
+
|
11151
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
11152
|
+
cred = credential.CVMRoleCredential()
|
11153
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11154
|
+
cred = credential.STSAssumeRoleCredential(
|
11155
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11156
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11157
|
+
)
|
11158
|
+
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):
|
11159
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
11160
|
+
else:
|
11161
|
+
cred = credential.Credential(
|
11162
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
11163
|
+
)
|
11164
|
+
http_profile = HttpProfile(
|
11165
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
11166
|
+
reqMethod="POST",
|
11167
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
11168
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
11169
|
+
)
|
11170
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
11171
|
+
if g_param[OptionsDefine.Language]:
|
11172
|
+
profile.language = g_param[OptionsDefine.Language]
|
11173
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
11174
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
11175
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
11176
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11177
|
+
model = models.AuditCrossBorderComplianceRequest()
|
11178
|
+
model.from_json_string(json.dumps(args))
|
11179
|
+
start_time = time.time()
|
11180
|
+
while True:
|
11181
|
+
rsp = client.AuditCrossBorderCompliance(model)
|
11182
|
+
result = rsp.to_json_string()
|
11183
|
+
try:
|
11184
|
+
json_obj = json.loads(result)
|
11185
|
+
except TypeError as e:
|
11186
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
11187
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
11188
|
+
break
|
11189
|
+
cur_time = time.time()
|
11190
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
11191
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
11192
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
11193
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
11194
|
+
else:
|
11195
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
11196
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
11197
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11198
|
+
|
11199
|
+
|
11200
|
+
def doModifyNetworkInterfaceAttribute(args, parsed_globals):
|
11201
|
+
g_param = parse_global_arg(parsed_globals)
|
11202
|
+
|
11203
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
11204
|
+
cred = credential.CVMRoleCredential()
|
11205
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11206
|
+
cred = credential.STSAssumeRoleCredential(
|
11207
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11208
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11209
|
+
)
|
11210
|
+
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):
|
11211
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
11212
|
+
else:
|
11213
|
+
cred = credential.Credential(
|
11214
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
11215
|
+
)
|
11216
|
+
http_profile = HttpProfile(
|
11217
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
11218
|
+
reqMethod="POST",
|
11219
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
11220
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
11221
|
+
)
|
11222
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
11223
|
+
if g_param[OptionsDefine.Language]:
|
11224
|
+
profile.language = g_param[OptionsDefine.Language]
|
11225
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
11226
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
11227
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
11228
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11229
|
+
model = models.ModifyNetworkInterfaceAttributeRequest()
|
11230
|
+
model.from_json_string(json.dumps(args))
|
11231
|
+
start_time = time.time()
|
11232
|
+
while True:
|
11233
|
+
rsp = client.ModifyNetworkInterfaceAttribute(model)
|
11234
|
+
result = rsp.to_json_string()
|
11235
|
+
try:
|
11236
|
+
json_obj = json.loads(result)
|
11237
|
+
except TypeError as e:
|
11238
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
11239
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
11240
|
+
break
|
11241
|
+
cur_time = time.time()
|
11242
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
11243
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
11244
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
11245
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
11246
|
+
else:
|
11247
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
11248
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
11249
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11250
|
+
|
11251
|
+
|
11252
|
+
def doCreatePrivateNatGatewayTranslationAclRule(args, parsed_globals):
|
11253
|
+
g_param = parse_global_arg(parsed_globals)
|
11254
|
+
|
11255
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
11256
|
+
cred = credential.CVMRoleCredential()
|
11257
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11258
|
+
cred = credential.STSAssumeRoleCredential(
|
11259
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11260
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11261
|
+
)
|
11262
|
+
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):
|
11263
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
11264
|
+
else:
|
11265
|
+
cred = credential.Credential(
|
11266
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
11267
|
+
)
|
11268
|
+
http_profile = HttpProfile(
|
11269
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
11270
|
+
reqMethod="POST",
|
11271
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
11272
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
11273
|
+
)
|
11274
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
11275
|
+
if g_param[OptionsDefine.Language]:
|
11276
|
+
profile.language = g_param[OptionsDefine.Language]
|
11277
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
11278
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
11279
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
11280
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11281
|
+
model = models.CreatePrivateNatGatewayTranslationAclRuleRequest()
|
11282
|
+
model.from_json_string(json.dumps(args))
|
11283
|
+
start_time = time.time()
|
11284
|
+
while True:
|
11285
|
+
rsp = client.CreatePrivateNatGatewayTranslationAclRule(model)
|
11286
|
+
result = rsp.to_json_string()
|
11287
|
+
try:
|
11288
|
+
json_obj = json.loads(result)
|
11289
|
+
except TypeError as e:
|
11290
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
11291
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
11292
|
+
break
|
11293
|
+
cur_time = time.time()
|
11294
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
11295
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
11296
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
11297
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
11298
|
+
else:
|
11299
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
11300
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
11301
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11302
|
+
|
11303
|
+
|
11304
|
+
def doDescribeVpnGateways(args, parsed_globals):
|
11305
|
+
g_param = parse_global_arg(parsed_globals)
|
11306
|
+
|
11307
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
11308
|
+
cred = credential.CVMRoleCredential()
|
11309
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11310
|
+
cred = credential.STSAssumeRoleCredential(
|
11311
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11312
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11313
|
+
)
|
11314
|
+
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):
|
11315
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
11316
|
+
else:
|
11317
|
+
cred = credential.Credential(
|
11318
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
11319
|
+
)
|
11320
|
+
http_profile = HttpProfile(
|
11321
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
11322
|
+
reqMethod="POST",
|
11323
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
11324
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
11325
|
+
)
|
11326
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
11327
|
+
if g_param[OptionsDefine.Language]:
|
11328
|
+
profile.language = g_param[OptionsDefine.Language]
|
11329
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
11330
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
11331
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
11332
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11333
|
+
model = models.DescribeVpnGatewaysRequest()
|
11334
|
+
model.from_json_string(json.dumps(args))
|
11335
|
+
start_time = time.time()
|
11336
|
+
while True:
|
11337
|
+
rsp = client.DescribeVpnGateways(model)
|
11338
|
+
result = rsp.to_json_string()
|
11339
|
+
try:
|
11340
|
+
json_obj = json.loads(result)
|
11341
|
+
except TypeError as e:
|
11342
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
11343
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
11344
|
+
break
|
11345
|
+
cur_time = time.time()
|
11346
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
11347
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
11348
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
11349
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
11350
|
+
else:
|
11351
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
11352
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
11353
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11354
|
+
|
11355
|
+
|
11356
|
+
def doDisableFlowLogs(args, parsed_globals):
|
11357
|
+
g_param = parse_global_arg(parsed_globals)
|
11358
|
+
|
11359
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
11360
|
+
cred = credential.CVMRoleCredential()
|
11361
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11362
|
+
cred = credential.STSAssumeRoleCredential(
|
11363
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11364
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11365
|
+
)
|
11366
|
+
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):
|
11367
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
11368
|
+
else:
|
11369
|
+
cred = credential.Credential(
|
11370
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
11371
|
+
)
|
11372
|
+
http_profile = HttpProfile(
|
11373
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
11374
|
+
reqMethod="POST",
|
11375
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
11376
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
11377
|
+
)
|
11378
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
11379
|
+
if g_param[OptionsDefine.Language]:
|
11380
|
+
profile.language = g_param[OptionsDefine.Language]
|
11381
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
11382
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
11383
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
11384
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11385
|
+
model = models.DisableFlowLogsRequest()
|
11386
|
+
model.from_json_string(json.dumps(args))
|
11387
|
+
start_time = time.time()
|
11388
|
+
while True:
|
11389
|
+
rsp = client.DisableFlowLogs(model)
|
11390
|
+
result = rsp.to_json_string()
|
11391
|
+
try:
|
11392
|
+
json_obj = json.loads(result)
|
11393
|
+
except TypeError as e:
|
11394
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
11395
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
11396
|
+
break
|
11397
|
+
cur_time = time.time()
|
11398
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
11399
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
11400
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
11401
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
11402
|
+
else:
|
11403
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
11404
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
11405
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11406
|
+
|
11407
|
+
|
11408
|
+
def doDownloadCustomerGatewayConfiguration(args, parsed_globals):
|
11409
|
+
g_param = parse_global_arg(parsed_globals)
|
11410
|
+
|
11411
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
11412
|
+
cred = credential.CVMRoleCredential()
|
11413
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11414
|
+
cred = credential.STSAssumeRoleCredential(
|
11415
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11416
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11417
|
+
)
|
11418
|
+
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):
|
11419
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
11420
|
+
else:
|
11421
|
+
cred = credential.Credential(
|
11422
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
11423
|
+
)
|
11424
|
+
http_profile = HttpProfile(
|
11425
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
11426
|
+
reqMethod="POST",
|
11427
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
11428
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
11429
|
+
)
|
11430
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
11431
|
+
if g_param[OptionsDefine.Language]:
|
11432
|
+
profile.language = g_param[OptionsDefine.Language]
|
11433
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
11434
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
11435
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
11436
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11437
|
+
model = models.DownloadCustomerGatewayConfigurationRequest()
|
11438
|
+
model.from_json_string(json.dumps(args))
|
11439
|
+
start_time = time.time()
|
11440
|
+
while True:
|
11441
|
+
rsp = client.DownloadCustomerGatewayConfiguration(model)
|
10818
11442
|
result = rsp.to_json_string()
|
10819
11443
|
try:
|
10820
11444
|
json_obj = json.loads(result)
|
@@ -11873,6 +12497,58 @@ def doDescribeVpcLimits(args, parsed_globals):
|
|
11873
12497
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11874
12498
|
|
11875
12499
|
|
12500
|
+
def doCreateVpcEndPoint(args, parsed_globals):
|
12501
|
+
g_param = parse_global_arg(parsed_globals)
|
12502
|
+
|
12503
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
12504
|
+
cred = credential.CVMRoleCredential()
|
12505
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12506
|
+
cred = credential.STSAssumeRoleCredential(
|
12507
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12508
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12509
|
+
)
|
12510
|
+
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):
|
12511
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
12512
|
+
else:
|
12513
|
+
cred = credential.Credential(
|
12514
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
12515
|
+
)
|
12516
|
+
http_profile = HttpProfile(
|
12517
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
12518
|
+
reqMethod="POST",
|
12519
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
12520
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
12521
|
+
)
|
12522
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
12523
|
+
if g_param[OptionsDefine.Language]:
|
12524
|
+
profile.language = g_param[OptionsDefine.Language]
|
12525
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
12526
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
12527
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
12528
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
12529
|
+
model = models.CreateVpcEndPointRequest()
|
12530
|
+
model.from_json_string(json.dumps(args))
|
12531
|
+
start_time = time.time()
|
12532
|
+
while True:
|
12533
|
+
rsp = client.CreateVpcEndPoint(model)
|
12534
|
+
result = rsp.to_json_string()
|
12535
|
+
try:
|
12536
|
+
json_obj = json.loads(result)
|
12537
|
+
except TypeError as e:
|
12538
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
12539
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
12540
|
+
break
|
12541
|
+
cur_time = time.time()
|
12542
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
12543
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
12544
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
12545
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
12546
|
+
else:
|
12547
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
12548
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
12549
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12550
|
+
|
12551
|
+
|
11876
12552
|
def doHaVipAssociateAddressIp(args, parsed_globals):
|
11877
12553
|
g_param = parse_global_arg(parsed_globals)
|
11878
12554
|
|
@@ -12185,6 +12861,58 @@ def doRejectVpcPeeringConnection(args, parsed_globals):
|
|
12185
12861
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12186
12862
|
|
12187
12863
|
|
12864
|
+
def doDescribePrivateNatGateways(args, parsed_globals):
|
12865
|
+
g_param = parse_global_arg(parsed_globals)
|
12866
|
+
|
12867
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
12868
|
+
cred = credential.CVMRoleCredential()
|
12869
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12870
|
+
cred = credential.STSAssumeRoleCredential(
|
12871
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12872
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12873
|
+
)
|
12874
|
+
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):
|
12875
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
12876
|
+
else:
|
12877
|
+
cred = credential.Credential(
|
12878
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
12879
|
+
)
|
12880
|
+
http_profile = HttpProfile(
|
12881
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
12882
|
+
reqMethod="POST",
|
12883
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
12884
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
12885
|
+
)
|
12886
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
12887
|
+
if g_param[OptionsDefine.Language]:
|
12888
|
+
profile.language = g_param[OptionsDefine.Language]
|
12889
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
12890
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
12891
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
12892
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
12893
|
+
model = models.DescribePrivateNatGatewaysRequest()
|
12894
|
+
model.from_json_string(json.dumps(args))
|
12895
|
+
start_time = time.time()
|
12896
|
+
while True:
|
12897
|
+
rsp = client.DescribePrivateNatGateways(model)
|
12898
|
+
result = rsp.to_json_string()
|
12899
|
+
try:
|
12900
|
+
json_obj = json.loads(result)
|
12901
|
+
except TypeError as e:
|
12902
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
12903
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
12904
|
+
break
|
12905
|
+
cur_time = time.time()
|
12906
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
12907
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
12908
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
12909
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
12910
|
+
else:
|
12911
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
12912
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
12913
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12914
|
+
|
12915
|
+
|
12188
12916
|
def doModifyCcnAttachedInstancesAttribute(args, parsed_globals):
|
12189
12917
|
g_param = parse_global_arg(parsed_globals)
|
12190
12918
|
|
@@ -12734,11 +13462,167 @@ def doResetVpnGatewayInternetMaxBandwidth(args, parsed_globals):
|
|
12734
13462
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
12735
13463
|
client._sdkVersion += ("_CLI_" + __version__)
|
12736
13464
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
12737
|
-
model = models.ResetVpnGatewayInternetMaxBandwidthRequest()
|
13465
|
+
model = models.ResetVpnGatewayInternetMaxBandwidthRequest()
|
13466
|
+
model.from_json_string(json.dumps(args))
|
13467
|
+
start_time = time.time()
|
13468
|
+
while True:
|
13469
|
+
rsp = client.ResetVpnGatewayInternetMaxBandwidth(model)
|
13470
|
+
result = rsp.to_json_string()
|
13471
|
+
try:
|
13472
|
+
json_obj = json.loads(result)
|
13473
|
+
except TypeError as e:
|
13474
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
13475
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
13476
|
+
break
|
13477
|
+
cur_time = time.time()
|
13478
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
13479
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
13480
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
13481
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
13482
|
+
else:
|
13483
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
13484
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
13485
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13486
|
+
|
13487
|
+
|
13488
|
+
def doDeleteVpc(args, parsed_globals):
|
13489
|
+
g_param = parse_global_arg(parsed_globals)
|
13490
|
+
|
13491
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
13492
|
+
cred = credential.CVMRoleCredential()
|
13493
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13494
|
+
cred = credential.STSAssumeRoleCredential(
|
13495
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13496
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13497
|
+
)
|
13498
|
+
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):
|
13499
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
13500
|
+
else:
|
13501
|
+
cred = credential.Credential(
|
13502
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
13503
|
+
)
|
13504
|
+
http_profile = HttpProfile(
|
13505
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
13506
|
+
reqMethod="POST",
|
13507
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
13508
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
13509
|
+
)
|
13510
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
13511
|
+
if g_param[OptionsDefine.Language]:
|
13512
|
+
profile.language = g_param[OptionsDefine.Language]
|
13513
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
13514
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13515
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
13516
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13517
|
+
model = models.DeleteVpcRequest()
|
13518
|
+
model.from_json_string(json.dumps(args))
|
13519
|
+
start_time = time.time()
|
13520
|
+
while True:
|
13521
|
+
rsp = client.DeleteVpc(model)
|
13522
|
+
result = rsp.to_json_string()
|
13523
|
+
try:
|
13524
|
+
json_obj = json.loads(result)
|
13525
|
+
except TypeError as e:
|
13526
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
13527
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
13528
|
+
break
|
13529
|
+
cur_time = time.time()
|
13530
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
13531
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
13532
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
13533
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
13534
|
+
else:
|
13535
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
13536
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
13537
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13538
|
+
|
13539
|
+
|
13540
|
+
def doDescribeSubnets(args, parsed_globals):
|
13541
|
+
g_param = parse_global_arg(parsed_globals)
|
13542
|
+
|
13543
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
13544
|
+
cred = credential.CVMRoleCredential()
|
13545
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13546
|
+
cred = credential.STSAssumeRoleCredential(
|
13547
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13548
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13549
|
+
)
|
13550
|
+
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):
|
13551
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
13552
|
+
else:
|
13553
|
+
cred = credential.Credential(
|
13554
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
13555
|
+
)
|
13556
|
+
http_profile = HttpProfile(
|
13557
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
13558
|
+
reqMethod="POST",
|
13559
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
13560
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
13561
|
+
)
|
13562
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
13563
|
+
if g_param[OptionsDefine.Language]:
|
13564
|
+
profile.language = g_param[OptionsDefine.Language]
|
13565
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
13566
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13567
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
13568
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13569
|
+
model = models.DescribeSubnetsRequest()
|
13570
|
+
model.from_json_string(json.dumps(args))
|
13571
|
+
start_time = time.time()
|
13572
|
+
while True:
|
13573
|
+
rsp = client.DescribeSubnets(model)
|
13574
|
+
result = rsp.to_json_string()
|
13575
|
+
try:
|
13576
|
+
json_obj = json.loads(result)
|
13577
|
+
except TypeError as e:
|
13578
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
13579
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
13580
|
+
break
|
13581
|
+
cur_time = time.time()
|
13582
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
13583
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
13584
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
13585
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
13586
|
+
else:
|
13587
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
13588
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
13589
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13590
|
+
|
13591
|
+
|
13592
|
+
def doCreateCcn(args, parsed_globals):
|
13593
|
+
g_param = parse_global_arg(parsed_globals)
|
13594
|
+
|
13595
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
13596
|
+
cred = credential.CVMRoleCredential()
|
13597
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13598
|
+
cred = credential.STSAssumeRoleCredential(
|
13599
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13600
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13601
|
+
)
|
13602
|
+
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):
|
13603
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
13604
|
+
else:
|
13605
|
+
cred = credential.Credential(
|
13606
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
13607
|
+
)
|
13608
|
+
http_profile = HttpProfile(
|
13609
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
13610
|
+
reqMethod="POST",
|
13611
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
13612
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
13613
|
+
)
|
13614
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
13615
|
+
if g_param[OptionsDefine.Language]:
|
13616
|
+
profile.language = g_param[OptionsDefine.Language]
|
13617
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
13618
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13619
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
13620
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13621
|
+
model = models.CreateCcnRequest()
|
12738
13622
|
model.from_json_string(json.dumps(args))
|
12739
13623
|
start_time = time.time()
|
12740
13624
|
while True:
|
12741
|
-
rsp = client.
|
13625
|
+
rsp = client.CreateCcn(model)
|
12742
13626
|
result = rsp.to_json_string()
|
12743
13627
|
try:
|
12744
13628
|
json_obj = json.loads(result)
|
@@ -12757,7 +13641,7 @@ def doResetVpnGatewayInternetMaxBandwidth(args, parsed_globals):
|
|
12757
13641
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12758
13642
|
|
12759
13643
|
|
12760
|
-
def
|
13644
|
+
def doModifyCustomerGatewayAttribute(args, parsed_globals):
|
12761
13645
|
g_param = parse_global_arg(parsed_globals)
|
12762
13646
|
|
12763
13647
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -12786,11 +13670,11 @@ def doDeleteVpc(args, parsed_globals):
|
|
12786
13670
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
12787
13671
|
client._sdkVersion += ("_CLI_" + __version__)
|
12788
13672
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
12789
|
-
model = models.
|
13673
|
+
model = models.ModifyCustomerGatewayAttributeRequest()
|
12790
13674
|
model.from_json_string(json.dumps(args))
|
12791
13675
|
start_time = time.time()
|
12792
13676
|
while True:
|
12793
|
-
rsp = client.
|
13677
|
+
rsp = client.ModifyCustomerGatewayAttribute(model)
|
12794
13678
|
result = rsp.to_json_string()
|
12795
13679
|
try:
|
12796
13680
|
json_obj = json.loads(result)
|
@@ -12809,7 +13693,7 @@ def doDeleteVpc(args, parsed_globals):
|
|
12809
13693
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12810
13694
|
|
12811
13695
|
|
12812
|
-
def
|
13696
|
+
def doReplaceDirectConnectGatewayCcnRoutes(args, parsed_globals):
|
12813
13697
|
g_param = parse_global_arg(parsed_globals)
|
12814
13698
|
|
12815
13699
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -12838,11 +13722,11 @@ def doDescribeSubnets(args, parsed_globals):
|
|
12838
13722
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
12839
13723
|
client._sdkVersion += ("_CLI_" + __version__)
|
12840
13724
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
12841
|
-
model = models.
|
13725
|
+
model = models.ReplaceDirectConnectGatewayCcnRoutesRequest()
|
12842
13726
|
model.from_json_string(json.dumps(args))
|
12843
13727
|
start_time = time.time()
|
12844
13728
|
while True:
|
12845
|
-
rsp = client.
|
13729
|
+
rsp = client.ReplaceDirectConnectGatewayCcnRoutes(model)
|
12846
13730
|
result = rsp.to_json_string()
|
12847
13731
|
try:
|
12848
13732
|
json_obj = json.loads(result)
|
@@ -12861,7 +13745,7 @@ def doDescribeSubnets(args, parsed_globals):
|
|
12861
13745
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12862
13746
|
|
12863
13747
|
|
12864
|
-
def
|
13748
|
+
def doDescribeNetworkAcls(args, parsed_globals):
|
12865
13749
|
g_param = parse_global_arg(parsed_globals)
|
12866
13750
|
|
12867
13751
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -12890,11 +13774,11 @@ def doCreateCcn(args, parsed_globals):
|
|
12890
13774
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
12891
13775
|
client._sdkVersion += ("_CLI_" + __version__)
|
12892
13776
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
12893
|
-
model = models.
|
13777
|
+
model = models.DescribeNetworkAclsRequest()
|
12894
13778
|
model.from_json_string(json.dumps(args))
|
12895
13779
|
start_time = time.time()
|
12896
13780
|
while True:
|
12897
|
-
rsp = client.
|
13781
|
+
rsp = client.DescribeNetworkAcls(model)
|
12898
13782
|
result = rsp.to_json_string()
|
12899
13783
|
try:
|
12900
13784
|
json_obj = json.loads(result)
|
@@ -12913,7 +13797,7 @@ def doCreateCcn(args, parsed_globals):
|
|
12913
13797
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12914
13798
|
|
12915
13799
|
|
12916
|
-
def
|
13800
|
+
def doModifyVpnConnectionAttribute(args, parsed_globals):
|
12917
13801
|
g_param = parse_global_arg(parsed_globals)
|
12918
13802
|
|
12919
13803
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -12942,11 +13826,11 @@ def doModifyCustomerGatewayAttribute(args, parsed_globals):
|
|
12942
13826
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
12943
13827
|
client._sdkVersion += ("_CLI_" + __version__)
|
12944
13828
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
12945
|
-
model = models.
|
13829
|
+
model = models.ModifyVpnConnectionAttributeRequest()
|
12946
13830
|
model.from_json_string(json.dumps(args))
|
12947
13831
|
start_time = time.time()
|
12948
13832
|
while True:
|
12949
|
-
rsp = client.
|
13833
|
+
rsp = client.ModifyVpnConnectionAttribute(model)
|
12950
13834
|
result = rsp.to_json_string()
|
12951
13835
|
try:
|
12952
13836
|
json_obj = json.loads(result)
|
@@ -12965,7 +13849,7 @@ def doModifyCustomerGatewayAttribute(args, parsed_globals):
|
|
12965
13849
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12966
13850
|
|
12967
13851
|
|
12968
|
-
def
|
13852
|
+
def doDescribeSecurityGroups(args, parsed_globals):
|
12969
13853
|
g_param = parse_global_arg(parsed_globals)
|
12970
13854
|
|
12971
13855
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -12994,11 +13878,11 @@ def doReplaceDirectConnectGatewayCcnRoutes(args, parsed_globals):
|
|
12994
13878
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
12995
13879
|
client._sdkVersion += ("_CLI_" + __version__)
|
12996
13880
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
12997
|
-
model = models.
|
13881
|
+
model = models.DescribeSecurityGroupsRequest()
|
12998
13882
|
model.from_json_string(json.dumps(args))
|
12999
13883
|
start_time = time.time()
|
13000
13884
|
while True:
|
13001
|
-
rsp = client.
|
13885
|
+
rsp = client.DescribeSecurityGroups(model)
|
13002
13886
|
result = rsp.to_json_string()
|
13003
13887
|
try:
|
13004
13888
|
json_obj = json.loads(result)
|
@@ -13017,7 +13901,7 @@ def doReplaceDirectConnectGatewayCcnRoutes(args, parsed_globals):
|
|
13017
13901
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13018
13902
|
|
13019
13903
|
|
13020
|
-
def
|
13904
|
+
def doDescribePrivateNatGatewayTranslationNatRules(args, parsed_globals):
|
13021
13905
|
g_param = parse_global_arg(parsed_globals)
|
13022
13906
|
|
13023
13907
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13046,11 +13930,11 @@ def doDescribeNetworkAcls(args, parsed_globals):
|
|
13046
13930
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13047
13931
|
client._sdkVersion += ("_CLI_" + __version__)
|
13048
13932
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13049
|
-
model = models.
|
13933
|
+
model = models.DescribePrivateNatGatewayTranslationNatRulesRequest()
|
13050
13934
|
model.from_json_string(json.dumps(args))
|
13051
13935
|
start_time = time.time()
|
13052
13936
|
while True:
|
13053
|
-
rsp = client.
|
13937
|
+
rsp = client.DescribePrivateNatGatewayTranslationNatRules(model)
|
13054
13938
|
result = rsp.to_json_string()
|
13055
13939
|
try:
|
13056
13940
|
json_obj = json.loads(result)
|
@@ -13069,7 +13953,7 @@ def doDescribeNetworkAcls(args, parsed_globals):
|
|
13069
13953
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13070
13954
|
|
13071
13955
|
|
13072
|
-
def
|
13956
|
+
def doCreateVpnGateway(args, parsed_globals):
|
13073
13957
|
g_param = parse_global_arg(parsed_globals)
|
13074
13958
|
|
13075
13959
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13098,11 +13982,11 @@ def doModifyVpnConnectionAttribute(args, parsed_globals):
|
|
13098
13982
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13099
13983
|
client._sdkVersion += ("_CLI_" + __version__)
|
13100
13984
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13101
|
-
model = models.
|
13985
|
+
model = models.CreateVpnGatewayRequest()
|
13102
13986
|
model.from_json_string(json.dumps(args))
|
13103
13987
|
start_time = time.time()
|
13104
13988
|
while True:
|
13105
|
-
rsp = client.
|
13989
|
+
rsp = client.CreateVpnGateway(model)
|
13106
13990
|
result = rsp.to_json_string()
|
13107
13991
|
try:
|
13108
13992
|
json_obj = json.loads(result)
|
@@ -13121,7 +14005,7 @@ def doModifyVpnConnectionAttribute(args, parsed_globals):
|
|
13121
14005
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13122
14006
|
|
13123
14007
|
|
13124
|
-
def
|
14008
|
+
def doDescribePrivateNatGatewayTranslationAclRules(args, parsed_globals):
|
13125
14009
|
g_param = parse_global_arg(parsed_globals)
|
13126
14010
|
|
13127
14011
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13150,11 +14034,11 @@ def doDescribeSecurityGroups(args, parsed_globals):
|
|
13150
14034
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13151
14035
|
client._sdkVersion += ("_CLI_" + __version__)
|
13152
14036
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13153
|
-
model = models.
|
14037
|
+
model = models.DescribePrivateNatGatewayTranslationAclRulesRequest()
|
13154
14038
|
model.from_json_string(json.dumps(args))
|
13155
14039
|
start_time = time.time()
|
13156
14040
|
while True:
|
13157
|
-
rsp = client.
|
14041
|
+
rsp = client.DescribePrivateNatGatewayTranslationAclRules(model)
|
13158
14042
|
result = rsp.to_json_string()
|
13159
14043
|
try:
|
13160
14044
|
json_obj = json.loads(result)
|
@@ -13173,7 +14057,7 @@ def doDescribeSecurityGroups(args, parsed_globals):
|
|
13173
14057
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13174
14058
|
|
13175
14059
|
|
13176
|
-
def
|
14060
|
+
def doDescribeTrafficPackages(args, parsed_globals):
|
13177
14061
|
g_param = parse_global_arg(parsed_globals)
|
13178
14062
|
|
13179
14063
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13202,11 +14086,11 @@ def doCreateVpnGateway(args, parsed_globals):
|
|
13202
14086
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13203
14087
|
client._sdkVersion += ("_CLI_" + __version__)
|
13204
14088
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13205
|
-
model = models.
|
14089
|
+
model = models.DescribeTrafficPackagesRequest()
|
13206
14090
|
model.from_json_string(json.dumps(args))
|
13207
14091
|
start_time = time.time()
|
13208
14092
|
while True:
|
13209
|
-
rsp = client.
|
14093
|
+
rsp = client.DescribeTrafficPackages(model)
|
13210
14094
|
result = rsp.to_json_string()
|
13211
14095
|
try:
|
13212
14096
|
json_obj = json.loads(result)
|
@@ -13225,7 +14109,7 @@ def doCreateVpnGateway(args, parsed_globals):
|
|
13225
14109
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13226
14110
|
|
13227
14111
|
|
13228
|
-
def
|
14112
|
+
def doModifyPrivateIpAddressesAttribute(args, parsed_globals):
|
13229
14113
|
g_param = parse_global_arg(parsed_globals)
|
13230
14114
|
|
13231
14115
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13254,11 +14138,11 @@ def doDescribeTrafficPackages(args, parsed_globals):
|
|
13254
14138
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13255
14139
|
client._sdkVersion += ("_CLI_" + __version__)
|
13256
14140
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13257
|
-
model = models.
|
14141
|
+
model = models.ModifyPrivateIpAddressesAttributeRequest()
|
13258
14142
|
model.from_json_string(json.dumps(args))
|
13259
14143
|
start_time = time.time()
|
13260
14144
|
while True:
|
13261
|
-
rsp = client.
|
14145
|
+
rsp = client.ModifyPrivateIpAddressesAttribute(model)
|
13262
14146
|
result = rsp.to_json_string()
|
13263
14147
|
try:
|
13264
14148
|
json_obj = json.loads(result)
|
@@ -13277,7 +14161,7 @@ def doDescribeTrafficPackages(args, parsed_globals):
|
|
13277
14161
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13278
14162
|
|
13279
14163
|
|
13280
|
-
def
|
14164
|
+
def doCreateDirectConnectGatewayCcnRoutes(args, parsed_globals):
|
13281
14165
|
g_param = parse_global_arg(parsed_globals)
|
13282
14166
|
|
13283
14167
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13306,11 +14190,11 @@ def doModifyPrivateIpAddressesAttribute(args, parsed_globals):
|
|
13306
14190
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13307
14191
|
client._sdkVersion += ("_CLI_" + __version__)
|
13308
14192
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13309
|
-
model = models.
|
14193
|
+
model = models.CreateDirectConnectGatewayCcnRoutesRequest()
|
13310
14194
|
model.from_json_string(json.dumps(args))
|
13311
14195
|
start_time = time.time()
|
13312
14196
|
while True:
|
13313
|
-
rsp = client.
|
14197
|
+
rsp = client.CreateDirectConnectGatewayCcnRoutes(model)
|
13314
14198
|
result = rsp.to_json_string()
|
13315
14199
|
try:
|
13316
14200
|
json_obj = json.loads(result)
|
@@ -13329,7 +14213,7 @@ def doModifyPrivateIpAddressesAttribute(args, parsed_globals):
|
|
13329
14213
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13330
14214
|
|
13331
14215
|
|
13332
|
-
def
|
14216
|
+
def doDescribeSubnetResourceDashboard(args, parsed_globals):
|
13333
14217
|
g_param = parse_global_arg(parsed_globals)
|
13334
14218
|
|
13335
14219
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13358,11 +14242,11 @@ def doCreateDirectConnectGatewayCcnRoutes(args, parsed_globals):
|
|
13358
14242
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13359
14243
|
client._sdkVersion += ("_CLI_" + __version__)
|
13360
14244
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13361
|
-
model = models.
|
14245
|
+
model = models.DescribeSubnetResourceDashboardRequest()
|
13362
14246
|
model.from_json_string(json.dumps(args))
|
13363
14247
|
start_time = time.time()
|
13364
14248
|
while True:
|
13365
|
-
rsp = client.
|
14249
|
+
rsp = client.DescribeSubnetResourceDashboard(model)
|
13366
14250
|
result = rsp.to_json_string()
|
13367
14251
|
try:
|
13368
14252
|
json_obj = json.loads(result)
|
@@ -13381,7 +14265,7 @@ def doCreateDirectConnectGatewayCcnRoutes(args, parsed_globals):
|
|
13381
14265
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13382
14266
|
|
13383
14267
|
|
13384
|
-
def
|
14268
|
+
def doCreateLocalGateway(args, parsed_globals):
|
13385
14269
|
g_param = parse_global_arg(parsed_globals)
|
13386
14270
|
|
13387
14271
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13410,11 +14294,11 @@ def doDescribeSubnetResourceDashboard(args, parsed_globals):
|
|
13410
14294
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13411
14295
|
client._sdkVersion += ("_CLI_" + __version__)
|
13412
14296
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13413
|
-
model = models.
|
14297
|
+
model = models.CreateLocalGatewayRequest()
|
13414
14298
|
model.from_json_string(json.dumps(args))
|
13415
14299
|
start_time = time.time()
|
13416
14300
|
while True:
|
13417
|
-
rsp = client.
|
14301
|
+
rsp = client.CreateLocalGateway(model)
|
13418
14302
|
result = rsp.to_json_string()
|
13419
14303
|
try:
|
13420
14304
|
json_obj = json.loads(result)
|
@@ -13433,7 +14317,7 @@ def doDescribeSubnetResourceDashboard(args, parsed_globals):
|
|
13433
14317
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13434
14318
|
|
13435
14319
|
|
13436
|
-
def
|
14320
|
+
def doModifyNetworkInterfaceQos(args, parsed_globals):
|
13437
14321
|
g_param = parse_global_arg(parsed_globals)
|
13438
14322
|
|
13439
14323
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13462,11 +14346,11 @@ def doCreateLocalGateway(args, parsed_globals):
|
|
13462
14346
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13463
14347
|
client._sdkVersion += ("_CLI_" + __version__)
|
13464
14348
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13465
|
-
model = models.
|
14349
|
+
model = models.ModifyNetworkInterfaceQosRequest()
|
13466
14350
|
model.from_json_string(json.dumps(args))
|
13467
14351
|
start_time = time.time()
|
13468
14352
|
while True:
|
13469
|
-
rsp = client.
|
14353
|
+
rsp = client.ModifyNetworkInterfaceQos(model)
|
13470
14354
|
result = rsp.to_json_string()
|
13471
14355
|
try:
|
13472
14356
|
json_obj = json.loads(result)
|
@@ -13485,7 +14369,7 @@ def doCreateLocalGateway(args, parsed_globals):
|
|
13485
14369
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13486
14370
|
|
13487
14371
|
|
13488
|
-
def
|
14372
|
+
def doDetachCcnInstances(args, parsed_globals):
|
13489
14373
|
g_param = parse_global_arg(parsed_globals)
|
13490
14374
|
|
13491
14375
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13514,11 +14398,11 @@ def doModifyNetworkInterfaceQos(args, parsed_globals):
|
|
13514
14398
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13515
14399
|
client._sdkVersion += ("_CLI_" + __version__)
|
13516
14400
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13517
|
-
model = models.
|
14401
|
+
model = models.DetachCcnInstancesRequest()
|
13518
14402
|
model.from_json_string(json.dumps(args))
|
13519
14403
|
start_time = time.time()
|
13520
14404
|
while True:
|
13521
|
-
rsp = client.
|
14405
|
+
rsp = client.DetachCcnInstances(model)
|
13522
14406
|
result = rsp.to_json_string()
|
13523
14407
|
try:
|
13524
14408
|
json_obj = json.loads(result)
|
@@ -13537,7 +14421,7 @@ def doModifyNetworkInterfaceQos(args, parsed_globals):
|
|
13537
14421
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13538
14422
|
|
13539
14423
|
|
13540
|
-
def
|
14424
|
+
def doDetachClassicLinkVpc(args, parsed_globals):
|
13541
14425
|
g_param = parse_global_arg(parsed_globals)
|
13542
14426
|
|
13543
14427
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13566,11 +14450,11 @@ def doDetachCcnInstances(args, parsed_globals):
|
|
13566
14450
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13567
14451
|
client._sdkVersion += ("_CLI_" + __version__)
|
13568
14452
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13569
|
-
model = models.
|
14453
|
+
model = models.DetachClassicLinkVpcRequest()
|
13570
14454
|
model.from_json_string(json.dumps(args))
|
13571
14455
|
start_time = time.time()
|
13572
14456
|
while True:
|
13573
|
-
rsp = client.
|
14457
|
+
rsp = client.DetachClassicLinkVpc(model)
|
13574
14458
|
result = rsp.to_json_string()
|
13575
14459
|
try:
|
13576
14460
|
json_obj = json.loads(result)
|
@@ -13589,7 +14473,7 @@ def doDetachCcnInstances(args, parsed_globals):
|
|
13589
14473
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13590
14474
|
|
13591
14475
|
|
13592
|
-
def
|
14476
|
+
def doRefreshDirectConnectGatewayRouteToNatGateway(args, parsed_globals):
|
13593
14477
|
g_param = parse_global_arg(parsed_globals)
|
13594
14478
|
|
13595
14479
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13618,11 +14502,11 @@ def doDetachClassicLinkVpc(args, parsed_globals):
|
|
13618
14502
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13619
14503
|
client._sdkVersion += ("_CLI_" + __version__)
|
13620
14504
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13621
|
-
model = models.
|
14505
|
+
model = models.RefreshDirectConnectGatewayRouteToNatGatewayRequest()
|
13622
14506
|
model.from_json_string(json.dumps(args))
|
13623
14507
|
start_time = time.time()
|
13624
14508
|
while True:
|
13625
|
-
rsp = client.
|
14509
|
+
rsp = client.RefreshDirectConnectGatewayRouteToNatGateway(model)
|
13626
14510
|
result = rsp.to_json_string()
|
13627
14511
|
try:
|
13628
14512
|
json_obj = json.loads(result)
|
@@ -13641,7 +14525,7 @@ def doDetachClassicLinkVpc(args, parsed_globals):
|
|
13641
14525
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13642
14526
|
|
13643
14527
|
|
13644
|
-
def
|
14528
|
+
def doDisassociateDhcpIpWithAddressIp(args, parsed_globals):
|
13645
14529
|
g_param = parse_global_arg(parsed_globals)
|
13646
14530
|
|
13647
14531
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13670,11 +14554,11 @@ def doDescribeVpnGatewaySslServers(args, parsed_globals):
|
|
13670
14554
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13671
14555
|
client._sdkVersion += ("_CLI_" + __version__)
|
13672
14556
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13673
|
-
model = models.
|
14557
|
+
model = models.DisassociateDhcpIpWithAddressIpRequest()
|
13674
14558
|
model.from_json_string(json.dumps(args))
|
13675
14559
|
start_time = time.time()
|
13676
14560
|
while True:
|
13677
|
-
rsp = client.
|
14561
|
+
rsp = client.DisassociateDhcpIpWithAddressIp(model)
|
13678
14562
|
result = rsp.to_json_string()
|
13679
14563
|
try:
|
13680
14564
|
json_obj = json.loads(result)
|
@@ -13693,7 +14577,7 @@ def doDescribeVpnGatewaySslServers(args, parsed_globals):
|
|
13693
14577
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13694
14578
|
|
13695
14579
|
|
13696
|
-
def
|
14580
|
+
def doCreateHaVip(args, parsed_globals):
|
13697
14581
|
g_param = parse_global_arg(parsed_globals)
|
13698
14582
|
|
13699
14583
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13722,11 +14606,11 @@ def doRefreshDirectConnectGatewayRouteToNatGateway(args, parsed_globals):
|
|
13722
14606
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13723
14607
|
client._sdkVersion += ("_CLI_" + __version__)
|
13724
14608
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13725
|
-
model = models.
|
14609
|
+
model = models.CreateHaVipRequest()
|
13726
14610
|
model.from_json_string(json.dumps(args))
|
13727
14611
|
start_time = time.time()
|
13728
14612
|
while True:
|
13729
|
-
rsp = client.
|
14613
|
+
rsp = client.CreateHaVip(model)
|
13730
14614
|
result = rsp.to_json_string()
|
13731
14615
|
try:
|
13732
14616
|
json_obj = json.loads(result)
|
@@ -13745,7 +14629,7 @@ def doRefreshDirectConnectGatewayRouteToNatGateway(args, parsed_globals):
|
|
13745
14629
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13746
14630
|
|
13747
14631
|
|
13748
|
-
def
|
14632
|
+
def doModifyServiceTemplateAttribute(args, parsed_globals):
|
13749
14633
|
g_param = parse_global_arg(parsed_globals)
|
13750
14634
|
|
13751
14635
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13774,11 +14658,11 @@ def doDisassociateDhcpIpWithAddressIp(args, parsed_globals):
|
|
13774
14658
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13775
14659
|
client._sdkVersion += ("_CLI_" + __version__)
|
13776
14660
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13777
|
-
model = models.
|
14661
|
+
model = models.ModifyServiceTemplateAttributeRequest()
|
13778
14662
|
model.from_json_string(json.dumps(args))
|
13779
14663
|
start_time = time.time()
|
13780
14664
|
while True:
|
13781
|
-
rsp = client.
|
14665
|
+
rsp = client.ModifyServiceTemplateAttribute(model)
|
13782
14666
|
result = rsp.to_json_string()
|
13783
14667
|
try:
|
13784
14668
|
json_obj = json.loads(result)
|
@@ -13797,7 +14681,7 @@ def doDisassociateDhcpIpWithAddressIp(args, parsed_globals):
|
|
13797
14681
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13798
14682
|
|
13799
14683
|
|
13800
|
-
def
|
14684
|
+
def doMigrateNetworkInterface(args, parsed_globals):
|
13801
14685
|
g_param = parse_global_arg(parsed_globals)
|
13802
14686
|
|
13803
14687
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13826,11 +14710,11 @@ def doCreateHaVip(args, parsed_globals):
|
|
13826
14710
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13827
14711
|
client._sdkVersion += ("_CLI_" + __version__)
|
13828
14712
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13829
|
-
model = models.
|
14713
|
+
model = models.MigrateNetworkInterfaceRequest()
|
13830
14714
|
model.from_json_string(json.dumps(args))
|
13831
14715
|
start_time = time.time()
|
13832
14716
|
while True:
|
13833
|
-
rsp = client.
|
14717
|
+
rsp = client.MigrateNetworkInterface(model)
|
13834
14718
|
result = rsp.to_json_string()
|
13835
14719
|
try:
|
13836
14720
|
json_obj = json.loads(result)
|
@@ -13849,7 +14733,7 @@ def doCreateHaVip(args, parsed_globals):
|
|
13849
14733
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13850
14734
|
|
13851
14735
|
|
13852
|
-
def
|
14736
|
+
def doReleaseAddresses(args, parsed_globals):
|
13853
14737
|
g_param = parse_global_arg(parsed_globals)
|
13854
14738
|
|
13855
14739
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13878,11 +14762,11 @@ def doModifyServiceTemplateAttribute(args, parsed_globals):
|
|
13878
14762
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13879
14763
|
client._sdkVersion += ("_CLI_" + __version__)
|
13880
14764
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13881
|
-
model = models.
|
14765
|
+
model = models.ReleaseAddressesRequest()
|
13882
14766
|
model.from_json_string(json.dumps(args))
|
13883
14767
|
start_time = time.time()
|
13884
14768
|
while True:
|
13885
|
-
rsp = client.
|
14769
|
+
rsp = client.ReleaseAddresses(model)
|
13886
14770
|
result = rsp.to_json_string()
|
13887
14771
|
try:
|
13888
14772
|
json_obj = json.loads(result)
|
@@ -13901,7 +14785,7 @@ def doModifyServiceTemplateAttribute(args, parsed_globals):
|
|
13901
14785
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13902
14786
|
|
13903
14787
|
|
13904
|
-
def
|
14788
|
+
def doDisassociateNetworkAclSubnets(args, parsed_globals):
|
13905
14789
|
g_param = parse_global_arg(parsed_globals)
|
13906
14790
|
|
13907
14791
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13930,11 +14814,11 @@ def doMigrateNetworkInterface(args, parsed_globals):
|
|
13930
14814
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13931
14815
|
client._sdkVersion += ("_CLI_" + __version__)
|
13932
14816
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13933
|
-
model = models.
|
14817
|
+
model = models.DisassociateNetworkAclSubnetsRequest()
|
13934
14818
|
model.from_json_string(json.dumps(args))
|
13935
14819
|
start_time = time.time()
|
13936
14820
|
while True:
|
13937
|
-
rsp = client.
|
14821
|
+
rsp = client.DisassociateNetworkAclSubnets(model)
|
13938
14822
|
result = rsp.to_json_string()
|
13939
14823
|
try:
|
13940
14824
|
json_obj = json.loads(result)
|
@@ -13953,7 +14837,7 @@ def doMigrateNetworkInterface(args, parsed_globals):
|
|
13953
14837
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13954
14838
|
|
13955
14839
|
|
13956
|
-
def
|
14840
|
+
def doDescribeNatGatewaySourceIpTranslationNatRules(args, parsed_globals):
|
13957
14841
|
g_param = parse_global_arg(parsed_globals)
|
13958
14842
|
|
13959
14843
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -13982,11 +14866,11 @@ def doReleaseAddresses(args, parsed_globals):
|
|
13982
14866
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13983
14867
|
client._sdkVersion += ("_CLI_" + __version__)
|
13984
14868
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13985
|
-
model = models.
|
14869
|
+
model = models.DescribeNatGatewaySourceIpTranslationNatRulesRequest()
|
13986
14870
|
model.from_json_string(json.dumps(args))
|
13987
14871
|
start_time = time.time()
|
13988
14872
|
while True:
|
13989
|
-
rsp = client.
|
14873
|
+
rsp = client.DescribeNatGatewaySourceIpTranslationNatRules(model)
|
13990
14874
|
result = rsp.to_json_string()
|
13991
14875
|
try:
|
13992
14876
|
json_obj = json.loads(result)
|
@@ -14005,7 +14889,7 @@ def doReleaseAddresses(args, parsed_globals):
|
|
14005
14889
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
14006
14890
|
|
14007
14891
|
|
14008
|
-
def
|
14892
|
+
def doDeleteNatGateway(args, parsed_globals):
|
14009
14893
|
g_param = parse_global_arg(parsed_globals)
|
14010
14894
|
|
14011
14895
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -14034,11 +14918,11 @@ def doDisassociateNetworkAclSubnets(args, parsed_globals):
|
|
14034
14918
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
14035
14919
|
client._sdkVersion += ("_CLI_" + __version__)
|
14036
14920
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
14037
|
-
model = models.
|
14921
|
+
model = models.DeleteNatGatewayRequest()
|
14038
14922
|
model.from_json_string(json.dumps(args))
|
14039
14923
|
start_time = time.time()
|
14040
14924
|
while True:
|
14041
|
-
rsp = client.
|
14925
|
+
rsp = client.DeleteNatGateway(model)
|
14042
14926
|
result = rsp.to_json_string()
|
14043
14927
|
try:
|
14044
14928
|
json_obj = json.loads(result)
|
@@ -14057,7 +14941,7 @@ def doDisassociateNetworkAclSubnets(args, parsed_globals):
|
|
14057
14941
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
14058
14942
|
|
14059
14943
|
|
14060
|
-
def
|
14944
|
+
def doModifyNetworkAclAttribute(args, parsed_globals):
|
14061
14945
|
g_param = parse_global_arg(parsed_globals)
|
14062
14946
|
|
14063
14947
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -14086,11 +14970,11 @@ def doDescribeNatGatewaySourceIpTranslationNatRules(args, parsed_globals):
|
|
14086
14970
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
14087
14971
|
client._sdkVersion += ("_CLI_" + __version__)
|
14088
14972
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
14089
|
-
model = models.
|
14973
|
+
model = models.ModifyNetworkAclAttributeRequest()
|
14090
14974
|
model.from_json_string(json.dumps(args))
|
14091
14975
|
start_time = time.time()
|
14092
14976
|
while True:
|
14093
|
-
rsp = client.
|
14977
|
+
rsp = client.ModifyNetworkAclAttribute(model)
|
14094
14978
|
result = rsp.to_json_string()
|
14095
14979
|
try:
|
14096
14980
|
json_obj = json.loads(result)
|
@@ -15253,6 +16137,58 @@ def doModifyCcnAttribute(args, parsed_globals):
|
|
15253
16137
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15254
16138
|
|
15255
16139
|
|
16140
|
+
def doModifyPrivateNatGatewayTranslationAclRule(args, parsed_globals):
|
16141
|
+
g_param = parse_global_arg(parsed_globals)
|
16142
|
+
|
16143
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
16144
|
+
cred = credential.CVMRoleCredential()
|
16145
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16146
|
+
cred = credential.STSAssumeRoleCredential(
|
16147
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16148
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16149
|
+
)
|
16150
|
+
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):
|
16151
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
16152
|
+
else:
|
16153
|
+
cred = credential.Credential(
|
16154
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
16155
|
+
)
|
16156
|
+
http_profile = HttpProfile(
|
16157
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
16158
|
+
reqMethod="POST",
|
16159
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
16160
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
16161
|
+
)
|
16162
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
16163
|
+
if g_param[OptionsDefine.Language]:
|
16164
|
+
profile.language = g_param[OptionsDefine.Language]
|
16165
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
16166
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
16167
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
16168
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
16169
|
+
model = models.ModifyPrivateNatGatewayTranslationAclRuleRequest()
|
16170
|
+
model.from_json_string(json.dumps(args))
|
16171
|
+
start_time = time.time()
|
16172
|
+
while True:
|
16173
|
+
rsp = client.ModifyPrivateNatGatewayTranslationAclRule(model)
|
16174
|
+
result = rsp.to_json_string()
|
16175
|
+
try:
|
16176
|
+
json_obj = json.loads(result)
|
16177
|
+
except TypeError as e:
|
16178
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
16179
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
16180
|
+
break
|
16181
|
+
cur_time = time.time()
|
16182
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
16183
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
16184
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
16185
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
16186
|
+
else:
|
16187
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
16188
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
16189
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
16190
|
+
|
16191
|
+
|
15256
16192
|
def doResumeSnapshotInstance(args, parsed_globals):
|
15257
16193
|
g_param = parse_global_arg(parsed_globals)
|
15258
16194
|
|
@@ -15409,7 +16345,7 @@ def doModifyIp6Translator(args, parsed_globals):
|
|
15409
16345
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15410
16346
|
|
15411
16347
|
|
15412
|
-
def
|
16348
|
+
def doDescribeSnapshotPolicies(args, parsed_globals):
|
15413
16349
|
g_param = parse_global_arg(parsed_globals)
|
15414
16350
|
|
15415
16351
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15438,11 +16374,11 @@ def doUnassignIpv6SubnetCidrBlock(args, parsed_globals):
|
|
15438
16374
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15439
16375
|
client._sdkVersion += ("_CLI_" + __version__)
|
15440
16376
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15441
|
-
model = models.
|
16377
|
+
model = models.DescribeSnapshotPoliciesRequest()
|
15442
16378
|
model.from_json_string(json.dumps(args))
|
15443
16379
|
start_time = time.time()
|
15444
16380
|
while True:
|
15445
|
-
rsp = client.
|
16381
|
+
rsp = client.DescribeSnapshotPolicies(model)
|
15446
16382
|
result = rsp.to_json_string()
|
15447
16383
|
try:
|
15448
16384
|
json_obj = json.loads(result)
|
@@ -15877,7 +16813,7 @@ def doDescribeAddressTemplateGroups(args, parsed_globals):
|
|
15877
16813
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15878
16814
|
|
15879
16815
|
|
15880
|
-
def
|
16816
|
+
def doDescribeVpnGatewayRoutes(args, parsed_globals):
|
15881
16817
|
g_param = parse_global_arg(parsed_globals)
|
15882
16818
|
|
15883
16819
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15906,11 +16842,11 @@ def doCreateVpcEndPoint(args, parsed_globals):
|
|
15906
16842
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15907
16843
|
client._sdkVersion += ("_CLI_" + __version__)
|
15908
16844
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15909
|
-
model = models.
|
16845
|
+
model = models.DescribeVpnGatewayRoutesRequest()
|
15910
16846
|
model.from_json_string(json.dumps(args))
|
15911
16847
|
start_time = time.time()
|
15912
16848
|
while True:
|
15913
|
-
rsp = client.
|
16849
|
+
rsp = client.DescribeVpnGatewayRoutes(model)
|
15914
16850
|
result = rsp.to_json_string()
|
15915
16851
|
try:
|
15916
16852
|
json_obj = json.loads(result)
|
@@ -16085,7 +17021,7 @@ def doCreateSecurityGroupPolicies(args, parsed_globals):
|
|
16085
17021
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
16086
17022
|
|
16087
17023
|
|
16088
|
-
def
|
17024
|
+
def doDescribeVpcIpv6Addresses(args, parsed_globals):
|
16089
17025
|
g_param = parse_global_arg(parsed_globals)
|
16090
17026
|
|
16091
17027
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -16114,11 +17050,11 @@ def doModifyNetworkAclAttribute(args, parsed_globals):
|
|
16114
17050
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
16115
17051
|
client._sdkVersion += ("_CLI_" + __version__)
|
16116
17052
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
16117
|
-
model = models.
|
17053
|
+
model = models.DescribeVpcIpv6AddressesRequest()
|
16118
17054
|
model.from_json_string(json.dumps(args))
|
16119
17055
|
start_time = time.time()
|
16120
17056
|
while True:
|
16121
|
-
rsp = client.
|
17057
|
+
rsp = client.DescribeVpcIpv6Addresses(model)
|
16122
17058
|
result = rsp.to_json_string()
|
16123
17059
|
try:
|
16124
17060
|
json_obj = json.loads(result)
|
@@ -16189,7 +17125,7 @@ def doSetCcnRegionBandwidthLimits(args, parsed_globals):
|
|
16189
17125
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
16190
17126
|
|
16191
17127
|
|
16192
|
-
def
|
17128
|
+
def doReturnNormalAddresses(args, parsed_globals):
|
16193
17129
|
g_param = parse_global_arg(parsed_globals)
|
16194
17130
|
|
16195
17131
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -16218,11 +17154,11 @@ def doCreateSecurityGroup(args, parsed_globals):
|
|
16218
17154
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
16219
17155
|
client._sdkVersion += ("_CLI_" + __version__)
|
16220
17156
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
16221
|
-
model = models.
|
17157
|
+
model = models.ReturnNormalAddressesRequest()
|
16222
17158
|
model.from_json_string(json.dumps(args))
|
16223
17159
|
start_time = time.time()
|
16224
17160
|
while True:
|
16225
|
-
rsp = client.
|
17161
|
+
rsp = client.ReturnNormalAddresses(model)
|
16226
17162
|
result = rsp.to_json_string()
|
16227
17163
|
try:
|
16228
17164
|
json_obj = json.loads(result)
|
@@ -16483,8 +17419,8 @@ ACTION_MAP = {
|
|
16483
17419
|
"DisassociateNetworkInterfaceSecurityGroups": doDisassociateNetworkInterfaceSecurityGroups,
|
16484
17420
|
"ModifyAddressInternetChargeType": doModifyAddressInternetChargeType,
|
16485
17421
|
"DescribeCcnAttachedInstances": doDescribeCcnAttachedInstances,
|
16486
|
-
"
|
16487
|
-
"
|
17422
|
+
"DescribePrivateNatGatewayRegions": doDescribePrivateNatGatewayRegions,
|
17423
|
+
"CreatePrivateNatGateway": doCreatePrivateNatGateway,
|
16488
17424
|
"DescribeNetworkInterfaceLimit": doDescribeNetworkInterfaceLimit,
|
16489
17425
|
"EnableSnapshotPolicies": doEnableSnapshotPolicies,
|
16490
17426
|
"DeleteNetworkAclEntries": doDeleteNetworkAclEntries,
|
@@ -16508,8 +17444,11 @@ ACTION_MAP = {
|
|
16508
17444
|
"UnlockCcns": doUnlockCcns,
|
16509
17445
|
"ModifyNatGatewaySourceIpTranslationNatRule": doModifyNatGatewaySourceIpTranslationNatRule,
|
16510
17446
|
"AssociateNatGatewayAddress": doAssociateNatGatewayAddress,
|
17447
|
+
"CreatePrivateNatGatewayTranslationNatRule": doCreatePrivateNatGatewayTranslationNatRule,
|
17448
|
+
"ModifyPrivateNatGatewayDestinationIpPortTranslationNatRule": doModifyPrivateNatGatewayDestinationIpPortTranslationNatRule,
|
17449
|
+
"ModifyPrivateNatGatewayTranslationNatRule": doModifyPrivateNatGatewayTranslationNatRule,
|
16511
17450
|
"ModifyVpcEndPointAttribute": doModifyVpcEndPointAttribute,
|
16512
|
-
"
|
17451
|
+
"DescribeVpnGatewaySslServers": doDescribeVpnGatewaySslServers,
|
16513
17452
|
"ModifyVpnGatewayRoutes": doModifyVpnGatewayRoutes,
|
16514
17453
|
"ReplaceSecurityGroupPolicies": doReplaceSecurityGroupPolicies,
|
16515
17454
|
"DisassociateVpcEndPointSecurityGroups": doDisassociateVpcEndPointSecurityGroups,
|
@@ -16535,7 +17474,7 @@ ACTION_MAP = {
|
|
16535
17474
|
"InquiryPriceResetVpnGatewayInternetMaxBandwidth": doInquiryPriceResetVpnGatewayInternetMaxBandwidth,
|
16536
17475
|
"DeleteDirectConnectGatewayCcnRoutes": doDeleteDirectConnectGatewayCcnRoutes,
|
16537
17476
|
"DescribeNetworkAccountType": doDescribeNetworkAccountType,
|
16538
|
-
"
|
17477
|
+
"CreatePrivateNatGatewayDestinationIpPortTranslationNatRule": doCreatePrivateNatGatewayDestinationIpPortTranslationNatRule,
|
16539
17478
|
"ModifyAddressesBandwidth": doModifyAddressesBandwidth,
|
16540
17479
|
"CreateNatGatewayDestinationIpPortTranslationNatRule": doCreateNatGatewayDestinationIpPortTranslationNatRule,
|
16541
17480
|
"CreateSubnet": doCreateSubnet,
|
@@ -16544,6 +17483,7 @@ ACTION_MAP = {
|
|
16544
17483
|
"AllocateIp6AddressesBandwidth": doAllocateIp6AddressesBandwidth,
|
16545
17484
|
"DeleteDhcpIp": doDeleteDhcpIp,
|
16546
17485
|
"LockCcnBandwidths": doLockCcnBandwidths,
|
17486
|
+
"DescribePrivateNatGatewayDestinationIpPortTranslationNatRules": doDescribePrivateNatGatewayDestinationIpPortTranslationNatRules,
|
16547
17487
|
"ModifyAddressTemplateAttribute": doModifyAddressTemplateAttribute,
|
16548
17488
|
"AcceptAttachCcnInstances": doAcceptAttachCcnInstances,
|
16549
17489
|
"DeleteTemplateMember": doDeleteTemplateMember,
|
@@ -16561,19 +17501,20 @@ ACTION_MAP = {
|
|
16561
17501
|
"AssignIpv6SubnetCidrBlock": doAssignIpv6SubnetCidrBlock,
|
16562
17502
|
"DescribeVpnGatewayCcnRoutes": doDescribeVpnGatewayCcnRoutes,
|
16563
17503
|
"AllocateAddresses": doAllocateAddresses,
|
16564
|
-
"DescribeSnapshotPolicies": doDescribeSnapshotPolicies,
|
16565
17504
|
"CheckAssistantCidr": doCheckAssistantCidr,
|
16566
17505
|
"DeleteNetworkAclQuintupleEntries": doDeleteNetworkAclQuintupleEntries,
|
16567
|
-
"
|
17506
|
+
"ResetRoutes": doResetRoutes,
|
16568
17507
|
"DescribeIp6Addresses": doDescribeIp6Addresses,
|
16569
17508
|
"UnlockCcnBandwidths": doUnlockCcnBandwidths,
|
16570
17509
|
"ModifyVpcAttribute": doModifyVpcAttribute,
|
16571
17510
|
"DisableSnapshotPolicies": doDisableSnapshotPolicies,
|
17511
|
+
"DeletePrivateNatGatewayTranslationNatRule": doDeletePrivateNatGatewayTranslationNatRule,
|
16572
17512
|
"DescribeVpcs": doDescribeVpcs,
|
16573
17513
|
"AttachCcnInstances": doAttachCcnInstances,
|
16574
17514
|
"AssociateAddress": doAssociateAddress,
|
16575
17515
|
"DeleteCustomerGateway": doDeleteCustomerGateway,
|
16576
17516
|
"DeleteSubnet": doDeleteSubnet,
|
17517
|
+
"DeleteVpnGatewaySslServer": doDeleteVpnGatewaySslServer,
|
16577
17518
|
"AttachClassicLinkVpc": doAttachClassicLinkVpc,
|
16578
17519
|
"DisassociateNatGatewayAddress": doDisassociateNatGatewayAddress,
|
16579
17520
|
"ModifyTemplateMember": doModifyTemplateMember,
|
@@ -16595,7 +17536,7 @@ ACTION_MAP = {
|
|
16595
17536
|
"DescribeHaVips": doDescribeHaVips,
|
16596
17537
|
"ModifyVpnGatewayCcnRoutes": doModifyVpnGatewayCcnRoutes,
|
16597
17538
|
"DetachNetworkInterface": doDetachNetworkInterface,
|
16598
|
-
"
|
17539
|
+
"DeletePrivateNatGatewayDestinationIpPortTranslationNatRule": doDeletePrivateNatGatewayDestinationIpPortTranslationNatRule,
|
16599
17540
|
"CreateVpnConnection": doCreateVpnConnection,
|
16600
17541
|
"ModifyNetworkAclQuintupleEntries": doModifyNetworkAclQuintupleEntries,
|
16601
17542
|
"DeleteAssistantCidr": doDeleteAssistantCidr,
|
@@ -16612,7 +17553,7 @@ ACTION_MAP = {
|
|
16612
17553
|
"DescribeSecurityGroupReferences": doDescribeSecurityGroupReferences,
|
16613
17554
|
"DescribeFlowLog": doDescribeFlowLog,
|
16614
17555
|
"ModifyGatewayFlowQos": doModifyGatewayFlowQos,
|
16615
|
-
"
|
17556
|
+
"UnassignIpv6SubnetCidrBlock": doUnassignIpv6SubnetCidrBlock,
|
16616
17557
|
"DescribeRouteConflicts": doDescribeRouteConflicts,
|
16617
17558
|
"DescribeAccountAttributes": doDescribeAccountAttributes,
|
16618
17559
|
"RenewAddresses": doRenewAddresses,
|
@@ -16627,6 +17568,7 @@ ACTION_MAP = {
|
|
16627
17568
|
"DescribeCcnRoutes": doDescribeCcnRoutes,
|
16628
17569
|
"CreateVpcEndPointService": doCreateVpcEndPointService,
|
16629
17570
|
"CreateIp6Translators": doCreateIp6Translators,
|
17571
|
+
"DeletePrivateNatGateway": doDeletePrivateNatGateway,
|
16630
17572
|
"DescribeUsedIpAddress": doDescribeUsedIpAddress,
|
16631
17573
|
"CreateSecurityGroupWithPolicies": doCreateSecurityGroupWithPolicies,
|
16632
17574
|
"CreateAssistantCidr": doCreateAssistantCidr,
|
@@ -16642,12 +17584,14 @@ ACTION_MAP = {
|
|
16642
17584
|
"DeleteAddressTemplate": doDeleteAddressTemplate,
|
16643
17585
|
"NotifyRoutes": doNotifyRoutes,
|
16644
17586
|
"DeleteVpcEndPointService": doDeleteVpcEndPointService,
|
17587
|
+
"DeletePrivateNatGatewayTranslationAclRule": doDeletePrivateNatGatewayTranslationAclRule,
|
16645
17588
|
"CreateNetworkAclQuintupleEntries": doCreateNetworkAclQuintupleEntries,
|
16646
17589
|
"DeleteVpcEndPoint": doDeleteVpcEndPoint,
|
16647
17590
|
"DeleteVpnGateway": doDeleteVpnGateway,
|
16648
17591
|
"DescribeTenantCcns": doDescribeTenantCcns,
|
16649
17592
|
"CreateServiceTemplate": doCreateServiceTemplate,
|
16650
17593
|
"CreateSnapshotPolicies": doCreateSnapshotPolicies,
|
17594
|
+
"RejectAttachCcnInstances": doRejectAttachCcnInstances,
|
16651
17595
|
"DeleteRoutes": doDeleteRoutes,
|
16652
17596
|
"ModifyDirectConnectGatewayAttribute": doModifyDirectConnectGatewayAttribute,
|
16653
17597
|
"ModifySubnetAttribute": doModifySubnetAttribute,
|
@@ -16656,15 +17600,19 @@ ACTION_MAP = {
|
|
16656
17600
|
"InquiryPriceRenewVpnGateway": doInquiryPriceRenewVpnGateway,
|
16657
17601
|
"DisableCcnRoutes": doDisableCcnRoutes,
|
16658
17602
|
"DescribeVpcEndPointServiceWhiteList": doDescribeVpcEndPointServiceWhiteList,
|
17603
|
+
"DeleteSecurityGroup": doDeleteSecurityGroup,
|
16659
17604
|
"ReleaseIp6AddressesBandwidth": doReleaseIp6AddressesBandwidth,
|
16660
17605
|
"ModifySecurityGroupPolicies": doModifySecurityGroupPolicies,
|
16661
17606
|
"ResetVpnConnection": doResetVpnConnection,
|
16662
17607
|
"CreateCustomerGateway": doCreateCustomerGateway,
|
17608
|
+
"DescribePrivateNatGatewayLimits": doDescribePrivateNatGatewayLimits,
|
16663
17609
|
"DescribeCrossBorderCompliance": doDescribeCrossBorderCompliance,
|
16664
17610
|
"SetVpnGatewaysRenewFlag": doSetVpnGatewaysRenewFlag,
|
16665
|
-
"
|
17611
|
+
"ModifyPrivateNatGatewayAttribute": doModifyPrivateNatGatewayAttribute,
|
17612
|
+
"CreateSecurityGroup": doCreateSecurityGroup,
|
16666
17613
|
"AuditCrossBorderCompliance": doAuditCrossBorderCompliance,
|
16667
17614
|
"ModifyNetworkInterfaceAttribute": doModifyNetworkInterfaceAttribute,
|
17615
|
+
"CreatePrivateNatGatewayTranslationAclRule": doCreatePrivateNatGatewayTranslationAclRule,
|
16668
17616
|
"DescribeVpnGateways": doDescribeVpnGateways,
|
16669
17617
|
"DisableFlowLogs": doDisableFlowLogs,
|
16670
17618
|
"DownloadCustomerGatewayConfiguration": doDownloadCustomerGatewayConfiguration,
|
@@ -16688,12 +17636,14 @@ ACTION_MAP = {
|
|
16688
17636
|
"DescribeNatGatewayDirectConnectGatewayRoute": doDescribeNatGatewayDirectConnectGatewayRoute,
|
16689
17637
|
"ModifyNatGatewayDestinationIpPortTranslationNatRule": doModifyNatGatewayDestinationIpPortTranslationNatRule,
|
16690
17638
|
"DescribeVpcLimits": doDescribeVpcLimits,
|
17639
|
+
"CreateVpcEndPoint": doCreateVpcEndPoint,
|
16691
17640
|
"HaVipAssociateAddressIp": doHaVipAssociateAddressIp,
|
16692
17641
|
"CreateNatGatewaySourceIpTranslationNatRule": doCreateNatGatewaySourceIpTranslationNatRule,
|
16693
17642
|
"DescribeSnapshotAttachedInstances": doDescribeSnapshotAttachedInstances,
|
16694
17643
|
"RemoveIp6Rules": doRemoveIp6Rules,
|
16695
17644
|
"CheckDefaultSubnet": doCheckDefaultSubnet,
|
16696
17645
|
"RejectVpcPeeringConnection": doRejectVpcPeeringConnection,
|
17646
|
+
"DescribePrivateNatGateways": doDescribePrivateNatGateways,
|
16697
17647
|
"ModifyCcnAttachedInstancesAttribute": doModifyCcnAttachedInstancesAttribute,
|
16698
17648
|
"DownloadVpnGatewaySslClientCert": doDownloadVpnGatewaySslClientCert,
|
16699
17649
|
"DeleteHaVip": doDeleteHaVip,
|
@@ -16713,7 +17663,9 @@ ACTION_MAP = {
|
|
16713
17663
|
"DescribeNetworkAcls": doDescribeNetworkAcls,
|
16714
17664
|
"ModifyVpnConnectionAttribute": doModifyVpnConnectionAttribute,
|
16715
17665
|
"DescribeSecurityGroups": doDescribeSecurityGroups,
|
17666
|
+
"DescribePrivateNatGatewayTranslationNatRules": doDescribePrivateNatGatewayTranslationNatRules,
|
16716
17667
|
"CreateVpnGateway": doCreateVpnGateway,
|
17668
|
+
"DescribePrivateNatGatewayTranslationAclRules": doDescribePrivateNatGatewayTranslationAclRules,
|
16717
17669
|
"DescribeTrafficPackages": doDescribeTrafficPackages,
|
16718
17670
|
"ModifyPrivateIpAddressesAttribute": doModifyPrivateIpAddressesAttribute,
|
16719
17671
|
"CreateDirectConnectGatewayCcnRoutes": doCreateDirectConnectGatewayCcnRoutes,
|
@@ -16722,7 +17674,6 @@ ACTION_MAP = {
|
|
16722
17674
|
"ModifyNetworkInterfaceQos": doModifyNetworkInterfaceQos,
|
16723
17675
|
"DetachCcnInstances": doDetachCcnInstances,
|
16724
17676
|
"DetachClassicLinkVpc": doDetachClassicLinkVpc,
|
16725
|
-
"DescribeVpnGatewaySslServers": doDescribeVpnGatewaySslServers,
|
16726
17677
|
"RefreshDirectConnectGatewayRouteToNatGateway": doRefreshDirectConnectGatewayRouteToNatGateway,
|
16727
17678
|
"DisassociateDhcpIpWithAddressIp": doDisassociateDhcpIpWithAddressIp,
|
16728
17679
|
"CreateHaVip": doCreateHaVip,
|
@@ -16731,6 +17682,8 @@ ACTION_MAP = {
|
|
16731
17682
|
"ReleaseAddresses": doReleaseAddresses,
|
16732
17683
|
"DisassociateNetworkAclSubnets": doDisassociateNetworkAclSubnets,
|
16733
17684
|
"DescribeNatGatewaySourceIpTranslationNatRules": doDescribeNatGatewaySourceIpTranslationNatRules,
|
17685
|
+
"DeleteNatGateway": doDeleteNatGateway,
|
17686
|
+
"ModifyNetworkAclAttribute": doModifyNetworkAclAttribute,
|
16734
17687
|
"EnableCcnRoutes": doEnableCcnRoutes,
|
16735
17688
|
"ModifyRouteTableAttribute": doModifyRouteTableAttribute,
|
16736
17689
|
"DisassociateDirectConnectGatewayNatGateway": doDisassociateDirectConnectGatewayNatGateway,
|
@@ -16753,10 +17706,11 @@ ACTION_MAP = {
|
|
16753
17706
|
"CreateDhcpIp": doCreateDhcpIp,
|
16754
17707
|
"ReplaceRoutes": doReplaceRoutes,
|
16755
17708
|
"ModifyCcnAttribute": doModifyCcnAttribute,
|
17709
|
+
"ModifyPrivateNatGatewayTranslationAclRule": doModifyPrivateNatGatewayTranslationAclRule,
|
16756
17710
|
"ResumeSnapshotInstance": doResumeSnapshotInstance,
|
16757
17711
|
"DescribeVpcPrivateIpAddresses": doDescribeVpcPrivateIpAddresses,
|
16758
17712
|
"ModifyIp6Translator": doModifyIp6Translator,
|
16759
|
-
"
|
17713
|
+
"DescribeSnapshotPolicies": doDescribeSnapshotPolicies,
|
16760
17714
|
"DescribeSnapshotFiles": doDescribeSnapshotFiles,
|
16761
17715
|
"DescribeBandwidthPackageBillUsage": doDescribeBandwidthPackageBillUsage,
|
16762
17716
|
"DescribeIpGeolocationDatabaseUrl": doDescribeIpGeolocationDatabaseUrl,
|
@@ -16765,13 +17719,13 @@ ACTION_MAP = {
|
|
16765
17719
|
"CreateAddressTemplate": doCreateAddressTemplate,
|
16766
17720
|
"ModifyAddressAttribute": doModifyAddressAttribute,
|
16767
17721
|
"DescribeAddressTemplateGroups": doDescribeAddressTemplateGroups,
|
16768
|
-
"
|
17722
|
+
"DescribeVpnGatewayRoutes": doDescribeVpnGatewayRoutes,
|
16769
17723
|
"TransformAddress": doTransformAddress,
|
16770
17724
|
"DescribeIp6TranslatorQuota": doDescribeIp6TranslatorQuota,
|
16771
17725
|
"CreateSecurityGroupPolicies": doCreateSecurityGroupPolicies,
|
16772
|
-
"
|
17726
|
+
"DescribeVpcIpv6Addresses": doDescribeVpcIpv6Addresses,
|
16773
17727
|
"SetCcnRegionBandwidthLimits": doSetCcnRegionBandwidthLimits,
|
16774
|
-
"
|
17728
|
+
"ReturnNormalAddresses": doReturnNormalAddresses,
|
16775
17729
|
"DisableRoutes": doDisableRoutes,
|
16776
17730
|
"DescribeVpcEndPoint": doDescribeVpcEndPoint,
|
16777
17731
|
"AttachSnapshotInstances": doAttachSnapshotInstances,
|