tccli-intl-en 3.1.13.1__py2.py3-none-any.whl → 3.1.39.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +3 -0
- tccli/services/advisor/advisor_client.py +56 -0
- tccli/services/advisor/v20200721/api.json +34 -0
- tccli/services/advisor/v20200721/examples.json +8 -0
- tccli/services/autoscaling/v20180419/api.json +41 -13
- tccli/services/billing/billing_client.py +172 -4
- tccli/services/billing/v20180709/api.json +332 -1
- tccli/services/billing/v20180709/examples.json +24 -0
- tccli/services/ccc/v20200210/api.json +71 -26
- tccli/services/cdb/cdb_client.py +1128 -288
- tccli/services/cdb/v20170320/api.json +2166 -335
- tccli/services/cdb/v20170320/examples.json +126 -6
- tccli/services/cdn/v20180606/api.json +22 -22
- tccli/services/cdn/v20180606/examples.json +1 -1
- tccli/services/ckafka/ckafka_client.py +120 -8
- tccli/services/ckafka/v20190819/api.json +525 -180
- tccli/services/ckafka/v20190819/examples.json +30 -20
- tccli/services/clb/v20180317/api.json +87 -87
- tccli/services/csip/csip_client.py +392 -0
- tccli/services/csip/v20221121/api.json +2050 -284
- tccli/services/csip/v20221121/examples.json +56 -0
- tccli/services/cvm/v20170312/api.json +20 -20
- tccli/services/cvm/v20170312/examples.json +8 -8
- tccli/services/emr/v20190103/api.json +6 -6
- tccli/services/faceid/v20180301/api.json +102 -52
- tccli/services/faceid/v20180301/examples.json +3 -9
- tccli/services/hunyuan/hunyuan_client.py +448 -0
- tccli/services/hunyuan/v20230901/api.json +879 -18
- tccli/services/hunyuan/v20230901/examples.json +64 -0
- tccli/services/lighthouse/lighthouse_client.py +360 -24
- tccli/services/lighthouse/v20200324/api.json +488 -0
- tccli/services/lighthouse/v20200324/examples.json +54 -0
- tccli/services/lkeap/v20240522/api.json +36 -0
- tccli/services/lkeap/v20240522/examples.json +1 -1
- tccli/services/mdl/v20200326/api.json +309 -38
- tccli/services/mdp/v20200527/api.json +191 -28
- tccli/services/mongodb/v20190725/api.json +39 -39
- tccli/services/monitor/v20180724/api.json +5 -5
- tccli/services/mps/mps_client.py +341 -61
- tccli/services/mps/v20190612/api.json +890 -31
- tccli/services/mps/v20190612/examples.json +40 -0
- tccli/services/mqtt/__init__.py +4 -0
- tccli/services/mqtt/mqtt_client.py +1610 -0
- tccli/services/mqtt/v20240516/api.json +3057 -0
- tccli/services/mqtt/v20240516/examples.json +213 -0
- tccli/services/ocr/v20181119/api.json +23 -3
- tccli/services/ocr/v20181119/examples.json +6 -6
- tccli/services/redis/v20180412/api.json +12 -12
- tccli/services/ses/ses_client.py +348 -12
- tccli/services/ses/v20201002/api.json +1197 -256
- tccli/services/ses/v20201002/examples.json +78 -24
- tccli/services/tcsas/tcsas_client.py +2281 -209
- tccli/services/tcsas/v20250106/api.json +8410 -3423
- tccli/services/tcsas/v20250106/examples.json +308 -12
- tccli/services/tdmq/v20200217/api.json +4 -4
- tccli/services/teo/v20220901/api.json +10 -10
- tccli/services/tke/tke_client.py +168 -0
- tccli/services/tke/v20180525/api.json +227 -0
- tccli/services/tke/v20180525/examples.json +24 -0
- tccli/services/trocket/v20230308/api.json +96 -96
- tccli/services/trtc/v20190722/api.json +212 -144
- tccli/services/trtc/v20190722/examples.json +7 -7
- tccli/services/vod/v20180717/api.json +2929 -296
- tccli/services/vod/v20180717/examples.json +40 -6
- tccli/services/vod/vod_client.py +280 -0
- tccli/services/vpc/v20170312/api.json +80 -13
- tccli/services/vpc/v20170312/examples.json +17 -9
- tccli/services/vpc/vpc_client.py +64 -8
- {tccli_intl_en-3.1.13.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/METADATA +2 -2
- {tccli_intl_en-3.1.13.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/RECORD +75 -71
- {tccli_intl_en-3.1.13.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/WHEEL +1 -1
- {tccli_intl_en-3.1.13.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/LICENSE +0 -0
- {tccli_intl_en-3.1.13.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/entry_points.txt +0 -0
- {tccli_intl_en-3.1.13.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/top_level.txt +0 -0
|
@@ -127,6 +127,61 @@ def doDescribeDbAssetInfo(args, parsed_globals):
|
|
|
127
127
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
128
128
|
|
|
129
129
|
|
|
130
|
+
def doDescribeNICAssets(args, parsed_globals):
|
|
131
|
+
g_param = parse_global_arg(parsed_globals)
|
|
132
|
+
|
|
133
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
134
|
+
cred = credential.CVMRoleCredential()
|
|
135
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
136
|
+
cred = credential.STSAssumeRoleCredential(
|
|
137
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
138
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
139
|
+
)
|
|
140
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
141
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
142
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
143
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
144
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
145
|
+
else:
|
|
146
|
+
cred = credential.Credential(
|
|
147
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
148
|
+
)
|
|
149
|
+
http_profile = HttpProfile(
|
|
150
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
151
|
+
reqMethod="POST",
|
|
152
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
153
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
154
|
+
)
|
|
155
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
156
|
+
if g_param[OptionsDefine.Language]:
|
|
157
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
158
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
159
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
|
160
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
161
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
162
|
+
model = models.DescribeNICAssetsRequest()
|
|
163
|
+
model.from_json_string(json.dumps(args))
|
|
164
|
+
start_time = time.time()
|
|
165
|
+
while True:
|
|
166
|
+
rsp = client.DescribeNICAssets(model)
|
|
167
|
+
result = rsp.to_json_string()
|
|
168
|
+
try:
|
|
169
|
+
json_obj = json.loads(result)
|
|
170
|
+
except TypeError as e:
|
|
171
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
172
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
173
|
+
break
|
|
174
|
+
cur_time = time.time()
|
|
175
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
176
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
177
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
178
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
179
|
+
else:
|
|
180
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
181
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
182
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
183
|
+
|
|
184
|
+
|
|
130
185
|
def doDescribeRiskCenterVULViewVULRiskList(args, parsed_globals):
|
|
131
186
|
g_param = parse_global_arg(parsed_globals)
|
|
132
187
|
|
|
@@ -402,6 +457,61 @@ def doDescribeSubnetAssets(args, parsed_globals):
|
|
|
402
457
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
403
458
|
|
|
404
459
|
|
|
460
|
+
def doDescribeOtherCloudAssets(args, parsed_globals):
|
|
461
|
+
g_param = parse_global_arg(parsed_globals)
|
|
462
|
+
|
|
463
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
464
|
+
cred = credential.CVMRoleCredential()
|
|
465
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
466
|
+
cred = credential.STSAssumeRoleCredential(
|
|
467
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
468
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
469
|
+
)
|
|
470
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
471
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
472
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
473
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
474
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
475
|
+
else:
|
|
476
|
+
cred = credential.Credential(
|
|
477
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
478
|
+
)
|
|
479
|
+
http_profile = HttpProfile(
|
|
480
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
481
|
+
reqMethod="POST",
|
|
482
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
483
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
484
|
+
)
|
|
485
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
486
|
+
if g_param[OptionsDefine.Language]:
|
|
487
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
488
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
489
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
|
490
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
491
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
492
|
+
model = models.DescribeOtherCloudAssetsRequest()
|
|
493
|
+
model.from_json_string(json.dumps(args))
|
|
494
|
+
start_time = time.time()
|
|
495
|
+
while True:
|
|
496
|
+
rsp = client.DescribeOtherCloudAssets(model)
|
|
497
|
+
result = rsp.to_json_string()
|
|
498
|
+
try:
|
|
499
|
+
json_obj = json.loads(result)
|
|
500
|
+
except TypeError as e:
|
|
501
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
502
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
503
|
+
break
|
|
504
|
+
cur_time = time.time()
|
|
505
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
506
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
507
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
508
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
509
|
+
else:
|
|
510
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
511
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
512
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
513
|
+
|
|
514
|
+
|
|
405
515
|
def doDescribeListenerList(args, parsed_globals):
|
|
406
516
|
g_param = parse_global_arg(parsed_globals)
|
|
407
517
|
|
|
@@ -897,6 +1007,61 @@ def doDescribeCVMAssets(args, parsed_globals):
|
|
|
897
1007
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
898
1008
|
|
|
899
1009
|
|
|
1010
|
+
def doDescribeCFWAssetStatistics(args, parsed_globals):
|
|
1011
|
+
g_param = parse_global_arg(parsed_globals)
|
|
1012
|
+
|
|
1013
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
1014
|
+
cred = credential.CVMRoleCredential()
|
|
1015
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
1016
|
+
cred = credential.STSAssumeRoleCredential(
|
|
1017
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1018
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1019
|
+
)
|
|
1020
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1021
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1022
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1023
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1024
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1025
|
+
else:
|
|
1026
|
+
cred = credential.Credential(
|
|
1027
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
1028
|
+
)
|
|
1029
|
+
http_profile = HttpProfile(
|
|
1030
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
1031
|
+
reqMethod="POST",
|
|
1032
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1033
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1034
|
+
)
|
|
1035
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1036
|
+
if g_param[OptionsDefine.Language]:
|
|
1037
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
1038
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
1039
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1040
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
1041
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1042
|
+
model = models.DescribeCFWAssetStatisticsRequest()
|
|
1043
|
+
model.from_json_string(json.dumps(args))
|
|
1044
|
+
start_time = time.time()
|
|
1045
|
+
while True:
|
|
1046
|
+
rsp = client.DescribeCFWAssetStatistics(model)
|
|
1047
|
+
result = rsp.to_json_string()
|
|
1048
|
+
try:
|
|
1049
|
+
json_obj = json.loads(result)
|
|
1050
|
+
except TypeError as e:
|
|
1051
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
1052
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
1053
|
+
break
|
|
1054
|
+
cur_time = time.time()
|
|
1055
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
1056
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
1057
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
1058
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
1059
|
+
else:
|
|
1060
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
1061
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
1062
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1063
|
+
|
|
1064
|
+
|
|
900
1065
|
def doDescribeRiskCenterWebsiteRiskList(args, parsed_globals):
|
|
901
1066
|
g_param = parse_global_arg(parsed_globals)
|
|
902
1067
|
|
|
@@ -1117,6 +1282,61 @@ def doCreateRiskCenterScanTask(args, parsed_globals):
|
|
|
1117
1282
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1118
1283
|
|
|
1119
1284
|
|
|
1285
|
+
def doDescribeGatewayAssets(args, parsed_globals):
|
|
1286
|
+
g_param = parse_global_arg(parsed_globals)
|
|
1287
|
+
|
|
1288
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
1289
|
+
cred = credential.CVMRoleCredential()
|
|
1290
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
1291
|
+
cred = credential.STSAssumeRoleCredential(
|
|
1292
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1293
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1294
|
+
)
|
|
1295
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1296
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1297
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1298
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1299
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1300
|
+
else:
|
|
1301
|
+
cred = credential.Credential(
|
|
1302
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
1303
|
+
)
|
|
1304
|
+
http_profile = HttpProfile(
|
|
1305
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
1306
|
+
reqMethod="POST",
|
|
1307
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1308
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1309
|
+
)
|
|
1310
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1311
|
+
if g_param[OptionsDefine.Language]:
|
|
1312
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
1313
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
1314
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1315
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
1316
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1317
|
+
model = models.DescribeGatewayAssetsRequest()
|
|
1318
|
+
model.from_json_string(json.dumps(args))
|
|
1319
|
+
start_time = time.time()
|
|
1320
|
+
while True:
|
|
1321
|
+
rsp = client.DescribeGatewayAssets(model)
|
|
1322
|
+
result = rsp.to_json_string()
|
|
1323
|
+
try:
|
|
1324
|
+
json_obj = json.loads(result)
|
|
1325
|
+
except TypeError as e:
|
|
1326
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
1327
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
1328
|
+
break
|
|
1329
|
+
cur_time = time.time()
|
|
1330
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
1331
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
1332
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
1333
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
1334
|
+
else:
|
|
1335
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
1336
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
1337
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1338
|
+
|
|
1339
|
+
|
|
1120
1340
|
def doDescribeSearchBugInfo(args, parsed_globals):
|
|
1121
1341
|
g_param = parse_global_arg(parsed_globals)
|
|
1122
1342
|
|
|
@@ -1722,6 +1942,61 @@ def doCreateDomainAndIp(args, parsed_globals):
|
|
|
1722
1942
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1723
1943
|
|
|
1724
1944
|
|
|
1945
|
+
def doModifyOrganizationAccountStatus(args, parsed_globals):
|
|
1946
|
+
g_param = parse_global_arg(parsed_globals)
|
|
1947
|
+
|
|
1948
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
1949
|
+
cred = credential.CVMRoleCredential()
|
|
1950
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
1951
|
+
cred = credential.STSAssumeRoleCredential(
|
|
1952
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1953
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1954
|
+
)
|
|
1955
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1956
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1957
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1958
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1959
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1960
|
+
else:
|
|
1961
|
+
cred = credential.Credential(
|
|
1962
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
1963
|
+
)
|
|
1964
|
+
http_profile = HttpProfile(
|
|
1965
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
1966
|
+
reqMethod="POST",
|
|
1967
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1968
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1969
|
+
)
|
|
1970
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1971
|
+
if g_param[OptionsDefine.Language]:
|
|
1972
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
1973
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
1974
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1975
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
1976
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1977
|
+
model = models.ModifyOrganizationAccountStatusRequest()
|
|
1978
|
+
model.from_json_string(json.dumps(args))
|
|
1979
|
+
start_time = time.time()
|
|
1980
|
+
while True:
|
|
1981
|
+
rsp = client.ModifyOrganizationAccountStatus(model)
|
|
1982
|
+
result = rsp.to_json_string()
|
|
1983
|
+
try:
|
|
1984
|
+
json_obj = json.loads(result)
|
|
1985
|
+
except TypeError as e:
|
|
1986
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
1987
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
1988
|
+
break
|
|
1989
|
+
cur_time = time.time()
|
|
1990
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
1991
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
1992
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
1993
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
1994
|
+
else:
|
|
1995
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
1996
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
1997
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1998
|
+
|
|
1999
|
+
|
|
1725
2000
|
def doDescribeOrganizationUserInfo(args, parsed_globals):
|
|
1726
2001
|
g_param = parse_global_arg(parsed_globals)
|
|
1727
2002
|
|
|
@@ -1777,6 +2052,61 @@ def doDescribeOrganizationUserInfo(args, parsed_globals):
|
|
|
1777
2052
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1778
2053
|
|
|
1779
2054
|
|
|
2055
|
+
def doDescribeClusterAssets(args, parsed_globals):
|
|
2056
|
+
g_param = parse_global_arg(parsed_globals)
|
|
2057
|
+
|
|
2058
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
2059
|
+
cred = credential.CVMRoleCredential()
|
|
2060
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
2061
|
+
cred = credential.STSAssumeRoleCredential(
|
|
2062
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2063
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2064
|
+
)
|
|
2065
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2066
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2067
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2068
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2069
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2070
|
+
else:
|
|
2071
|
+
cred = credential.Credential(
|
|
2072
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
2073
|
+
)
|
|
2074
|
+
http_profile = HttpProfile(
|
|
2075
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
2076
|
+
reqMethod="POST",
|
|
2077
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2078
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2079
|
+
)
|
|
2080
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2081
|
+
if g_param[OptionsDefine.Language]:
|
|
2082
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
2083
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
2084
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2085
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
2086
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2087
|
+
model = models.DescribeClusterAssetsRequest()
|
|
2088
|
+
model.from_json_string(json.dumps(args))
|
|
2089
|
+
start_time = time.time()
|
|
2090
|
+
while True:
|
|
2091
|
+
rsp = client.DescribeClusterAssets(model)
|
|
2092
|
+
result = rsp.to_json_string()
|
|
2093
|
+
try:
|
|
2094
|
+
json_obj = json.loads(result)
|
|
2095
|
+
except TypeError as e:
|
|
2096
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
2097
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
2098
|
+
break
|
|
2099
|
+
cur_time = time.time()
|
|
2100
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
2101
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
2102
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
2103
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
2104
|
+
else:
|
|
2105
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
2106
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
2107
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2108
|
+
|
|
2109
|
+
|
|
1780
2110
|
def doDescribeTaskLogURL(args, parsed_globals):
|
|
1781
2111
|
g_param = parse_global_arg(parsed_globals)
|
|
1782
2112
|
|
|
@@ -1832,6 +2162,61 @@ def doDescribeTaskLogURL(args, parsed_globals):
|
|
|
1832
2162
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1833
2163
|
|
|
1834
2164
|
|
|
2165
|
+
def doDescribeRepositoryImageAssets(args, parsed_globals):
|
|
2166
|
+
g_param = parse_global_arg(parsed_globals)
|
|
2167
|
+
|
|
2168
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
2169
|
+
cred = credential.CVMRoleCredential()
|
|
2170
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
2171
|
+
cred = credential.STSAssumeRoleCredential(
|
|
2172
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2173
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2174
|
+
)
|
|
2175
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2176
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2177
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2178
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2179
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2180
|
+
else:
|
|
2181
|
+
cred = credential.Credential(
|
|
2182
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
2183
|
+
)
|
|
2184
|
+
http_profile = HttpProfile(
|
|
2185
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
2186
|
+
reqMethod="POST",
|
|
2187
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2188
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2189
|
+
)
|
|
2190
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
2191
|
+
if g_param[OptionsDefine.Language]:
|
|
2192
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
2193
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
2194
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2195
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
2196
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2197
|
+
model = models.DescribeRepositoryImageAssetsRequest()
|
|
2198
|
+
model.from_json_string(json.dumps(args))
|
|
2199
|
+
start_time = time.time()
|
|
2200
|
+
while True:
|
|
2201
|
+
rsp = client.DescribeRepositoryImageAssets(model)
|
|
2202
|
+
result = rsp.to_json_string()
|
|
2203
|
+
try:
|
|
2204
|
+
json_obj = json.loads(result)
|
|
2205
|
+
except TypeError as e:
|
|
2206
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
2207
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
2208
|
+
break
|
|
2209
|
+
cur_time = time.time()
|
|
2210
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
2211
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
2212
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
2213
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
2214
|
+
else:
|
|
2215
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
2216
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
2217
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2218
|
+
|
|
2219
|
+
|
|
1835
2220
|
def doDescribeCVMAssetInfo(args, parsed_globals):
|
|
1836
2221
|
g_param = parse_global_arg(parsed_globals)
|
|
1837
2222
|
|
|
@@ -1900,11 +2285,13 @@ MODELS_MAP = {
|
|
|
1900
2285
|
ACTION_MAP = {
|
|
1901
2286
|
"DeleteDomainAndIp": doDeleteDomainAndIp,
|
|
1902
2287
|
"DescribeDbAssetInfo": doDescribeDbAssetInfo,
|
|
2288
|
+
"DescribeNICAssets": doDescribeNICAssets,
|
|
1903
2289
|
"DescribeRiskCenterVULViewVULRiskList": doDescribeRiskCenterVULViewVULRiskList,
|
|
1904
2290
|
"DescribeDomainAssets": doDescribeDomainAssets,
|
|
1905
2291
|
"DescribePublicIpAssets": doDescribePublicIpAssets,
|
|
1906
2292
|
"AddNewBindRoleUser": doAddNewBindRoleUser,
|
|
1907
2293
|
"DescribeSubnetAssets": doDescribeSubnetAssets,
|
|
2294
|
+
"DescribeOtherCloudAssets": doDescribeOtherCloudAssets,
|
|
1908
2295
|
"DescribeListenerList": doDescribeListenerList,
|
|
1909
2296
|
"DeleteRiskScanTask": doDeleteRiskScanTask,
|
|
1910
2297
|
"DescribeTaskLogList": doDescribeTaskLogList,
|
|
@@ -1914,10 +2301,12 @@ ACTION_MAP = {
|
|
|
1914
2301
|
"DescribeVpcAssets": doDescribeVpcAssets,
|
|
1915
2302
|
"DescribeRiskCenterServerRiskList": doDescribeRiskCenterServerRiskList,
|
|
1916
2303
|
"DescribeCVMAssets": doDescribeCVMAssets,
|
|
2304
|
+
"DescribeCFWAssetStatistics": doDescribeCFWAssetStatistics,
|
|
1917
2305
|
"DescribeRiskCenterWebsiteRiskList": doDescribeRiskCenterWebsiteRiskList,
|
|
1918
2306
|
"DescribeOrganizationInfo": doDescribeOrganizationInfo,
|
|
1919
2307
|
"StopRiskCenterTask": doStopRiskCenterTask,
|
|
1920
2308
|
"CreateRiskCenterScanTask": doCreateRiskCenterScanTask,
|
|
2309
|
+
"DescribeGatewayAssets": doDescribeGatewayAssets,
|
|
1921
2310
|
"DescribeSearchBugInfo": doDescribeSearchBugInfo,
|
|
1922
2311
|
"DescribeRiskCenterAssetViewWeakPasswordRiskList": doDescribeRiskCenterAssetViewWeakPasswordRiskList,
|
|
1923
2312
|
"DescribeScanReportList": doDescribeScanReportList,
|
|
@@ -1929,8 +2318,11 @@ ACTION_MAP = {
|
|
|
1929
2318
|
"DescribeRiskCenterAssetViewPortRiskList": doDescribeRiskCenterAssetViewPortRiskList,
|
|
1930
2319
|
"DescribeVULRiskAdvanceCFGList": doDescribeVULRiskAdvanceCFGList,
|
|
1931
2320
|
"CreateDomainAndIp": doCreateDomainAndIp,
|
|
2321
|
+
"ModifyOrganizationAccountStatus": doModifyOrganizationAccountStatus,
|
|
1932
2322
|
"DescribeOrganizationUserInfo": doDescribeOrganizationUserInfo,
|
|
2323
|
+
"DescribeClusterAssets": doDescribeClusterAssets,
|
|
1933
2324
|
"DescribeTaskLogURL": doDescribeTaskLogURL,
|
|
2325
|
+
"DescribeRepositoryImageAssets": doDescribeRepositoryImageAssets,
|
|
1934
2326
|
"DescribeCVMAssetInfo": doDescribeCVMAssetInfo,
|
|
1935
2327
|
|
|
1936
2328
|
}
|