tccli-intl-en 3.1.11.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 +9 -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/ai3d/__init__.py +4 -0
- tccli/services/ai3d/ai3d_client.py +266 -0
- tccli/services/ai3d/v20250513/api.json +264 -0
- tccli/services/ai3d/v20250513/examples.json +20 -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 +23 -23
- tccli/services/cvm/v20170312/examples.json +32 -32
- 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/__init__.py +4 -0
- tccli/services/hunyuan/hunyuan_client.py +714 -0
- tccli/services/hunyuan/v20230901/api.json +1131 -0
- tccli/services/hunyuan/v20230901/examples.json +84 -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/mdl_client.py +192 -24
- tccli/services/mdl/v20200326/api.json +761 -77
- tccli/services/mdl/v20200326/examples.json +24 -0
- 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 +397 -61
- tccli/services/mps/v20190612/api.json +1190 -132
- tccli/services/mps/v20190612/examples.json +76 -22
- 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/teo_client.py +56 -0
- tccli/services/teo/v20220901/api.json +111 -12
- tccli/services/teo/v20220901/examples.json +8 -0
- 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.11.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/METADATA +2 -2
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/RECORD +84 -72
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/WHEEL +1 -1
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/LICENSE +0 -0
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/entry_points.txt +0 -0
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/top_level.txt +0 -0
|
@@ -17,7 +17,7 @@ from tencentcloud.tcsas.v20250106 import models as models_v20250106
|
|
|
17
17
|
from jmespath import search
|
|
18
18
|
import time
|
|
19
19
|
|
|
20
|
-
def
|
|
20
|
+
def doDescribeMNGPaymentReportDetail(args, parsed_globals):
|
|
21
21
|
g_param = parse_global_arg(parsed_globals)
|
|
22
22
|
|
|
23
23
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -49,11 +49,11 @@ def doDescribeMNPOfflinePackageURL(args, parsed_globals):
|
|
|
49
49
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
50
50
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
51
51
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
52
|
-
model = models.
|
|
52
|
+
model = models.DescribeMNGPaymentReportDetailRequest()
|
|
53
53
|
model.from_json_string(json.dumps(args))
|
|
54
54
|
start_time = time.time()
|
|
55
55
|
while True:
|
|
56
|
-
rsp = client.
|
|
56
|
+
rsp = client.DescribeMNGPaymentReportDetail(model)
|
|
57
57
|
result = rsp.to_json_string()
|
|
58
58
|
try:
|
|
59
59
|
json_obj = json.loads(result)
|
|
@@ -72,7 +72,7 @@ def doDescribeMNPOfflinePackageURL(args, parsed_globals):
|
|
|
72
72
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
def
|
|
75
|
+
def doModifyApplicationConfig(args, parsed_globals):
|
|
76
76
|
g_param = parse_global_arg(parsed_globals)
|
|
77
77
|
|
|
78
78
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -104,11 +104,11 @@ def doDeleteGlobalDomain(args, parsed_globals):
|
|
|
104
104
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
105
105
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
106
106
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
107
|
-
model = models.
|
|
107
|
+
model = models.ModifyApplicationConfigRequest()
|
|
108
108
|
model.from_json_string(json.dumps(args))
|
|
109
109
|
start_time = time.time()
|
|
110
110
|
while True:
|
|
111
|
-
rsp = client.
|
|
111
|
+
rsp = client.ModifyApplicationConfig(model)
|
|
112
112
|
result = rsp.to_json_string()
|
|
113
113
|
try:
|
|
114
114
|
json_obj = json.loads(result)
|
|
@@ -127,7 +127,7 @@ def doDeleteGlobalDomain(args, parsed_globals):
|
|
|
127
127
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
128
128
|
|
|
129
129
|
|
|
130
|
-
def
|
|
130
|
+
def doDescribeMNGAdvertisingOverview(args, parsed_globals):
|
|
131
131
|
g_param = parse_global_arg(parsed_globals)
|
|
132
132
|
|
|
133
133
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -159,11 +159,11 @@ def doRollbackMNPVersion(args, parsed_globals):
|
|
|
159
159
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
160
160
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
161
161
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
162
|
-
model = models.
|
|
162
|
+
model = models.DescribeMNGAdvertisingOverviewRequest()
|
|
163
163
|
model.from_json_string(json.dumps(args))
|
|
164
164
|
start_time = time.time()
|
|
165
165
|
while True:
|
|
166
|
-
rsp = client.
|
|
166
|
+
rsp = client.DescribeMNGAdvertisingOverview(model)
|
|
167
167
|
result = rsp.to_json_string()
|
|
168
168
|
try:
|
|
169
169
|
json_obj = json.loads(result)
|
|
@@ -182,7 +182,7 @@ def doRollbackMNPVersion(args, parsed_globals):
|
|
|
182
182
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
183
183
|
|
|
184
184
|
|
|
185
|
-
def
|
|
185
|
+
def doCreateMNP(args, parsed_globals):
|
|
186
186
|
g_param = parse_global_arg(parsed_globals)
|
|
187
187
|
|
|
188
188
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -214,11 +214,11 @@ def doRemoveMNP(args, parsed_globals):
|
|
|
214
214
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
215
215
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
216
216
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
217
|
-
model = models.
|
|
217
|
+
model = models.CreateMNPRequest()
|
|
218
218
|
model.from_json_string(json.dumps(args))
|
|
219
219
|
start_time = time.time()
|
|
220
220
|
while True:
|
|
221
|
-
rsp = client.
|
|
221
|
+
rsp = client.CreateMNP(model)
|
|
222
222
|
result = rsp.to_json_string()
|
|
223
223
|
try:
|
|
224
224
|
json_obj = json.loads(result)
|
|
@@ -237,7 +237,7 @@ def doRemoveMNP(args, parsed_globals):
|
|
|
237
237
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
238
238
|
|
|
239
239
|
|
|
240
|
-
def
|
|
240
|
+
def doDescribeUser(args, parsed_globals):
|
|
241
241
|
g_param = parse_global_arg(parsed_globals)
|
|
242
242
|
|
|
243
243
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -269,11 +269,11 @@ def doCreateMNP(args, parsed_globals):
|
|
|
269
269
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
270
270
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
271
271
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
272
|
-
model = models.
|
|
272
|
+
model = models.DescribeUserRequest()
|
|
273
273
|
model.from_json_string(json.dumps(args))
|
|
274
274
|
start_time = time.time()
|
|
275
275
|
while True:
|
|
276
|
-
rsp = client.
|
|
276
|
+
rsp = client.DescribeUser(model)
|
|
277
277
|
result = rsp.to_json_string()
|
|
278
278
|
try:
|
|
279
279
|
json_obj = json.loads(result)
|
|
@@ -292,7 +292,7 @@ def doCreateMNP(args, parsed_globals):
|
|
|
292
292
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
293
293
|
|
|
294
294
|
|
|
295
|
-
def
|
|
295
|
+
def doDescribeMNPActiveUserRealTimeStatistics(args, parsed_globals):
|
|
296
296
|
g_param = parse_global_arg(parsed_globals)
|
|
297
297
|
|
|
298
298
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -324,11 +324,11 @@ def doDescribeApplicationSensitiveAPIList(args, parsed_globals):
|
|
|
324
324
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
325
325
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
326
326
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
327
|
-
model = models.
|
|
327
|
+
model = models.DescribeMNPActiveUserRealTimeStatisticsRequest()
|
|
328
328
|
model.from_json_string(json.dumps(args))
|
|
329
329
|
start_time = time.time()
|
|
330
330
|
while True:
|
|
331
|
-
rsp = client.
|
|
331
|
+
rsp = client.DescribeMNPActiveUserRealTimeStatistics(model)
|
|
332
332
|
result = rsp.to_json_string()
|
|
333
333
|
try:
|
|
334
334
|
json_obj = json.loads(result)
|
|
@@ -347,7 +347,7 @@ def doDescribeApplicationSensitiveAPIList(args, parsed_globals):
|
|
|
347
347
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
348
348
|
|
|
349
349
|
|
|
350
|
-
def
|
|
350
|
+
def doModifyTeam(args, parsed_globals):
|
|
351
351
|
g_param = parse_global_arg(parsed_globals)
|
|
352
352
|
|
|
353
353
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -379,11 +379,11 @@ def doDeleteApplication(args, parsed_globals):
|
|
|
379
379
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
380
380
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
381
381
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
382
|
-
model = models.
|
|
382
|
+
model = models.ModifyTeamRequest()
|
|
383
383
|
model.from_json_string(json.dumps(args))
|
|
384
384
|
start_time = time.time()
|
|
385
385
|
while True:
|
|
386
|
-
rsp = client.
|
|
386
|
+
rsp = client.ModifyTeam(model)
|
|
387
387
|
result = rsp.to_json_string()
|
|
388
388
|
try:
|
|
389
389
|
json_obj = json.loads(result)
|
|
@@ -402,7 +402,7 @@ def doDeleteApplication(args, parsed_globals):
|
|
|
402
402
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
403
403
|
|
|
404
404
|
|
|
405
|
-
def
|
|
405
|
+
def doDescribeAPPDataDetailLineChart(args, parsed_globals):
|
|
406
406
|
g_param = parse_global_arg(parsed_globals)
|
|
407
407
|
|
|
408
408
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -434,11 +434,11 @@ def doDescribeRoleList(args, parsed_globals):
|
|
|
434
434
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
435
435
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
436
436
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
437
|
-
model = models.
|
|
437
|
+
model = models.DescribeAPPDataDetailLineChartRequest()
|
|
438
438
|
model.from_json_string(json.dumps(args))
|
|
439
439
|
start_time = time.time()
|
|
440
440
|
while True:
|
|
441
|
-
rsp = client.
|
|
441
|
+
rsp = client.DescribeAPPDataDetailLineChart(model)
|
|
442
442
|
result = rsp.to_json_string()
|
|
443
443
|
try:
|
|
444
444
|
json_obj = json.loads(result)
|
|
@@ -457,7 +457,7 @@ def doDescribeRoleList(args, parsed_globals):
|
|
|
457
457
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
458
458
|
|
|
459
459
|
|
|
460
|
-
def
|
|
460
|
+
def doDescribeMNPSensitiveAPIPermissionApproval(args, parsed_globals):
|
|
461
461
|
g_param = parse_global_arg(parsed_globals)
|
|
462
462
|
|
|
463
463
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -489,11 +489,11 @@ def doProcessMNPSensitiveAPIPermissionApproval(args, parsed_globals):
|
|
|
489
489
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
490
490
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
491
491
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
492
|
-
model = models.
|
|
492
|
+
model = models.DescribeMNPSensitiveAPIPermissionApprovalRequest()
|
|
493
493
|
model.from_json_string(json.dumps(args))
|
|
494
494
|
start_time = time.time()
|
|
495
495
|
while True:
|
|
496
|
-
rsp = client.
|
|
496
|
+
rsp = client.DescribeMNPSensitiveAPIPermissionApproval(model)
|
|
497
497
|
result = rsp.to_json_string()
|
|
498
498
|
try:
|
|
499
499
|
json_obj = json.loads(result)
|
|
@@ -512,7 +512,7 @@ def doProcessMNPSensitiveAPIPermissionApproval(args, parsed_globals):
|
|
|
512
512
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
513
513
|
|
|
514
514
|
|
|
515
|
-
def
|
|
515
|
+
def doDescribeMNGPaymentLineChart(args, parsed_globals):
|
|
516
516
|
g_param = parse_global_arg(parsed_globals)
|
|
517
517
|
|
|
518
518
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -544,11 +544,11 @@ def doDescribeTeamList(args, parsed_globals):
|
|
|
544
544
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
545
545
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
546
546
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
547
|
-
model = models.
|
|
547
|
+
model = models.DescribeMNGPaymentLineChartRequest()
|
|
548
548
|
model.from_json_string(json.dumps(args))
|
|
549
549
|
start_time = time.time()
|
|
550
550
|
while True:
|
|
551
|
-
rsp = client.
|
|
551
|
+
rsp = client.DescribeMNGPaymentLineChart(model)
|
|
552
552
|
result = rsp.to_json_string()
|
|
553
553
|
try:
|
|
554
554
|
json_obj = json.loads(result)
|
|
@@ -567,7 +567,7 @@ def doDescribeTeamList(args, parsed_globals):
|
|
|
567
567
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
568
568
|
|
|
569
569
|
|
|
570
|
-
def
|
|
570
|
+
def doDisableApplicationSensitiveAPI(args, parsed_globals):
|
|
571
571
|
g_param = parse_global_arg(parsed_globals)
|
|
572
572
|
|
|
573
573
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -599,11 +599,11 @@ def doDescribeApplicationConfigFile(args, parsed_globals):
|
|
|
599
599
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
600
600
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
601
601
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
602
|
-
model = models.
|
|
602
|
+
model = models.DisableApplicationSensitiveAPIRequest()
|
|
603
603
|
model.from_json_string(json.dumps(args))
|
|
604
604
|
start_time = time.time()
|
|
605
605
|
while True:
|
|
606
|
-
rsp = client.
|
|
606
|
+
rsp = client.DisableApplicationSensitiveAPI(model)
|
|
607
607
|
result = rsp.to_json_string()
|
|
608
608
|
try:
|
|
609
609
|
json_obj = json.loads(result)
|
|
@@ -622,7 +622,7 @@ def doDescribeApplicationConfigFile(args, parsed_globals):
|
|
|
622
622
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
623
623
|
|
|
624
624
|
|
|
625
|
-
def
|
|
625
|
+
def doModifyMNPDomain(args, parsed_globals):
|
|
626
626
|
g_param = parse_global_arg(parsed_globals)
|
|
627
627
|
|
|
628
628
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -654,11 +654,11 @@ def doDescribeTeam(args, parsed_globals):
|
|
|
654
654
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
655
655
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
656
656
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
657
|
-
model = models.
|
|
657
|
+
model = models.ModifyMNPDomainRequest()
|
|
658
658
|
model.from_json_string(json.dumps(args))
|
|
659
659
|
start_time = time.time()
|
|
660
660
|
while True:
|
|
661
|
-
rsp = client.
|
|
661
|
+
rsp = client.ModifyMNPDomain(model)
|
|
662
662
|
result = rsp.to_json_string()
|
|
663
663
|
try:
|
|
664
664
|
json_obj = json.loads(result)
|
|
@@ -677,7 +677,7 @@ def doDescribeTeam(args, parsed_globals):
|
|
|
677
677
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
678
678
|
|
|
679
679
|
|
|
680
|
-
def
|
|
680
|
+
def doDescribeTempSecret4UploadFile2Cos(args, parsed_globals):
|
|
681
681
|
g_param = parse_global_arg(parsed_globals)
|
|
682
682
|
|
|
683
683
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -709,11 +709,11 @@ def doProcessMNPApproval(args, parsed_globals):
|
|
|
709
709
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
710
710
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
711
711
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
712
|
-
model = models.
|
|
712
|
+
model = models.DescribeTempSecret4UploadFile2CosRequest()
|
|
713
713
|
model.from_json_string(json.dumps(args))
|
|
714
714
|
start_time = time.time()
|
|
715
715
|
while True:
|
|
716
|
-
rsp = client.
|
|
716
|
+
rsp = client.DescribeTempSecret4UploadFile2Cos(model)
|
|
717
717
|
result = rsp.to_json_string()
|
|
718
718
|
try:
|
|
719
719
|
json_obj = json.loads(result)
|
|
@@ -732,7 +732,7 @@ def doProcessMNPApproval(args, parsed_globals):
|
|
|
732
732
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
733
733
|
|
|
734
734
|
|
|
735
|
-
def
|
|
735
|
+
def doCreateApplicationSensitiveAPI(args, parsed_globals):
|
|
736
736
|
g_param = parse_global_arg(parsed_globals)
|
|
737
737
|
|
|
738
738
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -764,11 +764,11 @@ def doConfigureMNPPreview(args, parsed_globals):
|
|
|
764
764
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
765
765
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
766
766
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
767
|
-
model = models.
|
|
767
|
+
model = models.CreateApplicationSensitiveAPIRequest()
|
|
768
768
|
model.from_json_string(json.dumps(args))
|
|
769
769
|
start_time = time.time()
|
|
770
770
|
while True:
|
|
771
|
-
rsp = client.
|
|
771
|
+
rsp = client.CreateApplicationSensitiveAPI(model)
|
|
772
772
|
result = rsp.to_json_string()
|
|
773
773
|
try:
|
|
774
774
|
json_obj = json.loads(result)
|
|
@@ -787,7 +787,7 @@ def doConfigureMNPPreview(args, parsed_globals):
|
|
|
787
787
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
788
788
|
|
|
789
789
|
|
|
790
|
-
def
|
|
790
|
+
def doCreateUser(args, parsed_globals):
|
|
791
791
|
g_param = parse_global_arg(parsed_globals)
|
|
792
792
|
|
|
793
793
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -819,11 +819,11 @@ def doDescribeMNPApprovalList(args, parsed_globals):
|
|
|
819
819
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
820
820
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
821
821
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
822
|
-
model = models.
|
|
822
|
+
model = models.CreateUserRequest()
|
|
823
823
|
model.from_json_string(json.dumps(args))
|
|
824
824
|
start_time = time.time()
|
|
825
825
|
while True:
|
|
826
|
-
rsp = client.
|
|
826
|
+
rsp = client.CreateUser(model)
|
|
827
827
|
result = rsp.to_json_string()
|
|
828
828
|
try:
|
|
829
829
|
json_obj = json.loads(result)
|
|
@@ -842,7 +842,7 @@ def doDescribeMNPApprovalList(args, parsed_globals):
|
|
|
842
842
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
843
843
|
|
|
844
844
|
|
|
845
|
-
def
|
|
845
|
+
def doDescribeApplication(args, parsed_globals):
|
|
846
846
|
g_param = parse_global_arg(parsed_globals)
|
|
847
847
|
|
|
848
848
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -874,11 +874,11 @@ def doDescribeMNPSensitiveAPIPermissionApprovalList(args, parsed_globals):
|
|
|
874
874
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
875
875
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
876
876
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
877
|
-
model = models.
|
|
877
|
+
model = models.DescribeApplicationRequest()
|
|
878
878
|
model.from_json_string(json.dumps(args))
|
|
879
879
|
start_time = time.time()
|
|
880
880
|
while True:
|
|
881
|
-
rsp = client.
|
|
881
|
+
rsp = client.DescribeApplication(model)
|
|
882
882
|
result = rsp.to_json_string()
|
|
883
883
|
try:
|
|
884
884
|
json_obj = json.loads(result)
|
|
@@ -897,7 +897,7 @@ def doDescribeMNPSensitiveAPIPermissionApprovalList(args, parsed_globals):
|
|
|
897
897
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
898
898
|
|
|
899
899
|
|
|
900
|
-
def
|
|
900
|
+
def doDescribeMNGPaymentOverview(args, parsed_globals):
|
|
901
901
|
g_param = parse_global_arg(parsed_globals)
|
|
902
902
|
|
|
903
903
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -929,11 +929,11 @@ def doModifyApplication(args, parsed_globals):
|
|
|
929
929
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
930
930
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
931
931
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
932
|
-
model = models.
|
|
932
|
+
model = models.DescribeMNGPaymentOverviewRequest()
|
|
933
933
|
model.from_json_string(json.dumps(args))
|
|
934
934
|
start_time = time.time()
|
|
935
935
|
while True:
|
|
936
|
-
rsp = client.
|
|
936
|
+
rsp = client.DescribeMNGPaymentOverview(model)
|
|
937
937
|
result = rsp.to_json_string()
|
|
938
938
|
try:
|
|
939
939
|
json_obj = json.loads(result)
|
|
@@ -952,7 +952,7 @@ def doModifyApplication(args, parsed_globals):
|
|
|
952
952
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
953
953
|
|
|
954
954
|
|
|
955
|
-
def
|
|
955
|
+
def doDescribeUserList(args, parsed_globals):
|
|
956
956
|
g_param = parse_global_arg(parsed_globals)
|
|
957
957
|
|
|
958
958
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -984,11 +984,11 @@ def doDescribeUser(args, parsed_globals):
|
|
|
984
984
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
985
985
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
986
986
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
987
|
-
model = models.
|
|
987
|
+
model = models.DescribeUserListRequest()
|
|
988
988
|
model.from_json_string(json.dumps(args))
|
|
989
989
|
start_time = time.time()
|
|
990
990
|
while True:
|
|
991
|
-
rsp = client.
|
|
991
|
+
rsp = client.DescribeUserList(model)
|
|
992
992
|
result = rsp.to_json_string()
|
|
993
993
|
try:
|
|
994
994
|
json_obj = json.loads(result)
|
|
@@ -1007,7 +1007,7 @@ def doDescribeUser(args, parsed_globals):
|
|
|
1007
1007
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1008
1008
|
|
|
1009
1009
|
|
|
1010
|
-
def
|
|
1010
|
+
def doRollbackMNPVersion(args, parsed_globals):
|
|
1011
1011
|
g_param = parse_global_arg(parsed_globals)
|
|
1012
1012
|
|
|
1013
1013
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1039,11 +1039,11 @@ def doDescribeTeamMemberList(args, parsed_globals):
|
|
|
1039
1039
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1040
1040
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1041
1041
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1042
|
-
model = models.
|
|
1042
|
+
model = models.RollbackMNPVersionRequest()
|
|
1043
1043
|
model.from_json_string(json.dumps(args))
|
|
1044
1044
|
start_time = time.time()
|
|
1045
1045
|
while True:
|
|
1046
|
-
rsp = client.
|
|
1046
|
+
rsp = client.RollbackMNPVersion(model)
|
|
1047
1047
|
result = rsp.to_json_string()
|
|
1048
1048
|
try:
|
|
1049
1049
|
json_obj = json.loads(result)
|
|
@@ -1062,7 +1062,7 @@ def doDescribeTeamMemberList(args, parsed_globals):
|
|
|
1062
1062
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1063
1063
|
|
|
1064
1064
|
|
|
1065
|
-
def
|
|
1065
|
+
def doRemoveMNP(args, parsed_globals):
|
|
1066
1066
|
g_param = parse_global_arg(parsed_globals)
|
|
1067
1067
|
|
|
1068
1068
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1094,11 +1094,11 @@ def doModifyTeam(args, parsed_globals):
|
|
|
1094
1094
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1095
1095
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1096
1096
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1097
|
-
model = models.
|
|
1097
|
+
model = models.RemoveMNPRequest()
|
|
1098
1098
|
model.from_json_string(json.dumps(args))
|
|
1099
1099
|
start_time = time.time()
|
|
1100
1100
|
while True:
|
|
1101
|
-
rsp = client.
|
|
1101
|
+
rsp = client.RemoveMNP(model)
|
|
1102
1102
|
result = rsp.to_json_string()
|
|
1103
1103
|
try:
|
|
1104
1104
|
json_obj = json.loads(result)
|
|
@@ -1117,7 +1117,7 @@ def doModifyTeam(args, parsed_globals):
|
|
|
1117
1117
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1118
1118
|
|
|
1119
1119
|
|
|
1120
|
-
def
|
|
1120
|
+
def doDescribeRoleList(args, parsed_globals):
|
|
1121
1121
|
g_param = parse_global_arg(parsed_globals)
|
|
1122
1122
|
|
|
1123
1123
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1149,11 +1149,11 @@ def doCreateMNPSensitiveAPIPermissionApproval(args, parsed_globals):
|
|
|
1149
1149
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1150
1150
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1151
1151
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1152
|
-
model = models.
|
|
1152
|
+
model = models.DescribeRoleListRequest()
|
|
1153
1153
|
model.from_json_string(json.dumps(args))
|
|
1154
1154
|
start_time = time.time()
|
|
1155
1155
|
while True:
|
|
1156
|
-
rsp = client.
|
|
1156
|
+
rsp = client.DescribeRoleList(model)
|
|
1157
1157
|
result = rsp.to_json_string()
|
|
1158
1158
|
try:
|
|
1159
1159
|
json_obj = json.loads(result)
|
|
@@ -1172,7 +1172,7 @@ def doCreateMNPSensitiveAPIPermissionApproval(args, parsed_globals):
|
|
|
1172
1172
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1173
1173
|
|
|
1174
1174
|
|
|
1175
|
-
def
|
|
1175
|
+
def doDescribeTeamList(args, parsed_globals):
|
|
1176
1176
|
g_param = parse_global_arg(parsed_globals)
|
|
1177
1177
|
|
|
1178
1178
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1204,11 +1204,11 @@ def doDescribeMNPDomainACL(args, parsed_globals):
|
|
|
1204
1204
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1205
1205
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1206
1206
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1207
|
-
model = models.
|
|
1207
|
+
model = models.DescribeTeamListRequest()
|
|
1208
1208
|
model.from_json_string(json.dumps(args))
|
|
1209
1209
|
start_time = time.time()
|
|
1210
1210
|
while True:
|
|
1211
|
-
rsp = client.
|
|
1211
|
+
rsp = client.DescribeTeamList(model)
|
|
1212
1212
|
result = rsp.to_json_string()
|
|
1213
1213
|
try:
|
|
1214
1214
|
json_obj = json.loads(result)
|
|
@@ -1227,7 +1227,7 @@ def doDescribeMNPDomainACL(args, parsed_globals):
|
|
|
1227
1227
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1228
1228
|
|
|
1229
1229
|
|
|
1230
|
-
def
|
|
1230
|
+
def doDescribeMNPAccessAnalysisOverview(args, parsed_globals):
|
|
1231
1231
|
g_param = parse_global_arg(parsed_globals)
|
|
1232
1232
|
|
|
1233
1233
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1259,11 +1259,11 @@ def doDescribeMNPSensitiveAPIPermissionApproval(args, parsed_globals):
|
|
|
1259
1259
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1260
1260
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1261
1261
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1262
|
-
model = models.
|
|
1262
|
+
model = models.DescribeMNPAccessAnalysisOverviewRequest()
|
|
1263
1263
|
model.from_json_string(json.dumps(args))
|
|
1264
1264
|
start_time = time.time()
|
|
1265
1265
|
while True:
|
|
1266
|
-
rsp = client.
|
|
1266
|
+
rsp = client.DescribeMNPAccessAnalysisOverview(model)
|
|
1267
1267
|
result = rsp.to_json_string()
|
|
1268
1268
|
try:
|
|
1269
1269
|
json_obj = json.loads(result)
|
|
@@ -1282,7 +1282,7 @@ def doDescribeMNPSensitiveAPIPermissionApproval(args, parsed_globals):
|
|
|
1282
1282
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1283
1283
|
|
|
1284
1284
|
|
|
1285
|
-
def
|
|
1285
|
+
def doDescribeMNGAccessAnalysisLineChart(args, parsed_globals):
|
|
1286
1286
|
g_param = parse_global_arg(parsed_globals)
|
|
1287
1287
|
|
|
1288
1288
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1314,11 +1314,11 @@ def doDeleteTeam(args, parsed_globals):
|
|
|
1314
1314
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1315
1315
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1316
1316
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1317
|
-
model = models.
|
|
1317
|
+
model = models.DescribeMNGAccessAnalysisLineChartRequest()
|
|
1318
1318
|
model.from_json_string(json.dumps(args))
|
|
1319
1319
|
start_time = time.time()
|
|
1320
1320
|
while True:
|
|
1321
|
-
rsp = client.
|
|
1321
|
+
rsp = client.DescribeMNGAccessAnalysisLineChart(model)
|
|
1322
1322
|
result = rsp.to_json_string()
|
|
1323
1323
|
try:
|
|
1324
1324
|
json_obj = json.loads(result)
|
|
@@ -1337,7 +1337,7 @@ def doDeleteTeam(args, parsed_globals):
|
|
|
1337
1337
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1338
1338
|
|
|
1339
1339
|
|
|
1340
|
-
def
|
|
1340
|
+
def doDescribePaymentDataOverview(args, parsed_globals):
|
|
1341
1341
|
g_param = parse_global_arg(parsed_globals)
|
|
1342
1342
|
|
|
1343
1343
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1369,11 +1369,11 @@ def doDescribeMNP(args, parsed_globals):
|
|
|
1369
1369
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1370
1370
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1371
1371
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1372
|
-
model = models.
|
|
1372
|
+
model = models.DescribePaymentDataOverviewRequest()
|
|
1373
1373
|
model.from_json_string(json.dumps(args))
|
|
1374
1374
|
start_time = time.time()
|
|
1375
1375
|
while True:
|
|
1376
|
-
rsp = client.
|
|
1376
|
+
rsp = client.DescribePaymentDataOverview(model)
|
|
1377
1377
|
result = rsp.to_json_string()
|
|
1378
1378
|
try:
|
|
1379
1379
|
json_obj = json.loads(result)
|
|
@@ -1392,7 +1392,7 @@ def doDescribeMNP(args, parsed_globals):
|
|
|
1392
1392
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1393
1393
|
|
|
1394
1394
|
|
|
1395
|
-
def
|
|
1395
|
+
def doProcessMNPSensitiveAPIPermissionApproval(args, parsed_globals):
|
|
1396
1396
|
g_param = parse_global_arg(parsed_globals)
|
|
1397
1397
|
|
|
1398
1398
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1424,11 +1424,11 @@ def doDescribeUserList(args, parsed_globals):
|
|
|
1424
1424
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1425
1425
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1426
1426
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1427
|
-
model = models.
|
|
1427
|
+
model = models.ProcessMNPSensitiveAPIPermissionApprovalRequest()
|
|
1428
1428
|
model.from_json_string(json.dumps(args))
|
|
1429
1429
|
start_time = time.time()
|
|
1430
1430
|
while True:
|
|
1431
|
-
rsp = client.
|
|
1431
|
+
rsp = client.ProcessMNPSensitiveAPIPermissionApproval(model)
|
|
1432
1432
|
result = rsp.to_json_string()
|
|
1433
1433
|
try:
|
|
1434
1434
|
json_obj = json.loads(result)
|
|
@@ -1447,7 +1447,7 @@ def doDescribeUserList(args, parsed_globals):
|
|
|
1447
1447
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1448
1448
|
|
|
1449
1449
|
|
|
1450
|
-
def
|
|
1450
|
+
def doReleaseMNPVersion(args, parsed_globals):
|
|
1451
1451
|
g_param = parse_global_arg(parsed_globals)
|
|
1452
1452
|
|
|
1453
1453
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1479,11 +1479,11 @@ def doCreateMNPDomainACL(args, parsed_globals):
|
|
|
1479
1479
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1480
1480
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1481
1481
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1482
|
-
model = models.
|
|
1482
|
+
model = models.ReleaseMNPVersionRequest()
|
|
1483
1483
|
model.from_json_string(json.dumps(args))
|
|
1484
1484
|
start_time = time.time()
|
|
1485
1485
|
while True:
|
|
1486
|
-
rsp = client.
|
|
1486
|
+
rsp = client.ReleaseMNPVersion(model)
|
|
1487
1487
|
result = rsp.to_json_string()
|
|
1488
1488
|
try:
|
|
1489
1489
|
json_obj = json.loads(result)
|
|
@@ -1502,7 +1502,7 @@ def doCreateMNPDomainACL(args, parsed_globals):
|
|
|
1502
1502
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1503
1503
|
|
|
1504
1504
|
|
|
1505
|
-
def
|
|
1505
|
+
def doDescribeMNPAdvertisingDetail(args, parsed_globals):
|
|
1506
1506
|
g_param = parse_global_arg(parsed_globals)
|
|
1507
1507
|
|
|
1508
1508
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1534,11 +1534,11 @@ def doAddTeamMember(args, parsed_globals):
|
|
|
1534
1534
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1535
1535
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1536
1536
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1537
|
-
model = models.
|
|
1537
|
+
model = models.DescribeMNPAdvertisingDetailRequest()
|
|
1538
1538
|
model.from_json_string(json.dumps(args))
|
|
1539
1539
|
start_time = time.time()
|
|
1540
1540
|
while True:
|
|
1541
|
-
rsp = client.
|
|
1541
|
+
rsp = client.DescribeMNPAdvertisingDetail(model)
|
|
1542
1542
|
result = rsp.to_json_string()
|
|
1543
1543
|
try:
|
|
1544
1544
|
json_obj = json.loads(result)
|
|
@@ -1557,7 +1557,7 @@ def doAddTeamMember(args, parsed_globals):
|
|
|
1557
1557
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1558
1558
|
|
|
1559
1559
|
|
|
1560
|
-
def
|
|
1560
|
+
def doDeleteTeam(args, parsed_globals):
|
|
1561
1561
|
g_param = parse_global_arg(parsed_globals)
|
|
1562
1562
|
|
|
1563
1563
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1589,11 +1589,11 @@ def doCreateMNPApproval(args, parsed_globals):
|
|
|
1589
1589
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1590
1590
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1591
1591
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1592
|
-
model = models.
|
|
1592
|
+
model = models.DeleteTeamRequest()
|
|
1593
1593
|
model.from_json_string(json.dumps(args))
|
|
1594
1594
|
start_time = time.time()
|
|
1595
1595
|
while True:
|
|
1596
|
-
rsp = client.
|
|
1596
|
+
rsp = client.DeleteTeam(model)
|
|
1597
1597
|
result = rsp.to_json_string()
|
|
1598
1598
|
try:
|
|
1599
1599
|
json_obj = json.loads(result)
|
|
@@ -1612,7 +1612,7 @@ def doCreateMNPApproval(args, parsed_globals):
|
|
|
1612
1612
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1613
1613
|
|
|
1614
1614
|
|
|
1615
|
-
def
|
|
1615
|
+
def doDescribeMNGRetentionData(args, parsed_globals):
|
|
1616
1616
|
g_param = parse_global_arg(parsed_globals)
|
|
1617
1617
|
|
|
1618
1618
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1644,11 +1644,11 @@ def doModifyTeamMember(args, parsed_globals):
|
|
|
1644
1644
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1645
1645
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1646
1646
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1647
|
-
model = models.
|
|
1647
|
+
model = models.DescribeMNGRetentionDataRequest()
|
|
1648
1648
|
model.from_json_string(json.dumps(args))
|
|
1649
1649
|
start_time = time.time()
|
|
1650
1650
|
while True:
|
|
1651
|
-
rsp = client.
|
|
1651
|
+
rsp = client.DescribeMNGRetentionData(model)
|
|
1652
1652
|
result = rsp.to_json_string()
|
|
1653
1653
|
try:
|
|
1654
1654
|
json_obj = json.loads(result)
|
|
@@ -1667,7 +1667,7 @@ def doModifyTeamMember(args, parsed_globals):
|
|
|
1667
1667
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1668
1668
|
|
|
1669
1669
|
|
|
1670
|
-
def
|
|
1670
|
+
def doDescribeApplicationConfigInfos(args, parsed_globals):
|
|
1671
1671
|
g_param = parse_global_arg(parsed_globals)
|
|
1672
1672
|
|
|
1673
1673
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1699,11 +1699,11 @@ def doDisableApplicationSensitiveAPI(args, parsed_globals):
|
|
|
1699
1699
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1700
1700
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1701
1701
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1702
|
-
model = models.
|
|
1702
|
+
model = models.DescribeApplicationConfigInfosRequest()
|
|
1703
1703
|
model.from_json_string(json.dumps(args))
|
|
1704
1704
|
start_time = time.time()
|
|
1705
1705
|
while True:
|
|
1706
|
-
rsp = client.
|
|
1706
|
+
rsp = client.DescribeApplicationConfigInfos(model)
|
|
1707
1707
|
result = rsp.to_json_string()
|
|
1708
1708
|
try:
|
|
1709
1709
|
json_obj = json.loads(result)
|
|
@@ -1722,7 +1722,7 @@ def doDisableApplicationSensitiveAPI(args, parsed_globals):
|
|
|
1722
1722
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1723
1723
|
|
|
1724
1724
|
|
|
1725
|
-
def
|
|
1725
|
+
def doDescribeMNPCategory(args, parsed_globals):
|
|
1726
1726
|
g_param = parse_global_arg(parsed_globals)
|
|
1727
1727
|
|
|
1728
1728
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1754,11 +1754,11 @@ def doReleaseMNPVersion(args, parsed_globals):
|
|
|
1754
1754
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1755
1755
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1756
1756
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1757
|
-
model = models.
|
|
1757
|
+
model = models.DescribeMNPCategoryRequest()
|
|
1758
1758
|
model.from_json_string(json.dumps(args))
|
|
1759
1759
|
start_time = time.time()
|
|
1760
1760
|
while True:
|
|
1761
|
-
rsp = client.
|
|
1761
|
+
rsp = client.DescribeMNPCategory(model)
|
|
1762
1762
|
result = rsp.to_json_string()
|
|
1763
1763
|
try:
|
|
1764
1764
|
json_obj = json.loads(result)
|
|
@@ -1777,7 +1777,7 @@ def doReleaseMNPVersion(args, parsed_globals):
|
|
|
1777
1777
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1778
1778
|
|
|
1779
1779
|
|
|
1780
|
-
def
|
|
1780
|
+
def doDescribeMNGAccessAnalysisDetail(args, parsed_globals):
|
|
1781
1781
|
g_param = parse_global_arg(parsed_globals)
|
|
1782
1782
|
|
|
1783
1783
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1809,11 +1809,11 @@ def doDeleteMNP(args, parsed_globals):
|
|
|
1809
1809
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1810
1810
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1811
1811
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1812
|
-
model = models.
|
|
1812
|
+
model = models.DescribeMNGAccessAnalysisDetailRequest()
|
|
1813
1813
|
model.from_json_string(json.dumps(args))
|
|
1814
1814
|
start_time = time.time()
|
|
1815
1815
|
while True:
|
|
1816
|
-
rsp = client.
|
|
1816
|
+
rsp = client.DescribeMNGAccessAnalysisDetail(model)
|
|
1817
1817
|
result = rsp.to_json_string()
|
|
1818
1818
|
try:
|
|
1819
1819
|
json_obj = json.loads(result)
|
|
@@ -1832,7 +1832,7 @@ def doDeleteMNP(args, parsed_globals):
|
|
|
1832
1832
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1833
1833
|
|
|
1834
1834
|
|
|
1835
|
-
def
|
|
1835
|
+
def doDescribeMNGAccessAnalysisOverview(args, parsed_globals):
|
|
1836
1836
|
g_param = parse_global_arg(parsed_globals)
|
|
1837
1837
|
|
|
1838
1838
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1864,11 +1864,11 @@ def doDescribeMNPSensitiveAPIPermissionList(args, parsed_globals):
|
|
|
1864
1864
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1865
1865
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1866
1866
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1867
|
-
model = models.
|
|
1867
|
+
model = models.DescribeMNGAccessAnalysisOverviewRequest()
|
|
1868
1868
|
model.from_json_string(json.dumps(args))
|
|
1869
1869
|
start_time = time.time()
|
|
1870
1870
|
while True:
|
|
1871
|
-
rsp = client.
|
|
1871
|
+
rsp = client.DescribeMNGAccessAnalysisOverview(model)
|
|
1872
1872
|
result = rsp.to_json_string()
|
|
1873
1873
|
try:
|
|
1874
1874
|
json_obj = json.loads(result)
|
|
@@ -1887,7 +1887,7 @@ def doDescribeMNPSensitiveAPIPermissionList(args, parsed_globals):
|
|
|
1887
1887
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1888
1888
|
|
|
1889
1889
|
|
|
1890
|
-
def
|
|
1890
|
+
def doCreateGlobalDomainACL(args, parsed_globals):
|
|
1891
1891
|
g_param = parse_global_arg(parsed_globals)
|
|
1892
1892
|
|
|
1893
1893
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1919,11 +1919,11 @@ def doDescribeMNPCategory(args, parsed_globals):
|
|
|
1919
1919
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1920
1920
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1921
1921
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1922
|
-
model = models.
|
|
1922
|
+
model = models.CreateGlobalDomainACLRequest()
|
|
1923
1923
|
model.from_json_string(json.dumps(args))
|
|
1924
1924
|
start_time = time.time()
|
|
1925
1925
|
while True:
|
|
1926
|
-
rsp = client.
|
|
1926
|
+
rsp = client.CreateGlobalDomainACL(model)
|
|
1927
1927
|
result = rsp.to_json_string()
|
|
1928
1928
|
try:
|
|
1929
1929
|
json_obj = json.loads(result)
|
|
@@ -1942,7 +1942,7 @@ def doDescribeMNPCategory(args, parsed_globals):
|
|
|
1942
1942
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1943
1943
|
|
|
1944
1944
|
|
|
1945
|
-
def
|
|
1945
|
+
def doDescribeMNPReportDataLineChart(args, parsed_globals):
|
|
1946
1946
|
g_param = parse_global_arg(parsed_globals)
|
|
1947
1947
|
|
|
1948
1948
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1974,11 +1974,11 @@ def doDescribeApplication(args, parsed_globals):
|
|
|
1974
1974
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1975
1975
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1976
1976
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1977
|
-
model = models.
|
|
1977
|
+
model = models.DescribeMNPReportDataLineChartRequest()
|
|
1978
1978
|
model.from_json_string(json.dumps(args))
|
|
1979
1979
|
start_time = time.time()
|
|
1980
1980
|
while True:
|
|
1981
|
-
rsp = client.
|
|
1981
|
+
rsp = client.DescribeMNPReportDataLineChart(model)
|
|
1982
1982
|
result = rsp.to_json_string()
|
|
1983
1983
|
try:
|
|
1984
1984
|
json_obj = json.loads(result)
|
|
@@ -1997,7 +1997,7 @@ def doDescribeApplication(args, parsed_globals):
|
|
|
1997
1997
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1998
1998
|
|
|
1999
1999
|
|
|
2000
|
-
def
|
|
2000
|
+
def doProcessMNPApproval(args, parsed_globals):
|
|
2001
2001
|
g_param = parse_global_arg(parsed_globals)
|
|
2002
2002
|
|
|
2003
2003
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2029,11 +2029,11 @@ def doCreateGlobalDomainACL(args, parsed_globals):
|
|
|
2029
2029
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2030
2030
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2031
2031
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2032
|
-
model = models.
|
|
2032
|
+
model = models.ProcessMNPApprovalRequest()
|
|
2033
2033
|
model.from_json_string(json.dumps(args))
|
|
2034
2034
|
start_time = time.time()
|
|
2035
2035
|
while True:
|
|
2036
|
-
rsp = client.
|
|
2036
|
+
rsp = client.ProcessMNPApproval(model)
|
|
2037
2037
|
result = rsp.to_json_string()
|
|
2038
2038
|
try:
|
|
2039
2039
|
json_obj = json.loads(result)
|
|
@@ -2052,7 +2052,7 @@ def doCreateGlobalDomainACL(args, parsed_globals):
|
|
|
2052
2052
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2053
2053
|
|
|
2054
2054
|
|
|
2055
|
-
def
|
|
2055
|
+
def doCreateMNPVersion(args, parsed_globals):
|
|
2056
2056
|
g_param = parse_global_arg(parsed_globals)
|
|
2057
2057
|
|
|
2058
2058
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2084,11 +2084,11 @@ def doDescribeMNPAllStageVersions(args, parsed_globals):
|
|
|
2084
2084
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2085
2085
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2086
2086
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2087
|
-
model = models.
|
|
2087
|
+
model = models.CreateMNPVersionRequest()
|
|
2088
2088
|
model.from_json_string(json.dumps(args))
|
|
2089
2089
|
start_time = time.time()
|
|
2090
2090
|
while True:
|
|
2091
|
-
rsp = client.
|
|
2091
|
+
rsp = client.CreateMNPVersion(model)
|
|
2092
2092
|
result = rsp.to_json_string()
|
|
2093
2093
|
try:
|
|
2094
2094
|
json_obj = json.loads(result)
|
|
@@ -2107,7 +2107,7 @@ def doDescribeMNPAllStageVersions(args, parsed_globals):
|
|
|
2107
2107
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2108
2108
|
|
|
2109
2109
|
|
|
2110
|
-
def
|
|
2110
|
+
def doDescribeMNGPaymentRetentionAnalysis(args, parsed_globals):
|
|
2111
2111
|
g_param = parse_global_arg(parsed_globals)
|
|
2112
2112
|
|
|
2113
2113
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2139,11 +2139,11 @@ def doModifyMNPDomain(args, parsed_globals):
|
|
|
2139
2139
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2140
2140
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2141
2141
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2142
|
-
model = models.
|
|
2142
|
+
model = models.DescribeMNGPaymentRetentionAnalysisRequest()
|
|
2143
2143
|
model.from_json_string(json.dumps(args))
|
|
2144
2144
|
start_time = time.time()
|
|
2145
2145
|
while True:
|
|
2146
|
-
rsp = client.
|
|
2146
|
+
rsp = client.DescribeMNGPaymentRetentionAnalysis(model)
|
|
2147
2147
|
result = rsp.to_json_string()
|
|
2148
2148
|
try:
|
|
2149
2149
|
json_obj = json.loads(result)
|
|
@@ -2162,7 +2162,7 @@ def doModifyMNPDomain(args, parsed_globals):
|
|
|
2162
2162
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2163
2163
|
|
|
2164
2164
|
|
|
2165
|
-
def
|
|
2165
|
+
def doCreateMNPSensitiveAPIPermissionApproval(args, parsed_globals):
|
|
2166
2166
|
g_param = parse_global_arg(parsed_globals)
|
|
2167
2167
|
|
|
2168
2168
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2194,11 +2194,11 @@ def doDescribeTempSecret4UploadFile2Cos(args, parsed_globals):
|
|
|
2194
2194
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2195
2195
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2196
2196
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2197
|
-
model = models.
|
|
2197
|
+
model = models.CreateMNPSensitiveAPIPermissionApprovalRequest()
|
|
2198
2198
|
model.from_json_string(json.dumps(args))
|
|
2199
2199
|
start_time = time.time()
|
|
2200
2200
|
while True:
|
|
2201
|
-
rsp = client.
|
|
2201
|
+
rsp = client.CreateMNPSensitiveAPIPermissionApproval(model)
|
|
2202
2202
|
result = rsp.to_json_string()
|
|
2203
2203
|
try:
|
|
2204
2204
|
json_obj = json.loads(result)
|
|
@@ -2217,7 +2217,7 @@ def doDescribeTempSecret4UploadFile2Cos(args, parsed_globals):
|
|
|
2217
2217
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2218
2218
|
|
|
2219
2219
|
|
|
2220
|
-
def
|
|
2220
|
+
def doDescribeMNPList(args, parsed_globals):
|
|
2221
2221
|
g_param = parse_global_arg(parsed_globals)
|
|
2222
2222
|
|
|
2223
2223
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2249,11 +2249,11 @@ def doDescribeGlobalDomainACL(args, parsed_globals):
|
|
|
2249
2249
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2250
2250
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2251
2251
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2252
|
-
model = models.
|
|
2252
|
+
model = models.DescribeMNPListRequest()
|
|
2253
2253
|
model.from_json_string(json.dumps(args))
|
|
2254
2254
|
start_time = time.time()
|
|
2255
2255
|
while True:
|
|
2256
|
-
rsp = client.
|
|
2256
|
+
rsp = client.DescribeMNPList(model)
|
|
2257
2257
|
result = rsp.to_json_string()
|
|
2258
2258
|
try:
|
|
2259
2259
|
json_obj = json.loads(result)
|
|
@@ -2272,7 +2272,7 @@ def doDescribeGlobalDomainACL(args, parsed_globals):
|
|
|
2272
2272
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2273
2273
|
|
|
2274
2274
|
|
|
2275
|
-
def
|
|
2275
|
+
def doDescribeMNPMAUDataDetail(args, parsed_globals):
|
|
2276
2276
|
g_param = parse_global_arg(parsed_globals)
|
|
2277
2277
|
|
|
2278
2278
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2304,11 +2304,11 @@ def doModifyMNP(args, parsed_globals):
|
|
|
2304
2304
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2305
2305
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2306
2306
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2307
|
-
model = models.
|
|
2307
|
+
model = models.DescribeMNPMAUDataDetailRequest()
|
|
2308
2308
|
model.from_json_string(json.dumps(args))
|
|
2309
2309
|
start_time = time.time()
|
|
2310
2310
|
while True:
|
|
2311
|
-
rsp = client.
|
|
2311
|
+
rsp = client.DescribeMNPMAUDataDetail(model)
|
|
2312
2312
|
result = rsp.to_json_string()
|
|
2313
2313
|
try:
|
|
2314
2314
|
json_obj = json.loads(result)
|
|
@@ -2327,7 +2327,7 @@ def doModifyMNP(args, parsed_globals):
|
|
|
2327
2327
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2328
2328
|
|
|
2329
2329
|
|
|
2330
|
-
def
|
|
2330
|
+
def doDescribeAdvertisingLineChart(args, parsed_globals):
|
|
2331
2331
|
g_param = parse_global_arg(parsed_globals)
|
|
2332
2332
|
|
|
2333
2333
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2359,11 +2359,11 @@ def doCreateTeam(args, parsed_globals):
|
|
|
2359
2359
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2360
2360
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2361
2361
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2362
|
-
model = models.
|
|
2362
|
+
model = models.DescribeAdvertisingLineChartRequest()
|
|
2363
2363
|
model.from_json_string(json.dumps(args))
|
|
2364
2364
|
start_time = time.time()
|
|
2365
2365
|
while True:
|
|
2366
|
-
rsp = client.
|
|
2366
|
+
rsp = client.DescribeAdvertisingLineChart(model)
|
|
2367
2367
|
result = rsp.to_json_string()
|
|
2368
2368
|
try:
|
|
2369
2369
|
json_obj = json.loads(result)
|
|
@@ -2382,7 +2382,7 @@ def doCreateTeam(args, parsed_globals):
|
|
|
2382
2382
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2383
2383
|
|
|
2384
2384
|
|
|
2385
|
-
def
|
|
2385
|
+
def doCreateApplicationConfig(args, parsed_globals):
|
|
2386
2386
|
g_param = parse_global_arg(parsed_globals)
|
|
2387
2387
|
|
|
2388
2388
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2414,11 +2414,11 @@ def doCreateApplication(args, parsed_globals):
|
|
|
2414
2414
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2415
2415
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2416
2416
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2417
|
-
model = models.
|
|
2417
|
+
model = models.CreateApplicationConfigRequest()
|
|
2418
2418
|
model.from_json_string(json.dumps(args))
|
|
2419
2419
|
start_time = time.time()
|
|
2420
2420
|
while True:
|
|
2421
|
-
rsp = client.
|
|
2421
|
+
rsp = client.CreateApplicationConfig(model)
|
|
2422
2422
|
result = rsp.to_json_string()
|
|
2423
2423
|
try:
|
|
2424
2424
|
json_obj = json.loads(result)
|
|
@@ -2437,7 +2437,7 @@ def doCreateApplication(args, parsed_globals):
|
|
|
2437
2437
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2438
2438
|
|
|
2439
2439
|
|
|
2440
|
-
def
|
|
2440
|
+
def doDescribeMNPOfflinePackageURL(args, parsed_globals):
|
|
2441
2441
|
g_param = parse_global_arg(parsed_globals)
|
|
2442
2442
|
|
|
2443
2443
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2469,11 +2469,11 @@ def doEnableApplicationSensitiveAPI(args, parsed_globals):
|
|
|
2469
2469
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2470
2470
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2471
2471
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2472
|
-
model = models.
|
|
2472
|
+
model = models.DescribeMNPOfflinePackageURLRequest()
|
|
2473
2473
|
model.from_json_string(json.dumps(args))
|
|
2474
2474
|
start_time = time.time()
|
|
2475
2475
|
while True:
|
|
2476
|
-
rsp = client.
|
|
2476
|
+
rsp = client.DescribeMNPOfflinePackageURL(model)
|
|
2477
2477
|
result = rsp.to_json_string()
|
|
2478
2478
|
try:
|
|
2479
2479
|
json_obj = json.loads(result)
|
|
@@ -2492,7 +2492,7 @@ def doEnableApplicationSensitiveAPI(args, parsed_globals):
|
|
|
2492
2492
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2493
2493
|
|
|
2494
2494
|
|
|
2495
|
-
def
|
|
2495
|
+
def doDescribeMNPReportDetail(args, parsed_globals):
|
|
2496
2496
|
g_param = parse_global_arg(parsed_globals)
|
|
2497
2497
|
|
|
2498
2498
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2524,11 +2524,11 @@ def doModifyUser(args, parsed_globals):
|
|
|
2524
2524
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2525
2525
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2526
2526
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2527
|
-
model = models.
|
|
2527
|
+
model = models.DescribeMNPReportDetailRequest()
|
|
2528
2528
|
model.from_json_string(json.dumps(args))
|
|
2529
2529
|
start_time = time.time()
|
|
2530
2530
|
while True:
|
|
2531
|
-
rsp = client.
|
|
2531
|
+
rsp = client.DescribeMNPReportDetail(model)
|
|
2532
2532
|
result = rsp.to_json_string()
|
|
2533
2533
|
try:
|
|
2534
2534
|
json_obj = json.loads(result)
|
|
@@ -2547,7 +2547,7 @@ def doModifyUser(args, parsed_globals):
|
|
|
2547
2547
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2548
2548
|
|
|
2549
2549
|
|
|
2550
|
-
def
|
|
2550
|
+
def doDeleteGlobalDomain(args, parsed_globals):
|
|
2551
2551
|
g_param = parse_global_arg(parsed_globals)
|
|
2552
2552
|
|
|
2553
2553
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2579,11 +2579,11 @@ def doDeleteUser(args, parsed_globals):
|
|
|
2579
2579
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2580
2580
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2581
2581
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2582
|
-
model = models.
|
|
2582
|
+
model = models.DeleteGlobalDomainRequest()
|
|
2583
2583
|
model.from_json_string(json.dumps(args))
|
|
2584
2584
|
start_time = time.time()
|
|
2585
2585
|
while True:
|
|
2586
|
-
rsp = client.
|
|
2586
|
+
rsp = client.DeleteGlobalDomain(model)
|
|
2587
2587
|
result = rsp.to_json_string()
|
|
2588
2588
|
try:
|
|
2589
2589
|
json_obj = json.loads(result)
|
|
@@ -2602,7 +2602,7 @@ def doDeleteUser(args, parsed_globals):
|
|
|
2602
2602
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2603
2603
|
|
|
2604
2604
|
|
|
2605
|
-
def
|
|
2605
|
+
def doDescribeMNPRetentionData(args, parsed_globals):
|
|
2606
2606
|
g_param = parse_global_arg(parsed_globals)
|
|
2607
2607
|
|
|
2608
2608
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2634,11 +2634,11 @@ def doCreateMNPVersion(args, parsed_globals):
|
|
|
2634
2634
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2635
2635
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2636
2636
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2637
|
-
model = models.
|
|
2637
|
+
model = models.DescribeMNPRetentionDataRequest()
|
|
2638
2638
|
model.from_json_string(json.dumps(args))
|
|
2639
2639
|
start_time = time.time()
|
|
2640
2640
|
while True:
|
|
2641
|
-
rsp = client.
|
|
2641
|
+
rsp = client.DescribeMNPRetentionData(model)
|
|
2642
2642
|
result = rsp.to_json_string()
|
|
2643
2643
|
try:
|
|
2644
2644
|
json_obj = json.loads(result)
|
|
@@ -2657,7 +2657,7 @@ def doCreateMNPVersion(args, parsed_globals):
|
|
|
2657
2657
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2658
2658
|
|
|
2659
2659
|
|
|
2660
|
-
def
|
|
2660
|
+
def doDescribeApplicationSensitiveAPIList(args, parsed_globals):
|
|
2661
2661
|
g_param = parse_global_arg(parsed_globals)
|
|
2662
2662
|
|
|
2663
2663
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2689,11 +2689,11 @@ def doModifyGlobalDomain(args, parsed_globals):
|
|
|
2689
2689
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2690
2690
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2691
2691
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2692
|
-
model = models.
|
|
2692
|
+
model = models.DescribeApplicationSensitiveAPIListRequest()
|
|
2693
2693
|
model.from_json_string(json.dumps(args))
|
|
2694
2694
|
start_time = time.time()
|
|
2695
2695
|
while True:
|
|
2696
|
-
rsp = client.
|
|
2696
|
+
rsp = client.DescribeApplicationSensitiveAPIList(model)
|
|
2697
2697
|
result = rsp.to_json_string()
|
|
2698
2698
|
try:
|
|
2699
2699
|
json_obj = json.loads(result)
|
|
@@ -2712,7 +2712,7 @@ def doModifyGlobalDomain(args, parsed_globals):
|
|
|
2712
2712
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2713
2713
|
|
|
2714
2714
|
|
|
2715
|
-
def
|
|
2715
|
+
def doDescribeMNGAdvertisingDetail(args, parsed_globals):
|
|
2716
2716
|
g_param = parse_global_arg(parsed_globals)
|
|
2717
2717
|
|
|
2718
2718
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2744,11 +2744,11 @@ def doDescribeApplicationList(args, parsed_globals):
|
|
|
2744
2744
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2745
2745
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2746
2746
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2747
|
-
model = models.
|
|
2747
|
+
model = models.DescribeMNGAdvertisingDetailRequest()
|
|
2748
2748
|
model.from_json_string(json.dumps(args))
|
|
2749
2749
|
start_time = time.time()
|
|
2750
2750
|
while True:
|
|
2751
|
-
rsp = client.
|
|
2751
|
+
rsp = client.DescribeMNGAdvertisingDetail(model)
|
|
2752
2752
|
result = rsp.to_json_string()
|
|
2753
2753
|
try:
|
|
2754
2754
|
json_obj = json.loads(result)
|
|
@@ -2767,7 +2767,7 @@ def doDescribeApplicationList(args, parsed_globals):
|
|
|
2767
2767
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2768
2768
|
|
|
2769
2769
|
|
|
2770
|
-
def
|
|
2770
|
+
def doDescribeApplicationConfigFile(args, parsed_globals):
|
|
2771
2771
|
g_param = parse_global_arg(parsed_globals)
|
|
2772
2772
|
|
|
2773
2773
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2799,11 +2799,11 @@ def doCreatePresetKey(args, parsed_globals):
|
|
|
2799
2799
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2800
2800
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2801
2801
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2802
|
-
model = models.
|
|
2802
|
+
model = models.DescribeApplicationConfigFileRequest()
|
|
2803
2803
|
model.from_json_string(json.dumps(args))
|
|
2804
2804
|
start_time = time.time()
|
|
2805
2805
|
while True:
|
|
2806
|
-
rsp = client.
|
|
2806
|
+
rsp = client.DescribeApplicationConfigFile(model)
|
|
2807
2807
|
result = rsp.to_json_string()
|
|
2808
2808
|
try:
|
|
2809
2809
|
json_obj = json.loads(result)
|
|
@@ -2822,7 +2822,7 @@ def doCreatePresetKey(args, parsed_globals):
|
|
|
2822
2822
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2823
2823
|
|
|
2824
2824
|
|
|
2825
|
-
def
|
|
2825
|
+
def doDescribeMNGAdvertisingLineChart(args, parsed_globals):
|
|
2826
2826
|
g_param = parse_global_arg(parsed_globals)
|
|
2827
2827
|
|
|
2828
2828
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2854,11 +2854,11 @@ def doDescribeMNPReleasedVersionHistory(args, parsed_globals):
|
|
|
2854
2854
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2855
2855
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2856
2856
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2857
|
-
model = models.
|
|
2857
|
+
model = models.DescribeMNGAdvertisingLineChartRequest()
|
|
2858
2858
|
model.from_json_string(json.dumps(args))
|
|
2859
2859
|
start_time = time.time()
|
|
2860
2860
|
while True:
|
|
2861
|
-
rsp = client.
|
|
2861
|
+
rsp = client.DescribeMNGAdvertisingLineChart(model)
|
|
2862
2862
|
result = rsp.to_json_string()
|
|
2863
2863
|
try:
|
|
2864
2864
|
json_obj = json.loads(result)
|
|
@@ -2877,7 +2877,7 @@ def doDescribeMNPReleasedVersionHistory(args, parsed_globals):
|
|
|
2877
2877
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2878
2878
|
|
|
2879
2879
|
|
|
2880
|
-
def
|
|
2880
|
+
def doDescribeMNPApprovalList(args, parsed_globals):
|
|
2881
2881
|
g_param = parse_global_arg(parsed_globals)
|
|
2882
2882
|
|
|
2883
2883
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2909,11 +2909,11 @@ def doDescribeMNPPreview(args, parsed_globals):
|
|
|
2909
2909
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2910
2910
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2911
2911
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2912
|
-
model = models.
|
|
2912
|
+
model = models.DescribeMNPApprovalListRequest()
|
|
2913
2913
|
model.from_json_string(json.dumps(args))
|
|
2914
2914
|
start_time = time.time()
|
|
2915
2915
|
while True:
|
|
2916
|
-
rsp = client.
|
|
2916
|
+
rsp = client.DescribeMNPApprovalList(model)
|
|
2917
2917
|
result = rsp.to_json_string()
|
|
2918
2918
|
try:
|
|
2919
2919
|
json_obj = json.loads(result)
|
|
@@ -2932,7 +2932,7 @@ def doDescribeMNPPreview(args, parsed_globals):
|
|
|
2932
2932
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2933
2933
|
|
|
2934
2934
|
|
|
2935
|
-
def
|
|
2935
|
+
def doDescribeMNPSensitiveAPIPermissionApprovalList(args, parsed_globals):
|
|
2936
2936
|
g_param = parse_global_arg(parsed_globals)
|
|
2937
2937
|
|
|
2938
2938
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2964,11 +2964,11 @@ def doCreateApplicationSensitiveAPI(args, parsed_globals):
|
|
|
2964
2964
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2965
2965
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2966
2966
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2967
|
-
model = models.
|
|
2967
|
+
model = models.DescribeMNPSensitiveAPIPermissionApprovalListRequest()
|
|
2968
2968
|
model.from_json_string(json.dumps(args))
|
|
2969
2969
|
start_time = time.time()
|
|
2970
2970
|
while True:
|
|
2971
|
-
rsp = client.
|
|
2971
|
+
rsp = client.DescribeMNPSensitiveAPIPermissionApprovalList(model)
|
|
2972
2972
|
result = rsp.to_json_string()
|
|
2973
2973
|
try:
|
|
2974
2974
|
json_obj = json.loads(result)
|
|
@@ -2987,7 +2987,7 @@ def doCreateApplicationSensitiveAPI(args, parsed_globals):
|
|
|
2987
2987
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2988
2988
|
|
|
2989
2989
|
|
|
2990
|
-
def
|
|
2990
|
+
def doModifyApplication(args, parsed_globals):
|
|
2991
2991
|
g_param = parse_global_arg(parsed_globals)
|
|
2992
2992
|
|
|
2993
2993
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3019,11 +3019,1881 @@ def doDeleteTeamMember(args, parsed_globals):
|
|
|
3019
3019
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3020
3020
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3021
3021
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3022
|
-
model = models.
|
|
3022
|
+
model = models.ModifyApplicationRequest()
|
|
3023
3023
|
model.from_json_string(json.dumps(args))
|
|
3024
3024
|
start_time = time.time()
|
|
3025
3025
|
while True:
|
|
3026
|
-
rsp = client.
|
|
3026
|
+
rsp = client.ModifyApplication(model)
|
|
3027
|
+
result = rsp.to_json_string()
|
|
3028
|
+
try:
|
|
3029
|
+
json_obj = json.loads(result)
|
|
3030
|
+
except TypeError as e:
|
|
3031
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3032
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3033
|
+
break
|
|
3034
|
+
cur_time = time.time()
|
|
3035
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3036
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3037
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3038
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3039
|
+
else:
|
|
3040
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3041
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3042
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3043
|
+
|
|
3044
|
+
|
|
3045
|
+
def doDescribeTeamMemberList(args, parsed_globals):
|
|
3046
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3047
|
+
|
|
3048
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3049
|
+
cred = credential.CVMRoleCredential()
|
|
3050
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3051
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3052
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3053
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3054
|
+
)
|
|
3055
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3056
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3057
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3058
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3059
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3060
|
+
else:
|
|
3061
|
+
cred = credential.Credential(
|
|
3062
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3063
|
+
)
|
|
3064
|
+
http_profile = HttpProfile(
|
|
3065
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3066
|
+
reqMethod="POST",
|
|
3067
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3068
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3069
|
+
)
|
|
3070
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3071
|
+
if g_param[OptionsDefine.Language]:
|
|
3072
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3073
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3074
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3075
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3076
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3077
|
+
model = models.DescribeTeamMemberListRequest()
|
|
3078
|
+
model.from_json_string(json.dumps(args))
|
|
3079
|
+
start_time = time.time()
|
|
3080
|
+
while True:
|
|
3081
|
+
rsp = client.DescribeTeamMemberList(model)
|
|
3082
|
+
result = rsp.to_json_string()
|
|
3083
|
+
try:
|
|
3084
|
+
json_obj = json.loads(result)
|
|
3085
|
+
except TypeError as e:
|
|
3086
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3087
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3088
|
+
break
|
|
3089
|
+
cur_time = time.time()
|
|
3090
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3091
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3092
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3093
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3094
|
+
else:
|
|
3095
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3096
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3097
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3098
|
+
|
|
3099
|
+
|
|
3100
|
+
def doDescribeAPPDataOverview(args, parsed_globals):
|
|
3101
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3102
|
+
|
|
3103
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3104
|
+
cred = credential.CVMRoleCredential()
|
|
3105
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3106
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3107
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3108
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3109
|
+
)
|
|
3110
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3111
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3112
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3113
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3114
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3115
|
+
else:
|
|
3116
|
+
cred = credential.Credential(
|
|
3117
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3118
|
+
)
|
|
3119
|
+
http_profile = HttpProfile(
|
|
3120
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3121
|
+
reqMethod="POST",
|
|
3122
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3123
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3124
|
+
)
|
|
3125
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3126
|
+
if g_param[OptionsDefine.Language]:
|
|
3127
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3128
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3129
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3130
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3131
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3132
|
+
model = models.DescribeAPPDataOverviewRequest()
|
|
3133
|
+
model.from_json_string(json.dumps(args))
|
|
3134
|
+
start_time = time.time()
|
|
3135
|
+
while True:
|
|
3136
|
+
rsp = client.DescribeAPPDataOverview(model)
|
|
3137
|
+
result = rsp.to_json_string()
|
|
3138
|
+
try:
|
|
3139
|
+
json_obj = json.loads(result)
|
|
3140
|
+
except TypeError as e:
|
|
3141
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3142
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3143
|
+
break
|
|
3144
|
+
cur_time = time.time()
|
|
3145
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3146
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3147
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3148
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3149
|
+
else:
|
|
3150
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3151
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3152
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3153
|
+
|
|
3154
|
+
|
|
3155
|
+
def doDescribeMNPDomainACL(args, parsed_globals):
|
|
3156
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3157
|
+
|
|
3158
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3159
|
+
cred = credential.CVMRoleCredential()
|
|
3160
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3161
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3162
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3163
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3164
|
+
)
|
|
3165
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3166
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3167
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3168
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3169
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3170
|
+
else:
|
|
3171
|
+
cred = credential.Credential(
|
|
3172
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3173
|
+
)
|
|
3174
|
+
http_profile = HttpProfile(
|
|
3175
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3176
|
+
reqMethod="POST",
|
|
3177
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3178
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3179
|
+
)
|
|
3180
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3181
|
+
if g_param[OptionsDefine.Language]:
|
|
3182
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3183
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3184
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3185
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3186
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3187
|
+
model = models.DescribeMNPDomainACLRequest()
|
|
3188
|
+
model.from_json_string(json.dumps(args))
|
|
3189
|
+
start_time = time.time()
|
|
3190
|
+
while True:
|
|
3191
|
+
rsp = client.DescribeMNPDomainACL(model)
|
|
3192
|
+
result = rsp.to_json_string()
|
|
3193
|
+
try:
|
|
3194
|
+
json_obj = json.loads(result)
|
|
3195
|
+
except TypeError as e:
|
|
3196
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3197
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3198
|
+
break
|
|
3199
|
+
cur_time = time.time()
|
|
3200
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3201
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3202
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3203
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3204
|
+
else:
|
|
3205
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3206
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3207
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3208
|
+
|
|
3209
|
+
|
|
3210
|
+
def doCreateMNPDomainACL(args, parsed_globals):
|
|
3211
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3212
|
+
|
|
3213
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3214
|
+
cred = credential.CVMRoleCredential()
|
|
3215
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3216
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3217
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3218
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3219
|
+
)
|
|
3220
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3221
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3222
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3223
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3224
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3225
|
+
else:
|
|
3226
|
+
cred = credential.Credential(
|
|
3227
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3228
|
+
)
|
|
3229
|
+
http_profile = HttpProfile(
|
|
3230
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3231
|
+
reqMethod="POST",
|
|
3232
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3233
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3234
|
+
)
|
|
3235
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3236
|
+
if g_param[OptionsDefine.Language]:
|
|
3237
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3238
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3239
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3240
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3241
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3242
|
+
model = models.CreateMNPDomainACLRequest()
|
|
3243
|
+
model.from_json_string(json.dumps(args))
|
|
3244
|
+
start_time = time.time()
|
|
3245
|
+
while True:
|
|
3246
|
+
rsp = client.CreateMNPDomainACL(model)
|
|
3247
|
+
result = rsp.to_json_string()
|
|
3248
|
+
try:
|
|
3249
|
+
json_obj = json.loads(result)
|
|
3250
|
+
except TypeError as e:
|
|
3251
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3252
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3253
|
+
break
|
|
3254
|
+
cur_time = time.time()
|
|
3255
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3256
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3257
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3258
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3259
|
+
else:
|
|
3260
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3261
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3262
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3263
|
+
|
|
3264
|
+
|
|
3265
|
+
def doModifyTeamMember(args, parsed_globals):
|
|
3266
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3267
|
+
|
|
3268
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3269
|
+
cred = credential.CVMRoleCredential()
|
|
3270
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3271
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3272
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3273
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3274
|
+
)
|
|
3275
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3276
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3277
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3278
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3279
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3280
|
+
else:
|
|
3281
|
+
cred = credential.Credential(
|
|
3282
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3283
|
+
)
|
|
3284
|
+
http_profile = HttpProfile(
|
|
3285
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3286
|
+
reqMethod="POST",
|
|
3287
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3288
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3289
|
+
)
|
|
3290
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3291
|
+
if g_param[OptionsDefine.Language]:
|
|
3292
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3293
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3294
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3295
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3296
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3297
|
+
model = models.ModifyTeamMemberRequest()
|
|
3298
|
+
model.from_json_string(json.dumps(args))
|
|
3299
|
+
start_time = time.time()
|
|
3300
|
+
while True:
|
|
3301
|
+
rsp = client.ModifyTeamMember(model)
|
|
3302
|
+
result = rsp.to_json_string()
|
|
3303
|
+
try:
|
|
3304
|
+
json_obj = json.loads(result)
|
|
3305
|
+
except TypeError as e:
|
|
3306
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3307
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3308
|
+
break
|
|
3309
|
+
cur_time = time.time()
|
|
3310
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3311
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3312
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3313
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3314
|
+
else:
|
|
3315
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3316
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3317
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3318
|
+
|
|
3319
|
+
|
|
3320
|
+
def doDeleteMNP(args, parsed_globals):
|
|
3321
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3322
|
+
|
|
3323
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3324
|
+
cred = credential.CVMRoleCredential()
|
|
3325
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3326
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3327
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3328
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3329
|
+
)
|
|
3330
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3331
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3332
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3333
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3334
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3335
|
+
else:
|
|
3336
|
+
cred = credential.Credential(
|
|
3337
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3338
|
+
)
|
|
3339
|
+
http_profile = HttpProfile(
|
|
3340
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3341
|
+
reqMethod="POST",
|
|
3342
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3343
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3344
|
+
)
|
|
3345
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3346
|
+
if g_param[OptionsDefine.Language]:
|
|
3347
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3348
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3349
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3350
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3351
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3352
|
+
model = models.DeleteMNPRequest()
|
|
3353
|
+
model.from_json_string(json.dumps(args))
|
|
3354
|
+
start_time = time.time()
|
|
3355
|
+
while True:
|
|
3356
|
+
rsp = client.DeleteMNP(model)
|
|
3357
|
+
result = rsp.to_json_string()
|
|
3358
|
+
try:
|
|
3359
|
+
json_obj = json.loads(result)
|
|
3360
|
+
except TypeError as e:
|
|
3361
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3362
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3363
|
+
break
|
|
3364
|
+
cur_time = time.time()
|
|
3365
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3366
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3367
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3368
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3369
|
+
else:
|
|
3370
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3371
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3372
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3373
|
+
|
|
3374
|
+
|
|
3375
|
+
def doDescribeMNPSensitiveAPIPermissionList(args, parsed_globals):
|
|
3376
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3377
|
+
|
|
3378
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3379
|
+
cred = credential.CVMRoleCredential()
|
|
3380
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3381
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3382
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3383
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3384
|
+
)
|
|
3385
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3386
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3387
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3388
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3389
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3390
|
+
else:
|
|
3391
|
+
cred = credential.Credential(
|
|
3392
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3393
|
+
)
|
|
3394
|
+
http_profile = HttpProfile(
|
|
3395
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3396
|
+
reqMethod="POST",
|
|
3397
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3398
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3399
|
+
)
|
|
3400
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3401
|
+
if g_param[OptionsDefine.Language]:
|
|
3402
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3403
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3404
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3405
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3406
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3407
|
+
model = models.DescribeMNPSensitiveAPIPermissionListRequest()
|
|
3408
|
+
model.from_json_string(json.dumps(args))
|
|
3409
|
+
start_time = time.time()
|
|
3410
|
+
while True:
|
|
3411
|
+
rsp = client.DescribeMNPSensitiveAPIPermissionList(model)
|
|
3412
|
+
result = rsp.to_json_string()
|
|
3413
|
+
try:
|
|
3414
|
+
json_obj = json.loads(result)
|
|
3415
|
+
except TypeError as e:
|
|
3416
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3417
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3418
|
+
break
|
|
3419
|
+
cur_time = time.time()
|
|
3420
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3421
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3422
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3423
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3424
|
+
else:
|
|
3425
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3426
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3427
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3428
|
+
|
|
3429
|
+
|
|
3430
|
+
def doDescribeMNPReleasedVersionHistory(args, parsed_globals):
|
|
3431
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3432
|
+
|
|
3433
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3434
|
+
cred = credential.CVMRoleCredential()
|
|
3435
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3436
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3437
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3438
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3439
|
+
)
|
|
3440
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3441
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3442
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3443
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3444
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3445
|
+
else:
|
|
3446
|
+
cred = credential.Credential(
|
|
3447
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3448
|
+
)
|
|
3449
|
+
http_profile = HttpProfile(
|
|
3450
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3451
|
+
reqMethod="POST",
|
|
3452
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3453
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3454
|
+
)
|
|
3455
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3456
|
+
if g_param[OptionsDefine.Language]:
|
|
3457
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3458
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3459
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3460
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3461
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3462
|
+
model = models.DescribeMNPReleasedVersionHistoryRequest()
|
|
3463
|
+
model.from_json_string(json.dumps(args))
|
|
3464
|
+
start_time = time.time()
|
|
3465
|
+
while True:
|
|
3466
|
+
rsp = client.DescribeMNPReleasedVersionHistory(model)
|
|
3467
|
+
result = rsp.to_json_string()
|
|
3468
|
+
try:
|
|
3469
|
+
json_obj = json.loads(result)
|
|
3470
|
+
except TypeError as e:
|
|
3471
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3472
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3473
|
+
break
|
|
3474
|
+
cur_time = time.time()
|
|
3475
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3476
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3477
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3478
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3479
|
+
else:
|
|
3480
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3481
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3482
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3483
|
+
|
|
3484
|
+
|
|
3485
|
+
def doDescribeMNPAllStageVersions(args, parsed_globals):
|
|
3486
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3487
|
+
|
|
3488
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3489
|
+
cred = credential.CVMRoleCredential()
|
|
3490
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3491
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3492
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3493
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3494
|
+
)
|
|
3495
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3496
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3497
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3498
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3499
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3500
|
+
else:
|
|
3501
|
+
cred = credential.Credential(
|
|
3502
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3503
|
+
)
|
|
3504
|
+
http_profile = HttpProfile(
|
|
3505
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3506
|
+
reqMethod="POST",
|
|
3507
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3508
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3509
|
+
)
|
|
3510
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3511
|
+
if g_param[OptionsDefine.Language]:
|
|
3512
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3513
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3514
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3515
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3516
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3517
|
+
model = models.DescribeMNPAllStageVersionsRequest()
|
|
3518
|
+
model.from_json_string(json.dumps(args))
|
|
3519
|
+
start_time = time.time()
|
|
3520
|
+
while True:
|
|
3521
|
+
rsp = client.DescribeMNPAllStageVersions(model)
|
|
3522
|
+
result = rsp.to_json_string()
|
|
3523
|
+
try:
|
|
3524
|
+
json_obj = json.loads(result)
|
|
3525
|
+
except TypeError as e:
|
|
3526
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3527
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3528
|
+
break
|
|
3529
|
+
cur_time = time.time()
|
|
3530
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3531
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3532
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3533
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3534
|
+
else:
|
|
3535
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3536
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3537
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3538
|
+
|
|
3539
|
+
|
|
3540
|
+
def doDescribeGlobalOverviewReportDetail(args, parsed_globals):
|
|
3541
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3542
|
+
|
|
3543
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3544
|
+
cred = credential.CVMRoleCredential()
|
|
3545
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3546
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3547
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3548
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3549
|
+
)
|
|
3550
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3551
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3552
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3553
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3554
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3555
|
+
else:
|
|
3556
|
+
cred = credential.Credential(
|
|
3557
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3558
|
+
)
|
|
3559
|
+
http_profile = HttpProfile(
|
|
3560
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3561
|
+
reqMethod="POST",
|
|
3562
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3563
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3564
|
+
)
|
|
3565
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3566
|
+
if g_param[OptionsDefine.Language]:
|
|
3567
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3568
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3569
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3570
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3571
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3572
|
+
model = models.DescribeGlobalOverviewReportDetailRequest()
|
|
3573
|
+
model.from_json_string(json.dumps(args))
|
|
3574
|
+
start_time = time.time()
|
|
3575
|
+
while True:
|
|
3576
|
+
rsp = client.DescribeGlobalOverviewReportDetail(model)
|
|
3577
|
+
result = rsp.to_json_string()
|
|
3578
|
+
try:
|
|
3579
|
+
json_obj = json.loads(result)
|
|
3580
|
+
except TypeError as e:
|
|
3581
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3582
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3583
|
+
break
|
|
3584
|
+
cur_time = time.time()
|
|
3585
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3586
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3587
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3588
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3589
|
+
else:
|
|
3590
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3591
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3592
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3593
|
+
|
|
3594
|
+
|
|
3595
|
+
def doDescribeGlobalDomainACL(args, parsed_globals):
|
|
3596
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3597
|
+
|
|
3598
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3599
|
+
cred = credential.CVMRoleCredential()
|
|
3600
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3601
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3602
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3603
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3604
|
+
)
|
|
3605
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3606
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3607
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3608
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3609
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3610
|
+
else:
|
|
3611
|
+
cred = credential.Credential(
|
|
3612
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3613
|
+
)
|
|
3614
|
+
http_profile = HttpProfile(
|
|
3615
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3616
|
+
reqMethod="POST",
|
|
3617
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3618
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3619
|
+
)
|
|
3620
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3621
|
+
if g_param[OptionsDefine.Language]:
|
|
3622
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3623
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3624
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3625
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3626
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3627
|
+
model = models.DescribeGlobalDomainACLRequest()
|
|
3628
|
+
model.from_json_string(json.dumps(args))
|
|
3629
|
+
start_time = time.time()
|
|
3630
|
+
while True:
|
|
3631
|
+
rsp = client.DescribeGlobalDomainACL(model)
|
|
3632
|
+
result = rsp.to_json_string()
|
|
3633
|
+
try:
|
|
3634
|
+
json_obj = json.loads(result)
|
|
3635
|
+
except TypeError as e:
|
|
3636
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3637
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3638
|
+
break
|
|
3639
|
+
cur_time = time.time()
|
|
3640
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3641
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3642
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3643
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3644
|
+
else:
|
|
3645
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3646
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3647
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3648
|
+
|
|
3649
|
+
|
|
3650
|
+
def doDescribeMNPMAUMetricCard(args, parsed_globals):
|
|
3651
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3652
|
+
|
|
3653
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3654
|
+
cred = credential.CVMRoleCredential()
|
|
3655
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3656
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3657
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3658
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3659
|
+
)
|
|
3660
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3661
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3662
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3663
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3664
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3665
|
+
else:
|
|
3666
|
+
cred = credential.Credential(
|
|
3667
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3668
|
+
)
|
|
3669
|
+
http_profile = HttpProfile(
|
|
3670
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3671
|
+
reqMethod="POST",
|
|
3672
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3673
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3674
|
+
)
|
|
3675
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3676
|
+
if g_param[OptionsDefine.Language]:
|
|
3677
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3678
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3679
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3680
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3681
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3682
|
+
model = models.DescribeMNPMAUMetricCardRequest()
|
|
3683
|
+
model.from_json_string(json.dumps(args))
|
|
3684
|
+
start_time = time.time()
|
|
3685
|
+
while True:
|
|
3686
|
+
rsp = client.DescribeMNPMAUMetricCard(model)
|
|
3687
|
+
result = rsp.to_json_string()
|
|
3688
|
+
try:
|
|
3689
|
+
json_obj = json.loads(result)
|
|
3690
|
+
except TypeError as e:
|
|
3691
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3692
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3693
|
+
break
|
|
3694
|
+
cur_time = time.time()
|
|
3695
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3696
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3697
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3698
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3699
|
+
else:
|
|
3700
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3701
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3702
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3703
|
+
|
|
3704
|
+
|
|
3705
|
+
def doCreateTeam(args, parsed_globals):
|
|
3706
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3707
|
+
|
|
3708
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3709
|
+
cred = credential.CVMRoleCredential()
|
|
3710
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3711
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3712
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3713
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3714
|
+
)
|
|
3715
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3716
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3717
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3718
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3719
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3720
|
+
else:
|
|
3721
|
+
cred = credential.Credential(
|
|
3722
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3723
|
+
)
|
|
3724
|
+
http_profile = HttpProfile(
|
|
3725
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3726
|
+
reqMethod="POST",
|
|
3727
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3728
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3729
|
+
)
|
|
3730
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3731
|
+
if g_param[OptionsDefine.Language]:
|
|
3732
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3733
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3734
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3735
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3736
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3737
|
+
model = models.CreateTeamRequest()
|
|
3738
|
+
model.from_json_string(json.dumps(args))
|
|
3739
|
+
start_time = time.time()
|
|
3740
|
+
while True:
|
|
3741
|
+
rsp = client.CreateTeam(model)
|
|
3742
|
+
result = rsp.to_json_string()
|
|
3743
|
+
try:
|
|
3744
|
+
json_obj = json.loads(result)
|
|
3745
|
+
except TypeError as e:
|
|
3746
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3747
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3748
|
+
break
|
|
3749
|
+
cur_time = time.time()
|
|
3750
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3751
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3752
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3753
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3754
|
+
else:
|
|
3755
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3756
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3757
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3758
|
+
|
|
3759
|
+
|
|
3760
|
+
def doCreateApplication(args, parsed_globals):
|
|
3761
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3762
|
+
|
|
3763
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3764
|
+
cred = credential.CVMRoleCredential()
|
|
3765
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3766
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3767
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3768
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3769
|
+
)
|
|
3770
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3771
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3772
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3773
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3774
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3775
|
+
else:
|
|
3776
|
+
cred = credential.Credential(
|
|
3777
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3778
|
+
)
|
|
3779
|
+
http_profile = HttpProfile(
|
|
3780
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3781
|
+
reqMethod="POST",
|
|
3782
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3783
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3784
|
+
)
|
|
3785
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3786
|
+
if g_param[OptionsDefine.Language]:
|
|
3787
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3788
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3789
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3790
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3791
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3792
|
+
model = models.CreateApplicationRequest()
|
|
3793
|
+
model.from_json_string(json.dumps(args))
|
|
3794
|
+
start_time = time.time()
|
|
3795
|
+
while True:
|
|
3796
|
+
rsp = client.CreateApplication(model)
|
|
3797
|
+
result = rsp.to_json_string()
|
|
3798
|
+
try:
|
|
3799
|
+
json_obj = json.loads(result)
|
|
3800
|
+
except TypeError as e:
|
|
3801
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3802
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3803
|
+
break
|
|
3804
|
+
cur_time = time.time()
|
|
3805
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3806
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3807
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3808
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3809
|
+
else:
|
|
3810
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3811
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3812
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3813
|
+
|
|
3814
|
+
|
|
3815
|
+
def doDeleteUser(args, parsed_globals):
|
|
3816
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3817
|
+
|
|
3818
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3819
|
+
cred = credential.CVMRoleCredential()
|
|
3820
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3821
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3822
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3823
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3824
|
+
)
|
|
3825
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3826
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3827
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3828
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3829
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3830
|
+
else:
|
|
3831
|
+
cred = credential.Credential(
|
|
3832
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3833
|
+
)
|
|
3834
|
+
http_profile = HttpProfile(
|
|
3835
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3836
|
+
reqMethod="POST",
|
|
3837
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3838
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3839
|
+
)
|
|
3840
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3841
|
+
if g_param[OptionsDefine.Language]:
|
|
3842
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3843
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3844
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3845
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3846
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3847
|
+
model = models.DeleteUserRequest()
|
|
3848
|
+
model.from_json_string(json.dumps(args))
|
|
3849
|
+
start_time = time.time()
|
|
3850
|
+
while True:
|
|
3851
|
+
rsp = client.DeleteUser(model)
|
|
3852
|
+
result = rsp.to_json_string()
|
|
3853
|
+
try:
|
|
3854
|
+
json_obj = json.loads(result)
|
|
3855
|
+
except TypeError as e:
|
|
3856
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3857
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3858
|
+
break
|
|
3859
|
+
cur_time = time.time()
|
|
3860
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3861
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3862
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3863
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3864
|
+
else:
|
|
3865
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3866
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3867
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3868
|
+
|
|
3869
|
+
|
|
3870
|
+
def doModifyGlobalDomain(args, parsed_globals):
|
|
3871
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3872
|
+
|
|
3873
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3874
|
+
cred = credential.CVMRoleCredential()
|
|
3875
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3876
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3877
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3878
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3879
|
+
)
|
|
3880
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3881
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3882
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3883
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3884
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3885
|
+
else:
|
|
3886
|
+
cred = credential.Credential(
|
|
3887
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3888
|
+
)
|
|
3889
|
+
http_profile = HttpProfile(
|
|
3890
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3891
|
+
reqMethod="POST",
|
|
3892
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3893
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3894
|
+
)
|
|
3895
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3896
|
+
if g_param[OptionsDefine.Language]:
|
|
3897
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3898
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3899
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3900
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3901
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3902
|
+
model = models.ModifyGlobalDomainRequest()
|
|
3903
|
+
model.from_json_string(json.dumps(args))
|
|
3904
|
+
start_time = time.time()
|
|
3905
|
+
while True:
|
|
3906
|
+
rsp = client.ModifyGlobalDomain(model)
|
|
3907
|
+
result = rsp.to_json_string()
|
|
3908
|
+
try:
|
|
3909
|
+
json_obj = json.loads(result)
|
|
3910
|
+
except TypeError as e:
|
|
3911
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3912
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3913
|
+
break
|
|
3914
|
+
cur_time = time.time()
|
|
3915
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3916
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3917
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3918
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3919
|
+
else:
|
|
3920
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3921
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3922
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3923
|
+
|
|
3924
|
+
|
|
3925
|
+
def doCreatePresetKey(args, parsed_globals):
|
|
3926
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3927
|
+
|
|
3928
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3929
|
+
cred = credential.CVMRoleCredential()
|
|
3930
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3931
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3932
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3933
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3934
|
+
)
|
|
3935
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3936
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3937
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3938
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3939
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3940
|
+
else:
|
|
3941
|
+
cred = credential.Credential(
|
|
3942
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3943
|
+
)
|
|
3944
|
+
http_profile = HttpProfile(
|
|
3945
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3946
|
+
reqMethod="POST",
|
|
3947
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3948
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3949
|
+
)
|
|
3950
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3951
|
+
if g_param[OptionsDefine.Language]:
|
|
3952
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3953
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3954
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3955
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3956
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3957
|
+
model = models.CreatePresetKeyRequest()
|
|
3958
|
+
model.from_json_string(json.dumps(args))
|
|
3959
|
+
start_time = time.time()
|
|
3960
|
+
while True:
|
|
3961
|
+
rsp = client.CreatePresetKey(model)
|
|
3962
|
+
result = rsp.to_json_string()
|
|
3963
|
+
try:
|
|
3964
|
+
json_obj = json.loads(result)
|
|
3965
|
+
except TypeError as e:
|
|
3966
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3967
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3968
|
+
break
|
|
3969
|
+
cur_time = time.time()
|
|
3970
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3971
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3972
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3973
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3974
|
+
else:
|
|
3975
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3976
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3977
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3978
|
+
|
|
3979
|
+
|
|
3980
|
+
def doDescribeMNPPreview(args, parsed_globals):
|
|
3981
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3982
|
+
|
|
3983
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3984
|
+
cred = credential.CVMRoleCredential()
|
|
3985
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3986
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3987
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3988
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3989
|
+
)
|
|
3990
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3991
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3992
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3993
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3994
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3995
|
+
else:
|
|
3996
|
+
cred = credential.Credential(
|
|
3997
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3998
|
+
)
|
|
3999
|
+
http_profile = HttpProfile(
|
|
4000
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4001
|
+
reqMethod="POST",
|
|
4002
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4003
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4004
|
+
)
|
|
4005
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4006
|
+
if g_param[OptionsDefine.Language]:
|
|
4007
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4008
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4009
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4010
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4011
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4012
|
+
model = models.DescribeMNPPreviewRequest()
|
|
4013
|
+
model.from_json_string(json.dumps(args))
|
|
4014
|
+
start_time = time.time()
|
|
4015
|
+
while True:
|
|
4016
|
+
rsp = client.DescribeMNPPreview(model)
|
|
4017
|
+
result = rsp.to_json_string()
|
|
4018
|
+
try:
|
|
4019
|
+
json_obj = json.loads(result)
|
|
4020
|
+
except TypeError as e:
|
|
4021
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4022
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4023
|
+
break
|
|
4024
|
+
cur_time = time.time()
|
|
4025
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4026
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4027
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4028
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4029
|
+
else:
|
|
4030
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4031
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4032
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4033
|
+
|
|
4034
|
+
|
|
4035
|
+
def doDescribeMNGActiveUserRealTimeStatistics(args, parsed_globals):
|
|
4036
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4037
|
+
|
|
4038
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4039
|
+
cred = credential.CVMRoleCredential()
|
|
4040
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4041
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4042
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4043
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4044
|
+
)
|
|
4045
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4046
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4047
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4048
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4049
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4050
|
+
else:
|
|
4051
|
+
cred = credential.Credential(
|
|
4052
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4053
|
+
)
|
|
4054
|
+
http_profile = HttpProfile(
|
|
4055
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4056
|
+
reqMethod="POST",
|
|
4057
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4058
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4059
|
+
)
|
|
4060
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4061
|
+
if g_param[OptionsDefine.Language]:
|
|
4062
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4063
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4064
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4065
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4066
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4067
|
+
model = models.DescribeMNGActiveUserRealTimeStatisticsRequest()
|
|
4068
|
+
model.from_json_string(json.dumps(args))
|
|
4069
|
+
start_time = time.time()
|
|
4070
|
+
while True:
|
|
4071
|
+
rsp = client.DescribeMNGActiveUserRealTimeStatistics(model)
|
|
4072
|
+
result = rsp.to_json_string()
|
|
4073
|
+
try:
|
|
4074
|
+
json_obj = json.loads(result)
|
|
4075
|
+
except TypeError as e:
|
|
4076
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4077
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4078
|
+
break
|
|
4079
|
+
cur_time = time.time()
|
|
4080
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4081
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4082
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4083
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4084
|
+
else:
|
|
4085
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4086
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4087
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4088
|
+
|
|
4089
|
+
|
|
4090
|
+
def doDescribeMNPVersion(args, parsed_globals):
|
|
4091
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4092
|
+
|
|
4093
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4094
|
+
cred = credential.CVMRoleCredential()
|
|
4095
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4096
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4097
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4098
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4099
|
+
)
|
|
4100
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4101
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4102
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4103
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4104
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4105
|
+
else:
|
|
4106
|
+
cred = credential.Credential(
|
|
4107
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4108
|
+
)
|
|
4109
|
+
http_profile = HttpProfile(
|
|
4110
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4111
|
+
reqMethod="POST",
|
|
4112
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4113
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4114
|
+
)
|
|
4115
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4116
|
+
if g_param[OptionsDefine.Language]:
|
|
4117
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4118
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4119
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4120
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4121
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4122
|
+
model = models.DescribeMNPVersionRequest()
|
|
4123
|
+
model.from_json_string(json.dumps(args))
|
|
4124
|
+
start_time = time.time()
|
|
4125
|
+
while True:
|
|
4126
|
+
rsp = client.DescribeMNPVersion(model)
|
|
4127
|
+
result = rsp.to_json_string()
|
|
4128
|
+
try:
|
|
4129
|
+
json_obj = json.loads(result)
|
|
4130
|
+
except TypeError as e:
|
|
4131
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4132
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4133
|
+
break
|
|
4134
|
+
cur_time = time.time()
|
|
4135
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4136
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4137
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4138
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4139
|
+
else:
|
|
4140
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4141
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4142
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4143
|
+
|
|
4144
|
+
|
|
4145
|
+
def doDescribeMNGMAUDataDetail(args, parsed_globals):
|
|
4146
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4147
|
+
|
|
4148
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4149
|
+
cred = credential.CVMRoleCredential()
|
|
4150
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4151
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4152
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4153
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4154
|
+
)
|
|
4155
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4156
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4157
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4158
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4159
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4160
|
+
else:
|
|
4161
|
+
cred = credential.Credential(
|
|
4162
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4163
|
+
)
|
|
4164
|
+
http_profile = HttpProfile(
|
|
4165
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4166
|
+
reqMethod="POST",
|
|
4167
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4168
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4169
|
+
)
|
|
4170
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4171
|
+
if g_param[OptionsDefine.Language]:
|
|
4172
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4173
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4174
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4175
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4176
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4177
|
+
model = models.DescribeMNGMAUDataDetailRequest()
|
|
4178
|
+
model.from_json_string(json.dumps(args))
|
|
4179
|
+
start_time = time.time()
|
|
4180
|
+
while True:
|
|
4181
|
+
rsp = client.DescribeMNGMAUDataDetail(model)
|
|
4182
|
+
result = rsp.to_json_string()
|
|
4183
|
+
try:
|
|
4184
|
+
json_obj = json.loads(result)
|
|
4185
|
+
except TypeError as e:
|
|
4186
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4187
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4188
|
+
break
|
|
4189
|
+
cur_time = time.time()
|
|
4190
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4191
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4192
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4193
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4194
|
+
else:
|
|
4195
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4196
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4197
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4198
|
+
|
|
4199
|
+
|
|
4200
|
+
def doDescribeMNGMAUMonthlyComparisonMetricCard(args, parsed_globals):
|
|
4201
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4202
|
+
|
|
4203
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4204
|
+
cred = credential.CVMRoleCredential()
|
|
4205
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4206
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4207
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4208
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4209
|
+
)
|
|
4210
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4211
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4212
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4213
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4214
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4215
|
+
else:
|
|
4216
|
+
cred = credential.Credential(
|
|
4217
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4218
|
+
)
|
|
4219
|
+
http_profile = HttpProfile(
|
|
4220
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4221
|
+
reqMethod="POST",
|
|
4222
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4223
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4224
|
+
)
|
|
4225
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4226
|
+
if g_param[OptionsDefine.Language]:
|
|
4227
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4228
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4229
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4230
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4231
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4232
|
+
model = models.DescribeMNGMAUMonthlyComparisonMetricCardRequest()
|
|
4233
|
+
model.from_json_string(json.dumps(args))
|
|
4234
|
+
start_time = time.time()
|
|
4235
|
+
while True:
|
|
4236
|
+
rsp = client.DescribeMNGMAUMonthlyComparisonMetricCard(model)
|
|
4237
|
+
result = rsp.to_json_string()
|
|
4238
|
+
try:
|
|
4239
|
+
json_obj = json.loads(result)
|
|
4240
|
+
except TypeError as e:
|
|
4241
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4242
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4243
|
+
break
|
|
4244
|
+
cur_time = time.time()
|
|
4245
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4246
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4247
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4248
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4249
|
+
else:
|
|
4250
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4251
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4252
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4253
|
+
|
|
4254
|
+
|
|
4255
|
+
def doDescribeMNGMAULineChart(args, parsed_globals):
|
|
4256
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4257
|
+
|
|
4258
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4259
|
+
cred = credential.CVMRoleCredential()
|
|
4260
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4261
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4262
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4263
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4264
|
+
)
|
|
4265
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4266
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4267
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4268
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4269
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4270
|
+
else:
|
|
4271
|
+
cred = credential.Credential(
|
|
4272
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4273
|
+
)
|
|
4274
|
+
http_profile = HttpProfile(
|
|
4275
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4276
|
+
reqMethod="POST",
|
|
4277
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4278
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4279
|
+
)
|
|
4280
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4281
|
+
if g_param[OptionsDefine.Language]:
|
|
4282
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4283
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4284
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4285
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4286
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4287
|
+
model = models.DescribeMNGMAULineChartRequest()
|
|
4288
|
+
model.from_json_string(json.dumps(args))
|
|
4289
|
+
start_time = time.time()
|
|
4290
|
+
while True:
|
|
4291
|
+
rsp = client.DescribeMNGMAULineChart(model)
|
|
4292
|
+
result = rsp.to_json_string()
|
|
4293
|
+
try:
|
|
4294
|
+
json_obj = json.loads(result)
|
|
4295
|
+
except TypeError as e:
|
|
4296
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4297
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4298
|
+
break
|
|
4299
|
+
cur_time = time.time()
|
|
4300
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4301
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4302
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4303
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4304
|
+
else:
|
|
4305
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4306
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4307
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4308
|
+
|
|
4309
|
+
|
|
4310
|
+
def doDeleteApplication(args, parsed_globals):
|
|
4311
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4312
|
+
|
|
4313
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4314
|
+
cred = credential.CVMRoleCredential()
|
|
4315
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4316
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4317
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4318
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4319
|
+
)
|
|
4320
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4321
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4322
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4323
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4324
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4325
|
+
else:
|
|
4326
|
+
cred = credential.Credential(
|
|
4327
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4328
|
+
)
|
|
4329
|
+
http_profile = HttpProfile(
|
|
4330
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4331
|
+
reqMethod="POST",
|
|
4332
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4333
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4334
|
+
)
|
|
4335
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4336
|
+
if g_param[OptionsDefine.Language]:
|
|
4337
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4338
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4339
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4340
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4341
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4342
|
+
model = models.DeleteApplicationRequest()
|
|
4343
|
+
model.from_json_string(json.dumps(args))
|
|
4344
|
+
start_time = time.time()
|
|
4345
|
+
while True:
|
|
4346
|
+
rsp = client.DeleteApplication(model)
|
|
4347
|
+
result = rsp.to_json_string()
|
|
4348
|
+
try:
|
|
4349
|
+
json_obj = json.loads(result)
|
|
4350
|
+
except TypeError as e:
|
|
4351
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4352
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4353
|
+
break
|
|
4354
|
+
cur_time = time.time()
|
|
4355
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4356
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4357
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4358
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4359
|
+
else:
|
|
4360
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4361
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4362
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4363
|
+
|
|
4364
|
+
|
|
4365
|
+
def doDescribeTeam(args, parsed_globals):
|
|
4366
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4367
|
+
|
|
4368
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4369
|
+
cred = credential.CVMRoleCredential()
|
|
4370
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4371
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4372
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4373
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4374
|
+
)
|
|
4375
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4376
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4377
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4378
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4379
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4380
|
+
else:
|
|
4381
|
+
cred = credential.Credential(
|
|
4382
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4383
|
+
)
|
|
4384
|
+
http_profile = HttpProfile(
|
|
4385
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4386
|
+
reqMethod="POST",
|
|
4387
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4388
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4389
|
+
)
|
|
4390
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4391
|
+
if g_param[OptionsDefine.Language]:
|
|
4392
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4393
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4394
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4395
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4396
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4397
|
+
model = models.DescribeTeamRequest()
|
|
4398
|
+
model.from_json_string(json.dumps(args))
|
|
4399
|
+
start_time = time.time()
|
|
4400
|
+
while True:
|
|
4401
|
+
rsp = client.DescribeTeam(model)
|
|
4402
|
+
result = rsp.to_json_string()
|
|
4403
|
+
try:
|
|
4404
|
+
json_obj = json.loads(result)
|
|
4405
|
+
except TypeError as e:
|
|
4406
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4407
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4408
|
+
break
|
|
4409
|
+
cur_time = time.time()
|
|
4410
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4411
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4412
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4413
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4414
|
+
else:
|
|
4415
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4416
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4417
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4418
|
+
|
|
4419
|
+
|
|
4420
|
+
def doDescribeAdvertisingOverview(args, parsed_globals):
|
|
4421
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4422
|
+
|
|
4423
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4424
|
+
cred = credential.CVMRoleCredential()
|
|
4425
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4426
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4427
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4428
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4429
|
+
)
|
|
4430
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4431
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4432
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4433
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4434
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4435
|
+
else:
|
|
4436
|
+
cred = credential.Credential(
|
|
4437
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4438
|
+
)
|
|
4439
|
+
http_profile = HttpProfile(
|
|
4440
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4441
|
+
reqMethod="POST",
|
|
4442
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4443
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4444
|
+
)
|
|
4445
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4446
|
+
if g_param[OptionsDefine.Language]:
|
|
4447
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4448
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4449
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4450
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4451
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4452
|
+
model = models.DescribeAdvertisingOverviewRequest()
|
|
4453
|
+
model.from_json_string(json.dumps(args))
|
|
4454
|
+
start_time = time.time()
|
|
4455
|
+
while True:
|
|
4456
|
+
rsp = client.DescribeAdvertisingOverview(model)
|
|
4457
|
+
result = rsp.to_json_string()
|
|
4458
|
+
try:
|
|
4459
|
+
json_obj = json.loads(result)
|
|
4460
|
+
except TypeError as e:
|
|
4461
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4462
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4463
|
+
break
|
|
4464
|
+
cur_time = time.time()
|
|
4465
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4466
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4467
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4468
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4469
|
+
else:
|
|
4470
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4471
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4472
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4473
|
+
|
|
4474
|
+
|
|
4475
|
+
def doConfigureMNPPreview(args, parsed_globals):
|
|
4476
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4477
|
+
|
|
4478
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4479
|
+
cred = credential.CVMRoleCredential()
|
|
4480
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4481
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4482
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4483
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4484
|
+
)
|
|
4485
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4486
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4487
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4488
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4489
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4490
|
+
else:
|
|
4491
|
+
cred = credential.Credential(
|
|
4492
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4493
|
+
)
|
|
4494
|
+
http_profile = HttpProfile(
|
|
4495
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4496
|
+
reqMethod="POST",
|
|
4497
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4498
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4499
|
+
)
|
|
4500
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4501
|
+
if g_param[OptionsDefine.Language]:
|
|
4502
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4503
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4504
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4505
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4506
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4507
|
+
model = models.ConfigureMNPPreviewRequest()
|
|
4508
|
+
model.from_json_string(json.dumps(args))
|
|
4509
|
+
start_time = time.time()
|
|
4510
|
+
while True:
|
|
4511
|
+
rsp = client.ConfigureMNPPreview(model)
|
|
4512
|
+
result = rsp.to_json_string()
|
|
4513
|
+
try:
|
|
4514
|
+
json_obj = json.loads(result)
|
|
4515
|
+
except TypeError as e:
|
|
4516
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4517
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4518
|
+
break
|
|
4519
|
+
cur_time = time.time()
|
|
4520
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4521
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4522
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4523
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4524
|
+
else:
|
|
4525
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4526
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4527
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4528
|
+
|
|
4529
|
+
|
|
4530
|
+
def doDescribeMNPPageAnalysisDetail(args, parsed_globals):
|
|
4531
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4532
|
+
|
|
4533
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4534
|
+
cred = credential.CVMRoleCredential()
|
|
4535
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4536
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4537
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4538
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4539
|
+
)
|
|
4540
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4541
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4542
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4543
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4544
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4545
|
+
else:
|
|
4546
|
+
cred = credential.Credential(
|
|
4547
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4548
|
+
)
|
|
4549
|
+
http_profile = HttpProfile(
|
|
4550
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4551
|
+
reqMethod="POST",
|
|
4552
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4553
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4554
|
+
)
|
|
4555
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4556
|
+
if g_param[OptionsDefine.Language]:
|
|
4557
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4558
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4559
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4560
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4561
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4562
|
+
model = models.DescribeMNPPageAnalysisDetailRequest()
|
|
4563
|
+
model.from_json_string(json.dumps(args))
|
|
4564
|
+
start_time = time.time()
|
|
4565
|
+
while True:
|
|
4566
|
+
rsp = client.DescribeMNPPageAnalysisDetail(model)
|
|
4567
|
+
result = rsp.to_json_string()
|
|
4568
|
+
try:
|
|
4569
|
+
json_obj = json.loads(result)
|
|
4570
|
+
except TypeError as e:
|
|
4571
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4572
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4573
|
+
break
|
|
4574
|
+
cur_time = time.time()
|
|
4575
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4576
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4577
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4578
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4579
|
+
else:
|
|
4580
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4581
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4582
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4583
|
+
|
|
4584
|
+
|
|
4585
|
+
def doDescribeGlobalOverviewDataSummary(args, parsed_globals):
|
|
4586
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4587
|
+
|
|
4588
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4589
|
+
cred = credential.CVMRoleCredential()
|
|
4590
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4591
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4592
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4593
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4594
|
+
)
|
|
4595
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4596
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4597
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4598
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4599
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4600
|
+
else:
|
|
4601
|
+
cred = credential.Credential(
|
|
4602
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4603
|
+
)
|
|
4604
|
+
http_profile = HttpProfile(
|
|
4605
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4606
|
+
reqMethod="POST",
|
|
4607
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4608
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4609
|
+
)
|
|
4610
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4611
|
+
if g_param[OptionsDefine.Language]:
|
|
4612
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4613
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4614
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4615
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4616
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4617
|
+
model = models.DescribeGlobalOverviewDataSummaryRequest()
|
|
4618
|
+
model.from_json_string(json.dumps(args))
|
|
4619
|
+
start_time = time.time()
|
|
4620
|
+
while True:
|
|
4621
|
+
rsp = client.DescribeGlobalOverviewDataSummary(model)
|
|
4622
|
+
result = rsp.to_json_string()
|
|
4623
|
+
try:
|
|
4624
|
+
json_obj = json.loads(result)
|
|
4625
|
+
except TypeError as e:
|
|
4626
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4627
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4628
|
+
break
|
|
4629
|
+
cur_time = time.time()
|
|
4630
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4631
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4632
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4633
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4634
|
+
else:
|
|
4635
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4636
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4637
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4638
|
+
|
|
4639
|
+
|
|
4640
|
+
def doDescribeMNP(args, parsed_globals):
|
|
4641
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4642
|
+
|
|
4643
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4644
|
+
cred = credential.CVMRoleCredential()
|
|
4645
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4646
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4647
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4648
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4649
|
+
)
|
|
4650
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4651
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4652
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4653
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4654
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4655
|
+
else:
|
|
4656
|
+
cred = credential.Credential(
|
|
4657
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4658
|
+
)
|
|
4659
|
+
http_profile = HttpProfile(
|
|
4660
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4661
|
+
reqMethod="POST",
|
|
4662
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4663
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4664
|
+
)
|
|
4665
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4666
|
+
if g_param[OptionsDefine.Language]:
|
|
4667
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4668
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4669
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4670
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4671
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4672
|
+
model = models.DescribeMNPRequest()
|
|
4673
|
+
model.from_json_string(json.dumps(args))
|
|
4674
|
+
start_time = time.time()
|
|
4675
|
+
while True:
|
|
4676
|
+
rsp = client.DescribeMNP(model)
|
|
4677
|
+
result = rsp.to_json_string()
|
|
4678
|
+
try:
|
|
4679
|
+
json_obj = json.loads(result)
|
|
4680
|
+
except TypeError as e:
|
|
4681
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4682
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4683
|
+
break
|
|
4684
|
+
cur_time = time.time()
|
|
4685
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4686
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4687
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4688
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4689
|
+
else:
|
|
4690
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4691
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4692
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4693
|
+
|
|
4694
|
+
|
|
4695
|
+
def doAddTeamMember(args, parsed_globals):
|
|
4696
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4697
|
+
|
|
4698
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4699
|
+
cred = credential.CVMRoleCredential()
|
|
4700
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4701
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4702
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4703
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4704
|
+
)
|
|
4705
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4706
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4707
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4708
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4709
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4710
|
+
else:
|
|
4711
|
+
cred = credential.Credential(
|
|
4712
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4713
|
+
)
|
|
4714
|
+
http_profile = HttpProfile(
|
|
4715
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4716
|
+
reqMethod="POST",
|
|
4717
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4718
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4719
|
+
)
|
|
4720
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4721
|
+
if g_param[OptionsDefine.Language]:
|
|
4722
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4723
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4724
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4725
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4726
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4727
|
+
model = models.AddTeamMemberRequest()
|
|
4728
|
+
model.from_json_string(json.dumps(args))
|
|
4729
|
+
start_time = time.time()
|
|
4730
|
+
while True:
|
|
4731
|
+
rsp = client.AddTeamMember(model)
|
|
4732
|
+
result = rsp.to_json_string()
|
|
4733
|
+
try:
|
|
4734
|
+
json_obj = json.loads(result)
|
|
4735
|
+
except TypeError as e:
|
|
4736
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4737
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4738
|
+
break
|
|
4739
|
+
cur_time = time.time()
|
|
4740
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4741
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4742
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4743
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4744
|
+
else:
|
|
4745
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4746
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4747
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4748
|
+
|
|
4749
|
+
|
|
4750
|
+
def doDescribeMNPMAULineChart(args, parsed_globals):
|
|
4751
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4752
|
+
|
|
4753
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4754
|
+
cred = credential.CVMRoleCredential()
|
|
4755
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4756
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4757
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4758
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4759
|
+
)
|
|
4760
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4761
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4762
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4763
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4764
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4765
|
+
else:
|
|
4766
|
+
cred = credential.Credential(
|
|
4767
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4768
|
+
)
|
|
4769
|
+
http_profile = HttpProfile(
|
|
4770
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4771
|
+
reqMethod="POST",
|
|
4772
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4773
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4774
|
+
)
|
|
4775
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4776
|
+
if g_param[OptionsDefine.Language]:
|
|
4777
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4778
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4779
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4780
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4781
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4782
|
+
model = models.DescribeMNPMAULineChartRequest()
|
|
4783
|
+
model.from_json_string(json.dumps(args))
|
|
4784
|
+
start_time = time.time()
|
|
4785
|
+
while True:
|
|
4786
|
+
rsp = client.DescribeMNPMAULineChart(model)
|
|
4787
|
+
result = rsp.to_json_string()
|
|
4788
|
+
try:
|
|
4789
|
+
json_obj = json.loads(result)
|
|
4790
|
+
except TypeError as e:
|
|
4791
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4792
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4793
|
+
break
|
|
4794
|
+
cur_time = time.time()
|
|
4795
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4796
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4797
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4798
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4799
|
+
else:
|
|
4800
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4801
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4802
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4803
|
+
|
|
4804
|
+
|
|
4805
|
+
def doCreateMNPApproval(args, parsed_globals):
|
|
4806
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4807
|
+
|
|
4808
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4809
|
+
cred = credential.CVMRoleCredential()
|
|
4810
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4811
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4812
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4813
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4814
|
+
)
|
|
4815
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4816
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4817
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4818
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4819
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4820
|
+
else:
|
|
4821
|
+
cred = credential.Credential(
|
|
4822
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4823
|
+
)
|
|
4824
|
+
http_profile = HttpProfile(
|
|
4825
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4826
|
+
reqMethod="POST",
|
|
4827
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4828
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4829
|
+
)
|
|
4830
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4831
|
+
if g_param[OptionsDefine.Language]:
|
|
4832
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4833
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4834
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4835
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4836
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4837
|
+
model = models.CreateMNPApprovalRequest()
|
|
4838
|
+
model.from_json_string(json.dumps(args))
|
|
4839
|
+
start_time = time.time()
|
|
4840
|
+
while True:
|
|
4841
|
+
rsp = client.CreateMNPApproval(model)
|
|
4842
|
+
result = rsp.to_json_string()
|
|
4843
|
+
try:
|
|
4844
|
+
json_obj = json.loads(result)
|
|
4845
|
+
except TypeError as e:
|
|
4846
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4847
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4848
|
+
break
|
|
4849
|
+
cur_time = time.time()
|
|
4850
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4851
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4852
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4853
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4854
|
+
else:
|
|
4855
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4856
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4857
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4858
|
+
|
|
4859
|
+
|
|
4860
|
+
def doDescribePaymentDataDetail(args, parsed_globals):
|
|
4861
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4862
|
+
|
|
4863
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4864
|
+
cred = credential.CVMRoleCredential()
|
|
4865
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4866
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4867
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4868
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4869
|
+
)
|
|
4870
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4871
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4872
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4873
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4874
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4875
|
+
else:
|
|
4876
|
+
cred = credential.Credential(
|
|
4877
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4878
|
+
)
|
|
4879
|
+
http_profile = HttpProfile(
|
|
4880
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4881
|
+
reqMethod="POST",
|
|
4882
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4883
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4884
|
+
)
|
|
4885
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4886
|
+
if g_param[OptionsDefine.Language]:
|
|
4887
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4888
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4889
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4890
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4891
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4892
|
+
model = models.DescribePaymentDataDetailRequest()
|
|
4893
|
+
model.from_json_string(json.dumps(args))
|
|
4894
|
+
start_time = time.time()
|
|
4895
|
+
while True:
|
|
4896
|
+
rsp = client.DescribePaymentDataDetail(model)
|
|
3027
4897
|
result = rsp.to_json_string()
|
|
3028
4898
|
try:
|
|
3029
4899
|
json_obj = json.loads(result)
|
|
@@ -3042,7 +4912,7 @@ def doDeleteTeamMember(args, parsed_globals):
|
|
|
3042
4912
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3043
4913
|
|
|
3044
4914
|
|
|
3045
|
-
def
|
|
4915
|
+
def doDescribePaymentDataLineChart(args, parsed_globals):
|
|
3046
4916
|
g_param = parse_global_arg(parsed_globals)
|
|
3047
4917
|
|
|
3048
4918
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3074,11 +4944,11 @@ def doDescribeMNPList(args, parsed_globals):
|
|
|
3074
4944
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3075
4945
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3076
4946
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3077
|
-
model = models.
|
|
4947
|
+
model = models.DescribePaymentDataLineChartRequest()
|
|
3078
4948
|
model.from_json_string(json.dumps(args))
|
|
3079
4949
|
start_time = time.time()
|
|
3080
4950
|
while True:
|
|
3081
|
-
rsp = client.
|
|
4951
|
+
rsp = client.DescribePaymentDataLineChart(model)
|
|
3082
4952
|
result = rsp.to_json_string()
|
|
3083
4953
|
try:
|
|
3084
4954
|
json_obj = json.loads(result)
|
|
@@ -3097,7 +4967,7 @@ def doDescribeMNPList(args, parsed_globals):
|
|
|
3097
4967
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3098
4968
|
|
|
3099
4969
|
|
|
3100
|
-
def
|
|
4970
|
+
def doModifyMNP(args, parsed_globals):
|
|
3101
4971
|
g_param = parse_global_arg(parsed_globals)
|
|
3102
4972
|
|
|
3103
4973
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3129,11 +4999,11 @@ def doCreateUser(args, parsed_globals):
|
|
|
3129
4999
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3130
5000
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3131
5001
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3132
|
-
model = models.
|
|
5002
|
+
model = models.ModifyMNPRequest()
|
|
3133
5003
|
model.from_json_string(json.dumps(args))
|
|
3134
5004
|
start_time = time.time()
|
|
3135
5005
|
while True:
|
|
3136
|
-
rsp = client.
|
|
5006
|
+
rsp = client.ModifyMNP(model)
|
|
3137
5007
|
result = rsp.to_json_string()
|
|
3138
5008
|
try:
|
|
3139
5009
|
json_obj = json.loads(result)
|
|
@@ -3152,7 +5022,7 @@ def doCreateUser(args, parsed_globals):
|
|
|
3152
5022
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3153
5023
|
|
|
3154
5024
|
|
|
3155
|
-
def
|
|
5025
|
+
def doEnableApplicationSensitiveAPI(args, parsed_globals):
|
|
3156
5026
|
g_param = parse_global_arg(parsed_globals)
|
|
3157
5027
|
|
|
3158
5028
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3184,11 +5054,121 @@ def doDescribeMNPVersion(args, parsed_globals):
|
|
|
3184
5054
|
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3185
5055
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3186
5056
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3187
|
-
model = models.
|
|
5057
|
+
model = models.EnableApplicationSensitiveAPIRequest()
|
|
3188
5058
|
model.from_json_string(json.dumps(args))
|
|
3189
5059
|
start_time = time.time()
|
|
3190
5060
|
while True:
|
|
3191
|
-
rsp = client.
|
|
5061
|
+
rsp = client.EnableApplicationSensitiveAPI(model)
|
|
5062
|
+
result = rsp.to_json_string()
|
|
5063
|
+
try:
|
|
5064
|
+
json_obj = json.loads(result)
|
|
5065
|
+
except TypeError as e:
|
|
5066
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
5067
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
5068
|
+
break
|
|
5069
|
+
cur_time = time.time()
|
|
5070
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
5071
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
5072
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
5073
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
5074
|
+
else:
|
|
5075
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
5076
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
5077
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
5078
|
+
|
|
5079
|
+
|
|
5080
|
+
def doModifyUser(args, parsed_globals):
|
|
5081
|
+
g_param = parse_global_arg(parsed_globals)
|
|
5082
|
+
|
|
5083
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
5084
|
+
cred = credential.CVMRoleCredential()
|
|
5085
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
5086
|
+
cred = credential.STSAssumeRoleCredential(
|
|
5087
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5088
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5089
|
+
)
|
|
5090
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5091
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5092
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5093
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5094
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5095
|
+
else:
|
|
5096
|
+
cred = credential.Credential(
|
|
5097
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
5098
|
+
)
|
|
5099
|
+
http_profile = HttpProfile(
|
|
5100
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
5101
|
+
reqMethod="POST",
|
|
5102
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
5103
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
5104
|
+
)
|
|
5105
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
5106
|
+
if g_param[OptionsDefine.Language]:
|
|
5107
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
5108
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
5109
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
5110
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
5111
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
5112
|
+
model = models.ModifyUserRequest()
|
|
5113
|
+
model.from_json_string(json.dumps(args))
|
|
5114
|
+
start_time = time.time()
|
|
5115
|
+
while True:
|
|
5116
|
+
rsp = client.ModifyUser(model)
|
|
5117
|
+
result = rsp.to_json_string()
|
|
5118
|
+
try:
|
|
5119
|
+
json_obj = json.loads(result)
|
|
5120
|
+
except TypeError as e:
|
|
5121
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
5122
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
5123
|
+
break
|
|
5124
|
+
cur_time = time.time()
|
|
5125
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
5126
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
5127
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
5128
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
5129
|
+
else:
|
|
5130
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
5131
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
5132
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
5133
|
+
|
|
5134
|
+
|
|
5135
|
+
def doDeleteTeamMember(args, parsed_globals):
|
|
5136
|
+
g_param = parse_global_arg(parsed_globals)
|
|
5137
|
+
|
|
5138
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
5139
|
+
cred = credential.CVMRoleCredential()
|
|
5140
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
5141
|
+
cred = credential.STSAssumeRoleCredential(
|
|
5142
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5143
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5144
|
+
)
|
|
5145
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5146
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5147
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5148
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5149
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5150
|
+
else:
|
|
5151
|
+
cred = credential.Credential(
|
|
5152
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
5153
|
+
)
|
|
5154
|
+
http_profile = HttpProfile(
|
|
5155
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
5156
|
+
reqMethod="POST",
|
|
5157
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
5158
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
5159
|
+
)
|
|
5160
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
5161
|
+
if g_param[OptionsDefine.Language]:
|
|
5162
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
5163
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
5164
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
5165
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
5166
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
5167
|
+
model = models.DeleteTeamMemberRequest()
|
|
5168
|
+
model.from_json_string(json.dumps(args))
|
|
5169
|
+
start_time = time.time()
|
|
5170
|
+
while True:
|
|
5171
|
+
rsp = client.DeleteTeamMember(model)
|
|
3192
5172
|
result = rsp.to_json_string()
|
|
3193
5173
|
try:
|
|
3194
5174
|
json_obj = json.loads(result)
|
|
@@ -3262,6 +5242,61 @@ def doDeleteApplicationSensitiveAPI(args, parsed_globals):
|
|
|
3262
5242
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3263
5243
|
|
|
3264
5244
|
|
|
5245
|
+
def doDescribeApplicationList(args, parsed_globals):
|
|
5246
|
+
g_param = parse_global_arg(parsed_globals)
|
|
5247
|
+
|
|
5248
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
5249
|
+
cred = credential.CVMRoleCredential()
|
|
5250
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
5251
|
+
cred = credential.STSAssumeRoleCredential(
|
|
5252
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5253
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5254
|
+
)
|
|
5255
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5256
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5257
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5258
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5259
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5260
|
+
else:
|
|
5261
|
+
cred = credential.Credential(
|
|
5262
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
5263
|
+
)
|
|
5264
|
+
http_profile = HttpProfile(
|
|
5265
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
5266
|
+
reqMethod="POST",
|
|
5267
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
5268
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
5269
|
+
)
|
|
5270
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
5271
|
+
if g_param[OptionsDefine.Language]:
|
|
5272
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
5273
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
5274
|
+
client = mod.TcsasClient(cred, g_param[OptionsDefine.Region], profile)
|
|
5275
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
5276
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
5277
|
+
model = models.DescribeApplicationListRequest()
|
|
5278
|
+
model.from_json_string(json.dumps(args))
|
|
5279
|
+
start_time = time.time()
|
|
5280
|
+
while True:
|
|
5281
|
+
rsp = client.DescribeApplicationList(model)
|
|
5282
|
+
result = rsp.to_json_string()
|
|
5283
|
+
try:
|
|
5284
|
+
json_obj = json.loads(result)
|
|
5285
|
+
except TypeError as e:
|
|
5286
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
5287
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
5288
|
+
break
|
|
5289
|
+
cur_time = time.time()
|
|
5290
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
5291
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
5292
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
5293
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
5294
|
+
else:
|
|
5295
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
5296
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
5297
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
5298
|
+
|
|
5299
|
+
|
|
3265
5300
|
CLIENT_MAP = {
|
|
3266
5301
|
"v20250106": tcsas_client_v20250106,
|
|
3267
5302
|
|
|
@@ -3273,65 +5308,102 @@ MODELS_MAP = {
|
|
|
3273
5308
|
}
|
|
3274
5309
|
|
|
3275
5310
|
ACTION_MAP = {
|
|
3276
|
-
"
|
|
3277
|
-
"
|
|
5311
|
+
"DescribeMNGPaymentReportDetail": doDescribeMNGPaymentReportDetail,
|
|
5312
|
+
"ModifyApplicationConfig": doModifyApplicationConfig,
|
|
5313
|
+
"DescribeMNGAdvertisingOverview": doDescribeMNGAdvertisingOverview,
|
|
5314
|
+
"CreateMNP": doCreateMNP,
|
|
5315
|
+
"DescribeUser": doDescribeUser,
|
|
5316
|
+
"DescribeMNPActiveUserRealTimeStatistics": doDescribeMNPActiveUserRealTimeStatistics,
|
|
5317
|
+
"ModifyTeam": doModifyTeam,
|
|
5318
|
+
"DescribeAPPDataDetailLineChart": doDescribeAPPDataDetailLineChart,
|
|
5319
|
+
"DescribeMNPSensitiveAPIPermissionApproval": doDescribeMNPSensitiveAPIPermissionApproval,
|
|
5320
|
+
"DescribeMNGPaymentLineChart": doDescribeMNGPaymentLineChart,
|
|
5321
|
+
"DisableApplicationSensitiveAPI": doDisableApplicationSensitiveAPI,
|
|
5322
|
+
"ModifyMNPDomain": doModifyMNPDomain,
|
|
5323
|
+
"DescribeTempSecret4UploadFile2Cos": doDescribeTempSecret4UploadFile2Cos,
|
|
5324
|
+
"CreateApplicationSensitiveAPI": doCreateApplicationSensitiveAPI,
|
|
5325
|
+
"CreateUser": doCreateUser,
|
|
5326
|
+
"DescribeApplication": doDescribeApplication,
|
|
5327
|
+
"DescribeMNGPaymentOverview": doDescribeMNGPaymentOverview,
|
|
5328
|
+
"DescribeUserList": doDescribeUserList,
|
|
3278
5329
|
"RollbackMNPVersion": doRollbackMNPVersion,
|
|
3279
5330
|
"RemoveMNP": doRemoveMNP,
|
|
3280
|
-
"CreateMNP": doCreateMNP,
|
|
3281
|
-
"DescribeApplicationSensitiveAPIList": doDescribeApplicationSensitiveAPIList,
|
|
3282
|
-
"DeleteApplication": doDeleteApplication,
|
|
3283
5331
|
"DescribeRoleList": doDescribeRoleList,
|
|
3284
|
-
"ProcessMNPSensitiveAPIPermissionApproval": doProcessMNPSensitiveAPIPermissionApproval,
|
|
3285
5332
|
"DescribeTeamList": doDescribeTeamList,
|
|
3286
|
-
"
|
|
3287
|
-
"
|
|
5333
|
+
"DescribeMNPAccessAnalysisOverview": doDescribeMNPAccessAnalysisOverview,
|
|
5334
|
+
"DescribeMNGAccessAnalysisLineChart": doDescribeMNGAccessAnalysisLineChart,
|
|
5335
|
+
"DescribePaymentDataOverview": doDescribePaymentDataOverview,
|
|
5336
|
+
"ProcessMNPSensitiveAPIPermissionApproval": doProcessMNPSensitiveAPIPermissionApproval,
|
|
5337
|
+
"ReleaseMNPVersion": doReleaseMNPVersion,
|
|
5338
|
+
"DescribeMNPAdvertisingDetail": doDescribeMNPAdvertisingDetail,
|
|
5339
|
+
"DeleteTeam": doDeleteTeam,
|
|
5340
|
+
"DescribeMNGRetentionData": doDescribeMNGRetentionData,
|
|
5341
|
+
"DescribeApplicationConfigInfos": doDescribeApplicationConfigInfos,
|
|
5342
|
+
"DescribeMNPCategory": doDescribeMNPCategory,
|
|
5343
|
+
"DescribeMNGAccessAnalysisDetail": doDescribeMNGAccessAnalysisDetail,
|
|
5344
|
+
"DescribeMNGAccessAnalysisOverview": doDescribeMNGAccessAnalysisOverview,
|
|
5345
|
+
"CreateGlobalDomainACL": doCreateGlobalDomainACL,
|
|
5346
|
+
"DescribeMNPReportDataLineChart": doDescribeMNPReportDataLineChart,
|
|
3288
5347
|
"ProcessMNPApproval": doProcessMNPApproval,
|
|
3289
|
-
"
|
|
5348
|
+
"CreateMNPVersion": doCreateMNPVersion,
|
|
5349
|
+
"DescribeMNGPaymentRetentionAnalysis": doDescribeMNGPaymentRetentionAnalysis,
|
|
5350
|
+
"CreateMNPSensitiveAPIPermissionApproval": doCreateMNPSensitiveAPIPermissionApproval,
|
|
5351
|
+
"DescribeMNPList": doDescribeMNPList,
|
|
5352
|
+
"DescribeMNPMAUDataDetail": doDescribeMNPMAUDataDetail,
|
|
5353
|
+
"DescribeAdvertisingLineChart": doDescribeAdvertisingLineChart,
|
|
5354
|
+
"CreateApplicationConfig": doCreateApplicationConfig,
|
|
5355
|
+
"DescribeMNPOfflinePackageURL": doDescribeMNPOfflinePackageURL,
|
|
5356
|
+
"DescribeMNPReportDetail": doDescribeMNPReportDetail,
|
|
5357
|
+
"DeleteGlobalDomain": doDeleteGlobalDomain,
|
|
5358
|
+
"DescribeMNPRetentionData": doDescribeMNPRetentionData,
|
|
5359
|
+
"DescribeApplicationSensitiveAPIList": doDescribeApplicationSensitiveAPIList,
|
|
5360
|
+
"DescribeMNGAdvertisingDetail": doDescribeMNGAdvertisingDetail,
|
|
5361
|
+
"DescribeApplicationConfigFile": doDescribeApplicationConfigFile,
|
|
5362
|
+
"DescribeMNGAdvertisingLineChart": doDescribeMNGAdvertisingLineChart,
|
|
3290
5363
|
"DescribeMNPApprovalList": doDescribeMNPApprovalList,
|
|
3291
5364
|
"DescribeMNPSensitiveAPIPermissionApprovalList": doDescribeMNPSensitiveAPIPermissionApprovalList,
|
|
3292
5365
|
"ModifyApplication": doModifyApplication,
|
|
3293
|
-
"DescribeUser": doDescribeUser,
|
|
3294
5366
|
"DescribeTeamMemberList": doDescribeTeamMemberList,
|
|
3295
|
-
"
|
|
3296
|
-
"CreateMNPSensitiveAPIPermissionApproval": doCreateMNPSensitiveAPIPermissionApproval,
|
|
5367
|
+
"DescribeAPPDataOverview": doDescribeAPPDataOverview,
|
|
3297
5368
|
"DescribeMNPDomainACL": doDescribeMNPDomainACL,
|
|
3298
|
-
"DescribeMNPSensitiveAPIPermissionApproval": doDescribeMNPSensitiveAPIPermissionApproval,
|
|
3299
|
-
"DeleteTeam": doDeleteTeam,
|
|
3300
|
-
"DescribeMNP": doDescribeMNP,
|
|
3301
|
-
"DescribeUserList": doDescribeUserList,
|
|
3302
5369
|
"CreateMNPDomainACL": doCreateMNPDomainACL,
|
|
3303
|
-
"AddTeamMember": doAddTeamMember,
|
|
3304
|
-
"CreateMNPApproval": doCreateMNPApproval,
|
|
3305
5370
|
"ModifyTeamMember": doModifyTeamMember,
|
|
3306
|
-
"DisableApplicationSensitiveAPI": doDisableApplicationSensitiveAPI,
|
|
3307
|
-
"ReleaseMNPVersion": doReleaseMNPVersion,
|
|
3308
5371
|
"DeleteMNP": doDeleteMNP,
|
|
3309
5372
|
"DescribeMNPSensitiveAPIPermissionList": doDescribeMNPSensitiveAPIPermissionList,
|
|
3310
|
-
"
|
|
3311
|
-
"DescribeApplication": doDescribeApplication,
|
|
3312
|
-
"CreateGlobalDomainACL": doCreateGlobalDomainACL,
|
|
5373
|
+
"DescribeMNPReleasedVersionHistory": doDescribeMNPReleasedVersionHistory,
|
|
3313
5374
|
"DescribeMNPAllStageVersions": doDescribeMNPAllStageVersions,
|
|
3314
|
-
"
|
|
3315
|
-
"DescribeTempSecret4UploadFile2Cos": doDescribeTempSecret4UploadFile2Cos,
|
|
5375
|
+
"DescribeGlobalOverviewReportDetail": doDescribeGlobalOverviewReportDetail,
|
|
3316
5376
|
"DescribeGlobalDomainACL": doDescribeGlobalDomainACL,
|
|
3317
|
-
"
|
|
5377
|
+
"DescribeMNPMAUMetricCard": doDescribeMNPMAUMetricCard,
|
|
3318
5378
|
"CreateTeam": doCreateTeam,
|
|
3319
5379
|
"CreateApplication": doCreateApplication,
|
|
3320
|
-
"EnableApplicationSensitiveAPI": doEnableApplicationSensitiveAPI,
|
|
3321
|
-
"ModifyUser": doModifyUser,
|
|
3322
5380
|
"DeleteUser": doDeleteUser,
|
|
3323
|
-
"CreateMNPVersion": doCreateMNPVersion,
|
|
3324
5381
|
"ModifyGlobalDomain": doModifyGlobalDomain,
|
|
3325
|
-
"DescribeApplicationList": doDescribeApplicationList,
|
|
3326
5382
|
"CreatePresetKey": doCreatePresetKey,
|
|
3327
|
-
"DescribeMNPReleasedVersionHistory": doDescribeMNPReleasedVersionHistory,
|
|
3328
5383
|
"DescribeMNPPreview": doDescribeMNPPreview,
|
|
3329
|
-
"
|
|
3330
|
-
"DeleteTeamMember": doDeleteTeamMember,
|
|
3331
|
-
"DescribeMNPList": doDescribeMNPList,
|
|
3332
|
-
"CreateUser": doCreateUser,
|
|
5384
|
+
"DescribeMNGActiveUserRealTimeStatistics": doDescribeMNGActiveUserRealTimeStatistics,
|
|
3333
5385
|
"DescribeMNPVersion": doDescribeMNPVersion,
|
|
5386
|
+
"DescribeMNGMAUDataDetail": doDescribeMNGMAUDataDetail,
|
|
5387
|
+
"DescribeMNGMAUMonthlyComparisonMetricCard": doDescribeMNGMAUMonthlyComparisonMetricCard,
|
|
5388
|
+
"DescribeMNGMAULineChart": doDescribeMNGMAULineChart,
|
|
5389
|
+
"DeleteApplication": doDeleteApplication,
|
|
5390
|
+
"DescribeTeam": doDescribeTeam,
|
|
5391
|
+
"DescribeAdvertisingOverview": doDescribeAdvertisingOverview,
|
|
5392
|
+
"ConfigureMNPPreview": doConfigureMNPPreview,
|
|
5393
|
+
"DescribeMNPPageAnalysisDetail": doDescribeMNPPageAnalysisDetail,
|
|
5394
|
+
"DescribeGlobalOverviewDataSummary": doDescribeGlobalOverviewDataSummary,
|
|
5395
|
+
"DescribeMNP": doDescribeMNP,
|
|
5396
|
+
"AddTeamMember": doAddTeamMember,
|
|
5397
|
+
"DescribeMNPMAULineChart": doDescribeMNPMAULineChart,
|
|
5398
|
+
"CreateMNPApproval": doCreateMNPApproval,
|
|
5399
|
+
"DescribePaymentDataDetail": doDescribePaymentDataDetail,
|
|
5400
|
+
"DescribePaymentDataLineChart": doDescribePaymentDataLineChart,
|
|
5401
|
+
"ModifyMNP": doModifyMNP,
|
|
5402
|
+
"EnableApplicationSensitiveAPI": doEnableApplicationSensitiveAPI,
|
|
5403
|
+
"ModifyUser": doModifyUser,
|
|
5404
|
+
"DeleteTeamMember": doDeleteTeamMember,
|
|
3334
5405
|
"DeleteApplicationSensitiveAPI": doDeleteApplicationSensitiveAPI,
|
|
5406
|
+
"DescribeApplicationList": doDescribeApplicationList,
|
|
3335
5407
|
|
|
3336
5408
|
}
|
|
3337
5409
|
|