tccli 3.0.1216.1__py2.py3-none-any.whl → 3.0.1217.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/argparser.py +1 -1
- tccli/command.py +2 -2
- tccli/credentials.py +25 -0
- tccli/main.py +6 -2
- tccli/plugins/sso/__init__.py +61 -0
- tccli/plugins/sso/configs.py +4 -0
- tccli/plugins/sso/configure.py +45 -0
- tccli/plugins/sso/login.py +144 -0
- tccli/plugins/sso/logout.py +21 -0
- tccli/plugins/sso/terminal.py +161 -0
- tccli/plugins/sso/texts.py +40 -0
- tccli/services/__init__.py +6 -0
- tccli/services/acp/v20220105/api.json +7 -7
- tccli/services/acp/v20220105/examples.json +2 -2
- tccli/services/aiart/v20221229/api.json +29 -29
- tccli/services/aiart/v20221229/examples.json +8 -8
- tccli/services/apigateway/v20180808/api.json +18 -17
- tccli/services/apigateway/v20180808/examples.json +12 -12
- tccli/services/apm/v20210622/api.json +98 -4
- tccli/services/asr/v20190614/api.json +18 -17
- tccli/services/asr/v20190614/examples.json +13 -13
- tccli/services/autoscaling/v20180419/api.json +371 -309
- tccli/services/autoscaling/v20180419/examples.json +17 -17
- tccli/services/batch/v20170312/api.json +7 -7
- tccli/services/bda/v20200324/api.json +39 -31
- tccli/services/bda/v20200324/examples.json +9 -9
- tccli/services/bh/__init__.py +4 -0
- tccli/services/bh/bh_client.py +3428 -0
- tccli/services/bh/v20230418/api.json +8180 -0
- tccli/services/bh/v20230418/examples.json +519 -0
- tccli/services/bi/v20220105/api.json +48 -0
- tccli/services/billing/v20180709/api.json +26 -24
- tccli/services/bsca/v20210811/api.json +1 -1
- tccli/services/btoe/v20210514/api.json +4 -4
- tccli/services/btoe/v20210514/examples.json +2 -2
- tccli/services/ca/v20230228/api.json +60 -0
- tccli/services/cam/v20190116/api.json +11 -11
- tccli/services/cat/v20180409/api.json +9 -0
- tccli/services/cbs/v20170312/api.json +200 -188
- tccli/services/cbs/v20170312/examples.json +4 -4
- tccli/services/ccc/v20200210/api.json +390 -323
- tccli/services/ccc/v20200210/examples.json +15 -15
- tccli/services/cdb/cdb_client.py +13 -13
- tccli/services/cdb/v20170320/api.json +295 -270
- tccli/services/cdb/v20170320/examples.json +38 -38
- tccli/services/cdc/v20201214/api.json +283 -270
- tccli/services/cdc/v20201214/examples.json +26 -26
- tccli/services/cds/v20180420/api.json +82 -76
- tccli/services/cds/v20180420/examples.json +1 -1
- tccli/services/cdwch/v20200915/api.json +1 -1
- tccli/services/cdwdoris/v20211228/api.json +42 -2
- tccli/services/cdz/v20221123/api.json +41 -5
- tccli/services/cfg/v20210820/api.json +31 -0
- tccli/services/cfs/v20190719/api.json +89 -1
- tccli/services/cfs/v20190719/examples.json +1 -1
- tccli/services/cfw/cfw_client.py +0 -53
- tccli/services/cfw/v20190904/api.json +1849 -1999
- tccli/services/cfw/v20190904/examples.json +157 -159
- tccli/services/ckafka/v20190819/api.json +104 -75
- tccli/services/clb/v20180317/api.json +48 -26
- tccli/services/clb/v20180317/examples.json +1 -1
- tccli/services/cloudapp/v20220530/api.json +5 -1
- tccli/services/cloudaudit/v20190319/api.json +58 -44
- tccli/services/cloudaudit/v20190319/examples.json +6 -6
- tccli/services/cloudstudio/v20230508/api.json +38 -37
- tccli/services/cloudstudio/v20230508/examples.json +4 -4
- tccli/services/cls/cls_client.py +216 -4
- tccli/services/cls/v20201016/api.json +536 -47
- tccli/services/cls/v20201016/examples.json +34 -2
- tccli/services/csip/v20221121/api.json +2562 -2382
- tccli/services/csip/v20221121/examples.json +108 -108
- tccli/services/cvm/v20170312/api.json +149 -112
- tccli/services/cvm/v20170312/examples.json +2 -2
- tccli/services/cwp/cwp_client.py +4 -110
- tccli/services/cwp/v20180228/api.json +6338 -6146
- tccli/services/cwp/v20180228/examples.json +342 -370
- tccli/services/cynosdb/v20190107/api.json +93 -81
- tccli/services/cynosdb/v20190107/examples.json +70 -70
- tccli/services/dasb/v20191018/api.json +796 -651
- tccli/services/dasb/v20191018/examples.json +101 -101
- tccli/services/dcdb/dcdb_client.py +114 -61
- tccli/services/dcdb/v20180411/api.json +141 -7
- tccli/services/dcdb/v20180411/examples.json +32 -0
- tccli/services/dlc/v20210125/api.json +21 -11
- tccli/services/dnspod/dnspod_client.py +417 -46
- tccli/services/dnspod/v20210323/api.json +751 -30
- tccli/services/dnspod/v20210323/examples.json +62 -0
- tccli/services/dts/v20211206/api.json +4 -4
- tccli/services/ecm/v20190719/api.json +2 -2
- tccli/services/emr/v20190103/api.json +339 -114
- tccli/services/emr/v20190103/examples.json +64 -82
- tccli/services/es/v20180416/api.json +29 -0
- tccli/services/es/v20180416/examples.json +1 -1
- tccli/services/ess/v20201111/api.json +49 -31
- tccli/services/ess/v20201111/examples.json +20 -8
- tccli/services/essbasic/v20210526/api.json +54 -49
- tccli/services/essbasic/v20210526/examples.json +36 -18
- tccli/services/facefusion/v20181201/api.json +47 -45
- tccli/services/facefusion/v20181201/examples.json +2 -2
- tccli/services/facefusion/v20220927/api.json +54 -48
- tccli/services/facefusion/v20220927/examples.json +5 -5
- tccli/services/faceid/v20180301/api.json +497 -496
- tccli/services/faceid/v20180301/examples.json +219 -101
- tccli/services/fmu/v20191213/api.json +59 -67
- tccli/services/fmu/v20191213/examples.json +22 -22
- tccli/services/ft/v20200304/api.json +53 -57
- tccli/services/ft/v20200304/examples.json +14 -14
- tccli/services/gme/v20180711/api.json +21 -11
- tccli/services/gme/v20180711/examples.json +1 -1
- tccli/services/hai/v20230812/api.json +116 -9
- tccli/services/hai/v20230812/examples.json +4 -4
- tccli/services/hunyuan/hunyuan_client.py +436 -12
- tccli/services/hunyuan/v20230901/api.json +1482 -118
- tccli/services/hunyuan/v20230901/examples.json +82 -18
- tccli/services/iai/v20180301/api.json +23 -19
- tccli/services/iai/v20180301/examples.json +2 -2
- tccli/services/iai/v20200303/api.json +530 -511
- tccli/services/iai/v20200303/examples.json +116 -86
- tccli/services/ig/__init__.py +4 -0
- tccli/services/ig/ig_client.py +195 -0
- tccli/services/ig/v20210518/api.json +83 -0
- tccli/services/ig/v20210518/examples.json +13 -0
- tccli/services/ioa/ioa_client.py +53 -0
- tccli/services/ioa/v20220601/api.json +662 -413
- tccli/services/ioa/v20220601/examples.json +24 -10
- tccli/services/iotexplorer/v20190423/api.json +33 -13
- tccli/services/iotexplorer/v20190423/examples.json +3 -3
- tccli/services/iotvideo/iotvideo_client.py +106 -0
- tccli/services/iotvideo/v20191126/api.json +256 -24
- tccli/services/iotvideo/v20191126/examples.json +19 -3
- tccli/services/iotvideo/v20201215/api.json +1 -1
- tccli/services/iotvideo/v20201215/examples.json +1 -1
- tccli/services/iotvideo/v20211125/api.json +1 -1
- tccli/services/iotvideo/v20211125/examples.json +2 -2
- tccli/services/iss/iss_client.py +69 -122
- tccli/services/iss/v20230517/api.json +10 -54
- tccli/services/iss/v20230517/examples.json +0 -14
- tccli/services/kms/v20190118/api.json +301 -268
- tccli/services/kms/v20190118/examples.json +45 -51
- tccli/services/lcic/lcic_client.py +159 -0
- tccli/services/lcic/v20220817/api.json +273 -1
- tccli/services/lcic/v20220817/examples.json +24 -0
- tccli/services/lighthouse/v20200324/api.json +56 -0
- tccli/services/live/live_client.py +159 -0
- tccli/services/live/v20180801/api.json +244 -0
- tccli/services/live/v20180801/examples.json +24 -0
- tccli/services/lke/v20231130/api.json +17 -17
- tccli/services/lke/v20231130/examples.json +19 -25
- tccli/services/mariadb/v20170312/api.json +7 -7
- tccli/services/market/v20191010/api.json +3 -3
- tccli/services/market/v20191010/examples.json +2 -2
- tccli/services/mmps/v20200710/api.json +47 -47
- tccli/services/mmps/v20200710/examples.json +3 -3
- tccli/services/mongodb/v20190725/api.json +4 -4
- tccli/services/monitor/v20180724/api.json +46 -19
- tccli/services/mps/v20190612/api.json +282 -5
- tccli/services/mps/v20190612/examples.json +25 -1
- tccli/services/mqtt/v20240516/api.json +2 -2
- tccli/services/mrs/v20200910/api.json +72 -34
- tccli/services/mrs/v20200910/examples.json +2 -2
- tccli/services/ms/v20180408/api.json +535 -506
- tccli/services/ms/v20180408/examples.json +25 -25
- tccli/services/oceanus/v20190422/api.json +130 -0
- tccli/services/ocr/ocr_client.py +232 -20
- tccli/services/ocr/v20181119/api.json +2265 -760
- tccli/services/ocr/v20181119/examples.json +200 -180
- tccli/services/omics/v20221128/api.json +614 -553
- tccli/services/omics/v20221128/examples.json +9 -9
- tccli/services/organization/v20210331/api.json +13 -4
- tccli/services/organization/v20210331/examples.json +2 -2
- tccli/services/partners/v20180321/api.json +244 -234
- tccli/services/partners/v20180321/examples.json +19 -19
- tccli/services/privatedns/privatedns_client.py +428 -4
- tccli/services/privatedns/v20201028/api.json +815 -11
- tccli/services/privatedns/v20201028/examples.json +64 -0
- tccli/services/pts/v20210728/api.json +18 -0
- tccli/services/pts/v20210728/examples.json +1 -1
- tccli/services/rce/rce_client.py +53 -0
- tccli/services/rce/v20201103/api.json +146 -0
- tccli/services/rce/v20201103/examples.json +8 -0
- tccli/services/redis/v20180412/api.json +42 -42
- tccli/services/redis/v20180412/examples.json +19 -19
- tccli/services/rum/v20210622/api.json +9 -0
- tccli/services/scf/v20180416/api.json +15 -15
- tccli/services/scf/v20180416/examples.json +1 -1
- tccli/services/smop/v20201203/api.json +46 -42
- tccli/services/smop/v20201203/examples.json +2 -2
- tccli/services/soe/v20180724/api.json +10 -10
- tccli/services/sqlserver/v20180328/api.json +21 -8
- tccli/services/sqlserver/v20180328/examples.json +5 -5
- tccli/services/ssl/v20191205/api.json +97 -4
- tccli/services/ssm/v20190923/api.json +292 -231
- tccli/services/ssm/v20190923/examples.json +42 -42
- tccli/services/tat/v20201028/api.json +97 -97
- tccli/services/tat/v20201028/examples.json +20 -26
- tccli/services/tchd/v20230306/api.json +5 -5
- tccli/services/tchd/v20230306/examples.json +3 -3
- tccli/services/tcr/v20190924/api.json +1 -1
- tccli/services/tcr/v20190924/examples.json +1 -1
- tccli/services/tcss/v20201101/api.json +1973 -1426
- tccli/services/tcss/v20201101/examples.json +346 -364
- tccli/services/tdmq/v20200217/api.json +539 -401
- tccli/services/tdmq/v20200217/examples.json +104 -104
- tccli/services/tds/v20220801/api.json +4 -4
- tccli/services/tem/v20210701/api.json +287 -271
- tccli/services/tem/v20210701/examples.json +59 -59
- tccli/services/teo/v20220901/api.json +37 -9
- tccli/services/teo/v20220901/examples.json +13 -7
- tccli/services/thpc/v20230321/api.json +5 -5
- tccli/services/tke/tke_client.py +217 -58
- tccli/services/tke/v20180525/api.json +36 -27
- tccli/services/tke/v20180525/examples.json +1 -1
- tccli/services/tke/v20220501/api.json +176 -0
- tccli/services/tke/v20220501/examples.json +24 -0
- tccli/services/tmt/v20180321/api.json +38 -8
- tccli/services/trp/v20210515/api.json +86 -74
- tccli/services/trp/v20210515/examples.json +65 -65
- tccli/services/trro/v20220325/api.json +72 -71
- tccli/services/trro/v20220325/examples.json +8 -8
- tccli/services/trtc/trtc_client.py +8 -61
- tccli/services/trtc/v20190722/api.json +72 -30
- tccli/services/trtc/v20190722/examples.json +3 -11
- tccli/services/tse/tse_client.py +110 -4
- tccli/services/tse/v20201207/api.json +122 -7
- tccli/services/tse/v20201207/examples.json +25 -9
- tccli/services/vclm/v20240523/api.json +225 -82
- tccli/services/vclm/v20240523/examples.json +13 -19
- tccli/services/vod/v20180717/api.json +431 -4
- tccli/services/vod/v20180717/examples.json +25 -5
- tccli/services/vod/v20240718/api.json +11 -11
- tccli/services/vod/v20240718/examples.json +4 -4
- tccli/services/vod/vod_client.py +53 -0
- tccli/services/vpc/v20170312/api.json +1090 -862
- tccli/services/vpc/v20170312/examples.json +74 -66
- tccli/services/vpc/vpc_client.py +61 -8
- tccli/services/waf/v20180125/api.json +2540 -2177
- tccli/services/waf/v20180125/examples.json +216 -284
- tccli/services/waf/waf_client.py +172 -119
- tccli/services/wav/v20210129/api.json +48 -48
- tccli/services/wav/v20210129/examples.json +4 -4
- tccli/services/wedata/v20210820/api.json +909 -25
- tccli/services/wedata/v20210820/examples.json +28 -4
- tccli/services/wedata/wedata_client.py +159 -0
- tccli/services/weilingwith/v20230427/api.json +6 -6
- tccli/services/weilingwith/v20230427/examples.json +3 -3
- tccli/sso.py +229 -0
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/RECORD +252 -235
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/license_files/LICENSE +0 -0
@@ -277,6 +277,58 @@ def doDescribeDomainLogList(args, parsed_globals):
|
|
277
277
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
278
|
|
279
279
|
|
280
|
+
def doCreateDeal(args, parsed_globals):
|
281
|
+
g_param = parse_global_arg(parsed_globals)
|
282
|
+
|
283
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
284
|
+
cred = credential.CVMRoleCredential()
|
285
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
286
|
+
cred = credential.STSAssumeRoleCredential(
|
287
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
288
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
289
|
+
)
|
290
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
291
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
292
|
+
else:
|
293
|
+
cred = credential.Credential(
|
294
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
295
|
+
)
|
296
|
+
http_profile = HttpProfile(
|
297
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
298
|
+
reqMethod="POST",
|
299
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
300
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
301
|
+
)
|
302
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
303
|
+
if g_param[OptionsDefine.Language]:
|
304
|
+
profile.language = g_param[OptionsDefine.Language]
|
305
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
306
|
+
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
307
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
308
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
+
model = models.CreateDealRequest()
|
310
|
+
model.from_json_string(json.dumps(args))
|
311
|
+
start_time = time.time()
|
312
|
+
while True:
|
313
|
+
rsp = client.CreateDeal(model)
|
314
|
+
result = rsp.to_json_string()
|
315
|
+
try:
|
316
|
+
json_obj = json.loads(result)
|
317
|
+
except TypeError as e:
|
318
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
319
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
320
|
+
break
|
321
|
+
cur_time = time.time()
|
322
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
323
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
324
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
325
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
326
|
+
else:
|
327
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
328
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
329
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
330
|
+
|
331
|
+
|
280
332
|
def doDescribeDomainPurview(args, parsed_globals):
|
281
333
|
g_param = parse_global_arg(parsed_globals)
|
282
334
|
|
@@ -745,7 +797,7 @@ def doDescribeSnapshotList(args, parsed_globals):
|
|
745
797
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
798
|
|
747
799
|
|
748
|
-
def
|
800
|
+
def doCreateTXTRecord(args, parsed_globals):
|
749
801
|
g_param = parse_global_arg(parsed_globals)
|
750
802
|
|
751
803
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -774,11 +826,63 @@ def doModifyRecordFields(args, parsed_globals):
|
|
774
826
|
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
775
827
|
client._sdkVersion += ("_CLI_" + __version__)
|
776
828
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
777
|
-
model = models.
|
829
|
+
model = models.CreateTXTRecordRequest()
|
778
830
|
model.from_json_string(json.dumps(args))
|
779
831
|
start_time = time.time()
|
780
832
|
while True:
|
781
|
-
rsp = client.
|
833
|
+
rsp = client.CreateTXTRecord(model)
|
834
|
+
result = rsp.to_json_string()
|
835
|
+
try:
|
836
|
+
json_obj = json.loads(result)
|
837
|
+
except TypeError as e:
|
838
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
839
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
840
|
+
break
|
841
|
+
cur_time = time.time()
|
842
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
843
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
844
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
845
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
846
|
+
else:
|
847
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
848
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
849
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
850
|
+
|
851
|
+
|
852
|
+
def doDeleteDomain(args, parsed_globals):
|
853
|
+
g_param = parse_global_arg(parsed_globals)
|
854
|
+
|
855
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
856
|
+
cred = credential.CVMRoleCredential()
|
857
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
858
|
+
cred = credential.STSAssumeRoleCredential(
|
859
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
860
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
861
|
+
)
|
862
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
863
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
864
|
+
else:
|
865
|
+
cred = credential.Credential(
|
866
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
867
|
+
)
|
868
|
+
http_profile = HttpProfile(
|
869
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
870
|
+
reqMethod="POST",
|
871
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
872
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
873
|
+
)
|
874
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
875
|
+
if g_param[OptionsDefine.Language]:
|
876
|
+
profile.language = g_param[OptionsDefine.Language]
|
877
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
878
|
+
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
879
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
880
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
881
|
+
model = models.DeleteDomainRequest()
|
882
|
+
model.from_json_string(json.dumps(args))
|
883
|
+
start_time = time.time()
|
884
|
+
while True:
|
885
|
+
rsp = client.DeleteDomain(model)
|
782
886
|
result = rsp.to_json_string()
|
783
887
|
try:
|
784
888
|
json_obj = json.loads(result)
|
@@ -1369,7 +1473,7 @@ def doDescribeDomainShareInfo(args, parsed_globals):
|
|
1369
1473
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1370
1474
|
|
1371
1475
|
|
1372
|
-
def
|
1476
|
+
def doCreateLineGroup(args, parsed_globals):
|
1373
1477
|
g_param = parse_global_arg(parsed_globals)
|
1374
1478
|
|
1375
1479
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1398,11 +1502,63 @@ def doCreateDeal(args, parsed_globals):
|
|
1398
1502
|
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
1399
1503
|
client._sdkVersion += ("_CLI_" + __version__)
|
1400
1504
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1401
|
-
model = models.
|
1505
|
+
model = models.CreateLineGroupRequest()
|
1402
1506
|
model.from_json_string(json.dumps(args))
|
1403
1507
|
start_time = time.time()
|
1404
1508
|
while True:
|
1405
|
-
rsp = client.
|
1509
|
+
rsp = client.CreateLineGroup(model)
|
1510
|
+
result = rsp.to_json_string()
|
1511
|
+
try:
|
1512
|
+
json_obj = json.loads(result)
|
1513
|
+
except TypeError as e:
|
1514
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1515
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1516
|
+
break
|
1517
|
+
cur_time = time.time()
|
1518
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1519
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1520
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1521
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1522
|
+
else:
|
1523
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1524
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1525
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1526
|
+
|
1527
|
+
|
1528
|
+
def doModifyTXTRecord(args, parsed_globals):
|
1529
|
+
g_param = parse_global_arg(parsed_globals)
|
1530
|
+
|
1531
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1532
|
+
cred = credential.CVMRoleCredential()
|
1533
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1534
|
+
cred = credential.STSAssumeRoleCredential(
|
1535
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1536
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1537
|
+
)
|
1538
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1539
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1540
|
+
else:
|
1541
|
+
cred = credential.Credential(
|
1542
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1543
|
+
)
|
1544
|
+
http_profile = HttpProfile(
|
1545
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1546
|
+
reqMethod="POST",
|
1547
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1548
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1549
|
+
)
|
1550
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1551
|
+
if g_param[OptionsDefine.Language]:
|
1552
|
+
profile.language = g_param[OptionsDefine.Language]
|
1553
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1554
|
+
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
1555
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1556
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1557
|
+
model = models.ModifyTXTRecordRequest()
|
1558
|
+
model.from_json_string(json.dumps(args))
|
1559
|
+
start_time = time.time()
|
1560
|
+
while True:
|
1561
|
+
rsp = client.ModifyTXTRecord(model)
|
1406
1562
|
result = rsp.to_json_string()
|
1407
1563
|
try:
|
1408
1564
|
json_obj = json.loads(result)
|
@@ -1525,6 +1681,58 @@ def doDescribeRecordLineCategoryList(args, parsed_globals):
|
|
1525
1681
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1526
1682
|
|
1527
1683
|
|
1684
|
+
def doDeleteDomainAlias(args, parsed_globals):
|
1685
|
+
g_param = parse_global_arg(parsed_globals)
|
1686
|
+
|
1687
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1688
|
+
cred = credential.CVMRoleCredential()
|
1689
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1690
|
+
cred = credential.STSAssumeRoleCredential(
|
1691
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1692
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1693
|
+
)
|
1694
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1695
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1696
|
+
else:
|
1697
|
+
cred = credential.Credential(
|
1698
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1699
|
+
)
|
1700
|
+
http_profile = HttpProfile(
|
1701
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1702
|
+
reqMethod="POST",
|
1703
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1704
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1705
|
+
)
|
1706
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1707
|
+
if g_param[OptionsDefine.Language]:
|
1708
|
+
profile.language = g_param[OptionsDefine.Language]
|
1709
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1710
|
+
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
1711
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1712
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1713
|
+
model = models.DeleteDomainAliasRequest()
|
1714
|
+
model.from_json_string(json.dumps(args))
|
1715
|
+
start_time = time.time()
|
1716
|
+
while True:
|
1717
|
+
rsp = client.DeleteDomainAlias(model)
|
1718
|
+
result = rsp.to_json_string()
|
1719
|
+
try:
|
1720
|
+
json_obj = json.loads(result)
|
1721
|
+
except TypeError as e:
|
1722
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1723
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1724
|
+
break
|
1725
|
+
cur_time = time.time()
|
1726
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1727
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1728
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1729
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1730
|
+
else:
|
1731
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1732
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1733
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1734
|
+
|
1735
|
+
|
1528
1736
|
def doDeleteShareDomain(args, parsed_globals):
|
1529
1737
|
g_param = parse_global_arg(parsed_globals)
|
1530
1738
|
|
@@ -1577,7 +1785,7 @@ def doDeleteShareDomain(args, parsed_globals):
|
|
1577
1785
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1578
1786
|
|
1579
1787
|
|
1580
|
-
def
|
1788
|
+
def doDescribeDomain(args, parsed_globals):
|
1581
1789
|
g_param = parse_global_arg(parsed_globals)
|
1582
1790
|
|
1583
1791
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1606,11 +1814,63 @@ def doModifyRecordGroup(args, parsed_globals):
|
|
1606
1814
|
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
1607
1815
|
client._sdkVersion += ("_CLI_" + __version__)
|
1608
1816
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1609
|
-
model = models.
|
1817
|
+
model = models.DescribeDomainRequest()
|
1610
1818
|
model.from_json_string(json.dumps(args))
|
1611
1819
|
start_time = time.time()
|
1612
1820
|
while True:
|
1613
|
-
rsp = client.
|
1821
|
+
rsp = client.DescribeDomain(model)
|
1822
|
+
result = rsp.to_json_string()
|
1823
|
+
try:
|
1824
|
+
json_obj = json.loads(result)
|
1825
|
+
except TypeError as e:
|
1826
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1827
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1828
|
+
break
|
1829
|
+
cur_time = time.time()
|
1830
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1831
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1832
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1833
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1834
|
+
else:
|
1835
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1836
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1837
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1838
|
+
|
1839
|
+
|
1840
|
+
def doDeleteLineGroup(args, parsed_globals):
|
1841
|
+
g_param = parse_global_arg(parsed_globals)
|
1842
|
+
|
1843
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1844
|
+
cred = credential.CVMRoleCredential()
|
1845
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1846
|
+
cred = credential.STSAssumeRoleCredential(
|
1847
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1848
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1849
|
+
)
|
1850
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1851
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1852
|
+
else:
|
1853
|
+
cred = credential.Credential(
|
1854
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1855
|
+
)
|
1856
|
+
http_profile = HttpProfile(
|
1857
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1858
|
+
reqMethod="POST",
|
1859
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1860
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1861
|
+
)
|
1862
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1863
|
+
if g_param[OptionsDefine.Language]:
|
1864
|
+
profile.language = g_param[OptionsDefine.Language]
|
1865
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1866
|
+
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
1867
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1868
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1869
|
+
model = models.DeleteLineGroupRequest()
|
1870
|
+
model.from_json_string(json.dumps(args))
|
1871
|
+
start_time = time.time()
|
1872
|
+
while True:
|
1873
|
+
rsp = client.DeleteLineGroup(model)
|
1614
1874
|
result = rsp.to_json_string()
|
1615
1875
|
try:
|
1616
1876
|
json_obj = json.loads(result)
|
@@ -1889,7 +2149,7 @@ def doCreateDomainCustomLine(args, parsed_globals):
|
|
1889
2149
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1890
2150
|
|
1891
2151
|
|
1892
|
-
def
|
2152
|
+
def doModifyDomainLock(args, parsed_globals):
|
1893
2153
|
g_param = parse_global_arg(parsed_globals)
|
1894
2154
|
|
1895
2155
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1918,11 +2178,11 @@ def doDescribeUserDetail(args, parsed_globals):
|
|
1918
2178
|
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
1919
2179
|
client._sdkVersion += ("_CLI_" + __version__)
|
1920
2180
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1921
|
-
model = models.
|
2181
|
+
model = models.ModifyDomainLockRequest()
|
1922
2182
|
model.from_json_string(json.dumps(args))
|
1923
2183
|
start_time = time.time()
|
1924
2184
|
while True:
|
1925
|
-
rsp = client.
|
2185
|
+
rsp = client.ModifyDomainLock(model)
|
1926
2186
|
result = rsp.to_json_string()
|
1927
2187
|
try:
|
1928
2188
|
json_obj = json.loads(result)
|
@@ -2045,7 +2305,7 @@ def doDescribeRecordType(args, parsed_globals):
|
|
2045
2305
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2046
2306
|
|
2047
2307
|
|
2048
|
-
def
|
2308
|
+
def doDescribeRecordSnapshotRollbackResult(args, parsed_globals):
|
2049
2309
|
g_param = parse_global_arg(parsed_globals)
|
2050
2310
|
|
2051
2311
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2074,11 +2334,11 @@ def doDeleteRecordBatch(args, parsed_globals):
|
|
2074
2334
|
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
2075
2335
|
client._sdkVersion += ("_CLI_" + __version__)
|
2076
2336
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2077
|
-
model = models.
|
2337
|
+
model = models.DescribeRecordSnapshotRollbackResultRequest()
|
2078
2338
|
model.from_json_string(json.dumps(args))
|
2079
2339
|
start_time = time.time()
|
2080
2340
|
while True:
|
2081
|
-
rsp = client.
|
2341
|
+
rsp = client.DescribeRecordSnapshotRollbackResult(model)
|
2082
2342
|
result = rsp.to_json_string()
|
2083
2343
|
try:
|
2084
2344
|
json_obj = json.loads(result)
|
@@ -2097,7 +2357,7 @@ def doDeleteRecordBatch(args, parsed_globals):
|
|
2097
2357
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2098
2358
|
|
2099
2359
|
|
2100
|
-
def
|
2360
|
+
def doDescribeRecordGroupList(args, parsed_globals):
|
2101
2361
|
g_param = parse_global_arg(parsed_globals)
|
2102
2362
|
|
2103
2363
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2126,11 +2386,11 @@ def doDescribeRecordSnapshotRollbackResult(args, parsed_globals):
|
|
2126
2386
|
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
2127
2387
|
client._sdkVersion += ("_CLI_" + __version__)
|
2128
2388
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2129
|
-
model = models.
|
2389
|
+
model = models.DescribeRecordGroupListRequest()
|
2130
2390
|
model.from_json_string(json.dumps(args))
|
2131
2391
|
start_time = time.time()
|
2132
2392
|
while True:
|
2133
|
-
rsp = client.
|
2393
|
+
rsp = client.DescribeRecordGroupList(model)
|
2134
2394
|
result = rsp.to_json_string()
|
2135
2395
|
try:
|
2136
2396
|
json_obj = json.loads(result)
|
@@ -2149,7 +2409,7 @@ def doDescribeRecordSnapshotRollbackResult(args, parsed_globals):
|
|
2149
2409
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2150
2410
|
|
2151
2411
|
|
2152
|
-
def
|
2412
|
+
def doModifySnapshotConfig(args, parsed_globals):
|
2153
2413
|
g_param = parse_global_arg(parsed_globals)
|
2154
2414
|
|
2155
2415
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2178,11 +2438,63 @@ def doDescribeRecordGroupList(args, parsed_globals):
|
|
2178
2438
|
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
2179
2439
|
client._sdkVersion += ("_CLI_" + __version__)
|
2180
2440
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2181
|
-
model = models.
|
2441
|
+
model = models.ModifySnapshotConfigRequest()
|
2182
2442
|
model.from_json_string(json.dumps(args))
|
2183
2443
|
start_time = time.time()
|
2184
2444
|
while True:
|
2185
|
-
rsp = client.
|
2445
|
+
rsp = client.ModifySnapshotConfig(model)
|
2446
|
+
result = rsp.to_json_string()
|
2447
|
+
try:
|
2448
|
+
json_obj = json.loads(result)
|
2449
|
+
except TypeError as e:
|
2450
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2451
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2452
|
+
break
|
2453
|
+
cur_time = time.time()
|
2454
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2455
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2456
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2457
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2458
|
+
else:
|
2459
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2460
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2461
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2462
|
+
|
2463
|
+
|
2464
|
+
def doModifyRecordGroup(args, parsed_globals):
|
2465
|
+
g_param = parse_global_arg(parsed_globals)
|
2466
|
+
|
2467
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2468
|
+
cred = credential.CVMRoleCredential()
|
2469
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2470
|
+
cred = credential.STSAssumeRoleCredential(
|
2471
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2472
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2473
|
+
)
|
2474
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2475
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2476
|
+
else:
|
2477
|
+
cred = credential.Credential(
|
2478
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2479
|
+
)
|
2480
|
+
http_profile = HttpProfile(
|
2481
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2482
|
+
reqMethod="POST",
|
2483
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2484
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2485
|
+
)
|
2486
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2487
|
+
if g_param[OptionsDefine.Language]:
|
2488
|
+
profile.language = g_param[OptionsDefine.Language]
|
2489
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2490
|
+
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
2491
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2492
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2493
|
+
model = models.ModifyRecordGroupRequest()
|
2494
|
+
model.from_json_string(json.dumps(args))
|
2495
|
+
start_time = time.time()
|
2496
|
+
while True:
|
2497
|
+
rsp = client.ModifyRecordGroup(model)
|
2186
2498
|
result = rsp.to_json_string()
|
2187
2499
|
try:
|
2188
2500
|
json_obj = json.loads(result)
|
@@ -2409,7 +2721,7 @@ def doModifyPackageAutoRenew(args, parsed_globals):
|
|
2409
2721
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2410
2722
|
|
2411
2723
|
|
2412
|
-
def
|
2724
|
+
def doDeleteRecordBatch(args, parsed_globals):
|
2413
2725
|
g_param = parse_global_arg(parsed_globals)
|
2414
2726
|
|
2415
2727
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2438,11 +2750,11 @@ def doModifySnapshotConfig(args, parsed_globals):
|
|
2438
2750
|
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
2439
2751
|
client._sdkVersion += ("_CLI_" + __version__)
|
2440
2752
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2441
|
-
model = models.
|
2753
|
+
model = models.DeleteRecordBatchRequest()
|
2442
2754
|
model.from_json_string(json.dumps(args))
|
2443
2755
|
start_time = time.time()
|
2444
2756
|
while True:
|
2445
|
-
rsp = client.
|
2757
|
+
rsp = client.DeleteRecordBatch(model)
|
2446
2758
|
result = rsp.to_json_string()
|
2447
2759
|
try:
|
2448
2760
|
json_obj = json.loads(result)
|
@@ -2513,7 +2825,7 @@ def doModifyRecord(args, parsed_globals):
|
|
2513
2825
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2514
2826
|
|
2515
2827
|
|
2516
|
-
def
|
2828
|
+
def doDescribeLineGroupList(args, parsed_globals):
|
2517
2829
|
g_param = parse_global_arg(parsed_globals)
|
2518
2830
|
|
2519
2831
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2542,11 +2854,11 @@ def doDescribeDomain(args, parsed_globals):
|
|
2542
2854
|
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
2543
2855
|
client._sdkVersion += ("_CLI_" + __version__)
|
2544
2856
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2545
|
-
model = models.
|
2857
|
+
model = models.DescribeLineGroupListRequest()
|
2546
2858
|
model.from_json_string(json.dumps(args))
|
2547
2859
|
start_time = time.time()
|
2548
2860
|
while True:
|
2549
|
-
rsp = client.
|
2861
|
+
rsp = client.DescribeLineGroupList(model)
|
2550
2862
|
result = rsp.to_json_string()
|
2551
2863
|
try:
|
2552
2864
|
json_obj = json.loads(result)
|
@@ -2669,6 +2981,58 @@ def doDescribeDomainShareUserList(args, parsed_globals):
|
|
2669
2981
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2670
2982
|
|
2671
2983
|
|
2984
|
+
def doCreateLineGroupCopy(args, parsed_globals):
|
2985
|
+
g_param = parse_global_arg(parsed_globals)
|
2986
|
+
|
2987
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2988
|
+
cred = credential.CVMRoleCredential()
|
2989
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2990
|
+
cred = credential.STSAssumeRoleCredential(
|
2991
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2992
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2993
|
+
)
|
2994
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2995
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2996
|
+
else:
|
2997
|
+
cred = credential.Credential(
|
2998
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2999
|
+
)
|
3000
|
+
http_profile = HttpProfile(
|
3001
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3002
|
+
reqMethod="POST",
|
3003
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3004
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3005
|
+
)
|
3006
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3007
|
+
if g_param[OptionsDefine.Language]:
|
3008
|
+
profile.language = g_param[OptionsDefine.Language]
|
3009
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3010
|
+
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
3011
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3012
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3013
|
+
model = models.CreateLineGroupCopyRequest()
|
3014
|
+
model.from_json_string(json.dumps(args))
|
3015
|
+
start_time = time.time()
|
3016
|
+
while True:
|
3017
|
+
rsp = client.CreateLineGroupCopy(model)
|
3018
|
+
result = rsp.to_json_string()
|
3019
|
+
try:
|
3020
|
+
json_obj = json.loads(result)
|
3021
|
+
except TypeError as e:
|
3022
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3023
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3024
|
+
break
|
3025
|
+
cur_time = time.time()
|
3026
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3027
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3028
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3029
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3030
|
+
else:
|
3031
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3032
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3033
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3034
|
+
|
3035
|
+
|
2672
3036
|
def doModifyDomainRemark(args, parsed_globals):
|
2673
3037
|
g_param = parse_global_arg(parsed_globals)
|
2674
3038
|
|
@@ -2929,7 +3293,7 @@ def doCreateRecordGroup(args, parsed_globals):
|
|
2929
3293
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2930
3294
|
|
2931
3295
|
|
2932
|
-
def
|
3296
|
+
def doModifyLineGroup(args, parsed_globals):
|
2933
3297
|
g_param = parse_global_arg(parsed_globals)
|
2934
3298
|
|
2935
3299
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2958,11 +3322,11 @@ def doDeleteDomainAlias(args, parsed_globals):
|
|
2958
3322
|
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
2959
3323
|
client._sdkVersion += ("_CLI_" + __version__)
|
2960
3324
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2961
|
-
model = models.
|
3325
|
+
model = models.ModifyLineGroupRequest()
|
2962
3326
|
model.from_json_string(json.dumps(args))
|
2963
3327
|
start_time = time.time()
|
2964
3328
|
while True:
|
2965
|
-
rsp = client.
|
3329
|
+
rsp = client.ModifyLineGroup(model)
|
2966
3330
|
result = rsp.to_json_string()
|
2967
3331
|
try:
|
2968
3332
|
json_obj = json.loads(result)
|
@@ -3657,7 +4021,7 @@ def doDescribePackageDetail(args, parsed_globals):
|
|
3657
4021
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3658
4022
|
|
3659
4023
|
|
3660
|
-
def
|
4024
|
+
def doModifyRecordFields(args, parsed_globals):
|
3661
4025
|
g_param = parse_global_arg(parsed_globals)
|
3662
4026
|
|
3663
4027
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3686,11 +4050,11 @@ def doDeleteDomain(args, parsed_globals):
|
|
3686
4050
|
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
3687
4051
|
client._sdkVersion += ("_CLI_" + __version__)
|
3688
4052
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3689
|
-
model = models.
|
4053
|
+
model = models.ModifyRecordFieldsRequest()
|
3690
4054
|
model.from_json_string(json.dumps(args))
|
3691
4055
|
start_time = time.time()
|
3692
4056
|
while True:
|
3693
|
-
rsp = client.
|
4057
|
+
rsp = client.ModifyRecordFields(model)
|
3694
4058
|
result = rsp.to_json_string()
|
3695
4059
|
try:
|
3696
4060
|
json_obj = json.loads(result)
|
@@ -3761,7 +4125,7 @@ def doDescribeRecordFilterList(args, parsed_globals):
|
|
3761
4125
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3762
4126
|
|
3763
4127
|
|
3764
|
-
def
|
4128
|
+
def doDescribeUserDetail(args, parsed_globals):
|
3765
4129
|
g_param = parse_global_arg(parsed_globals)
|
3766
4130
|
|
3767
4131
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3790,11 +4154,11 @@ def doModifyDomainLock(args, parsed_globals):
|
|
3790
4154
|
client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
|
3791
4155
|
client._sdkVersion += ("_CLI_" + __version__)
|
3792
4156
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3793
|
-
model = models.
|
4157
|
+
model = models.DescribeUserDetailRequest()
|
3794
4158
|
model.from_json_string(json.dumps(args))
|
3795
4159
|
start_time = time.time()
|
3796
4160
|
while True:
|
3797
|
-
rsp = client.
|
4161
|
+
rsp = client.DescribeUserDetail(model)
|
3798
4162
|
result = rsp.to_json_string()
|
3799
4163
|
try:
|
3800
4164
|
json_obj = json.loads(result)
|
@@ -3933,6 +4297,7 @@ ACTION_MAP = {
|
|
3933
4297
|
"DescribeSnapshotRollbackTask": doDescribeSnapshotRollbackTask,
|
3934
4298
|
"DescribeDomainList": doDescribeDomainList,
|
3935
4299
|
"DescribeDomainLogList": doDescribeDomainLogList,
|
4300
|
+
"CreateDeal": doCreateDeal,
|
3936
4301
|
"DescribeDomainPurview": doDescribeDomainPurview,
|
3937
4302
|
"ModifySubdomainStatus": doModifySubdomainStatus,
|
3938
4303
|
"DeleteDomainCustomLine": doDeleteDomainCustomLine,
|
@@ -3942,7 +4307,8 @@ ACTION_MAP = {
|
|
3942
4307
|
"DescribeSubdomainAnalytics": doDescribeSubdomainAnalytics,
|
3943
4308
|
"DescribeDomainAliasList": doDescribeDomainAliasList,
|
3944
4309
|
"DescribeSnapshotList": doDescribeSnapshotList,
|
3945
|
-
"
|
4310
|
+
"CreateTXTRecord": doCreateTXTRecord,
|
4311
|
+
"DeleteDomain": doDeleteDomain,
|
3946
4312
|
"DeleteDomainBatch": doDeleteDomainBatch,
|
3947
4313
|
"DownloadSnapshot": doDownloadSnapshot,
|
3948
4314
|
"CheckSnapshotRollback": doCheckSnapshotRollback,
|
@@ -3954,37 +4320,42 @@ ACTION_MAP = {
|
|
3954
4320
|
"ModifyDomainUnlock": doModifyDomainUnlock,
|
3955
4321
|
"CreateDomainBatch": doCreateDomainBatch,
|
3956
4322
|
"DescribeDomainShareInfo": doDescribeDomainShareInfo,
|
3957
|
-
"
|
4323
|
+
"CreateLineGroup": doCreateLineGroup,
|
4324
|
+
"ModifyTXTRecord": doModifyTXTRecord,
|
3958
4325
|
"DescribeSnapshotConfig": doDescribeSnapshotConfig,
|
3959
4326
|
"DescribeRecordLineCategoryList": doDescribeRecordLineCategoryList,
|
4327
|
+
"DeleteDomainAlias": doDeleteDomainAlias,
|
3960
4328
|
"DeleteShareDomain": doDeleteShareDomain,
|
3961
|
-
"
|
4329
|
+
"DescribeDomain": doDescribeDomain,
|
4330
|
+
"DeleteLineGroup": doDeleteLineGroup,
|
3962
4331
|
"ModifyRecordStatus": doModifyRecordStatus,
|
3963
4332
|
"ModifyDomainToGroup": doModifyDomainToGroup,
|
3964
4333
|
"ModifyDynamicDNS": doModifyDynamicDNS,
|
3965
4334
|
"CreateRecordBatch": doCreateRecordBatch,
|
3966
4335
|
"CreateDomainCustomLine": doCreateDomainCustomLine,
|
3967
|
-
"
|
4336
|
+
"ModifyDomainLock": doModifyDomainLock,
|
3968
4337
|
"RollbackSnapshot": doRollbackSnapshot,
|
3969
4338
|
"DescribeRecordType": doDescribeRecordType,
|
3970
|
-
"DeleteRecordBatch": doDeleteRecordBatch,
|
3971
4339
|
"DescribeRecordSnapshotRollbackResult": doDescribeRecordSnapshotRollbackResult,
|
3972
4340
|
"DescribeRecordGroupList": doDescribeRecordGroupList,
|
4341
|
+
"ModifySnapshotConfig": doModifySnapshotConfig,
|
4342
|
+
"ModifyRecordGroup": doModifyRecordGroup,
|
3973
4343
|
"DescribeRecordLineList": doDescribeRecordLineList,
|
3974
4344
|
"DescribeVASStatistic": doDescribeVASStatistic,
|
3975
4345
|
"DescribeDomainAnalytics": doDescribeDomainAnalytics,
|
3976
4346
|
"ModifyPackageAutoRenew": doModifyPackageAutoRenew,
|
3977
|
-
"
|
4347
|
+
"DeleteRecordBatch": doDeleteRecordBatch,
|
3978
4348
|
"ModifyRecord": doModifyRecord,
|
3979
|
-
"
|
4349
|
+
"DescribeLineGroupList": doDescribeLineGroupList,
|
3980
4350
|
"DescribeRecord": doDescribeRecord,
|
3981
4351
|
"DescribeDomainShareUserList": doDescribeDomainShareUserList,
|
4352
|
+
"CreateLineGroupCopy": doCreateLineGroupCopy,
|
3982
4353
|
"ModifyDomainRemark": doModifyDomainRemark,
|
3983
4354
|
"DescribeRecordExistExceptDefaultNS": doDescribeRecordExistExceptDefaultNS,
|
3984
4355
|
"ModifyDomainOwner": doModifyDomainOwner,
|
3985
4356
|
"CreateDomainGroup": doCreateDomainGroup,
|
3986
4357
|
"CreateRecordGroup": doCreateRecordGroup,
|
3987
|
-
"
|
4358
|
+
"ModifyLineGroup": doModifyLineGroup,
|
3988
4359
|
"DescribeBatchTask": doDescribeBatchTask,
|
3989
4360
|
"CheckRecordSnapshotRollback": doCheckRecordSnapshotRollback,
|
3990
4361
|
"DescribeDomainCustomLineList": doDescribeDomainCustomLineList,
|
@@ -3998,9 +4369,9 @@ ACTION_MAP = {
|
|
3998
4369
|
"ModifyRecordRemark": doModifyRecordRemark,
|
3999
4370
|
"CreateSnapshot": doCreateSnapshot,
|
4000
4371
|
"DescribePackageDetail": doDescribePackageDetail,
|
4001
|
-
"
|
4372
|
+
"ModifyRecordFields": doModifyRecordFields,
|
4002
4373
|
"DescribeRecordFilterList": doDescribeRecordFilterList,
|
4003
|
-
"
|
4374
|
+
"DescribeUserDetail": doDescribeUserDetail,
|
4004
4375
|
"ModifyRecordBatch": doModifyRecordBatch,
|
4005
4376
|
"CreateDomainAlias": doCreateDomainAlias,
|
4006
4377
|
|