tccli 3.0.1200.1__py2.py3-none-any.whl → 3.0.1202.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/__init__.py +3 -0
- tccli/services/autoscaling/v20180419/api.json +33 -5
- tccli/services/autoscaling/v20180419/examples.json +3 -3
- tccli/services/batch/v20170312/api.json +2 -2
- tccli/services/ca/__init__.py +4 -0
- tccli/services/ca/ca_client.py +301 -0
- tccli/services/ca/v20230228/api.json +264 -0
- tccli/services/ca/v20230228/examples.json +41 -0
- tccli/services/ccc/ccc_client.py +153 -47
- tccli/services/ccc/v20200210/api.json +185 -1
- tccli/services/ccc/v20200210/examples.json +17 -1
- tccli/services/cdn/v20180606/api.json +30 -1
- tccli/services/cdwdoris/v20211228/api.json +5 -1
- tccli/services/cvm/cvm_client.py +53 -0
- tccli/services/cvm/v20170312/api.json +173 -25
- tccli/services/cvm/v20170312/examples.json +9 -1
- tccli/services/cynosdb/v20190107/api.json +56 -56
- tccli/services/dts/v20211206/api.json +12 -12
- tccli/services/emr/v20190103/api.json +9 -0
- tccli/services/ess/v20201111/api.json +6 -6
- tccli/services/essbasic/v20210526/api.json +1 -1
- tccli/services/lcic/v20220817/api.json +1 -1
- tccli/services/lighthouse/v20200324/api.json +2 -2
- tccli/services/mqtt/v20240516/api.json +1 -1
- tccli/services/mrs/v20200910/api.json +71 -1
- tccli/services/ocr/v20181119/api.json +10 -0
- tccli/services/ses/v20201002/api.json +50 -0
- tccli/services/ses/v20201002/examples.json +6 -0
- tccli/services/ssl/v20191205/api.json +20 -1
- tccli/services/ssl/v20191205/examples.json +1 -1
- tccli/services/teo/teo_client.py +724 -141
- tccli/services/teo/v20220901/api.json +993 -106
- tccli/services/teo/v20220901/examples.json +112 -0
- tccli/services/tke/v20180525/api.json +7 -4
- tccli/services/vpc/v20170312/api.json +1273 -17
- tccli/services/vpc/v20170312/examples.json +176 -0
- tccli/services/vpc/vpc_client.py +1315 -149
- {tccli-3.0.1200.1.dist-info → tccli-3.0.1202.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1200.1.dist-info → tccli-3.0.1202.1.dist-info}/RECORD +43 -39
- {tccli-3.0.1200.1.dist-info → tccli-3.0.1202.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1200.1.dist-info → tccli-3.0.1202.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1200.1.dist-info → tccli-3.0.1202.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/vpc/vpc_client.py
CHANGED
@@ -1577,6 +1577,58 @@ def doAllocateAddresses(args, parsed_globals):
|
|
1577
1577
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1578
1578
|
|
1579
1579
|
|
1580
|
+
def doDeleteCdcLDCXList(args, parsed_globals):
|
1581
|
+
g_param = parse_global_arg(parsed_globals)
|
1582
|
+
|
1583
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1584
|
+
cred = credential.CVMRoleCredential()
|
1585
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1586
|
+
cred = credential.STSAssumeRoleCredential(
|
1587
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1588
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1589
|
+
)
|
1590
|
+
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):
|
1591
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1592
|
+
else:
|
1593
|
+
cred = credential.Credential(
|
1594
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1595
|
+
)
|
1596
|
+
http_profile = HttpProfile(
|
1597
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1598
|
+
reqMethod="POST",
|
1599
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1600
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1601
|
+
)
|
1602
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1603
|
+
if g_param[OptionsDefine.Language]:
|
1604
|
+
profile.language = g_param[OptionsDefine.Language]
|
1605
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1606
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
1607
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1608
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1609
|
+
model = models.DeleteCdcLDCXListRequest()
|
1610
|
+
model.from_json_string(json.dumps(args))
|
1611
|
+
start_time = time.time()
|
1612
|
+
while True:
|
1613
|
+
rsp = client.DeleteCdcLDCXList(model)
|
1614
|
+
result = rsp.to_json_string()
|
1615
|
+
try:
|
1616
|
+
json_obj = json.loads(result)
|
1617
|
+
except TypeError as e:
|
1618
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1619
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1620
|
+
break
|
1621
|
+
cur_time = time.time()
|
1622
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1623
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1624
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1625
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1626
|
+
else:
|
1627
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1628
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1629
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1630
|
+
|
1631
|
+
|
1580
1632
|
def doDescribeIp6Addresses(args, parsed_globals):
|
1581
1633
|
g_param = parse_global_arg(parsed_globals)
|
1582
1634
|
|
@@ -1837,6 +1889,58 @@ def doDescribeNetDetectStates(args, parsed_globals):
|
|
1837
1889
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1838
1890
|
|
1839
1891
|
|
1892
|
+
def doModifyCdcNetPlaneAttribute(args, parsed_globals):
|
1893
|
+
g_param = parse_global_arg(parsed_globals)
|
1894
|
+
|
1895
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1896
|
+
cred = credential.CVMRoleCredential()
|
1897
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1898
|
+
cred = credential.STSAssumeRoleCredential(
|
1899
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1900
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1901
|
+
)
|
1902
|
+
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):
|
1903
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1904
|
+
else:
|
1905
|
+
cred = credential.Credential(
|
1906
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1907
|
+
)
|
1908
|
+
http_profile = HttpProfile(
|
1909
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1910
|
+
reqMethod="POST",
|
1911
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1912
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1913
|
+
)
|
1914
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1915
|
+
if g_param[OptionsDefine.Language]:
|
1916
|
+
profile.language = g_param[OptionsDefine.Language]
|
1917
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1918
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
1919
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1920
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1921
|
+
model = models.ModifyCdcNetPlaneAttributeRequest()
|
1922
|
+
model.from_json_string(json.dumps(args))
|
1923
|
+
start_time = time.time()
|
1924
|
+
while True:
|
1925
|
+
rsp = client.ModifyCdcNetPlaneAttribute(model)
|
1926
|
+
result = rsp.to_json_string()
|
1927
|
+
try:
|
1928
|
+
json_obj = json.loads(result)
|
1929
|
+
except TypeError as e:
|
1930
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1931
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1932
|
+
break
|
1933
|
+
cur_time = time.time()
|
1934
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1935
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1936
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1937
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1938
|
+
else:
|
1939
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1940
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1941
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1942
|
+
|
1943
|
+
|
1840
1944
|
def doDescribeCcns(args, parsed_globals):
|
1841
1945
|
g_param = parse_global_arg(parsed_globals)
|
1842
1946
|
|
@@ -3033,6 +3137,58 @@ def doWithdrawNotifyRoutes(args, parsed_globals):
|
|
3033
3137
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3034
3138
|
|
3035
3139
|
|
3140
|
+
def doCreateCdcNetPlanes(args, parsed_globals):
|
3141
|
+
g_param = parse_global_arg(parsed_globals)
|
3142
|
+
|
3143
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3144
|
+
cred = credential.CVMRoleCredential()
|
3145
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3146
|
+
cred = credential.STSAssumeRoleCredential(
|
3147
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3148
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3149
|
+
)
|
3150
|
+
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):
|
3151
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3152
|
+
else:
|
3153
|
+
cred = credential.Credential(
|
3154
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3155
|
+
)
|
3156
|
+
http_profile = HttpProfile(
|
3157
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3158
|
+
reqMethod="POST",
|
3159
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3160
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3161
|
+
)
|
3162
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3163
|
+
if g_param[OptionsDefine.Language]:
|
3164
|
+
profile.language = g_param[OptionsDefine.Language]
|
3165
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3166
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
3167
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3168
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3169
|
+
model = models.CreateCdcNetPlanesRequest()
|
3170
|
+
model.from_json_string(json.dumps(args))
|
3171
|
+
start_time = time.time()
|
3172
|
+
while True:
|
3173
|
+
rsp = client.CreateCdcNetPlanes(model)
|
3174
|
+
result = rsp.to_json_string()
|
3175
|
+
try:
|
3176
|
+
json_obj = json.loads(result)
|
3177
|
+
except TypeError as e:
|
3178
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3179
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3180
|
+
break
|
3181
|
+
cur_time = time.time()
|
3182
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3183
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3184
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3185
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3186
|
+
else:
|
3187
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3188
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3189
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3190
|
+
|
3191
|
+
|
3036
3192
|
def doDeleteRoutes(args, parsed_globals):
|
3037
3193
|
g_param = parse_global_arg(parsed_globals)
|
3038
3194
|
|
@@ -3137,6 +3293,58 @@ def doInquiryPriceCreateVpnGateway(args, parsed_globals):
|
|
3137
3293
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3138
3294
|
|
3139
3295
|
|
3296
|
+
def doDeleteHighPriorityRouteTables(args, parsed_globals):
|
3297
|
+
g_param = parse_global_arg(parsed_globals)
|
3298
|
+
|
3299
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3300
|
+
cred = credential.CVMRoleCredential()
|
3301
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3302
|
+
cred = credential.STSAssumeRoleCredential(
|
3303
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3304
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3305
|
+
)
|
3306
|
+
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):
|
3307
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3308
|
+
else:
|
3309
|
+
cred = credential.Credential(
|
3310
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3311
|
+
)
|
3312
|
+
http_profile = HttpProfile(
|
3313
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3314
|
+
reqMethod="POST",
|
3315
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3316
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3317
|
+
)
|
3318
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3319
|
+
if g_param[OptionsDefine.Language]:
|
3320
|
+
profile.language = g_param[OptionsDefine.Language]
|
3321
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3322
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
3323
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3324
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3325
|
+
model = models.DeleteHighPriorityRouteTablesRequest()
|
3326
|
+
model.from_json_string(json.dumps(args))
|
3327
|
+
start_time = time.time()
|
3328
|
+
while True:
|
3329
|
+
rsp = client.DeleteHighPriorityRouteTables(model)
|
3330
|
+
result = rsp.to_json_string()
|
3331
|
+
try:
|
3332
|
+
json_obj = json.loads(result)
|
3333
|
+
except TypeError as e:
|
3334
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3335
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3336
|
+
break
|
3337
|
+
cur_time = time.time()
|
3338
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3339
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3340
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3341
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3342
|
+
else:
|
3343
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3344
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3345
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3346
|
+
|
3347
|
+
|
3140
3348
|
def doDescribeCrossBorderCompliance(args, parsed_globals):
|
3141
3349
|
g_param = parse_global_arg(parsed_globals)
|
3142
3350
|
|
@@ -3189,7 +3397,7 @@ def doDescribeCrossBorderCompliance(args, parsed_globals):
|
|
3189
3397
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3190
3398
|
|
3191
3399
|
|
3192
|
-
def
|
3400
|
+
def doCreateSecurityGroup(args, parsed_globals):
|
3193
3401
|
g_param = parse_global_arg(parsed_globals)
|
3194
3402
|
|
3195
3403
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3218,11 +3426,11 @@ def doReturnNormalAddresses(args, parsed_globals):
|
|
3218
3426
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
3219
3427
|
client._sdkVersion += ("_CLI_" + __version__)
|
3220
3428
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3221
|
-
model = models.
|
3429
|
+
model = models.CreateSecurityGroupRequest()
|
3222
3430
|
model.from_json_string(json.dumps(args))
|
3223
3431
|
start_time = time.time()
|
3224
3432
|
while True:
|
3225
|
-
rsp = client.
|
3433
|
+
rsp = client.CreateSecurityGroup(model)
|
3226
3434
|
result = rsp.to_json_string()
|
3227
3435
|
try:
|
3228
3436
|
json_obj = json.loads(result)
|
@@ -4385,7 +4593,7 @@ def doReleaseAddresses(args, parsed_globals):
|
|
4385
4593
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4386
4594
|
|
4387
4595
|
|
4388
|
-
def
|
4596
|
+
def doReplaceRoutes(args, parsed_globals):
|
4389
4597
|
g_param = parse_global_arg(parsed_globals)
|
4390
4598
|
|
4391
4599
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4414,11 +4622,11 @@ def doModifyGatewayFlowQos(args, parsed_globals):
|
|
4414
4622
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
4415
4623
|
client._sdkVersion += ("_CLI_" + __version__)
|
4416
4624
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4417
|
-
model = models.
|
4625
|
+
model = models.ReplaceRoutesRequest()
|
4418
4626
|
model.from_json_string(json.dumps(args))
|
4419
4627
|
start_time = time.time()
|
4420
4628
|
while True:
|
4421
|
-
rsp = client.
|
4629
|
+
rsp = client.ReplaceRoutes(model)
|
4422
4630
|
result = rsp.to_json_string()
|
4423
4631
|
try:
|
4424
4632
|
json_obj = json.loads(result)
|
@@ -6881,7 +7089,7 @@ def doDescribeVpcPeeringConnections(args, parsed_globals):
|
|
6881
7089
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6882
7090
|
|
6883
7091
|
|
6884
|
-
def
|
7092
|
+
def doCreateHighPriorityRouteTable(args, parsed_globals):
|
6885
7093
|
g_param = parse_global_arg(parsed_globals)
|
6886
7094
|
|
6887
7095
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -6910,11 +7118,11 @@ def doReplaceRoutes(args, parsed_globals):
|
|
6910
7118
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
6911
7119
|
client._sdkVersion += ("_CLI_" + __version__)
|
6912
7120
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6913
|
-
model = models.
|
7121
|
+
model = models.CreateHighPriorityRouteTableRequest()
|
6914
7122
|
model.from_json_string(json.dumps(args))
|
6915
7123
|
start_time = time.time()
|
6916
7124
|
while True:
|
6917
|
-
rsp = client.
|
7125
|
+
rsp = client.CreateHighPriorityRouteTable(model)
|
6918
7126
|
result = rsp.to_json_string()
|
6919
7127
|
try:
|
6920
7128
|
json_obj = json.loads(result)
|
@@ -6933,7 +7141,7 @@ def doReplaceRoutes(args, parsed_globals):
|
|
6933
7141
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6934
7142
|
|
6935
7143
|
|
6936
|
-
def
|
7144
|
+
def doModifyGatewayFlowQos(args, parsed_globals):
|
6937
7145
|
g_param = parse_global_arg(parsed_globals)
|
6938
7146
|
|
6939
7147
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -6962,11 +7170,11 @@ def doDescribeRouteConflicts(args, parsed_globals):
|
|
6962
7170
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
6963
7171
|
client._sdkVersion += ("_CLI_" + __version__)
|
6964
7172
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6965
|
-
model = models.
|
7173
|
+
model = models.ModifyGatewayFlowQosRequest()
|
6966
7174
|
model.from_json_string(json.dumps(args))
|
6967
7175
|
start_time = time.time()
|
6968
7176
|
while True:
|
6969
|
-
rsp = client.
|
7177
|
+
rsp = client.ModifyGatewayFlowQos(model)
|
6970
7178
|
result = rsp.to_json_string()
|
6971
7179
|
try:
|
6972
7180
|
json_obj = json.loads(result)
|
@@ -6985,7 +7193,7 @@ def doDescribeRouteConflicts(args, parsed_globals):
|
|
6985
7193
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6986
7194
|
|
6987
7195
|
|
6988
|
-
def
|
7196
|
+
def doDescribeRouteConflicts(args, parsed_globals):
|
6989
7197
|
g_param = parse_global_arg(parsed_globals)
|
6990
7198
|
|
6991
7199
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -7014,11 +7222,11 @@ def doDownloadCustomerGatewayConfiguration(args, parsed_globals):
|
|
7014
7222
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
7015
7223
|
client._sdkVersion += ("_CLI_" + __version__)
|
7016
7224
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7017
|
-
model = models.
|
7225
|
+
model = models.DescribeRouteConflictsRequest()
|
7018
7226
|
model.from_json_string(json.dumps(args))
|
7019
7227
|
start_time = time.time()
|
7020
7228
|
while True:
|
7021
|
-
rsp = client.
|
7229
|
+
rsp = client.DescribeRouteConflicts(model)
|
7022
7230
|
result = rsp.to_json_string()
|
7023
7231
|
try:
|
7024
7232
|
json_obj = json.loads(result)
|
@@ -7037,7 +7245,7 @@ def doDownloadCustomerGatewayConfiguration(args, parsed_globals):
|
|
7037
7245
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7038
7246
|
|
7039
7247
|
|
7040
|
-
def
|
7248
|
+
def doDownloadCustomerGatewayConfiguration(args, parsed_globals):
|
7041
7249
|
g_param = parse_global_arg(parsed_globals)
|
7042
7250
|
|
7043
7251
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -7066,11 +7274,11 @@ def doAssociateDhcpIpWithAddressIp(args, parsed_globals):
|
|
7066
7274
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
7067
7275
|
client._sdkVersion += ("_CLI_" + __version__)
|
7068
7276
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7069
|
-
model = models.
|
7277
|
+
model = models.DownloadCustomerGatewayConfigurationRequest()
|
7070
7278
|
model.from_json_string(json.dumps(args))
|
7071
7279
|
start_time = time.time()
|
7072
7280
|
while True:
|
7073
|
-
rsp = client.
|
7281
|
+
rsp = client.DownloadCustomerGatewayConfiguration(model)
|
7074
7282
|
result = rsp.to_json_string()
|
7075
7283
|
try:
|
7076
7284
|
json_obj = json.loads(result)
|
@@ -7089,7 +7297,7 @@ def doAssociateDhcpIpWithAddressIp(args, parsed_globals):
|
|
7089
7297
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7090
7298
|
|
7091
7299
|
|
7092
|
-
def
|
7300
|
+
def doAssociateDhcpIpWithAddressIp(args, parsed_globals):
|
7093
7301
|
g_param = parse_global_arg(parsed_globals)
|
7094
7302
|
|
7095
7303
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -7118,11 +7326,11 @@ def doDeleteServiceTemplate(args, parsed_globals):
|
|
7118
7326
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
7119
7327
|
client._sdkVersion += ("_CLI_" + __version__)
|
7120
7328
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7121
|
-
model = models.
|
7329
|
+
model = models.AssociateDhcpIpWithAddressIpRequest()
|
7122
7330
|
model.from_json_string(json.dumps(args))
|
7123
7331
|
start_time = time.time()
|
7124
7332
|
while True:
|
7125
|
-
rsp = client.
|
7333
|
+
rsp = client.AssociateDhcpIpWithAddressIp(model)
|
7126
7334
|
result = rsp.to_json_string()
|
7127
7335
|
try:
|
7128
7336
|
json_obj = json.loads(result)
|
@@ -7141,7 +7349,7 @@ def doDeleteServiceTemplate(args, parsed_globals):
|
|
7141
7349
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7142
7350
|
|
7143
7351
|
|
7144
|
-
def
|
7352
|
+
def doDeleteServiceTemplate(args, parsed_globals):
|
7145
7353
|
g_param = parse_global_arg(parsed_globals)
|
7146
7354
|
|
7147
7355
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -7170,11 +7378,11 @@ def doUnassignPrivateIpAddresses(args, parsed_globals):
|
|
7170
7378
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
7171
7379
|
client._sdkVersion += ("_CLI_" + __version__)
|
7172
7380
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7173
|
-
model = models.
|
7381
|
+
model = models.DeleteServiceTemplateRequest()
|
7174
7382
|
model.from_json_string(json.dumps(args))
|
7175
7383
|
start_time = time.time()
|
7176
7384
|
while True:
|
7177
|
-
rsp = client.
|
7385
|
+
rsp = client.DeleteServiceTemplate(model)
|
7178
7386
|
result = rsp.to_json_string()
|
7179
7387
|
try:
|
7180
7388
|
json_obj = json.loads(result)
|
@@ -7193,7 +7401,7 @@ def doUnassignPrivateIpAddresses(args, parsed_globals):
|
|
7193
7401
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7194
7402
|
|
7195
7403
|
|
7196
|
-
def
|
7404
|
+
def doUnassignPrivateIpAddresses(args, parsed_globals):
|
7197
7405
|
g_param = parse_global_arg(parsed_globals)
|
7198
7406
|
|
7199
7407
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -7222,11 +7430,11 @@ def doModifyAddressTemplateGroupAttribute(args, parsed_globals):
|
|
7222
7430
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
7223
7431
|
client._sdkVersion += ("_CLI_" + __version__)
|
7224
7432
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7225
|
-
model = models.
|
7433
|
+
model = models.UnassignPrivateIpAddressesRequest()
|
7226
7434
|
model.from_json_string(json.dumps(args))
|
7227
7435
|
start_time = time.time()
|
7228
7436
|
while True:
|
7229
|
-
rsp = client.
|
7437
|
+
rsp = client.UnassignPrivateIpAddresses(model)
|
7230
7438
|
result = rsp.to_json_string()
|
7231
7439
|
try:
|
7232
7440
|
json_obj = json.loads(result)
|
@@ -7245,7 +7453,7 @@ def doModifyAddressTemplateGroupAttribute(args, parsed_globals):
|
|
7245
7453
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7246
7454
|
|
7247
7455
|
|
7248
|
-
def
|
7456
|
+
def doModifyAddressTemplateGroupAttribute(args, parsed_globals):
|
7249
7457
|
g_param = parse_global_arg(parsed_globals)
|
7250
7458
|
|
7251
7459
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -7274,11 +7482,11 @@ def doCreateIp6Translators(args, parsed_globals):
|
|
7274
7482
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
7275
7483
|
client._sdkVersion += ("_CLI_" + __version__)
|
7276
7484
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7277
|
-
model = models.
|
7485
|
+
model = models.ModifyAddressTemplateGroupAttributeRequest()
|
7278
7486
|
model.from_json_string(json.dumps(args))
|
7279
7487
|
start_time = time.time()
|
7280
7488
|
while True:
|
7281
|
-
rsp = client.
|
7489
|
+
rsp = client.ModifyAddressTemplateGroupAttribute(model)
|
7282
7490
|
result = rsp.to_json_string()
|
7283
7491
|
try:
|
7284
7492
|
json_obj = json.loads(result)
|
@@ -7297,7 +7505,7 @@ def doCreateIp6Translators(args, parsed_globals):
|
|
7297
7505
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7298
7506
|
|
7299
7507
|
|
7300
|
-
def
|
7508
|
+
def doCreateIp6Translators(args, parsed_globals):
|
7301
7509
|
g_param = parse_global_arg(parsed_globals)
|
7302
7510
|
|
7303
7511
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -7326,7 +7534,59 @@ def doCreateDefaultVpc(args, parsed_globals):
|
|
7326
7534
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
7327
7535
|
client._sdkVersion += ("_CLI_" + __version__)
|
7328
7536
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7329
|
-
model = models.
|
7537
|
+
model = models.CreateIp6TranslatorsRequest()
|
7538
|
+
model.from_json_string(json.dumps(args))
|
7539
|
+
start_time = time.time()
|
7540
|
+
while True:
|
7541
|
+
rsp = client.CreateIp6Translators(model)
|
7542
|
+
result = rsp.to_json_string()
|
7543
|
+
try:
|
7544
|
+
json_obj = json.loads(result)
|
7545
|
+
except TypeError as e:
|
7546
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
7547
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
7548
|
+
break
|
7549
|
+
cur_time = time.time()
|
7550
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
7551
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
7552
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
7553
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
7554
|
+
else:
|
7555
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
7556
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
7557
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7558
|
+
|
7559
|
+
|
7560
|
+
def doCreateDefaultVpc(args, parsed_globals):
|
7561
|
+
g_param = parse_global_arg(parsed_globals)
|
7562
|
+
|
7563
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
7564
|
+
cred = credential.CVMRoleCredential()
|
7565
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7566
|
+
cred = credential.STSAssumeRoleCredential(
|
7567
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7568
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7569
|
+
)
|
7570
|
+
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):
|
7571
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
7572
|
+
else:
|
7573
|
+
cred = credential.Credential(
|
7574
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
7575
|
+
)
|
7576
|
+
http_profile = HttpProfile(
|
7577
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
7578
|
+
reqMethod="POST",
|
7579
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
7580
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
7581
|
+
)
|
7582
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
7583
|
+
if g_param[OptionsDefine.Language]:
|
7584
|
+
profile.language = g_param[OptionsDefine.Language]
|
7585
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
7586
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
7587
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
7588
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7589
|
+
model = models.CreateDefaultVpcRequest()
|
7330
7590
|
model.from_json_string(json.dumps(args))
|
7331
7591
|
start_time = time.time()
|
7332
7592
|
while True:
|
@@ -10209,6 +10469,58 @@ def doDescribeCustomerGatewayVendors(args, parsed_globals):
|
|
10209
10469
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10210
10470
|
|
10211
10471
|
|
10472
|
+
def doDeleteCdcNetPlanes(args, parsed_globals):
|
10473
|
+
g_param = parse_global_arg(parsed_globals)
|
10474
|
+
|
10475
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
10476
|
+
cred = credential.CVMRoleCredential()
|
10477
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10478
|
+
cred = credential.STSAssumeRoleCredential(
|
10479
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10480
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10481
|
+
)
|
10482
|
+
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):
|
10483
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
10484
|
+
else:
|
10485
|
+
cred = credential.Credential(
|
10486
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
10487
|
+
)
|
10488
|
+
http_profile = HttpProfile(
|
10489
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
10490
|
+
reqMethod="POST",
|
10491
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
10492
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
10493
|
+
)
|
10494
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
10495
|
+
if g_param[OptionsDefine.Language]:
|
10496
|
+
profile.language = g_param[OptionsDefine.Language]
|
10497
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
10498
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
10499
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
10500
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10501
|
+
model = models.DeleteCdcNetPlanesRequest()
|
10502
|
+
model.from_json_string(json.dumps(args))
|
10503
|
+
start_time = time.time()
|
10504
|
+
while True:
|
10505
|
+
rsp = client.DeleteCdcNetPlanes(model)
|
10506
|
+
result = rsp.to_json_string()
|
10507
|
+
try:
|
10508
|
+
json_obj = json.loads(result)
|
10509
|
+
except TypeError as e:
|
10510
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
10511
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
10512
|
+
break
|
10513
|
+
cur_time = time.time()
|
10514
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
10515
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
10516
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
10517
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
10518
|
+
else:
|
10519
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
10520
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
10521
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10522
|
+
|
10523
|
+
|
10212
10524
|
def doDeleteLocalGateway(args, parsed_globals):
|
10213
10525
|
g_param = parse_global_arg(parsed_globals)
|
10214
10526
|
|
@@ -11041,7 +11353,7 @@ def doDescribePrivateNatGatewayDestinationIpPortTranslationNatRules(args, parsed
|
|
11041
11353
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11042
11354
|
|
11043
11355
|
|
11044
|
-
def
|
11356
|
+
def doDescribeHighPriorityRoutes(args, parsed_globals):
|
11045
11357
|
g_param = parse_global_arg(parsed_globals)
|
11046
11358
|
|
11047
11359
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -11070,11 +11382,11 @@ def doDisableVpnGatewaySslClientCert(args, parsed_globals):
|
|
11070
11382
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
11071
11383
|
client._sdkVersion += ("_CLI_" + __version__)
|
11072
11384
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11073
|
-
model = models.
|
11385
|
+
model = models.DescribeHighPriorityRoutesRequest()
|
11074
11386
|
model.from_json_string(json.dumps(args))
|
11075
11387
|
start_time = time.time()
|
11076
11388
|
while True:
|
11077
|
-
rsp = client.
|
11389
|
+
rsp = client.DescribeHighPriorityRoutes(model)
|
11078
11390
|
result = rsp.to_json_string()
|
11079
11391
|
try:
|
11080
11392
|
json_obj = json.loads(result)
|
@@ -11145,6 +11457,58 @@ def doDisassociateAddress(args, parsed_globals):
|
|
11145
11457
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11146
11458
|
|
11147
11459
|
|
11460
|
+
def doDescribeCdcLDCXList(args, parsed_globals):
|
11461
|
+
g_param = parse_global_arg(parsed_globals)
|
11462
|
+
|
11463
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
11464
|
+
cred = credential.CVMRoleCredential()
|
11465
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11466
|
+
cred = credential.STSAssumeRoleCredential(
|
11467
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11468
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11469
|
+
)
|
11470
|
+
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):
|
11471
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
11472
|
+
else:
|
11473
|
+
cred = credential.Credential(
|
11474
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
11475
|
+
)
|
11476
|
+
http_profile = HttpProfile(
|
11477
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
11478
|
+
reqMethod="POST",
|
11479
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
11480
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
11481
|
+
)
|
11482
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
11483
|
+
if g_param[OptionsDefine.Language]:
|
11484
|
+
profile.language = g_param[OptionsDefine.Language]
|
11485
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
11486
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
11487
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
11488
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11489
|
+
model = models.DescribeCdcLDCXListRequest()
|
11490
|
+
model.from_json_string(json.dumps(args))
|
11491
|
+
start_time = time.time()
|
11492
|
+
while True:
|
11493
|
+
rsp = client.DescribeCdcLDCXList(model)
|
11494
|
+
result = rsp.to_json_string()
|
11495
|
+
try:
|
11496
|
+
json_obj = json.loads(result)
|
11497
|
+
except TypeError as e:
|
11498
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
11499
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
11500
|
+
break
|
11501
|
+
cur_time = time.time()
|
11502
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
11503
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
11504
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
11505
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
11506
|
+
else:
|
11507
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
11508
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
11509
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11510
|
+
|
11511
|
+
|
11148
11512
|
def doModifyIp6Rule(args, parsed_globals):
|
11149
11513
|
g_param = parse_global_arg(parsed_globals)
|
11150
11514
|
|
@@ -11561,6 +11925,58 @@ def doModifyCcnRouteTables(args, parsed_globals):
|
|
11561
11925
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11562
11926
|
|
11563
11927
|
|
11928
|
+
def doModifyHighPriorityRouteECMPAlgorithm(args, parsed_globals):
|
11929
|
+
g_param = parse_global_arg(parsed_globals)
|
11930
|
+
|
11931
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
11932
|
+
cred = credential.CVMRoleCredential()
|
11933
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11934
|
+
cred = credential.STSAssumeRoleCredential(
|
11935
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11936
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11937
|
+
)
|
11938
|
+
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):
|
11939
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
11940
|
+
else:
|
11941
|
+
cred = credential.Credential(
|
11942
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
11943
|
+
)
|
11944
|
+
http_profile = HttpProfile(
|
11945
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
11946
|
+
reqMethod="POST",
|
11947
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
11948
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
11949
|
+
)
|
11950
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
11951
|
+
if g_param[OptionsDefine.Language]:
|
11952
|
+
profile.language = g_param[OptionsDefine.Language]
|
11953
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
11954
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
11955
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
11956
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11957
|
+
model = models.ModifyHighPriorityRouteECMPAlgorithmRequest()
|
11958
|
+
model.from_json_string(json.dumps(args))
|
11959
|
+
start_time = time.time()
|
11960
|
+
while True:
|
11961
|
+
rsp = client.ModifyHighPriorityRouteECMPAlgorithm(model)
|
11962
|
+
result = rsp.to_json_string()
|
11963
|
+
try:
|
11964
|
+
json_obj = json.loads(result)
|
11965
|
+
except TypeError as e:
|
11966
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
11967
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
11968
|
+
break
|
11969
|
+
cur_time = time.time()
|
11970
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
11971
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
11972
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
11973
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
11974
|
+
else:
|
11975
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
11976
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
11977
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11978
|
+
|
11979
|
+
|
11564
11980
|
def doDeleteNatGatewaySourceIpTranslationNatRule(args, parsed_globals):
|
11565
11981
|
g_param = parse_global_arg(parsed_globals)
|
11566
11982
|
|
@@ -12133,6 +12549,58 @@ def doDeleteVpcEndPoint(args, parsed_globals):
|
|
12133
12549
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12134
12550
|
|
12135
12551
|
|
12552
|
+
def doDeleteHighPriorityRoutes(args, parsed_globals):
|
12553
|
+
g_param = parse_global_arg(parsed_globals)
|
12554
|
+
|
12555
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
12556
|
+
cred = credential.CVMRoleCredential()
|
12557
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12558
|
+
cred = credential.STSAssumeRoleCredential(
|
12559
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12560
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12561
|
+
)
|
12562
|
+
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):
|
12563
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
12564
|
+
else:
|
12565
|
+
cred = credential.Credential(
|
12566
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
12567
|
+
)
|
12568
|
+
http_profile = HttpProfile(
|
12569
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
12570
|
+
reqMethod="POST",
|
12571
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
12572
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
12573
|
+
)
|
12574
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
12575
|
+
if g_param[OptionsDefine.Language]:
|
12576
|
+
profile.language = g_param[OptionsDefine.Language]
|
12577
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
12578
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
12579
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
12580
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
12581
|
+
model = models.DeleteHighPriorityRoutesRequest()
|
12582
|
+
model.from_json_string(json.dumps(args))
|
12583
|
+
start_time = time.time()
|
12584
|
+
while True:
|
12585
|
+
rsp = client.DeleteHighPriorityRoutes(model)
|
12586
|
+
result = rsp.to_json_string()
|
12587
|
+
try:
|
12588
|
+
json_obj = json.loads(result)
|
12589
|
+
except TypeError as e:
|
12590
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
12591
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
12592
|
+
break
|
12593
|
+
cur_time = time.time()
|
12594
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
12595
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
12596
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
12597
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
12598
|
+
else:
|
12599
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
12600
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
12601
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12602
|
+
|
12603
|
+
|
12136
12604
|
def doCreateServiceTemplate(args, parsed_globals):
|
12137
12605
|
g_param = parse_global_arg(parsed_globals)
|
12138
12606
|
|
@@ -12705,7 +13173,7 @@ def doDescribeVpnGateways(args, parsed_globals):
|
|
12705
13173
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12706
13174
|
|
12707
13175
|
|
12708
|
-
def
|
13176
|
+
def doDownloadVpnGatewaySslClientCert(args, parsed_globals):
|
12709
13177
|
g_param = parse_global_arg(parsed_globals)
|
12710
13178
|
|
12711
13179
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -12734,11 +13202,63 @@ def doAssociateNetworkInterfaceSecurityGroups(args, parsed_globals):
|
|
12734
13202
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
12735
13203
|
client._sdkVersion += ("_CLI_" + __version__)
|
12736
13204
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
12737
|
-
model = models.
|
13205
|
+
model = models.DownloadVpnGatewaySslClientCertRequest()
|
12738
13206
|
model.from_json_string(json.dumps(args))
|
12739
13207
|
start_time = time.time()
|
12740
13208
|
while True:
|
12741
|
-
rsp = client.
|
13209
|
+
rsp = client.DownloadVpnGatewaySslClientCert(model)
|
13210
|
+
result = rsp.to_json_string()
|
13211
|
+
try:
|
13212
|
+
json_obj = json.loads(result)
|
13213
|
+
except TypeError as e:
|
13214
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
13215
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
13216
|
+
break
|
13217
|
+
cur_time = time.time()
|
13218
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
13219
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
13220
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
13221
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
13222
|
+
else:
|
13223
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
13224
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
13225
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13226
|
+
|
13227
|
+
|
13228
|
+
def doReplaceHighPriorityRouteTableAssociation(args, parsed_globals):
|
13229
|
+
g_param = parse_global_arg(parsed_globals)
|
13230
|
+
|
13231
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
13232
|
+
cred = credential.CVMRoleCredential()
|
13233
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13234
|
+
cred = credential.STSAssumeRoleCredential(
|
13235
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13236
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13237
|
+
)
|
13238
|
+
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):
|
13239
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
13240
|
+
else:
|
13241
|
+
cred = credential.Credential(
|
13242
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
13243
|
+
)
|
13244
|
+
http_profile = HttpProfile(
|
13245
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
13246
|
+
reqMethod="POST",
|
13247
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
13248
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
13249
|
+
)
|
13250
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
13251
|
+
if g_param[OptionsDefine.Language]:
|
13252
|
+
profile.language = g_param[OptionsDefine.Language]
|
13253
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
13254
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13255
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
13256
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13257
|
+
model = models.ReplaceHighPriorityRouteTableAssociationRequest()
|
13258
|
+
model.from_json_string(json.dumps(args))
|
13259
|
+
start_time = time.time()
|
13260
|
+
while True:
|
13261
|
+
rsp = client.ReplaceHighPriorityRouteTableAssociation(model)
|
12742
13262
|
result = rsp.to_json_string()
|
12743
13263
|
try:
|
12744
13264
|
json_obj = json.loads(result)
|
@@ -12809,6 +13329,58 @@ def doEnableFlowLogs(args, parsed_globals):
|
|
12809
13329
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12810
13330
|
|
12811
13331
|
|
13332
|
+
def doCreateCdcLDCXList(args, parsed_globals):
|
13333
|
+
g_param = parse_global_arg(parsed_globals)
|
13334
|
+
|
13335
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
13336
|
+
cred = credential.CVMRoleCredential()
|
13337
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13338
|
+
cred = credential.STSAssumeRoleCredential(
|
13339
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13340
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13341
|
+
)
|
13342
|
+
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):
|
13343
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
13344
|
+
else:
|
13345
|
+
cred = credential.Credential(
|
13346
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
13347
|
+
)
|
13348
|
+
http_profile = HttpProfile(
|
13349
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
13350
|
+
reqMethod="POST",
|
13351
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
13352
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
13353
|
+
)
|
13354
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
13355
|
+
if g_param[OptionsDefine.Language]:
|
13356
|
+
profile.language = g_param[OptionsDefine.Language]
|
13357
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
13358
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13359
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
13360
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13361
|
+
model = models.CreateCdcLDCXListRequest()
|
13362
|
+
model.from_json_string(json.dumps(args))
|
13363
|
+
start_time = time.time()
|
13364
|
+
while True:
|
13365
|
+
rsp = client.CreateCdcLDCXList(model)
|
13366
|
+
result = rsp.to_json_string()
|
13367
|
+
try:
|
13368
|
+
json_obj = json.loads(result)
|
13369
|
+
except TypeError as e:
|
13370
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
13371
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
13372
|
+
break
|
13373
|
+
cur_time = time.time()
|
13374
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
13375
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
13376
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
13377
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
13378
|
+
else:
|
13379
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
13380
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
13381
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13382
|
+
|
13383
|
+
|
12812
13384
|
def doModifyNatGatewayDestinationIpPortTranslationNatRule(args, parsed_globals):
|
12813
13385
|
g_param = parse_global_arg(parsed_globals)
|
12814
13386
|
|
@@ -12861,6 +13433,58 @@ def doModifyNatGatewayDestinationIpPortTranslationNatRule(args, parsed_globals):
|
|
12861
13433
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12862
13434
|
|
12863
13435
|
|
13436
|
+
def doDisableVpnGatewaySslClientCert(args, parsed_globals):
|
13437
|
+
g_param = parse_global_arg(parsed_globals)
|
13438
|
+
|
13439
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
13440
|
+
cred = credential.CVMRoleCredential()
|
13441
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13442
|
+
cred = credential.STSAssumeRoleCredential(
|
13443
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13444
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13445
|
+
)
|
13446
|
+
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):
|
13447
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
13448
|
+
else:
|
13449
|
+
cred = credential.Credential(
|
13450
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
13451
|
+
)
|
13452
|
+
http_profile = HttpProfile(
|
13453
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
13454
|
+
reqMethod="POST",
|
13455
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
13456
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
13457
|
+
)
|
13458
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
13459
|
+
if g_param[OptionsDefine.Language]:
|
13460
|
+
profile.language = g_param[OptionsDefine.Language]
|
13461
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
13462
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13463
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
13464
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13465
|
+
model = models.DisableVpnGatewaySslClientCertRequest()
|
13466
|
+
model.from_json_string(json.dumps(args))
|
13467
|
+
start_time = time.time()
|
13468
|
+
while True:
|
13469
|
+
rsp = client.DisableVpnGatewaySslClientCert(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
|
+
|
12864
13488
|
def doDescribeHaVips(args, parsed_globals):
|
12865
13489
|
g_param = parse_global_arg(parsed_globals)
|
12866
13490
|
|
@@ -13277,6 +13901,58 @@ def doDescribeTenantCcns(args, parsed_globals):
|
|
13277
13901
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13278
13902
|
|
13279
13903
|
|
13904
|
+
def doCreateHighPriorityRoutes(args, parsed_globals):
|
13905
|
+
g_param = parse_global_arg(parsed_globals)
|
13906
|
+
|
13907
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
13908
|
+
cred = credential.CVMRoleCredential()
|
13909
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13910
|
+
cred = credential.STSAssumeRoleCredential(
|
13911
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13912
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13913
|
+
)
|
13914
|
+
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):
|
13915
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
13916
|
+
else:
|
13917
|
+
cred = credential.Credential(
|
13918
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
13919
|
+
)
|
13920
|
+
http_profile = HttpProfile(
|
13921
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
13922
|
+
reqMethod="POST",
|
13923
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
13924
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
13925
|
+
)
|
13926
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
13927
|
+
if g_param[OptionsDefine.Language]:
|
13928
|
+
profile.language = g_param[OptionsDefine.Language]
|
13929
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
13930
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
13931
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
13932
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
13933
|
+
model = models.CreateHighPriorityRoutesRequest()
|
13934
|
+
model.from_json_string(json.dumps(args))
|
13935
|
+
start_time = time.time()
|
13936
|
+
while True:
|
13937
|
+
rsp = client.CreateHighPriorityRoutes(model)
|
13938
|
+
result = rsp.to_json_string()
|
13939
|
+
try:
|
13940
|
+
json_obj = json.loads(result)
|
13941
|
+
except TypeError as e:
|
13942
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
13943
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
13944
|
+
break
|
13945
|
+
cur_time = time.time()
|
13946
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
13947
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
13948
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
13949
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
13950
|
+
else:
|
13951
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
13952
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
13953
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
13954
|
+
|
13955
|
+
|
13280
13956
|
def doLockCcns(args, parsed_globals):
|
13281
13957
|
g_param = parse_global_arg(parsed_globals)
|
13282
13958
|
|
@@ -14369,6 +15045,58 @@ def doModifyVpcEndPointAttribute(args, parsed_globals):
|
|
14369
15045
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
14370
15046
|
|
14371
15047
|
|
15048
|
+
def doModifyHighPriorityRouteAttribute(args, parsed_globals):
|
15049
|
+
g_param = parse_global_arg(parsed_globals)
|
15050
|
+
|
15051
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
15052
|
+
cred = credential.CVMRoleCredential()
|
15053
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15054
|
+
cred = credential.STSAssumeRoleCredential(
|
15055
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15056
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15057
|
+
)
|
15058
|
+
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):
|
15059
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
15060
|
+
else:
|
15061
|
+
cred = credential.Credential(
|
15062
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
15063
|
+
)
|
15064
|
+
http_profile = HttpProfile(
|
15065
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
15066
|
+
reqMethod="POST",
|
15067
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
15068
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
15069
|
+
)
|
15070
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
15071
|
+
if g_param[OptionsDefine.Language]:
|
15072
|
+
profile.language = g_param[OptionsDefine.Language]
|
15073
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
15074
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15075
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
15076
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15077
|
+
model = models.ModifyHighPriorityRouteAttributeRequest()
|
15078
|
+
model.from_json_string(json.dumps(args))
|
15079
|
+
start_time = time.time()
|
15080
|
+
while True:
|
15081
|
+
rsp = client.ModifyHighPriorityRouteAttribute(model)
|
15082
|
+
result = rsp.to_json_string()
|
15083
|
+
try:
|
15084
|
+
json_obj = json.loads(result)
|
15085
|
+
except TypeError as e:
|
15086
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
15087
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
15088
|
+
break
|
15089
|
+
cur_time = time.time()
|
15090
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
15091
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
15092
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
15093
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
15094
|
+
else:
|
15095
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
15096
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
15097
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15098
|
+
|
15099
|
+
|
14372
15100
|
def doDisassociateVpcEndPointSecurityGroups(args, parsed_globals):
|
14373
15101
|
g_param = parse_global_arg(parsed_globals)
|
14374
15102
|
|
@@ -14658,11 +15386,375 @@ def doDescribeNatGateways(args, parsed_globals):
|
|
14658
15386
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
14659
15387
|
client._sdkVersion += ("_CLI_" + __version__)
|
14660
15388
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
14661
|
-
model = models.DescribeNatGatewaysRequest()
|
15389
|
+
model = models.DescribeNatGatewaysRequest()
|
15390
|
+
model.from_json_string(json.dumps(args))
|
15391
|
+
start_time = time.time()
|
15392
|
+
while True:
|
15393
|
+
rsp = client.DescribeNatGateways(model)
|
15394
|
+
result = rsp.to_json_string()
|
15395
|
+
try:
|
15396
|
+
json_obj = json.loads(result)
|
15397
|
+
except TypeError as e:
|
15398
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
15399
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
15400
|
+
break
|
15401
|
+
cur_time = time.time()
|
15402
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
15403
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
15404
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
15405
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
15406
|
+
else:
|
15407
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
15408
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
15409
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15410
|
+
|
15411
|
+
|
15412
|
+
def doResetHighPriorityRoutes(args, parsed_globals):
|
15413
|
+
g_param = parse_global_arg(parsed_globals)
|
15414
|
+
|
15415
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
15416
|
+
cred = credential.CVMRoleCredential()
|
15417
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15418
|
+
cred = credential.STSAssumeRoleCredential(
|
15419
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15420
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15421
|
+
)
|
15422
|
+
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):
|
15423
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
15424
|
+
else:
|
15425
|
+
cred = credential.Credential(
|
15426
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
15427
|
+
)
|
15428
|
+
http_profile = HttpProfile(
|
15429
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
15430
|
+
reqMethod="POST",
|
15431
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
15432
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
15433
|
+
)
|
15434
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
15435
|
+
if g_param[OptionsDefine.Language]:
|
15436
|
+
profile.language = g_param[OptionsDefine.Language]
|
15437
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
15438
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15439
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
15440
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15441
|
+
model = models.ResetHighPriorityRoutesRequest()
|
15442
|
+
model.from_json_string(json.dumps(args))
|
15443
|
+
start_time = time.time()
|
15444
|
+
while True:
|
15445
|
+
rsp = client.ResetHighPriorityRoutes(model)
|
15446
|
+
result = rsp.to_json_string()
|
15447
|
+
try:
|
15448
|
+
json_obj = json.loads(result)
|
15449
|
+
except TypeError as e:
|
15450
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
15451
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
15452
|
+
break
|
15453
|
+
cur_time = time.time()
|
15454
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
15455
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
15456
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
15457
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
15458
|
+
else:
|
15459
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
15460
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
15461
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15462
|
+
|
15463
|
+
|
15464
|
+
def doDescribeVpcs(args, parsed_globals):
|
15465
|
+
g_param = parse_global_arg(parsed_globals)
|
15466
|
+
|
15467
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
15468
|
+
cred = credential.CVMRoleCredential()
|
15469
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15470
|
+
cred = credential.STSAssumeRoleCredential(
|
15471
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15472
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15473
|
+
)
|
15474
|
+
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):
|
15475
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
15476
|
+
else:
|
15477
|
+
cred = credential.Credential(
|
15478
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
15479
|
+
)
|
15480
|
+
http_profile = HttpProfile(
|
15481
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
15482
|
+
reqMethod="POST",
|
15483
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
15484
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
15485
|
+
)
|
15486
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
15487
|
+
if g_param[OptionsDefine.Language]:
|
15488
|
+
profile.language = g_param[OptionsDefine.Language]
|
15489
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
15490
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15491
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
15492
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15493
|
+
model = models.DescribeVpcsRequest()
|
15494
|
+
model.from_json_string(json.dumps(args))
|
15495
|
+
start_time = time.time()
|
15496
|
+
while True:
|
15497
|
+
rsp = client.DescribeVpcs(model)
|
15498
|
+
result = rsp.to_json_string()
|
15499
|
+
try:
|
15500
|
+
json_obj = json.loads(result)
|
15501
|
+
except TypeError as e:
|
15502
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
15503
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
15504
|
+
break
|
15505
|
+
cur_time = time.time()
|
15506
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
15507
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
15508
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
15509
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
15510
|
+
else:
|
15511
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
15512
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
15513
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15514
|
+
|
15515
|
+
|
15516
|
+
def doDescribeHighPriorityRouteTables(args, parsed_globals):
|
15517
|
+
g_param = parse_global_arg(parsed_globals)
|
15518
|
+
|
15519
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
15520
|
+
cred = credential.CVMRoleCredential()
|
15521
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15522
|
+
cred = credential.STSAssumeRoleCredential(
|
15523
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15524
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15525
|
+
)
|
15526
|
+
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):
|
15527
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
15528
|
+
else:
|
15529
|
+
cred = credential.Credential(
|
15530
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
15531
|
+
)
|
15532
|
+
http_profile = HttpProfile(
|
15533
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
15534
|
+
reqMethod="POST",
|
15535
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
15536
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
15537
|
+
)
|
15538
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
15539
|
+
if g_param[OptionsDefine.Language]:
|
15540
|
+
profile.language = g_param[OptionsDefine.Language]
|
15541
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
15542
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15543
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
15544
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15545
|
+
model = models.DescribeHighPriorityRouteTablesRequest()
|
15546
|
+
model.from_json_string(json.dumps(args))
|
15547
|
+
start_time = time.time()
|
15548
|
+
while True:
|
15549
|
+
rsp = client.DescribeHighPriorityRouteTables(model)
|
15550
|
+
result = rsp.to_json_string()
|
15551
|
+
try:
|
15552
|
+
json_obj = json.loads(result)
|
15553
|
+
except TypeError as e:
|
15554
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
15555
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
15556
|
+
break
|
15557
|
+
cur_time = time.time()
|
15558
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
15559
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
15560
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
15561
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
15562
|
+
else:
|
15563
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
15564
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
15565
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15566
|
+
|
15567
|
+
|
15568
|
+
def doAcceptAttachCcnInstances(args, parsed_globals):
|
15569
|
+
g_param = parse_global_arg(parsed_globals)
|
15570
|
+
|
15571
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
15572
|
+
cred = credential.CVMRoleCredential()
|
15573
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15574
|
+
cred = credential.STSAssumeRoleCredential(
|
15575
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15576
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15577
|
+
)
|
15578
|
+
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):
|
15579
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
15580
|
+
else:
|
15581
|
+
cred = credential.Credential(
|
15582
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
15583
|
+
)
|
15584
|
+
http_profile = HttpProfile(
|
15585
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
15586
|
+
reqMethod="POST",
|
15587
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
15588
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
15589
|
+
)
|
15590
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
15591
|
+
if g_param[OptionsDefine.Language]:
|
15592
|
+
profile.language = g_param[OptionsDefine.Language]
|
15593
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
15594
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15595
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
15596
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15597
|
+
model = models.AcceptAttachCcnInstancesRequest()
|
15598
|
+
model.from_json_string(json.dumps(args))
|
15599
|
+
start_time = time.time()
|
15600
|
+
while True:
|
15601
|
+
rsp = client.AcceptAttachCcnInstances(model)
|
15602
|
+
result = rsp.to_json_string()
|
15603
|
+
try:
|
15604
|
+
json_obj = json.loads(result)
|
15605
|
+
except TypeError as e:
|
15606
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
15607
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
15608
|
+
break
|
15609
|
+
cur_time = time.time()
|
15610
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
15611
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
15612
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
15613
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
15614
|
+
else:
|
15615
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
15616
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
15617
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15618
|
+
|
15619
|
+
|
15620
|
+
def doDescribeGatewayFlowQos(args, parsed_globals):
|
15621
|
+
g_param = parse_global_arg(parsed_globals)
|
15622
|
+
|
15623
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
15624
|
+
cred = credential.CVMRoleCredential()
|
15625
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15626
|
+
cred = credential.STSAssumeRoleCredential(
|
15627
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15628
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15629
|
+
)
|
15630
|
+
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):
|
15631
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
15632
|
+
else:
|
15633
|
+
cred = credential.Credential(
|
15634
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
15635
|
+
)
|
15636
|
+
http_profile = HttpProfile(
|
15637
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
15638
|
+
reqMethod="POST",
|
15639
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
15640
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
15641
|
+
)
|
15642
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
15643
|
+
if g_param[OptionsDefine.Language]:
|
15644
|
+
profile.language = g_param[OptionsDefine.Language]
|
15645
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
15646
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15647
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
15648
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15649
|
+
model = models.DescribeGatewayFlowQosRequest()
|
15650
|
+
model.from_json_string(json.dumps(args))
|
15651
|
+
start_time = time.time()
|
15652
|
+
while True:
|
15653
|
+
rsp = client.DescribeGatewayFlowQos(model)
|
15654
|
+
result = rsp.to_json_string()
|
15655
|
+
try:
|
15656
|
+
json_obj = json.loads(result)
|
15657
|
+
except TypeError as e:
|
15658
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
15659
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
15660
|
+
break
|
15661
|
+
cur_time = time.time()
|
15662
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
15663
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
15664
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
15665
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
15666
|
+
else:
|
15667
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
15668
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
15669
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15670
|
+
|
15671
|
+
|
15672
|
+
def doDescribeIp6Translators(args, parsed_globals):
|
15673
|
+
g_param = parse_global_arg(parsed_globals)
|
15674
|
+
|
15675
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
15676
|
+
cred = credential.CVMRoleCredential()
|
15677
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15678
|
+
cred = credential.STSAssumeRoleCredential(
|
15679
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15680
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15681
|
+
)
|
15682
|
+
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):
|
15683
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
15684
|
+
else:
|
15685
|
+
cred = credential.Credential(
|
15686
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
15687
|
+
)
|
15688
|
+
http_profile = HttpProfile(
|
15689
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
15690
|
+
reqMethod="POST",
|
15691
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
15692
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
15693
|
+
)
|
15694
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
15695
|
+
if g_param[OptionsDefine.Language]:
|
15696
|
+
profile.language = g_param[OptionsDefine.Language]
|
15697
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
15698
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15699
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
15700
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15701
|
+
model = models.DescribeIp6TranslatorsRequest()
|
15702
|
+
model.from_json_string(json.dumps(args))
|
15703
|
+
start_time = time.time()
|
15704
|
+
while True:
|
15705
|
+
rsp = client.DescribeIp6Translators(model)
|
15706
|
+
result = rsp.to_json_string()
|
15707
|
+
try:
|
15708
|
+
json_obj = json.loads(result)
|
15709
|
+
except TypeError as e:
|
15710
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
15711
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
15712
|
+
break
|
15713
|
+
cur_time = time.time()
|
15714
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
15715
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
15716
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
15717
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
15718
|
+
else:
|
15719
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
15720
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
15721
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15722
|
+
|
15723
|
+
|
15724
|
+
def doDisableGatewayFlowMonitor(args, parsed_globals):
|
15725
|
+
g_param = parse_global_arg(parsed_globals)
|
15726
|
+
|
15727
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
15728
|
+
cred = credential.CVMRoleCredential()
|
15729
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15730
|
+
cred = credential.STSAssumeRoleCredential(
|
15731
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15732
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15733
|
+
)
|
15734
|
+
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):
|
15735
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
15736
|
+
else:
|
15737
|
+
cred = credential.Credential(
|
15738
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
15739
|
+
)
|
15740
|
+
http_profile = HttpProfile(
|
15741
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
15742
|
+
reqMethod="POST",
|
15743
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
15744
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
15745
|
+
)
|
15746
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
15747
|
+
if g_param[OptionsDefine.Language]:
|
15748
|
+
profile.language = g_param[OptionsDefine.Language]
|
15749
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
15750
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15751
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
15752
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15753
|
+
model = models.DisableGatewayFlowMonitorRequest()
|
14662
15754
|
model.from_json_string(json.dumps(args))
|
14663
15755
|
start_time = time.time()
|
14664
15756
|
while True:
|
14665
|
-
rsp = client.
|
15757
|
+
rsp = client.DisableGatewayFlowMonitor(model)
|
14666
15758
|
result = rsp.to_json_string()
|
14667
15759
|
try:
|
14668
15760
|
json_obj = json.loads(result)
|
@@ -14681,7 +15773,7 @@ def doDescribeNatGateways(args, parsed_globals):
|
|
14681
15773
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
14682
15774
|
|
14683
15775
|
|
14684
|
-
def
|
15776
|
+
def doCreateVpc(args, parsed_globals):
|
14685
15777
|
g_param = parse_global_arg(parsed_globals)
|
14686
15778
|
|
14687
15779
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -14710,11 +15802,11 @@ def doDescribeVpcs(args, parsed_globals):
|
|
14710
15802
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
14711
15803
|
client._sdkVersion += ("_CLI_" + __version__)
|
14712
15804
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
14713
|
-
model = models.
|
15805
|
+
model = models.CreateVpcRequest()
|
14714
15806
|
model.from_json_string(json.dumps(args))
|
14715
15807
|
start_time = time.time()
|
14716
15808
|
while True:
|
14717
|
-
rsp = client.
|
15809
|
+
rsp = client.CreateVpc(model)
|
14718
15810
|
result = rsp.to_json_string()
|
14719
15811
|
try:
|
14720
15812
|
json_obj = json.loads(result)
|
@@ -14733,7 +15825,7 @@ def doDescribeVpcs(args, parsed_globals):
|
|
14733
15825
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
14734
15826
|
|
14735
15827
|
|
14736
|
-
def
|
15828
|
+
def doCheckAssistantCidr(args, parsed_globals):
|
14737
15829
|
g_param = parse_global_arg(parsed_globals)
|
14738
15830
|
|
14739
15831
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -14762,11 +15854,11 @@ def doCreateNetworkAclQuintupleEntries(args, parsed_globals):
|
|
14762
15854
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
14763
15855
|
client._sdkVersion += ("_CLI_" + __version__)
|
14764
15856
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
14765
|
-
model = models.
|
15857
|
+
model = models.CheckAssistantCidrRequest()
|
14766
15858
|
model.from_json_string(json.dumps(args))
|
14767
15859
|
start_time = time.time()
|
14768
15860
|
while True:
|
14769
|
-
rsp = client.
|
15861
|
+
rsp = client.CheckAssistantCidr(model)
|
14770
15862
|
result = rsp.to_json_string()
|
14771
15863
|
try:
|
14772
15864
|
json_obj = json.loads(result)
|
@@ -14785,7 +15877,7 @@ def doCreateNetworkAclQuintupleEntries(args, parsed_globals):
|
|
14785
15877
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
14786
15878
|
|
14787
15879
|
|
14788
|
-
def
|
15880
|
+
def doModifyNetworkAclAttribute(args, parsed_globals):
|
14789
15881
|
g_param = parse_global_arg(parsed_globals)
|
14790
15882
|
|
14791
15883
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -14814,11 +15906,11 @@ def doDescribeGatewayFlowQos(args, parsed_globals):
|
|
14814
15906
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
14815
15907
|
client._sdkVersion += ("_CLI_" + __version__)
|
14816
15908
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
14817
|
-
model = models.
|
15909
|
+
model = models.ModifyNetworkAclAttributeRequest()
|
14818
15910
|
model.from_json_string(json.dumps(args))
|
14819
15911
|
start_time = time.time()
|
14820
15912
|
while True:
|
14821
|
-
rsp = client.
|
15913
|
+
rsp = client.ModifyNetworkAclAttribute(model)
|
14822
15914
|
result = rsp.to_json_string()
|
14823
15915
|
try:
|
14824
15916
|
json_obj = json.loads(result)
|
@@ -14837,7 +15929,7 @@ def doDescribeGatewayFlowQos(args, parsed_globals):
|
|
14837
15929
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
14838
15930
|
|
14839
15931
|
|
14840
|
-
def
|
15932
|
+
def doDisableSnapshotPolicies(args, parsed_globals):
|
14841
15933
|
g_param = parse_global_arg(parsed_globals)
|
14842
15934
|
|
14843
15935
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -14866,11 +15958,11 @@ def doDescribeIp6Translators(args, parsed_globals):
|
|
14866
15958
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
14867
15959
|
client._sdkVersion += ("_CLI_" + __version__)
|
14868
15960
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
14869
|
-
model = models.
|
15961
|
+
model = models.DisableSnapshotPoliciesRequest()
|
14870
15962
|
model.from_json_string(json.dumps(args))
|
14871
15963
|
start_time = time.time()
|
14872
15964
|
while True:
|
14873
|
-
rsp = client.
|
15965
|
+
rsp = client.DisableSnapshotPolicies(model)
|
14874
15966
|
result = rsp.to_json_string()
|
14875
15967
|
try:
|
14876
15968
|
json_obj = json.loads(result)
|
@@ -14889,7 +15981,7 @@ def doDescribeIp6Translators(args, parsed_globals):
|
|
14889
15981
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
14890
15982
|
|
14891
15983
|
|
14892
|
-
def
|
15984
|
+
def doDeletePrivateNatGatewayTranslationNatRule(args, parsed_globals):
|
14893
15985
|
g_param = parse_global_arg(parsed_globals)
|
14894
15986
|
|
14895
15987
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -14918,11 +16010,11 @@ def doDisableGatewayFlowMonitor(args, parsed_globals):
|
|
14918
16010
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
14919
16011
|
client._sdkVersion += ("_CLI_" + __version__)
|
14920
16012
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
14921
|
-
model = models.
|
16013
|
+
model = models.DeletePrivateNatGatewayTranslationNatRuleRequest()
|
14922
16014
|
model.from_json_string(json.dumps(args))
|
14923
16015
|
start_time = time.time()
|
14924
16016
|
while True:
|
14925
|
-
rsp = client.
|
16017
|
+
rsp = client.DeletePrivateNatGatewayTranslationNatRule(model)
|
14926
16018
|
result = rsp.to_json_string()
|
14927
16019
|
try:
|
14928
16020
|
json_obj = json.loads(result)
|
@@ -14941,7 +16033,7 @@ def doDisableGatewayFlowMonitor(args, parsed_globals):
|
|
14941
16033
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
14942
16034
|
|
14943
16035
|
|
14944
|
-
def
|
16036
|
+
def doDescribeDhcpIps(args, parsed_globals):
|
14945
16037
|
g_param = parse_global_arg(parsed_globals)
|
14946
16038
|
|
14947
16039
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -14970,11 +16062,11 @@ def doCreateVpc(args, parsed_globals):
|
|
14970
16062
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
14971
16063
|
client._sdkVersion += ("_CLI_" + __version__)
|
14972
16064
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
14973
|
-
model = models.
|
16065
|
+
model = models.DescribeDhcpIpsRequest()
|
14974
16066
|
model.from_json_string(json.dumps(args))
|
14975
16067
|
start_time = time.time()
|
14976
16068
|
while True:
|
14977
|
-
rsp = client.
|
16069
|
+
rsp = client.DescribeDhcpIps(model)
|
14978
16070
|
result = rsp.to_json_string()
|
14979
16071
|
try:
|
14980
16072
|
json_obj = json.loads(result)
|
@@ -14993,7 +16085,7 @@ def doCreateVpc(args, parsed_globals):
|
|
14993
16085
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
14994
16086
|
|
14995
16087
|
|
14996
|
-
def
|
16088
|
+
def doAssociateAddress(args, parsed_globals):
|
14997
16089
|
g_param = parse_global_arg(parsed_globals)
|
14998
16090
|
|
14999
16091
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15022,11 +16114,11 @@ def doCheckAssistantCidr(args, parsed_globals):
|
|
15022
16114
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15023
16115
|
client._sdkVersion += ("_CLI_" + __version__)
|
15024
16116
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15025
|
-
model = models.
|
16117
|
+
model = models.AssociateAddressRequest()
|
15026
16118
|
model.from_json_string(json.dumps(args))
|
15027
16119
|
start_time = time.time()
|
15028
16120
|
while True:
|
15029
|
-
rsp = client.
|
16121
|
+
rsp = client.AssociateAddress(model)
|
15030
16122
|
result = rsp.to_json_string()
|
15031
16123
|
try:
|
15032
16124
|
json_obj = json.loads(result)
|
@@ -15045,7 +16137,7 @@ def doCheckAssistantCidr(args, parsed_globals):
|
|
15045
16137
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15046
16138
|
|
15047
16139
|
|
15048
|
-
def
|
16140
|
+
def doDeleteVpcPeeringConnection(args, parsed_globals):
|
15049
16141
|
g_param = parse_global_arg(parsed_globals)
|
15050
16142
|
|
15051
16143
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15074,11 +16166,11 @@ def doModifyNetworkAclAttribute(args, parsed_globals):
|
|
15074
16166
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15075
16167
|
client._sdkVersion += ("_CLI_" + __version__)
|
15076
16168
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15077
|
-
model = models.
|
16169
|
+
model = models.DeleteVpcPeeringConnectionRequest()
|
15078
16170
|
model.from_json_string(json.dumps(args))
|
15079
16171
|
start_time = time.time()
|
15080
16172
|
while True:
|
15081
|
-
rsp = client.
|
16173
|
+
rsp = client.DeleteVpcPeeringConnection(model)
|
15082
16174
|
result = rsp.to_json_string()
|
15083
16175
|
try:
|
15084
16176
|
json_obj = json.loads(result)
|
@@ -15097,7 +16189,7 @@ def doModifyNetworkAclAttribute(args, parsed_globals):
|
|
15097
16189
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15098
16190
|
|
15099
16191
|
|
15100
|
-
def
|
16192
|
+
def doDescribeFlowLogs(args, parsed_globals):
|
15101
16193
|
g_param = parse_global_arg(parsed_globals)
|
15102
16194
|
|
15103
16195
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15126,11 +16218,11 @@ def doDisableSnapshotPolicies(args, parsed_globals):
|
|
15126
16218
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15127
16219
|
client._sdkVersion += ("_CLI_" + __version__)
|
15128
16220
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15129
|
-
model = models.
|
16221
|
+
model = models.DescribeFlowLogsRequest()
|
15130
16222
|
model.from_json_string(json.dumps(args))
|
15131
16223
|
start_time = time.time()
|
15132
16224
|
while True:
|
15133
|
-
rsp = client.
|
16225
|
+
rsp = client.DescribeFlowLogs(model)
|
15134
16226
|
result = rsp.to_json_string()
|
15135
16227
|
try:
|
15136
16228
|
json_obj = json.loads(result)
|
@@ -15149,7 +16241,7 @@ def doDisableSnapshotPolicies(args, parsed_globals):
|
|
15149
16241
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15150
16242
|
|
15151
16243
|
|
15152
|
-
def
|
16244
|
+
def doDescribeDirectConnectGatewayCcnRoutes(args, parsed_globals):
|
15153
16245
|
g_param = parse_global_arg(parsed_globals)
|
15154
16246
|
|
15155
16247
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15178,11 +16270,11 @@ def doDeletePrivateNatGatewayTranslationNatRule(args, parsed_globals):
|
|
15178
16270
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15179
16271
|
client._sdkVersion += ("_CLI_" + __version__)
|
15180
16272
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15181
|
-
model = models.
|
16273
|
+
model = models.DescribeDirectConnectGatewayCcnRoutesRequest()
|
15182
16274
|
model.from_json_string(json.dumps(args))
|
15183
16275
|
start_time = time.time()
|
15184
16276
|
while True:
|
15185
|
-
rsp = client.
|
16277
|
+
rsp = client.DescribeDirectConnectGatewayCcnRoutes(model)
|
15186
16278
|
result = rsp.to_json_string()
|
15187
16279
|
try:
|
15188
16280
|
json_obj = json.loads(result)
|
@@ -15201,7 +16293,7 @@ def doDeletePrivateNatGatewayTranslationNatRule(args, parsed_globals):
|
|
15201
16293
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15202
16294
|
|
15203
16295
|
|
15204
|
-
def
|
16296
|
+
def doCreateNetworkAclEntries(args, parsed_globals):
|
15205
16297
|
g_param = parse_global_arg(parsed_globals)
|
15206
16298
|
|
15207
16299
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15230,11 +16322,11 @@ def doDescribeDhcpIps(args, parsed_globals):
|
|
15230
16322
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15231
16323
|
client._sdkVersion += ("_CLI_" + __version__)
|
15232
16324
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15233
|
-
model = models.
|
16325
|
+
model = models.CreateNetworkAclEntriesRequest()
|
15234
16326
|
model.from_json_string(json.dumps(args))
|
15235
16327
|
start_time = time.time()
|
15236
16328
|
while True:
|
15237
|
-
rsp = client.
|
16329
|
+
rsp = client.CreateNetworkAclEntries(model)
|
15238
16330
|
result = rsp.to_json_string()
|
15239
16331
|
try:
|
15240
16332
|
json_obj = json.loads(result)
|
@@ -15253,7 +16345,7 @@ def doDescribeDhcpIps(args, parsed_globals):
|
|
15253
16345
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15254
16346
|
|
15255
16347
|
|
15256
|
-
def
|
16348
|
+
def doDeleteBandwidthPackage(args, parsed_globals):
|
15257
16349
|
g_param = parse_global_arg(parsed_globals)
|
15258
16350
|
|
15259
16351
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15282,11 +16374,11 @@ def doAssociateAddress(args, parsed_globals):
|
|
15282
16374
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15283
16375
|
client._sdkVersion += ("_CLI_" + __version__)
|
15284
16376
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15285
|
-
model = models.
|
16377
|
+
model = models.DeleteBandwidthPackageRequest()
|
15286
16378
|
model.from_json_string(json.dumps(args))
|
15287
16379
|
start_time = time.time()
|
15288
16380
|
while True:
|
15289
|
-
rsp = client.
|
16381
|
+
rsp = client.DeleteBandwidthPackage(model)
|
15290
16382
|
result = rsp.to_json_string()
|
15291
16383
|
try:
|
15292
16384
|
json_obj = json.loads(result)
|
@@ -15305,7 +16397,7 @@ def doAssociateAddress(args, parsed_globals):
|
|
15305
16397
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15306
16398
|
|
15307
16399
|
|
15308
|
-
def
|
16400
|
+
def doDeleteIp6Translators(args, parsed_globals):
|
15309
16401
|
g_param = parse_global_arg(parsed_globals)
|
15310
16402
|
|
15311
16403
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15334,11 +16426,11 @@ def doDeleteVpcPeeringConnection(args, parsed_globals):
|
|
15334
16426
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15335
16427
|
client._sdkVersion += ("_CLI_" + __version__)
|
15336
16428
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15337
|
-
model = models.
|
16429
|
+
model = models.DeleteIp6TranslatorsRequest()
|
15338
16430
|
model.from_json_string(json.dumps(args))
|
15339
16431
|
start_time = time.time()
|
15340
16432
|
while True:
|
15341
|
-
rsp = client.
|
16433
|
+
rsp = client.DeleteIp6Translators(model)
|
15342
16434
|
result = rsp.to_json_string()
|
15343
16435
|
try:
|
15344
16436
|
json_obj = json.loads(result)
|
@@ -15357,7 +16449,7 @@ def doDeleteVpcPeeringConnection(args, parsed_globals):
|
|
15357
16449
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15358
16450
|
|
15359
16451
|
|
15360
|
-
def
|
16452
|
+
def doDescribeRoutes(args, parsed_globals):
|
15361
16453
|
g_param = parse_global_arg(parsed_globals)
|
15362
16454
|
|
15363
16455
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15386,11 +16478,11 @@ def doDescribeFlowLogs(args, parsed_globals):
|
|
15386
16478
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15387
16479
|
client._sdkVersion += ("_CLI_" + __version__)
|
15388
16480
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15389
|
-
model = models.
|
16481
|
+
model = models.DescribeRoutesRequest()
|
15390
16482
|
model.from_json_string(json.dumps(args))
|
15391
16483
|
start_time = time.time()
|
15392
16484
|
while True:
|
15393
|
-
rsp = client.
|
16485
|
+
rsp = client.DescribeRoutes(model)
|
15394
16486
|
result = rsp.to_json_string()
|
15395
16487
|
try:
|
15396
16488
|
json_obj = json.loads(result)
|
@@ -15409,7 +16501,7 @@ def doDescribeFlowLogs(args, parsed_globals):
|
|
15409
16501
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15410
16502
|
|
15411
16503
|
|
15412
|
-
def
|
16504
|
+
def doDeleteVpnGatewayRoutes(args, parsed_globals):
|
15413
16505
|
g_param = parse_global_arg(parsed_globals)
|
15414
16506
|
|
15415
16507
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15438,11 +16530,11 @@ def doDescribeDirectConnectGatewayCcnRoutes(args, parsed_globals):
|
|
15438
16530
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15439
16531
|
client._sdkVersion += ("_CLI_" + __version__)
|
15440
16532
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15441
|
-
model = models.
|
16533
|
+
model = models.DeleteVpnGatewayRoutesRequest()
|
15442
16534
|
model.from_json_string(json.dumps(args))
|
15443
16535
|
start_time = time.time()
|
15444
16536
|
while True:
|
15445
|
-
rsp = client.
|
16537
|
+
rsp = client.DeleteVpnGatewayRoutes(model)
|
15446
16538
|
result = rsp.to_json_string()
|
15447
16539
|
try:
|
15448
16540
|
json_obj = json.loads(result)
|
@@ -15461,7 +16553,7 @@ def doDescribeDirectConnectGatewayCcnRoutes(args, parsed_globals):
|
|
15461
16553
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15462
16554
|
|
15463
16555
|
|
15464
|
-
def
|
16556
|
+
def doReplaceHighPriorityRoutes(args, parsed_globals):
|
15465
16557
|
g_param = parse_global_arg(parsed_globals)
|
15466
16558
|
|
15467
16559
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15490,11 +16582,11 @@ def doCreateNetworkAclEntries(args, parsed_globals):
|
|
15490
16582
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15491
16583
|
client._sdkVersion += ("_CLI_" + __version__)
|
15492
16584
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15493
|
-
model = models.
|
16585
|
+
model = models.ReplaceHighPriorityRoutesRequest()
|
15494
16586
|
model.from_json_string(json.dumps(args))
|
15495
16587
|
start_time = time.time()
|
15496
16588
|
while True:
|
15497
|
-
rsp = client.
|
16589
|
+
rsp = client.ReplaceHighPriorityRoutes(model)
|
15498
16590
|
result = rsp.to_json_string()
|
15499
16591
|
try:
|
15500
16592
|
json_obj = json.loads(result)
|
@@ -15513,7 +16605,7 @@ def doCreateNetworkAclEntries(args, parsed_globals):
|
|
15513
16605
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15514
16606
|
|
15515
16607
|
|
15516
|
-
def
|
16608
|
+
def doModifyCcnAttachedInstancesAttribute(args, parsed_globals):
|
15517
16609
|
g_param = parse_global_arg(parsed_globals)
|
15518
16610
|
|
15519
16611
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15542,11 +16634,11 @@ def doDeleteBandwidthPackage(args, parsed_globals):
|
|
15542
16634
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15543
16635
|
client._sdkVersion += ("_CLI_" + __version__)
|
15544
16636
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15545
|
-
model = models.
|
16637
|
+
model = models.ModifyCcnAttachedInstancesAttributeRequest()
|
15546
16638
|
model.from_json_string(json.dumps(args))
|
15547
16639
|
start_time = time.time()
|
15548
16640
|
while True:
|
15549
|
-
rsp = client.
|
16641
|
+
rsp = client.ModifyCcnAttachedInstancesAttribute(model)
|
15550
16642
|
result = rsp.to_json_string()
|
15551
16643
|
try:
|
15552
16644
|
json_obj = json.loads(result)
|
@@ -15565,7 +16657,7 @@ def doDeleteBandwidthPackage(args, parsed_globals):
|
|
15565
16657
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15566
16658
|
|
15567
16659
|
|
15568
|
-
def
|
16660
|
+
def doDeleteNatGateway(args, parsed_globals):
|
15569
16661
|
g_param = parse_global_arg(parsed_globals)
|
15570
16662
|
|
15571
16663
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15594,11 +16686,11 @@ def doDeleteIp6Translators(args, parsed_globals):
|
|
15594
16686
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15595
16687
|
client._sdkVersion += ("_CLI_" + __version__)
|
15596
16688
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15597
|
-
model = models.
|
16689
|
+
model = models.DeleteNatGatewayRequest()
|
15598
16690
|
model.from_json_string(json.dumps(args))
|
15599
16691
|
start_time = time.time()
|
15600
16692
|
while True:
|
15601
|
-
rsp = client.
|
16693
|
+
rsp = client.DeleteNatGateway(model)
|
15602
16694
|
result = rsp.to_json_string()
|
15603
16695
|
try:
|
15604
16696
|
json_obj = json.loads(result)
|
@@ -15617,7 +16709,7 @@ def doDeleteIp6Translators(args, parsed_globals):
|
|
15617
16709
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15618
16710
|
|
15619
16711
|
|
15620
|
-
def
|
16712
|
+
def doDescribeBandwidthPackageQuota(args, parsed_globals):
|
15621
16713
|
g_param = parse_global_arg(parsed_globals)
|
15622
16714
|
|
15623
16715
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15646,11 +16738,11 @@ def doDeleteVpnGatewayRoutes(args, parsed_globals):
|
|
15646
16738
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15647
16739
|
client._sdkVersion += ("_CLI_" + __version__)
|
15648
16740
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15649
|
-
model = models.
|
16741
|
+
model = models.DescribeBandwidthPackageQuotaRequest()
|
15650
16742
|
model.from_json_string(json.dumps(args))
|
15651
16743
|
start_time = time.time()
|
15652
16744
|
while True:
|
15653
|
-
rsp = client.
|
16745
|
+
rsp = client.DescribeBandwidthPackageQuota(model)
|
15654
16746
|
result = rsp.to_json_string()
|
15655
16747
|
try:
|
15656
16748
|
json_obj = json.loads(result)
|
@@ -15669,7 +16761,7 @@ def doDeleteVpnGatewayRoutes(args, parsed_globals):
|
|
15669
16761
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15670
16762
|
|
15671
16763
|
|
15672
|
-
def
|
16764
|
+
def doModifyHighPriorityRouteTableAttribute(args, parsed_globals):
|
15673
16765
|
g_param = parse_global_arg(parsed_globals)
|
15674
16766
|
|
15675
16767
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15698,11 +16790,11 @@ def doModifyCcnAttachedInstancesAttribute(args, parsed_globals):
|
|
15698
16790
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15699
16791
|
client._sdkVersion += ("_CLI_" + __version__)
|
15700
16792
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15701
|
-
model = models.
|
16793
|
+
model = models.ModifyHighPriorityRouteTableAttributeRequest()
|
15702
16794
|
model.from_json_string(json.dumps(args))
|
15703
16795
|
start_time = time.time()
|
15704
16796
|
while True:
|
15705
|
-
rsp = client.
|
16797
|
+
rsp = client.ModifyHighPriorityRouteTableAttribute(model)
|
15706
16798
|
result = rsp.to_json_string()
|
15707
16799
|
try:
|
15708
16800
|
json_obj = json.loads(result)
|
@@ -15721,7 +16813,7 @@ def doModifyCcnAttachedInstancesAttribute(args, parsed_globals):
|
|
15721
16813
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15722
16814
|
|
15723
16815
|
|
15724
|
-
def
|
16816
|
+
def doModifyCdcLDCXAttribute(args, parsed_globals):
|
15725
16817
|
g_param = parse_global_arg(parsed_globals)
|
15726
16818
|
|
15727
16819
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15750,11 +16842,11 @@ def doDeleteNatGateway(args, parsed_globals):
|
|
15750
16842
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15751
16843
|
client._sdkVersion += ("_CLI_" + __version__)
|
15752
16844
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15753
|
-
model = models.
|
16845
|
+
model = models.ModifyCdcLDCXAttributeRequest()
|
15754
16846
|
model.from_json_string(json.dumps(args))
|
15755
16847
|
start_time = time.time()
|
15756
16848
|
while True:
|
15757
|
-
rsp = client.
|
16849
|
+
rsp = client.ModifyCdcLDCXAttribute(model)
|
15758
16850
|
result = rsp.to_json_string()
|
15759
16851
|
try:
|
15760
16852
|
json_obj = json.loads(result)
|
@@ -15773,7 +16865,7 @@ def doDeleteNatGateway(args, parsed_globals):
|
|
15773
16865
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15774
16866
|
|
15775
16867
|
|
15776
|
-
def
|
16868
|
+
def doDeleteVpcEndPointService(args, parsed_globals):
|
15777
16869
|
g_param = parse_global_arg(parsed_globals)
|
15778
16870
|
|
15779
16871
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15802,11 +16894,11 @@ def doDescribeBandwidthPackageQuota(args, parsed_globals):
|
|
15802
16894
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15803
16895
|
client._sdkVersion += ("_CLI_" + __version__)
|
15804
16896
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15805
|
-
model = models.
|
16897
|
+
model = models.DeleteVpcEndPointServiceRequest()
|
15806
16898
|
model.from_json_string(json.dumps(args))
|
15807
16899
|
start_time = time.time()
|
15808
16900
|
while True:
|
15809
|
-
rsp = client.
|
16901
|
+
rsp = client.DeleteVpcEndPointService(model)
|
15810
16902
|
result = rsp.to_json_string()
|
15811
16903
|
try:
|
15812
16904
|
json_obj = json.loads(result)
|
@@ -15825,7 +16917,7 @@ def doDescribeBandwidthPackageQuota(args, parsed_globals):
|
|
15825
16917
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15826
16918
|
|
15827
16919
|
|
15828
|
-
def
|
16920
|
+
def doCreateNetworkAclQuintupleEntries(args, parsed_globals):
|
15829
16921
|
g_param = parse_global_arg(parsed_globals)
|
15830
16922
|
|
15831
16923
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15854,11 +16946,11 @@ def doDeleteVpcEndPointService(args, parsed_globals):
|
|
15854
16946
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15855
16947
|
client._sdkVersion += ("_CLI_" + __version__)
|
15856
16948
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15857
|
-
model = models.
|
16949
|
+
model = models.CreateNetworkAclQuintupleEntriesRequest()
|
15858
16950
|
model.from_json_string(json.dumps(args))
|
15859
16951
|
start_time = time.time()
|
15860
16952
|
while True:
|
15861
|
-
rsp = client.
|
16953
|
+
rsp = client.CreateNetworkAclQuintupleEntries(model)
|
15862
16954
|
result = rsp.to_json_string()
|
15863
16955
|
try:
|
15864
16956
|
json_obj = json.loads(result)
|
@@ -15877,7 +16969,7 @@ def doDeleteVpcEndPointService(args, parsed_globals):
|
|
15877
16969
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15878
16970
|
|
15879
16971
|
|
15880
|
-
def
|
16972
|
+
def doDeleteVpnGateway(args, parsed_globals):
|
15881
16973
|
g_param = parse_global_arg(parsed_globals)
|
15882
16974
|
|
15883
16975
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15906,11 +16998,11 @@ def doAcceptAttachCcnInstances(args, parsed_globals):
|
|
15906
16998
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15907
16999
|
client._sdkVersion += ("_CLI_" + __version__)
|
15908
17000
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15909
|
-
model = models.
|
17001
|
+
model = models.DeleteVpnGatewayRequest()
|
15910
17002
|
model.from_json_string(json.dumps(args))
|
15911
17003
|
start_time = time.time()
|
15912
17004
|
while True:
|
15913
|
-
rsp = client.
|
17005
|
+
rsp = client.DeleteVpnGateway(model)
|
15914
17006
|
result = rsp.to_json_string()
|
15915
17007
|
try:
|
15916
17008
|
json_obj = json.loads(result)
|
@@ -15929,7 +17021,7 @@ def doAcceptAttachCcnInstances(args, parsed_globals):
|
|
15929
17021
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15930
17022
|
|
15931
17023
|
|
15932
|
-
def
|
17024
|
+
def doDescribeVpcEndPointServiceWhiteList(args, parsed_globals):
|
15933
17025
|
g_param = parse_global_arg(parsed_globals)
|
15934
17026
|
|
15935
17027
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15958,11 +17050,11 @@ def doDeleteVpnGateway(args, parsed_globals):
|
|
15958
17050
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
15959
17051
|
client._sdkVersion += ("_CLI_" + __version__)
|
15960
17052
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15961
|
-
model = models.
|
17053
|
+
model = models.DescribeVpcEndPointServiceWhiteListRequest()
|
15962
17054
|
model.from_json_string(json.dumps(args))
|
15963
17055
|
start_time = time.time()
|
15964
17056
|
while True:
|
15965
|
-
rsp = client.
|
17057
|
+
rsp = client.DescribeVpcEndPointServiceWhiteList(model)
|
15966
17058
|
result = rsp.to_json_string()
|
15967
17059
|
try:
|
15968
17060
|
json_obj = json.loads(result)
|
@@ -15981,7 +17073,7 @@ def doDeleteVpnGateway(args, parsed_globals):
|
|
15981
17073
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15982
17074
|
|
15983
17075
|
|
15984
|
-
def
|
17076
|
+
def doDescribePrivateNatGatewayLimits(args, parsed_globals):
|
15985
17077
|
g_param = parse_global_arg(parsed_globals)
|
15986
17078
|
|
15987
17079
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -16010,11 +17102,11 @@ def doDescribeVpcEndPointServiceWhiteList(args, parsed_globals):
|
|
16010
17102
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
16011
17103
|
client._sdkVersion += ("_CLI_" + __version__)
|
16012
17104
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
16013
|
-
model = models.
|
17105
|
+
model = models.DescribePrivateNatGatewayLimitsRequest()
|
16014
17106
|
model.from_json_string(json.dumps(args))
|
16015
17107
|
start_time = time.time()
|
16016
17108
|
while True:
|
16017
|
-
rsp = client.
|
17109
|
+
rsp = client.DescribePrivateNatGatewayLimits(model)
|
16018
17110
|
result = rsp.to_json_string()
|
16019
17111
|
try:
|
16020
17112
|
json_obj = json.loads(result)
|
@@ -16033,7 +17125,7 @@ def doDescribeVpcEndPointServiceWhiteList(args, parsed_globals):
|
|
16033
17125
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
16034
17126
|
|
16035
17127
|
|
16036
|
-
def
|
17128
|
+
def doModifySecurityGroupPolicies(args, parsed_globals):
|
16037
17129
|
g_param = parse_global_arg(parsed_globals)
|
16038
17130
|
|
16039
17131
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -16062,11 +17154,11 @@ def doDescribePrivateNatGatewayLimits(args, parsed_globals):
|
|
16062
17154
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
16063
17155
|
client._sdkVersion += ("_CLI_" + __version__)
|
16064
17156
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
16065
|
-
model = models.
|
17157
|
+
model = models.ModifySecurityGroupPoliciesRequest()
|
16066
17158
|
model.from_json_string(json.dumps(args))
|
16067
17159
|
start_time = time.time()
|
16068
17160
|
while True:
|
16069
|
-
rsp = client.
|
17161
|
+
rsp = client.ModifySecurityGroupPolicies(model)
|
16070
17162
|
result = rsp.to_json_string()
|
16071
17163
|
try:
|
16072
17164
|
json_obj = json.loads(result)
|
@@ -16085,7 +17177,7 @@ def doDescribePrivateNatGatewayLimits(args, parsed_globals):
|
|
16085
17177
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
16086
17178
|
|
16087
17179
|
|
16088
|
-
def
|
17180
|
+
def doModifyCcnAttribute(args, parsed_globals):
|
16089
17181
|
g_param = parse_global_arg(parsed_globals)
|
16090
17182
|
|
16091
17183
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -16114,11 +17206,11 @@ def doModifySecurityGroupPolicies(args, parsed_globals):
|
|
16114
17206
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
16115
17207
|
client._sdkVersion += ("_CLI_" + __version__)
|
16116
17208
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
16117
|
-
model = models.
|
17209
|
+
model = models.ModifyCcnAttributeRequest()
|
16118
17210
|
model.from_json_string(json.dumps(args))
|
16119
17211
|
start_time = time.time()
|
16120
17212
|
while True:
|
16121
|
-
rsp = client.
|
17213
|
+
rsp = client.ModifyCcnAttribute(model)
|
16122
17214
|
result = rsp.to_json_string()
|
16123
17215
|
try:
|
16124
17216
|
json_obj = json.loads(result)
|
@@ -16137,7 +17229,7 @@ def doModifySecurityGroupPolicies(args, parsed_globals):
|
|
16137
17229
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
16138
17230
|
|
16139
17231
|
|
16140
|
-
def
|
17232
|
+
def doDescribeSecurityGroupLimits(args, parsed_globals):
|
16141
17233
|
g_param = parse_global_arg(parsed_globals)
|
16142
17234
|
|
16143
17235
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -16166,11 +17258,11 @@ def doModifyCcnAttribute(args, parsed_globals):
|
|
16166
17258
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
16167
17259
|
client._sdkVersion += ("_CLI_" + __version__)
|
16168
17260
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
16169
|
-
model = models.
|
17261
|
+
model = models.DescribeSecurityGroupLimitsRequest()
|
16170
17262
|
model.from_json_string(json.dumps(args))
|
16171
17263
|
start_time = time.time()
|
16172
17264
|
while True:
|
16173
|
-
rsp = client.
|
17265
|
+
rsp = client.DescribeSecurityGroupLimits(model)
|
16174
17266
|
result = rsp.to_json_string()
|
16175
17267
|
try:
|
16176
17268
|
json_obj = json.loads(result)
|
@@ -16189,7 +17281,7 @@ def doModifyCcnAttribute(args, parsed_globals):
|
|
16189
17281
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
16190
17282
|
|
16191
17283
|
|
16192
|
-
def
|
17284
|
+
def doDescribeCdcUsedIdcVlan(args, parsed_globals):
|
16193
17285
|
g_param = parse_global_arg(parsed_globals)
|
16194
17286
|
|
16195
17287
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -16218,11 +17310,11 @@ def doDescribeSecurityGroupLimits(args, parsed_globals):
|
|
16218
17310
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
16219
17311
|
client._sdkVersion += ("_CLI_" + __version__)
|
16220
17312
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
16221
|
-
model = models.
|
17313
|
+
model = models.DescribeCdcUsedIdcVlanRequest()
|
16222
17314
|
model.from_json_string(json.dumps(args))
|
16223
17315
|
start_time = time.time()
|
16224
17316
|
while True:
|
16225
|
-
rsp = client.
|
17317
|
+
rsp = client.DescribeCdcUsedIdcVlan(model)
|
16226
17318
|
result = rsp.to_json_string()
|
16227
17319
|
try:
|
16228
17320
|
json_obj = json.loads(result)
|
@@ -16813,7 +17905,7 @@ def doCheckDefaultSubnet(args, parsed_globals):
|
|
16813
17905
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
16814
17906
|
|
16815
17907
|
|
16816
|
-
def
|
17908
|
+
def doAssociateNetworkInterfaceSecurityGroups(args, parsed_globals):
|
16817
17909
|
g_param = parse_global_arg(parsed_globals)
|
16818
17910
|
|
16819
17911
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -16842,11 +17934,11 @@ def doDownloadVpnGatewaySslClientCert(args, parsed_globals):
|
|
16842
17934
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
16843
17935
|
client._sdkVersion += ("_CLI_" + __version__)
|
16844
17936
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
16845
|
-
model = models.
|
17937
|
+
model = models.AssociateNetworkInterfaceSecurityGroupsRequest()
|
16846
17938
|
model.from_json_string(json.dumps(args))
|
16847
17939
|
start_time = time.time()
|
16848
17940
|
while True:
|
16849
|
-
rsp = client.
|
17941
|
+
rsp = client.AssociateNetworkInterfaceSecurityGroups(model)
|
16850
17942
|
result = rsp.to_json_string()
|
16851
17943
|
try:
|
16852
17944
|
json_obj = json.loads(result)
|
@@ -17593,6 +18685,58 @@ def doCreateDhcpIp(args, parsed_globals):
|
|
17593
18685
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
17594
18686
|
|
17595
18687
|
|
18688
|
+
def doModifyVpcAttribute(args, parsed_globals):
|
18689
|
+
g_param = parse_global_arg(parsed_globals)
|
18690
|
+
|
18691
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
18692
|
+
cred = credential.CVMRoleCredential()
|
18693
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
18694
|
+
cred = credential.STSAssumeRoleCredential(
|
18695
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
18696
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
18697
|
+
)
|
18698
|
+
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):
|
18699
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
18700
|
+
else:
|
18701
|
+
cred = credential.Credential(
|
18702
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
18703
|
+
)
|
18704
|
+
http_profile = HttpProfile(
|
18705
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
18706
|
+
reqMethod="POST",
|
18707
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
18708
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
18709
|
+
)
|
18710
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
18711
|
+
if g_param[OptionsDefine.Language]:
|
18712
|
+
profile.language = g_param[OptionsDefine.Language]
|
18713
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
18714
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
18715
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
18716
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
18717
|
+
model = models.ModifyVpcAttributeRequest()
|
18718
|
+
model.from_json_string(json.dumps(args))
|
18719
|
+
start_time = time.time()
|
18720
|
+
while True:
|
18721
|
+
rsp = client.ModifyVpcAttribute(model)
|
18722
|
+
result = rsp.to_json_string()
|
18723
|
+
try:
|
18724
|
+
json_obj = json.loads(result)
|
18725
|
+
except TypeError as e:
|
18726
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
18727
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
18728
|
+
break
|
18729
|
+
cur_time = time.time()
|
18730
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
18731
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
18732
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
18733
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
18734
|
+
else:
|
18735
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
18736
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
18737
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
18738
|
+
|
18739
|
+
|
17596
18740
|
def doResumeSnapshotInstance(args, parsed_globals):
|
17597
18741
|
g_param = parse_global_arg(parsed_globals)
|
17598
18742
|
|
@@ -17905,7 +19049,7 @@ def doCreateSecurityGroupWithPolicies(args, parsed_globals):
|
|
17905
19049
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
17906
19050
|
|
17907
19051
|
|
17908
|
-
def
|
19052
|
+
def doReturnNormalAddresses(args, parsed_globals):
|
17909
19053
|
g_param = parse_global_arg(parsed_globals)
|
17910
19054
|
|
17911
19055
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -17934,11 +19078,11 @@ def doCreateSecurityGroup(args, parsed_globals):
|
|
17934
19078
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
17935
19079
|
client._sdkVersion += ("_CLI_" + __version__)
|
17936
19080
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
17937
|
-
model = models.
|
19081
|
+
model = models.ReturnNormalAddressesRequest()
|
17938
19082
|
model.from_json_string(json.dumps(args))
|
17939
19083
|
start_time = time.time()
|
17940
19084
|
while True:
|
17941
|
-
rsp = client.
|
19085
|
+
rsp = client.ReturnNormalAddresses(model)
|
17942
19086
|
result = rsp.to_json_string()
|
17943
19087
|
try:
|
17944
19088
|
json_obj = json.loads(result)
|
@@ -17957,7 +19101,7 @@ def doCreateSecurityGroup(args, parsed_globals):
|
|
17957
19101
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
17958
19102
|
|
17959
19103
|
|
17960
|
-
def
|
19104
|
+
def doDescribeCdcNetPlanes(args, parsed_globals):
|
17961
19105
|
g_param = parse_global_arg(parsed_globals)
|
17962
19106
|
|
17963
19107
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -17986,11 +19130,11 @@ def doModifyVpcAttribute(args, parsed_globals):
|
|
17986
19130
|
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
17987
19131
|
client._sdkVersion += ("_CLI_" + __version__)
|
17988
19132
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
17989
|
-
model = models.
|
19133
|
+
model = models.DescribeCdcNetPlanesRequest()
|
17990
19134
|
model.from_json_string(json.dumps(args))
|
17991
19135
|
start_time = time.time()
|
17992
19136
|
while True:
|
17993
|
-
rsp = client.
|
19137
|
+
rsp = client.DescribeCdcNetPlanes(model)
|
17994
19138
|
result = rsp.to_json_string()
|
17995
19139
|
try:
|
17996
19140
|
json_obj = json.loads(result)
|
@@ -18154,11 +19298,13 @@ ACTION_MAP = {
|
|
18154
19298
|
"DeleteServiceTemplateGroup": doDeleteServiceTemplateGroup,
|
18155
19299
|
"AddBandwidthPackageResources": doAddBandwidthPackageResources,
|
18156
19300
|
"AllocateAddresses": doAllocateAddresses,
|
19301
|
+
"DeleteCdcLDCXList": doDeleteCdcLDCXList,
|
18157
19302
|
"DescribeIp6Addresses": doDescribeIp6Addresses,
|
18158
19303
|
"DeleteNetworkAclQuintupleEntries": doDeleteNetworkAclQuintupleEntries,
|
18159
19304
|
"DeleteDirectConnectGateway": doDeleteDirectConnectGateway,
|
18160
19305
|
"CreateNetworkInterface": doCreateNetworkInterface,
|
18161
19306
|
"DescribeNetDetectStates": doDescribeNetDetectStates,
|
19307
|
+
"ModifyCdcNetPlaneAttribute": doModifyCdcNetPlaneAttribute,
|
18162
19308
|
"DescribeCcns": doDescribeCcns,
|
18163
19309
|
"DeleteCcn": doDeleteCcn,
|
18164
19310
|
"ModifyNetworkAclEntries": doModifyNetworkAclEntries,
|
@@ -18182,10 +19328,12 @@ ACTION_MAP = {
|
|
18182
19328
|
"DescribeSnapshotAttachedInstances": doDescribeSnapshotAttachedInstances,
|
18183
19329
|
"DeleteAddressTemplate": doDeleteAddressTemplate,
|
18184
19330
|
"WithdrawNotifyRoutes": doWithdrawNotifyRoutes,
|
19331
|
+
"CreateCdcNetPlanes": doCreateCdcNetPlanes,
|
18185
19332
|
"DeleteRoutes": doDeleteRoutes,
|
18186
19333
|
"InquiryPriceCreateVpnGateway": doInquiryPriceCreateVpnGateway,
|
19334
|
+
"DeleteHighPriorityRouteTables": doDeleteHighPriorityRouteTables,
|
18187
19335
|
"DescribeCrossBorderCompliance": doDescribeCrossBorderCompliance,
|
18188
|
-
"
|
19336
|
+
"CreateSecurityGroup": doCreateSecurityGroup,
|
18189
19337
|
"ModifyNetworkInterfaceAttribute": doModifyNetworkInterfaceAttribute,
|
18190
19338
|
"ModifyVpcPeeringConnection": doModifyVpcPeeringConnection,
|
18191
19339
|
"DescribeVpcLimits": doDescribeVpcLimits,
|
@@ -18208,7 +19356,7 @@ ACTION_MAP = {
|
|
18208
19356
|
"ModifyRouteTableAttribute": doModifyRouteTableAttribute,
|
18209
19357
|
"ModifyHaVipAttribute": doModifyHaVipAttribute,
|
18210
19358
|
"ReleaseAddresses": doReleaseAddresses,
|
18211
|
-
"
|
19359
|
+
"ReplaceRoutes": doReplaceRoutes,
|
18212
19360
|
"DescribeVpcPrivateIpAddresses": doDescribeVpcPrivateIpAddresses,
|
18213
19361
|
"ModifyIp6Translator": doModifyIp6Translator,
|
18214
19362
|
"DescribeAddressTemplates": doDescribeAddressTemplates,
|
@@ -18256,7 +19404,8 @@ ACTION_MAP = {
|
|
18256
19404
|
"ModifyDhcpIpAttribute": doModifyDhcpIpAttribute,
|
18257
19405
|
"DescribeBandwidthPackageResources": doDescribeBandwidthPackageResources,
|
18258
19406
|
"DescribeVpcPeeringConnections": doDescribeVpcPeeringConnections,
|
18259
|
-
"
|
19407
|
+
"CreateHighPriorityRouteTable": doCreateHighPriorityRouteTable,
|
19408
|
+
"ModifyGatewayFlowQos": doModifyGatewayFlowQos,
|
18260
19409
|
"DescribeRouteConflicts": doDescribeRouteConflicts,
|
18261
19410
|
"DownloadCustomerGatewayConfiguration": doDownloadCustomerGatewayConfiguration,
|
18262
19411
|
"AssociateDhcpIpWithAddressIp": doAssociateDhcpIpWithAddressIp,
|
@@ -18320,6 +19469,7 @@ ACTION_MAP = {
|
|
18320
19469
|
"EnableSnapshotPolicies": doEnableSnapshotPolicies,
|
18321
19470
|
"DescribeUsedIpAddress": doDescribeUsedIpAddress,
|
18322
19471
|
"DescribeCustomerGatewayVendors": doDescribeCustomerGatewayVendors,
|
19472
|
+
"DeleteCdcNetPlanes": doDeleteCdcNetPlanes,
|
18323
19473
|
"DeleteLocalGateway": doDeleteLocalGateway,
|
18324
19474
|
"ModifyServiceTemplateAttribute": doModifyServiceTemplateAttribute,
|
18325
19475
|
"DisassociateNetworkAclSubnets": doDisassociateNetworkAclSubnets,
|
@@ -18336,8 +19486,9 @@ ACTION_MAP = {
|
|
18336
19486
|
"DescribeVpnConnections": doDescribeVpnConnections,
|
18337
19487
|
"DeleteDhcpIp": doDeleteDhcpIp,
|
18338
19488
|
"DescribePrivateNatGatewayDestinationIpPortTranslationNatRules": doDescribePrivateNatGatewayDestinationIpPortTranslationNatRules,
|
18339
|
-
"
|
19489
|
+
"DescribeHighPriorityRoutes": doDescribeHighPriorityRoutes,
|
18340
19490
|
"DisassociateAddress": doDisassociateAddress,
|
19491
|
+
"DescribeCdcLDCXList": doDescribeCdcLDCXList,
|
18341
19492
|
"ModifyIp6Rule": doModifyIp6Rule,
|
18342
19493
|
"DescribeVpcIpv6Addresses": doDescribeVpcIpv6Addresses,
|
18343
19494
|
"UnlockCcnBandwidths": doUnlockCcnBandwidths,
|
@@ -18346,6 +19497,7 @@ ACTION_MAP = {
|
|
18346
19497
|
"DeleteNetworkAclEntries": doDeleteNetworkAclEntries,
|
18347
19498
|
"DescribeBandwidthPackageBillUsage": doDescribeBandwidthPackageBillUsage,
|
18348
19499
|
"ModifyCcnRouteTables": doModifyCcnRouteTables,
|
19500
|
+
"ModifyHighPriorityRouteECMPAlgorithm": doModifyHighPriorityRouteECMPAlgorithm,
|
18349
19501
|
"DeleteNatGatewaySourceIpTranslationNatRule": doDeleteNatGatewaySourceIpTranslationNatRule,
|
18350
19502
|
"ModifyNatGatewaySourceIpTranslationNatRule": doModifyNatGatewaySourceIpTranslationNatRule,
|
18351
19503
|
"UnassignIpv6SubnetCidrBlock": doUnassignIpv6SubnetCidrBlock,
|
@@ -18357,6 +19509,7 @@ ACTION_MAP = {
|
|
18357
19509
|
"DeleteNetDetect": doDeleteNetDetect,
|
18358
19510
|
"NotifyRoutes": doNotifyRoutes,
|
18359
19511
|
"DeleteVpcEndPoint": doDeleteVpcEndPoint,
|
19512
|
+
"DeleteHighPriorityRoutes": doDeleteHighPriorityRoutes,
|
18360
19513
|
"CreateServiceTemplate": doCreateServiceTemplate,
|
18361
19514
|
"DeleteVpc": doDeleteVpc,
|
18362
19515
|
"ModifyDirectConnectGatewayAttribute": doModifyDirectConnectGatewayAttribute,
|
@@ -18368,9 +19521,12 @@ ACTION_MAP = {
|
|
18368
19521
|
"CreateAddressTemplateGroup": doCreateAddressTemplateGroup,
|
18369
19522
|
"AssociateNetworkAclSubnets": doAssociateNetworkAclSubnets,
|
18370
19523
|
"DescribeVpnGateways": doDescribeVpnGateways,
|
18371
|
-
"
|
19524
|
+
"DownloadVpnGatewaySslClientCert": doDownloadVpnGatewaySslClientCert,
|
19525
|
+
"ReplaceHighPriorityRouteTableAssociation": doReplaceHighPriorityRouteTableAssociation,
|
18372
19526
|
"EnableFlowLogs": doEnableFlowLogs,
|
19527
|
+
"CreateCdcLDCXList": doCreateCdcLDCXList,
|
18373
19528
|
"ModifyNatGatewayDestinationIpPortTranslationNatRule": doModifyNatGatewayDestinationIpPortTranslationNatRule,
|
19529
|
+
"DisableVpnGatewaySslClientCert": doDisableVpnGatewaySslClientCert,
|
18374
19530
|
"DescribeHaVips": doDescribeHaVips,
|
18375
19531
|
"CreateLocalGateway": doCreateLocalGateway,
|
18376
19532
|
"ResetVpnGatewayInternetMaxBandwidth": doResetVpnGatewayInternetMaxBandwidth,
|
@@ -18379,6 +19535,7 @@ ACTION_MAP = {
|
|
18379
19535
|
"DisassociateDhcpIpWithAddressIp": doDisassociateDhcpIpWithAddressIp,
|
18380
19536
|
"CreateHaVip": doCreateHaVip,
|
18381
19537
|
"DescribeTenantCcns": doDescribeTenantCcns,
|
19538
|
+
"CreateHighPriorityRoutes": doCreateHighPriorityRoutes,
|
18382
19539
|
"LockCcns": doLockCcns,
|
18383
19540
|
"CreateRoutes": doCreateRoutes,
|
18384
19541
|
"ModifyRouteTableSelectionPolicies": doModifyRouteTableSelectionPolicies,
|
@@ -18400,14 +19557,17 @@ ACTION_MAP = {
|
|
18400
19557
|
"DeleteSnapshotPolicies": doDeleteSnapshotPolicies,
|
18401
19558
|
"CreatePrivateNatGatewayTranslationNatRule": doCreatePrivateNatGatewayTranslationNatRule,
|
18402
19559
|
"ModifyVpcEndPointAttribute": doModifyVpcEndPointAttribute,
|
19560
|
+
"ModifyHighPriorityRouteAttribute": doModifyHighPriorityRouteAttribute,
|
18403
19561
|
"DisassociateVpcEndPointSecurityGroups": doDisassociateVpcEndPointSecurityGroups,
|
18404
19562
|
"InquiryPriceRenewVpnGateway": doInquiryPriceRenewVpnGateway,
|
18405
19563
|
"EnableVpcEndPointConnect": doEnableVpcEndPointConnect,
|
18406
19564
|
"CreateAndAttachNetworkInterface": doCreateAndAttachNetworkInterface,
|
18407
19565
|
"ModifyVpcEndPointServiceWhiteList": doModifyVpcEndPointServiceWhiteList,
|
18408
19566
|
"DescribeNatGateways": doDescribeNatGateways,
|
19567
|
+
"ResetHighPriorityRoutes": doResetHighPriorityRoutes,
|
18409
19568
|
"DescribeVpcs": doDescribeVpcs,
|
18410
|
-
"
|
19569
|
+
"DescribeHighPriorityRouteTables": doDescribeHighPriorityRouteTables,
|
19570
|
+
"AcceptAttachCcnInstances": doAcceptAttachCcnInstances,
|
18411
19571
|
"DescribeGatewayFlowQos": doDescribeGatewayFlowQos,
|
18412
19572
|
"DescribeIp6Translators": doDescribeIp6Translators,
|
18413
19573
|
"DisableGatewayFlowMonitor": doDisableGatewayFlowMonitor,
|
@@ -18424,18 +19584,23 @@ ACTION_MAP = {
|
|
18424
19584
|
"CreateNetworkAclEntries": doCreateNetworkAclEntries,
|
18425
19585
|
"DeleteBandwidthPackage": doDeleteBandwidthPackage,
|
18426
19586
|
"DeleteIp6Translators": doDeleteIp6Translators,
|
19587
|
+
"DescribeRoutes": doDescribeRoutes,
|
18427
19588
|
"DeleteVpnGatewayRoutes": doDeleteVpnGatewayRoutes,
|
19589
|
+
"ReplaceHighPriorityRoutes": doReplaceHighPriorityRoutes,
|
18428
19590
|
"ModifyCcnAttachedInstancesAttribute": doModifyCcnAttachedInstancesAttribute,
|
18429
19591
|
"DeleteNatGateway": doDeleteNatGateway,
|
18430
19592
|
"DescribeBandwidthPackageQuota": doDescribeBandwidthPackageQuota,
|
19593
|
+
"ModifyHighPriorityRouteTableAttribute": doModifyHighPriorityRouteTableAttribute,
|
19594
|
+
"ModifyCdcLDCXAttribute": doModifyCdcLDCXAttribute,
|
18431
19595
|
"DeleteVpcEndPointService": doDeleteVpcEndPointService,
|
18432
|
-
"
|
19596
|
+
"CreateNetworkAclQuintupleEntries": doCreateNetworkAclQuintupleEntries,
|
18433
19597
|
"DeleteVpnGateway": doDeleteVpnGateway,
|
18434
19598
|
"DescribeVpcEndPointServiceWhiteList": doDescribeVpcEndPointServiceWhiteList,
|
18435
19599
|
"DescribePrivateNatGatewayLimits": doDescribePrivateNatGatewayLimits,
|
18436
19600
|
"ModifySecurityGroupPolicies": doModifySecurityGroupPolicies,
|
18437
19601
|
"ModifyCcnAttribute": doModifyCcnAttribute,
|
18438
19602
|
"DescribeSecurityGroupLimits": doDescribeSecurityGroupLimits,
|
19603
|
+
"DescribeCdcUsedIdcVlan": doDescribeCdcUsedIdcVlan,
|
18439
19604
|
"InquirePriceCreateDirectConnectGateway": doInquirePriceCreateDirectConnectGateway,
|
18440
19605
|
"ModifyIpv6AddressesAttribute": doModifyIpv6AddressesAttribute,
|
18441
19606
|
"DescribeDirectConnectGateways": doDescribeDirectConnectGateways,
|
@@ -18447,7 +19612,7 @@ ACTION_MAP = {
|
|
18447
19612
|
"DescribeNatGatewayDirectConnectGatewayRoute": doDescribeNatGatewayDirectConnectGatewayRoute,
|
18448
19613
|
"HaVipAssociateAddressIp": doHaVipAssociateAddressIp,
|
18449
19614
|
"CheckDefaultSubnet": doCheckDefaultSubnet,
|
18450
|
-
"
|
19615
|
+
"AssociateNetworkInterfaceSecurityGroups": doAssociateNetworkInterfaceSecurityGroups,
|
18451
19616
|
"DescribeAddressQuota": doDescribeAddressQuota,
|
18452
19617
|
"CreateCcn": doCreateCcn,
|
18453
19618
|
"DescribeSecurityGroups": doDescribeSecurityGroups,
|
@@ -18462,14 +19627,15 @@ ACTION_MAP = {
|
|
18462
19627
|
"CreateTrafficPackages": doCreateTrafficPackages,
|
18463
19628
|
"DescribeSnapshotFiles": doDescribeSnapshotFiles,
|
18464
19629
|
"CreateDhcpIp": doCreateDhcpIp,
|
19630
|
+
"ModifyVpcAttribute": doModifyVpcAttribute,
|
18465
19631
|
"ResumeSnapshotInstance": doResumeSnapshotInstance,
|
18466
19632
|
"SetVpnGatewaysRenewFlag": doSetVpnGatewaysRenewFlag,
|
18467
19633
|
"DescribeSnapshotPolicies": doDescribeSnapshotPolicies,
|
18468
19634
|
"ModifyIp6AddressesBandwidth": doModifyIp6AddressesBandwidth,
|
18469
19635
|
"CreateVpcEndPoint": doCreateVpcEndPoint,
|
18470
19636
|
"CreateSecurityGroupWithPolicies": doCreateSecurityGroupWithPolicies,
|
18471
|
-
"
|
18472
|
-
"
|
19637
|
+
"ReturnNormalAddresses": doReturnNormalAddresses,
|
19638
|
+
"DescribeCdcNetPlanes": doDescribeCdcNetPlanes,
|
18473
19639
|
"DeletePrivateNatGateway": doDeletePrivateNatGateway,
|
18474
19640
|
"CreateVpnGatewayRoutes": doCreateVpnGatewayRoutes,
|
18475
19641
|
|