tccli 3.0.948.1__py2.py3-none-any.whl → 3.0.949.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/examples/vpc/v20170312/CreateNetworkAclEntries.md +30 -0
- tccli/examples/vpc/v20170312/DeleteNetworkAclEntries.md +22 -0
- tccli/examples/waf/v20180125/AddAntiFakeUrl.md +46 -0
- tccli/examples/waf/v20180125/AddAntiInfoLeakRules.md +26 -0
- tccli/examples/waf/v20180125/DeleteAntiFakeUrl.md +21 -0
- tccli/examples/waf/v20180125/DeleteAntiInfoLeakRule.md +21 -0
- tccli/examples/waf/v20180125/DeleteCCRule.md +23 -0
- tccli/examples/waf/v20180125/DescribeAntiFakeRules.md +28 -0
- tccli/examples/waf/v20180125/DescribeAntiFakeUrl.md +57 -0
- tccli/examples/waf/v20180125/DescribeAntiInfoLeakRules.md +40 -0
- tccli/examples/waf/v20180125/DescribeAntiInfoLeakageRules.md +38 -0
- tccli/examples/waf/v20180125/DescribeBatchIpAccessControl.md +42 -0
- tccli/examples/waf/v20180125/DescribeCCRule.md +71 -0
- tccli/examples/waf/v20180125/DescribeCCRuleList.md +36 -0
- tccli/examples/waf/v20180125/DescribeSession.md +51 -0
- tccli/examples/waf/v20180125/ModifyAntiFakeUrl.md +24 -0
- tccli/examples/waf/v20180125/ModifyAntiFakeUrlStatus.md +22 -0
- tccli/examples/waf/v20180125/ModifyAntiInfoLeakRuleStatus.md +22 -0
- tccli/examples/waf/v20180125/ModifyAntiInfoLeakRules.md +26 -0
- tccli/examples/waf/v20180125/ModifyCustomWhiteRuleStatus.md +26 -0
- tccli/examples/waf/v20180125/UpsertCCRule.md +95 -0
- tccli/examples/waf/v20180125/UpsertSession.md +25 -0
- tccli/services/vpc/v20170312/api.json +86 -0
- tccli/services/vpc/v20170312/examples.json +16 -0
- tccli/services/vpc/vpc_client.py +195 -89
- tccli/services/waf/v20180125/api.json +2671 -582
- tccli/services/waf/v20180125/examples.json +202 -0
- tccli/services/waf/waf_client.py +1365 -305
- {tccli-3.0.948.1.dist-info → tccli-3.0.949.1.dist-info}/METADATA +2 -2
- {tccli-3.0.948.1.dist-info → tccli-3.0.949.1.dist-info}/RECORD +34 -12
- {tccli-3.0.948.1.dist-info → tccli-3.0.949.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.948.1.dist-info → tccli-3.0.949.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.948.1.dist-info → tccli-3.0.949.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/vpc/vpc_client.py
CHANGED
@@ -1421,7 +1421,7 @@ def doEnableSnapshotPolicies(args, parsed_globals):
|
|
1421
1421
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1422
1422
|
|
1423
1423
|
|
1424
|
-
def
|
1424
|
+
def doDeleteNetworkAclEntries(args, parsed_globals):
|
1425
1425
|
g_param = parse_global_arg(parsed_globals)
|
1426
1426
|
|
1427
1427
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1450,11 +1450,11 @@ def doDescribeNetDetects(args, parsed_globals):
|
|
1450
1450
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
1451
1451
|
client._sdkVersion += ("_CLI_" + __version__)
|
1452
1452
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1453
|
-
model = models.
|
1453
|
+
model = models.DeleteNetworkAclEntriesRequest()
|
1454
1454
|
model.from_json_string(json.dumps(args))
|
1455
1455
|
start_time = time.time()
|
1456
1456
|
while True:
|
1457
|
-
rsp = client.
|
1457
|
+
rsp = client.DeleteNetworkAclEntries(model)
|
1458
1458
|
result = rsp.to_json_string()
|
1459
1459
|
try:
|
1460
1460
|
json_obj = json.loads(result)
|
@@ -2357,7 +2357,7 @@ def doDescribeSecurityGroupPolicies(args, parsed_globals):
|
|
2357
2357
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2358
2358
|
|
2359
2359
|
|
2360
|
-
def
|
2360
|
+
def doUnlockCcns(args, parsed_globals):
|
2361
2361
|
g_param = parse_global_arg(parsed_globals)
|
2362
2362
|
|
2363
2363
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2386,11 +2386,11 @@ def doModifyDirectConnectGatewayAttribute(args, parsed_globals):
|
|
2386
2386
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
2387
2387
|
client._sdkVersion += ("_CLI_" + __version__)
|
2388
2388
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2389
|
-
model = models.
|
2389
|
+
model = models.UnlockCcnsRequest()
|
2390
2390
|
model.from_json_string(json.dumps(args))
|
2391
2391
|
start_time = time.time()
|
2392
2392
|
while True:
|
2393
|
-
rsp = client.
|
2393
|
+
rsp = client.UnlockCcns(model)
|
2394
2394
|
result = rsp.to_json_string()
|
2395
2395
|
try:
|
2396
2396
|
json_obj = json.loads(result)
|
@@ -4801,6 +4801,58 @@ def doDescribeIp6Translators(args, parsed_globals):
|
|
4801
4801
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4802
4802
|
|
4803
4803
|
|
4804
|
+
def doCreateNetworkInterface(args, parsed_globals):
|
4805
|
+
g_param = parse_global_arg(parsed_globals)
|
4806
|
+
|
4807
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4808
|
+
cred = credential.CVMRoleCredential()
|
4809
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4810
|
+
cred = credential.STSAssumeRoleCredential(
|
4811
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4812
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4813
|
+
)
|
4814
|
+
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):
|
4815
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4816
|
+
else:
|
4817
|
+
cred = credential.Credential(
|
4818
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4819
|
+
)
|
4820
|
+
http_profile = HttpProfile(
|
4821
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4822
|
+
reqMethod="POST",
|
4823
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4824
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4825
|
+
)
|
4826
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4827
|
+
if g_param[OptionsDefine.Language]:
|
4828
|
+
profile.language = g_param[OptionsDefine.Language]
|
4829
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4830
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
4831
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4832
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4833
|
+
model = models.CreateNetworkInterfaceRequest()
|
4834
|
+
model.from_json_string(json.dumps(args))
|
4835
|
+
start_time = time.time()
|
4836
|
+
while True:
|
4837
|
+
rsp = client.CreateNetworkInterface(model)
|
4838
|
+
result = rsp.to_json_string()
|
4839
|
+
try:
|
4840
|
+
json_obj = json.loads(result)
|
4841
|
+
except TypeError as e:
|
4842
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4843
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4844
|
+
break
|
4845
|
+
cur_time = time.time()
|
4846
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4847
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4848
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4849
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4850
|
+
else:
|
4851
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4852
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4853
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4854
|
+
|
4855
|
+
|
4804
4856
|
def doDescribeDirectConnectGateways(args, parsed_globals):
|
4805
4857
|
g_param = parse_global_arg(parsed_globals)
|
4806
4858
|
|
@@ -6361,7 +6413,7 @@ def doDescribeDirectConnectGatewayCcnRoutes(args, parsed_globals):
|
|
6361
6413
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6362
6414
|
|
6363
6415
|
|
6364
|
-
def
|
6416
|
+
def doDescribeNetDetects(args, parsed_globals):
|
6365
6417
|
g_param = parse_global_arg(parsed_globals)
|
6366
6418
|
|
6367
6419
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -6390,11 +6442,11 @@ def doCreateNetworkInterface(args, parsed_globals):
|
|
6390
6442
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
6391
6443
|
client._sdkVersion += ("_CLI_" + __version__)
|
6392
6444
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6393
|
-
model = models.
|
6445
|
+
model = models.DescribeNetDetectsRequest()
|
6394
6446
|
model.from_json_string(json.dumps(args))
|
6395
6447
|
start_time = time.time()
|
6396
6448
|
while True:
|
6397
|
-
rsp = client.
|
6449
|
+
rsp = client.DescribeNetDetects(model)
|
6398
6450
|
result = rsp.to_json_string()
|
6399
6451
|
try:
|
6400
6452
|
json_obj = json.loads(result)
|
@@ -6465,6 +6517,58 @@ def doDeleteBandwidthPackage(args, parsed_globals):
|
|
6465
6517
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6466
6518
|
|
6467
6519
|
|
6520
|
+
def doCreateNetworkAclEntries(args, parsed_globals):
|
6521
|
+
g_param = parse_global_arg(parsed_globals)
|
6522
|
+
|
6523
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6524
|
+
cred = credential.CVMRoleCredential()
|
6525
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6526
|
+
cred = credential.STSAssumeRoleCredential(
|
6527
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6528
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6529
|
+
)
|
6530
|
+
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):
|
6531
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6532
|
+
else:
|
6533
|
+
cred = credential.Credential(
|
6534
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6535
|
+
)
|
6536
|
+
http_profile = HttpProfile(
|
6537
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6538
|
+
reqMethod="POST",
|
6539
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
6540
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6541
|
+
)
|
6542
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6543
|
+
if g_param[OptionsDefine.Language]:
|
6544
|
+
profile.language = g_param[OptionsDefine.Language]
|
6545
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6546
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
6547
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
6548
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6549
|
+
model = models.CreateNetworkAclEntriesRequest()
|
6550
|
+
model.from_json_string(json.dumps(args))
|
6551
|
+
start_time = time.time()
|
6552
|
+
while True:
|
6553
|
+
rsp = client.CreateNetworkAclEntries(model)
|
6554
|
+
result = rsp.to_json_string()
|
6555
|
+
try:
|
6556
|
+
json_obj = json.loads(result)
|
6557
|
+
except TypeError as e:
|
6558
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6559
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6560
|
+
break
|
6561
|
+
cur_time = time.time()
|
6562
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6563
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6564
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6565
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6566
|
+
else:
|
6567
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6568
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6569
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6570
|
+
|
6571
|
+
|
6468
6572
|
def doDescribeNetDetectStates(args, parsed_globals):
|
6469
6573
|
g_param = parse_global_arg(parsed_globals)
|
6470
6574
|
|
@@ -6777,6 +6881,58 @@ def doHaVipDisassociateAddressIp(args, parsed_globals):
|
|
6777
6881
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6778
6882
|
|
6779
6883
|
|
6884
|
+
def doDescribeHaVips(args, parsed_globals):
|
6885
|
+
g_param = parse_global_arg(parsed_globals)
|
6886
|
+
|
6887
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6888
|
+
cred = credential.CVMRoleCredential()
|
6889
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6890
|
+
cred = credential.STSAssumeRoleCredential(
|
6891
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6892
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6893
|
+
)
|
6894
|
+
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):
|
6895
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6896
|
+
else:
|
6897
|
+
cred = credential.Credential(
|
6898
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6899
|
+
)
|
6900
|
+
http_profile = HttpProfile(
|
6901
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6902
|
+
reqMethod="POST",
|
6903
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
6904
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6905
|
+
)
|
6906
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6907
|
+
if g_param[OptionsDefine.Language]:
|
6908
|
+
profile.language = g_param[OptionsDefine.Language]
|
6909
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6910
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
6911
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
6912
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6913
|
+
model = models.DescribeHaVipsRequest()
|
6914
|
+
model.from_json_string(json.dumps(args))
|
6915
|
+
start_time = time.time()
|
6916
|
+
while True:
|
6917
|
+
rsp = client.DescribeHaVips(model)
|
6918
|
+
result = rsp.to_json_string()
|
6919
|
+
try:
|
6920
|
+
json_obj = json.loads(result)
|
6921
|
+
except TypeError as e:
|
6922
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6923
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6924
|
+
break
|
6925
|
+
cur_time = time.time()
|
6926
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6927
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6928
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6929
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6930
|
+
else:
|
6931
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6932
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6933
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6934
|
+
|
6935
|
+
|
6780
6936
|
def doModifyVpnGatewayCcnRoutes(args, parsed_globals):
|
6781
6937
|
g_param = parse_global_arg(parsed_globals)
|
6782
6938
|
|
@@ -9585,7 +9741,7 @@ def doCreateServiceTemplate(args, parsed_globals):
|
|
9585
9741
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9586
9742
|
|
9587
9743
|
|
9588
|
-
def
|
9744
|
+
def doCreateSnapshotPolicies(args, parsed_globals):
|
9589
9745
|
g_param = parse_global_arg(parsed_globals)
|
9590
9746
|
|
9591
9747
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9614,11 +9770,11 @@ def doDeleteVpc(args, parsed_globals):
|
|
9614
9770
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
9615
9771
|
client._sdkVersion += ("_CLI_" + __version__)
|
9616
9772
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9617
|
-
model = models.
|
9773
|
+
model = models.CreateSnapshotPoliciesRequest()
|
9618
9774
|
model.from_json_string(json.dumps(args))
|
9619
9775
|
start_time = time.time()
|
9620
9776
|
while True:
|
9621
|
-
rsp = client.
|
9777
|
+
rsp = client.CreateSnapshotPolicies(model)
|
9622
9778
|
result = rsp.to_json_string()
|
9623
9779
|
try:
|
9624
9780
|
json_obj = json.loads(result)
|
@@ -9689,7 +9845,7 @@ def doDeleteRoutes(args, parsed_globals):
|
|
9689
9845
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9690
9846
|
|
9691
9847
|
|
9692
|
-
def
|
9848
|
+
def doModifyDirectConnectGatewayAttribute(args, parsed_globals):
|
9693
9849
|
g_param = parse_global_arg(parsed_globals)
|
9694
9850
|
|
9695
9851
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9718,11 +9874,11 @@ def doModifySecurityGroupPolicies(args, parsed_globals):
|
|
9718
9874
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
9719
9875
|
client._sdkVersion += ("_CLI_" + __version__)
|
9720
9876
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9721
|
-
model = models.
|
9877
|
+
model = models.ModifyDirectConnectGatewayAttributeRequest()
|
9722
9878
|
model.from_json_string(json.dumps(args))
|
9723
9879
|
start_time = time.time()
|
9724
9880
|
while True:
|
9725
|
-
rsp = client.
|
9881
|
+
rsp = client.ModifyDirectConnectGatewayAttribute(model)
|
9726
9882
|
result = rsp.to_json_string()
|
9727
9883
|
try:
|
9728
9884
|
json_obj = json.loads(result)
|
@@ -9741,7 +9897,7 @@ def doModifySecurityGroupPolicies(args, parsed_globals):
|
|
9741
9897
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9742
9898
|
|
9743
9899
|
|
9744
|
-
def
|
9900
|
+
def doModifySubnetAttribute(args, parsed_globals):
|
9745
9901
|
g_param = parse_global_arg(parsed_globals)
|
9746
9902
|
|
9747
9903
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9770,11 +9926,11 @@ def doDisableFlowLogs(args, parsed_globals):
|
|
9770
9926
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
9771
9927
|
client._sdkVersion += ("_CLI_" + __version__)
|
9772
9928
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9773
|
-
model = models.
|
9929
|
+
model = models.ModifySubnetAttributeRequest()
|
9774
9930
|
model.from_json_string(json.dumps(args))
|
9775
9931
|
start_time = time.time()
|
9776
9932
|
while True:
|
9777
|
-
rsp = client.
|
9933
|
+
rsp = client.ModifySubnetAttribute(model)
|
9778
9934
|
result = rsp.to_json_string()
|
9779
9935
|
try:
|
9780
9936
|
json_obj = json.loads(result)
|
@@ -10105,7 +10261,7 @@ def doReleaseIp6AddressesBandwidth(args, parsed_globals):
|
|
10105
10261
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10106
10262
|
|
10107
10263
|
|
10108
|
-
def
|
10264
|
+
def doModifySecurityGroupPolicies(args, parsed_globals):
|
10109
10265
|
g_param = parse_global_arg(parsed_globals)
|
10110
10266
|
|
10111
10267
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10134,11 +10290,11 @@ def doDescribeHaVips(args, parsed_globals):
|
|
10134
10290
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10135
10291
|
client._sdkVersion += ("_CLI_" + __version__)
|
10136
10292
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10137
|
-
model = models.
|
10293
|
+
model = models.ModifySecurityGroupPoliciesRequest()
|
10138
10294
|
model.from_json_string(json.dumps(args))
|
10139
10295
|
start_time = time.time()
|
10140
10296
|
while True:
|
10141
|
-
rsp = client.
|
10297
|
+
rsp = client.ModifySecurityGroupPolicies(model)
|
10142
10298
|
result = rsp.to_json_string()
|
10143
10299
|
try:
|
10144
10300
|
json_obj = json.loads(result)
|
@@ -10573,7 +10729,7 @@ def doDescribeVpnGateways(args, parsed_globals):
|
|
10573
10729
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10574
10730
|
|
10575
10731
|
|
10576
|
-
def
|
10732
|
+
def doDisableFlowLogs(args, parsed_globals):
|
10577
10733
|
g_param = parse_global_arg(parsed_globals)
|
10578
10734
|
|
10579
10735
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10602,11 +10758,11 @@ def doModifySubnetAttribute(args, parsed_globals):
|
|
10602
10758
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10603
10759
|
client._sdkVersion += ("_CLI_" + __version__)
|
10604
10760
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10605
|
-
model = models.
|
10761
|
+
model = models.DisableFlowLogsRequest()
|
10606
10762
|
model.from_json_string(json.dumps(args))
|
10607
10763
|
start_time = time.time()
|
10608
10764
|
while True:
|
10609
|
-
rsp = client.
|
10765
|
+
rsp = client.DisableFlowLogs(model)
|
10610
10766
|
result = rsp.to_json_string()
|
10611
10767
|
try:
|
10612
10768
|
json_obj = json.loads(result)
|
@@ -12185,58 +12341,6 @@ def doDeleteHaVip(args, parsed_globals):
|
|
12185
12341
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12186
12342
|
|
12187
12343
|
|
12188
|
-
def doCreateSnapshotPolicies(args, parsed_globals):
|
12189
|
-
g_param = parse_global_arg(parsed_globals)
|
12190
|
-
|
12191
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
12192
|
-
cred = credential.CVMRoleCredential()
|
12193
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12194
|
-
cred = credential.STSAssumeRoleCredential(
|
12195
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12196
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12197
|
-
)
|
12198
|
-
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):
|
12199
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
12200
|
-
else:
|
12201
|
-
cred = credential.Credential(
|
12202
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
12203
|
-
)
|
12204
|
-
http_profile = HttpProfile(
|
12205
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
12206
|
-
reqMethod="POST",
|
12207
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
12208
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
12209
|
-
)
|
12210
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
12211
|
-
if g_param[OptionsDefine.Language]:
|
12212
|
-
profile.language = g_param[OptionsDefine.Language]
|
12213
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
12214
|
-
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
12215
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
12216
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
12217
|
-
model = models.CreateSnapshotPoliciesRequest()
|
12218
|
-
model.from_json_string(json.dumps(args))
|
12219
|
-
start_time = time.time()
|
12220
|
-
while True:
|
12221
|
-
rsp = client.CreateSnapshotPolicies(model)
|
12222
|
-
result = rsp.to_json_string()
|
12223
|
-
try:
|
12224
|
-
json_obj = json.loads(result)
|
12225
|
-
except TypeError as e:
|
12226
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
12227
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
12228
|
-
break
|
12229
|
-
cur_time = time.time()
|
12230
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
12231
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
12232
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
12233
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
12234
|
-
else:
|
12235
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
12236
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
12237
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12238
|
-
|
12239
|
-
|
12240
12344
|
def doDescribeProductQuota(args, parsed_globals):
|
12241
12345
|
g_param = parse_global_arg(parsed_globals)
|
12242
12346
|
|
@@ -12653,7 +12757,7 @@ def doResetVpnGatewayInternetMaxBandwidth(args, parsed_globals):
|
|
12653
12757
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12654
12758
|
|
12655
12759
|
|
12656
|
-
def
|
12760
|
+
def doDeleteVpc(args, parsed_globals):
|
12657
12761
|
g_param = parse_global_arg(parsed_globals)
|
12658
12762
|
|
12659
12763
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -12682,11 +12786,11 @@ def doUnlockCcns(args, parsed_globals):
|
|
12682
12786
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
12683
12787
|
client._sdkVersion += ("_CLI_" + __version__)
|
12684
12788
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
12685
|
-
model = models.
|
12789
|
+
model = models.DeleteVpcRequest()
|
12686
12790
|
model.from_json_string(json.dumps(args))
|
12687
12791
|
start_time = time.time()
|
12688
12792
|
while True:
|
12689
|
-
rsp = client.
|
12793
|
+
rsp = client.DeleteVpc(model)
|
12690
12794
|
result = rsp.to_json_string()
|
12691
12795
|
try:
|
12692
12796
|
json_obj = json.loads(result)
|
@@ -16331,7 +16435,7 @@ ACTION_MAP = {
|
|
16331
16435
|
"DeleteVpnGatewaySslServer": doDeleteVpnGatewaySslServer,
|
16332
16436
|
"DescribeNetworkInterfaceLimit": doDescribeNetworkInterfaceLimit,
|
16333
16437
|
"EnableSnapshotPolicies": doEnableSnapshotPolicies,
|
16334
|
-
"
|
16438
|
+
"DeleteNetworkAclEntries": doDeleteNetworkAclEntries,
|
16335
16439
|
"AcceptVpcPeeringConnection": doAcceptVpcPeeringConnection,
|
16336
16440
|
"ModifyCcnRegionBandwidthLimitsType": doModifyCcnRegionBandwidthLimitsType,
|
16337
16441
|
"DescribeGatewayFlowMonitorDetail": doDescribeGatewayFlowMonitorDetail,
|
@@ -16349,7 +16453,7 @@ ACTION_MAP = {
|
|
16349
16453
|
"DeleteLocalGateway": doDeleteLocalGateway,
|
16350
16454
|
"CreateDirectConnectGateway": doCreateDirectConnectGateway,
|
16351
16455
|
"DescribeSecurityGroupPolicies": doDescribeSecurityGroupPolicies,
|
16352
|
-
"
|
16456
|
+
"UnlockCcns": doUnlockCcns,
|
16353
16457
|
"ModifyNatGatewaySourceIpTranslationNatRule": doModifyNatGatewaySourceIpTranslationNatRule,
|
16354
16458
|
"AssociateNatGatewayAddress": doAssociateNatGatewayAddress,
|
16355
16459
|
"ModifyVpcEndPointAttribute": doModifyVpcEndPointAttribute,
|
@@ -16396,6 +16500,7 @@ ACTION_MAP = {
|
|
16396
16500
|
"DescribeLocalGateway": doDescribeLocalGateway,
|
16397
16501
|
"DisableVpnGatewaySslClientCert": doDisableVpnGatewaySslClientCert,
|
16398
16502
|
"DescribeIp6Translators": doDescribeIp6Translators,
|
16503
|
+
"CreateNetworkInterface": doCreateNetworkInterface,
|
16399
16504
|
"DescribeDirectConnectGateways": doDescribeDirectConnectGateways,
|
16400
16505
|
"ModifyServiceTemplateGroupAttribute": doModifyServiceTemplateGroupAttribute,
|
16401
16506
|
"CreateVpc": doCreateVpc,
|
@@ -16426,14 +16531,16 @@ ACTION_MAP = {
|
|
16426
16531
|
"DeleteDirectConnectGateway": doDeleteDirectConnectGateway,
|
16427
16532
|
"CreateVpnGatewayRoutes": doCreateVpnGatewayRoutes,
|
16428
16533
|
"DescribeDirectConnectGatewayCcnRoutes": doDescribeDirectConnectGatewayCcnRoutes,
|
16429
|
-
"
|
16534
|
+
"DescribeNetDetects": doDescribeNetDetects,
|
16430
16535
|
"DeleteBandwidthPackage": doDeleteBandwidthPackage,
|
16536
|
+
"CreateNetworkAclEntries": doCreateNetworkAclEntries,
|
16431
16537
|
"DescribeNetDetectStates": doDescribeNetDetectStates,
|
16432
16538
|
"DescribeCcns": doDescribeCcns,
|
16433
16539
|
"DeleteIp6Translators": doDeleteIp6Translators,
|
16434
16540
|
"DeleteCcn": doDeleteCcn,
|
16435
16541
|
"ModifyNetworkAclEntries": doModifyNetworkAclEntries,
|
16436
16542
|
"HaVipDisassociateAddressIp": doHaVipDisassociateAddressIp,
|
16543
|
+
"DescribeHaVips": doDescribeHaVips,
|
16437
16544
|
"ModifyVpnGatewayCcnRoutes": doModifyVpnGatewayCcnRoutes,
|
16438
16545
|
"DetachNetworkInterface": doDetachNetworkInterface,
|
16439
16546
|
"RejectAttachCcnInstances": doRejectAttachCcnInstances,
|
@@ -16488,17 +16595,17 @@ ACTION_MAP = {
|
|
16488
16595
|
"DeleteVpnGateway": doDeleteVpnGateway,
|
16489
16596
|
"DescribeTenantCcns": doDescribeTenantCcns,
|
16490
16597
|
"CreateServiceTemplate": doCreateServiceTemplate,
|
16491
|
-
"
|
16598
|
+
"CreateSnapshotPolicies": doCreateSnapshotPolicies,
|
16492
16599
|
"DeleteRoutes": doDeleteRoutes,
|
16493
|
-
"
|
16494
|
-
"
|
16600
|
+
"ModifyDirectConnectGatewayAttribute": doModifyDirectConnectGatewayAttribute,
|
16601
|
+
"ModifySubnetAttribute": doModifySubnetAttribute,
|
16495
16602
|
"DescribeSgSnapshotFileContent": doDescribeSgSnapshotFileContent,
|
16496
16603
|
"DescribeNetworkInterfaces": doDescribeNetworkInterfaces,
|
16497
16604
|
"InquiryPriceRenewVpnGateway": doInquiryPriceRenewVpnGateway,
|
16498
16605
|
"DisableCcnRoutes": doDisableCcnRoutes,
|
16499
16606
|
"DescribeVpcEndPointServiceWhiteList": doDescribeVpcEndPointServiceWhiteList,
|
16500
16607
|
"ReleaseIp6AddressesBandwidth": doReleaseIp6AddressesBandwidth,
|
16501
|
-
"
|
16608
|
+
"ModifySecurityGroupPolicies": doModifySecurityGroupPolicies,
|
16502
16609
|
"ResetVpnConnection": doResetVpnConnection,
|
16503
16610
|
"CreateCustomerGateway": doCreateCustomerGateway,
|
16504
16611
|
"DescribeCrossBorderCompliance": doDescribeCrossBorderCompliance,
|
@@ -16507,7 +16614,7 @@ ACTION_MAP = {
|
|
16507
16614
|
"AuditCrossBorderCompliance": doAuditCrossBorderCompliance,
|
16508
16615
|
"ModifyNetworkInterfaceAttribute": doModifyNetworkInterfaceAttribute,
|
16509
16616
|
"DescribeVpnGateways": doDescribeVpnGateways,
|
16510
|
-
"
|
16617
|
+
"DisableFlowLogs": doDisableFlowLogs,
|
16511
16618
|
"DownloadCustomerGatewayConfiguration": doDownloadCustomerGatewayConfiguration,
|
16512
16619
|
"DescribeVpcInstances": doDescribeVpcInstances,
|
16513
16620
|
"AssociateNetworkInterfaceSecurityGroups": doAssociateNetworkInterfaceSecurityGroups,
|
@@ -16538,7 +16645,6 @@ ACTION_MAP = {
|
|
16538
16645
|
"ModifyCcnAttachedInstancesAttribute": doModifyCcnAttachedInstancesAttribute,
|
16539
16646
|
"DownloadVpnGatewaySslClientCert": doDownloadVpnGatewaySslClientCert,
|
16540
16647
|
"DeleteHaVip": doDeleteHaVip,
|
16541
|
-
"CreateSnapshotPolicies": doCreateSnapshotPolicies,
|
16542
16648
|
"DescribeProductQuota": doDescribeProductQuota,
|
16543
16649
|
"DescribeVpcPeeringConnections": doDescribeVpcPeeringConnections,
|
16544
16650
|
"InquiryPriceCreateVpnGateway": doInquiryPriceCreateVpnGateway,
|
@@ -16547,7 +16653,7 @@ ACTION_MAP = {
|
|
16547
16653
|
"CreateVpnGatewaySslServer": doCreateVpnGatewaySslServer,
|
16548
16654
|
"ModifyVpnGatewayAttribute": doModifyVpnGatewayAttribute,
|
16549
16655
|
"ResetVpnGatewayInternetMaxBandwidth": doResetVpnGatewayInternetMaxBandwidth,
|
16550
|
-
"
|
16656
|
+
"DeleteVpc": doDeleteVpc,
|
16551
16657
|
"DescribeSubnets": doDescribeSubnets,
|
16552
16658
|
"CreateCcn": doCreateCcn,
|
16553
16659
|
"ModifyCustomerGatewayAttribute": doModifyCustomerGatewayAttribute,
|