tccli 3.0.1404.1__py2.py3-none-any.whl → 3.0.1406.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/autoscaling/v20180419/api.json +1 -1
- tccli/services/batch/v20170312/api.json +1 -1
- tccli/services/cdb/v20170320/api.json +95 -25
- tccli/services/cdb/v20170320/examples.json +3 -3
- tccli/services/cdn/v20180606/api.json +1 -1
- tccli/services/cdwdoris/v20211228/api.json +9 -0
- tccli/services/ckafka/v20190819/api.json +33 -0
- tccli/services/cloudapp/v20220530/api.json +55 -0
- tccli/services/cloudhsm/v20191112/api.json +10 -10
- tccli/services/cls/v20201016/api.json +40 -31
- tccli/services/cls/v20201016/examples.json +8 -2
- tccli/services/ctem/v20231128/api.json +30 -0
- tccli/services/dbbrain/v20191016/api.json +11 -1
- tccli/services/dbbrain/v20191016/examples.json +1 -1
- tccli/services/dbbrain/v20210527/api.json +17 -7
- tccli/services/dbbrain/v20210527/examples.json +1 -1
- tccli/services/dc/v20180410/api.json +101 -3
- tccli/services/dlc/v20210125/examples.json +1 -1
- tccli/services/dts/v20211206/api.json +13 -3
- tccli/services/emr/v20190103/api.json +11 -2
- tccli/services/es/es_client.py +57 -4
- tccli/services/es/v20180416/api.json +3 -3
- tccli/services/es/v20180416/examples.json +1 -1
- tccli/services/es/v20250101/api.json +135 -2
- tccli/services/es/v20250101/examples.json +8 -0
- tccli/services/ess/ess_client.py +159 -0
- tccli/services/ess/v20201111/api.json +508 -24
- tccli/services/ess/v20201111/examples.json +33 -3
- tccli/services/essbasic/v20210526/api.json +12 -3
- tccli/services/essbasic/v20210526/examples.json +2 -2
- tccli/services/gwlb/gwlb_client.py +53 -0
- tccli/services/gwlb/v20240906/api.json +80 -0
- tccli/services/gwlb/v20240906/examples.json +8 -0
- tccli/services/hunyuan/v20230901/api.json +2 -2
- tccli/services/ioa/ioa_client.py +220 -8
- tccli/services/ioa/v20220601/api.json +559 -0
- tccli/services/ioa/v20220601/examples.json +38 -0
- tccli/services/iotexplorer/iotexplorer_client.py +220 -8
- tccli/services/iotexplorer/v20190423/api.json +959 -12
- tccli/services/iotexplorer/v20190423/examples.json +68 -0
- tccli/services/lcic/v20220817/api.json +2 -2
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/lke/v20231130/api.json +1 -1
- tccli/services/lke/v20231130/examples.json +2 -2
- tccli/services/lkeap/v20240522/api.json +1 -1
- tccli/services/lkeap/v20240522/examples.json +7 -1
- tccli/services/monitor/monitor_client.py +53 -0
- tccli/services/monitor/v20180724/api.json +248 -0
- tccli/services/monitor/v20180724/examples.json +8 -0
- tccli/services/mps/v20190612/api.json +140 -2
- tccli/services/mqtt/v20240516/api.json +10 -0
- tccli/services/mqtt/v20240516/examples.json +3 -9
- tccli/services/nlp/v20190408/api.json +6 -6
- tccli/services/oceanus/oceanus_client.py +110 -4
- tccli/services/oceanus/v20190422/api.json +157 -13
- tccli/services/oceanus/v20190422/examples.json +16 -0
- tccli/services/ocr/v20181119/api.json +3 -3
- tccli/services/postgres/v20170312/api.json +5 -5
- tccli/services/privatedns/privatedns_client.py +641 -58
- tccli/services/privatedns/v20201028/api.json +923 -12
- tccli/services/privatedns/v20201028/examples.json +88 -0
- tccli/services/redis/v20180412/api.json +1 -1
- tccli/services/teo/v20220901/api.json +51 -51
- tccli/services/tione/v20211111/api.json +1 -1
- tccli/services/tke/v20180525/api.json +23 -14
- tccli/services/tke/v20180525/examples.json +1 -1
- tccli/services/trtc/v20190722/api.json +9 -9
- tccli/services/trtc/v20190722/examples.json +1 -1
- tccli/services/tse/v20201207/api.json +30 -1
- tccli/services/vpc/v20170312/api.json +231 -4
- tccli/services/vpc/v20170312/examples.json +32 -0
- tccli/services/vpc/vpc_client.py +228 -16
- tccli/services/wedata/v20210820/api.json +1281 -601
- tccli/services/wedata/v20210820/examples.json +127 -157
- tccli/services/wedata/v20250806/api.json +8736 -3085
- tccli/services/wedata/v20250806/examples.json +378 -0
- tccli/services/wedata/wedata_client.py +2903 -836
- {tccli-3.0.1404.1.dist-info → tccli-3.0.1406.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1404.1.dist-info → tccli-3.0.1406.1.dist-info}/RECORD +83 -83
- {tccli-3.0.1404.1.dist-info → tccli-3.0.1406.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1404.1.dist-info → tccli-3.0.1406.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1404.1.dist-info → tccli-3.0.1406.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/ioa/ioa_client.py
CHANGED
|
@@ -173,7 +173,7 @@ def doDescribeSoftwareInformation(args, parsed_globals):
|
|
|
173
173
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
174
174
|
|
|
175
175
|
|
|
176
|
-
def
|
|
176
|
+
def doCreateDLPFileDetectTask(args, parsed_globals):
|
|
177
177
|
g_param = parse_global_arg(parsed_globals)
|
|
178
178
|
|
|
179
179
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -202,11 +202,115 @@ def doCreateDeviceVirtualGroup(args, parsed_globals):
|
|
|
202
202
|
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
203
203
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
204
204
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
205
|
-
model = models.
|
|
205
|
+
model = models.CreateDLPFileDetectTaskRequest()
|
|
206
206
|
model.from_json_string(json.dumps(args))
|
|
207
207
|
start_time = time.time()
|
|
208
208
|
while True:
|
|
209
|
-
rsp = client.
|
|
209
|
+
rsp = client.CreateDLPFileDetectTask(model)
|
|
210
|
+
result = rsp.to_json_string()
|
|
211
|
+
try:
|
|
212
|
+
json_obj = json.loads(result)
|
|
213
|
+
except TypeError as e:
|
|
214
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
215
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
216
|
+
break
|
|
217
|
+
cur_time = time.time()
|
|
218
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
219
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
220
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
221
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
222
|
+
else:
|
|
223
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
224
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
225
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
def doDescribeDeviceChildGroups(args, parsed_globals):
|
|
229
|
+
g_param = parse_global_arg(parsed_globals)
|
|
230
|
+
|
|
231
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
232
|
+
cred = credential.CVMRoleCredential()
|
|
233
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
234
|
+
cred = credential.STSAssumeRoleCredential(
|
|
235
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
236
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
237
|
+
)
|
|
238
|
+
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):
|
|
239
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
240
|
+
else:
|
|
241
|
+
cred = credential.Credential(
|
|
242
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
243
|
+
)
|
|
244
|
+
http_profile = HttpProfile(
|
|
245
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
246
|
+
reqMethod="POST",
|
|
247
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
248
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
249
|
+
)
|
|
250
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
251
|
+
if g_param[OptionsDefine.Language]:
|
|
252
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
253
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
254
|
+
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
255
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
256
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
257
|
+
model = models.DescribeDeviceChildGroupsRequest()
|
|
258
|
+
model.from_json_string(json.dumps(args))
|
|
259
|
+
start_time = time.time()
|
|
260
|
+
while True:
|
|
261
|
+
rsp = client.DescribeDeviceChildGroups(model)
|
|
262
|
+
result = rsp.to_json_string()
|
|
263
|
+
try:
|
|
264
|
+
json_obj = json.loads(result)
|
|
265
|
+
except TypeError as e:
|
|
266
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
267
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
268
|
+
break
|
|
269
|
+
cur_time = time.time()
|
|
270
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
271
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
272
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
273
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
274
|
+
else:
|
|
275
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
276
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
277
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
def doDescribeDLPFileDetectTaskResult(args, parsed_globals):
|
|
281
|
+
g_param = parse_global_arg(parsed_globals)
|
|
282
|
+
|
|
283
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
284
|
+
cred = credential.CVMRoleCredential()
|
|
285
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
286
|
+
cred = credential.STSAssumeRoleCredential(
|
|
287
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
288
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
289
|
+
)
|
|
290
|
+
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):
|
|
291
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
292
|
+
else:
|
|
293
|
+
cred = credential.Credential(
|
|
294
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
295
|
+
)
|
|
296
|
+
http_profile = HttpProfile(
|
|
297
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
298
|
+
reqMethod="POST",
|
|
299
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
300
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
301
|
+
)
|
|
302
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
303
|
+
if g_param[OptionsDefine.Language]:
|
|
304
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
305
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
306
|
+
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
307
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
308
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
309
|
+
model = models.DescribeDLPFileDetectTaskResultRequest()
|
|
310
|
+
model.from_json_string(json.dumps(args))
|
|
311
|
+
start_time = time.time()
|
|
312
|
+
while True:
|
|
313
|
+
rsp = client.DescribeDLPFileDetectTaskResult(model)
|
|
210
314
|
result = rsp.to_json_string()
|
|
211
315
|
try:
|
|
212
316
|
json_obj = json.loads(result)
|
|
@@ -589,6 +693,58 @@ def doDescribeAggrSoftCategorySoftList(args, parsed_globals):
|
|
|
589
693
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
590
694
|
|
|
591
695
|
|
|
696
|
+
def doDescribeDLPEdgeNodes(args, parsed_globals):
|
|
697
|
+
g_param = parse_global_arg(parsed_globals)
|
|
698
|
+
|
|
699
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
700
|
+
cred = credential.CVMRoleCredential()
|
|
701
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
702
|
+
cred = credential.STSAssumeRoleCredential(
|
|
703
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
704
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
705
|
+
)
|
|
706
|
+
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):
|
|
707
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
708
|
+
else:
|
|
709
|
+
cred = credential.Credential(
|
|
710
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
711
|
+
)
|
|
712
|
+
http_profile = HttpProfile(
|
|
713
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
714
|
+
reqMethod="POST",
|
|
715
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
716
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
717
|
+
)
|
|
718
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
719
|
+
if g_param[OptionsDefine.Language]:
|
|
720
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
721
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
722
|
+
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
723
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
724
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
725
|
+
model = models.DescribeDLPEdgeNodesRequest()
|
|
726
|
+
model.from_json_string(json.dumps(args))
|
|
727
|
+
start_time = time.time()
|
|
728
|
+
while True:
|
|
729
|
+
rsp = client.DescribeDLPEdgeNodes(model)
|
|
730
|
+
result = rsp.to_json_string()
|
|
731
|
+
try:
|
|
732
|
+
json_obj = json.loads(result)
|
|
733
|
+
except TypeError as e:
|
|
734
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
735
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
736
|
+
break
|
|
737
|
+
cur_time = time.time()
|
|
738
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
739
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
740
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
741
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
742
|
+
else:
|
|
743
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
744
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
745
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
746
|
+
|
|
747
|
+
|
|
592
748
|
def doDescribeAggrSoftDetail(args, parsed_globals):
|
|
593
749
|
g_param = parse_global_arg(parsed_globals)
|
|
594
750
|
|
|
@@ -745,7 +901,7 @@ def doDescribeDeviceHardwareInfoList(args, parsed_globals):
|
|
|
745
901
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
746
902
|
|
|
747
903
|
|
|
748
|
-
def
|
|
904
|
+
def doCreateDeviceVirtualGroup(args, parsed_globals):
|
|
749
905
|
g_param = parse_global_arg(parsed_globals)
|
|
750
906
|
|
|
751
907
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -774,11 +930,11 @@ def doDescribeDeviceChildGroups(args, parsed_globals):
|
|
|
774
930
|
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
775
931
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
776
932
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
777
|
-
model = models.
|
|
933
|
+
model = models.CreateDeviceVirtualGroupRequest()
|
|
778
934
|
model.from_json_string(json.dumps(args))
|
|
779
935
|
start_time = time.time()
|
|
780
936
|
while True:
|
|
781
|
-
rsp = client.
|
|
937
|
+
rsp = client.CreateDeviceVirtualGroup(model)
|
|
782
938
|
result = rsp.to_json_string()
|
|
783
939
|
try:
|
|
784
940
|
json_obj = json.loads(result)
|
|
@@ -953,6 +1109,58 @@ def doDescribeLocalAccounts(args, parsed_globals):
|
|
|
953
1109
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
954
1110
|
|
|
955
1111
|
|
|
1112
|
+
def doDescribeDLPEdgeNodeGroups(args, parsed_globals):
|
|
1113
|
+
g_param = parse_global_arg(parsed_globals)
|
|
1114
|
+
|
|
1115
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
1116
|
+
cred = credential.CVMRoleCredential()
|
|
1117
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
1118
|
+
cred = credential.STSAssumeRoleCredential(
|
|
1119
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1120
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1121
|
+
)
|
|
1122
|
+
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):
|
|
1123
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1124
|
+
else:
|
|
1125
|
+
cred = credential.Credential(
|
|
1126
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
1127
|
+
)
|
|
1128
|
+
http_profile = HttpProfile(
|
|
1129
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
1130
|
+
reqMethod="POST",
|
|
1131
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1132
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1133
|
+
)
|
|
1134
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
1135
|
+
if g_param[OptionsDefine.Language]:
|
|
1136
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
1137
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
1138
|
+
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1139
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
1140
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1141
|
+
model = models.DescribeDLPEdgeNodeGroupsRequest()
|
|
1142
|
+
model.from_json_string(json.dumps(args))
|
|
1143
|
+
start_time = time.time()
|
|
1144
|
+
while True:
|
|
1145
|
+
rsp = client.DescribeDLPEdgeNodeGroups(model)
|
|
1146
|
+
result = rsp.to_json_string()
|
|
1147
|
+
try:
|
|
1148
|
+
json_obj = json.loads(result)
|
|
1149
|
+
except TypeError as e:
|
|
1150
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
1151
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
1152
|
+
break
|
|
1153
|
+
cur_time = time.time()
|
|
1154
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
1155
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
1156
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
1157
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
1158
|
+
else:
|
|
1159
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
1160
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
1161
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1162
|
+
|
|
1163
|
+
|
|
956
1164
|
def doDescribeDevices(args, parsed_globals):
|
|
957
1165
|
g_param = parse_global_arg(parsed_globals)
|
|
958
1166
|
|
|
@@ -1175,7 +1383,9 @@ ACTION_MAP = {
|
|
|
1175
1383
|
"DescribeAggrSoftDeviceList": doDescribeAggrSoftDeviceList,
|
|
1176
1384
|
"CreateDeviceTask": doCreateDeviceTask,
|
|
1177
1385
|
"DescribeSoftwareInformation": doDescribeSoftwareInformation,
|
|
1178
|
-
"
|
|
1386
|
+
"CreateDLPFileDetectTask": doCreateDLPFileDetectTask,
|
|
1387
|
+
"DescribeDeviceChildGroups": doDescribeDeviceChildGroups,
|
|
1388
|
+
"DescribeDLPFileDetectTaskResult": doDescribeDLPFileDetectTaskResult,
|
|
1179
1389
|
"DescribeVirtualDevices": doDescribeVirtualDevices,
|
|
1180
1390
|
"ExportSoftwareInformationList": doExportSoftwareInformationList,
|
|
1181
1391
|
"CreateDLPFileDetectionTask": doCreateDLPFileDetectionTask,
|
|
@@ -1183,13 +1393,15 @@ ACTION_MAP = {
|
|
|
1183
1393
|
"DescribeRootAccountGroup": doDescribeRootAccountGroup,
|
|
1184
1394
|
"DescribeDLPFileDetectResult": doDescribeDLPFileDetectResult,
|
|
1185
1395
|
"DescribeAggrSoftCategorySoftList": doDescribeAggrSoftCategorySoftList,
|
|
1396
|
+
"DescribeDLPEdgeNodes": doDescribeDLPEdgeNodes,
|
|
1186
1397
|
"DescribeAggrSoftDetail": doDescribeAggrSoftDetail,
|
|
1187
1398
|
"DescribeDeviceInfo": doDescribeDeviceInfo,
|
|
1188
1399
|
"DescribeDeviceHardwareInfoList": doDescribeDeviceHardwareInfoList,
|
|
1189
|
-
"
|
|
1400
|
+
"CreateDeviceVirtualGroup": doCreateDeviceVirtualGroup,
|
|
1190
1401
|
"DescribeAccountGroups": doDescribeAccountGroups,
|
|
1191
1402
|
"DescribeDeviceDetailList": doDescribeDeviceDetailList,
|
|
1192
1403
|
"DescribeLocalAccounts": doDescribeLocalAccounts,
|
|
1404
|
+
"DescribeDLPEdgeNodeGroups": doDescribeDLPEdgeNodeGroups,
|
|
1193
1405
|
"DescribeDevices": doDescribeDevices,
|
|
1194
1406
|
"DescribeDeviceVirtualGroups": doDescribeDeviceVirtualGroups,
|
|
1195
1407
|
"DescribeSoftCensusListByDevice": doDescribeSoftCensusListByDevice,
|