tccli 3.0.1217.1__py2.py3-none-any.whl → 3.0.1219.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/command.py +0 -1
- tccli/configure.py +11 -1
- tccli/services/__init__.py +3 -0
- tccli/services/aa/aa_client.py +13 -1
- tccli/services/aai/aai_client.py +13 -1
- tccli/services/acp/acp_client.py +13 -1
- tccli/services/advisor/advisor_client.py +13 -1
- tccli/services/af/af_client.py +13 -1
- tccli/services/af/v20200226/api.json +2 -2
- tccli/services/afc/afc_client.py +13 -1
- tccli/services/aiart/aiart_client.py +13 -1
- tccli/services/ame/ame_client.py +13 -1
- tccli/services/ams/ams_client.py +13 -1
- tccli/services/anicloud/anicloud_client.py +13 -1
- tccli/services/antiddos/antiddos_client.py +13 -1
- tccli/services/apcas/apcas_client.py +13 -1
- tccli/services/ape/ape_client.py +13 -1
- tccli/services/api/api_client.py +13 -1
- tccli/services/apigateway/apigateway_client.py +13 -1
- tccli/services/apm/apm_client.py +13 -1
- tccli/services/asr/asr_client.py +13 -1
- tccli/services/asw/asw_client.py +13 -1
- tccli/services/autoscaling/autoscaling_client.py +13 -1
- tccli/services/ba/ba_client.py +13 -1
- tccli/services/batch/batch_client.py +13 -1
- tccli/services/bda/bda_client.py +13 -1
- tccli/services/bh/bh_client.py +13 -1
- tccli/services/bi/bi_client.py +13 -1
- tccli/services/billing/billing_client.py +13 -1
- tccli/services/billing/v20180709/api.json +176 -181
- tccli/services/billing/v20180709/examples.json +7 -7
- tccli/services/bizlive/bizlive_client.py +13 -1
- tccli/services/bm/bm_client.py +13 -1
- tccli/services/bma/bma_client.py +13 -1
- tccli/services/bmeip/bmeip_client.py +13 -1
- tccli/services/bmlb/bmlb_client.py +13 -1
- tccli/services/bmvpc/bmvpc_client.py +13 -1
- tccli/services/bpaas/bpaas_client.py +13 -1
- tccli/services/bri/bri_client.py +13 -1
- tccli/services/bsca/bsca_client.py +13 -1
- tccli/services/btoe/btoe_client.py +13 -1
- tccli/services/ca/ca_client.py +13 -1
- tccli/services/cam/cam_client.py +13 -1
- tccli/services/captcha/captcha_client.py +13 -1
- tccli/services/car/car_client.py +13 -1
- tccli/services/cat/cat_client.py +13 -1
- tccli/services/cbs/cbs_client.py +13 -1
- tccli/services/ccc/ccc_client.py +13 -1
- tccli/services/cdb/cdb_client.py +13 -1
- tccli/services/cdc/cdc_client.py +13 -1
- tccli/services/cdn/cdn_client.py +13 -1
- tccli/services/cds/cds_client.py +13 -1
- tccli/services/cdwch/cdwch_client.py +13 -1
- tccli/services/cdwdoris/cdwdoris_client.py +13 -1
- tccli/services/cdwpg/cdwpg_client.py +13 -1
- tccli/services/cdz/cdz_client.py +13 -1
- tccli/services/cfg/cfg_client.py +13 -1
- tccli/services/cfs/cfs_client.py +13 -1
- tccli/services/cfw/cfw_client.py +13 -1
- tccli/services/chdfs/chdfs_client.py +13 -1
- tccli/services/ciam/ciam_client.py +13 -1
- tccli/services/cii/cii_client.py +13 -1
- tccli/services/cim/cim_client.py +13 -1
- tccli/services/cis/cis_client.py +13 -1
- tccli/services/ckafka/ckafka_client.py +13 -1
- tccli/services/ckafka/v20190819/api.json +7 -7
- tccli/services/clb/clb_client.py +13 -1
- tccli/services/clb/v20180317/api.json +12 -12
- tccli/services/cloudapp/cloudapp_client.py +13 -1
- tccli/services/cloudaudit/cloudaudit_client.py +13 -1
- tccli/services/cloudhsm/cloudhsm_client.py +13 -1
- tccli/services/cloudstudio/cloudstudio_client.py +13 -1
- tccli/services/cls/cls_client.py +13 -1
- tccli/services/cme/cme_client.py +13 -1
- tccli/services/cmq/cmq_client.py +13 -1
- tccli/services/cms/cms_client.py +13 -1
- tccli/services/config/config_client.py +13 -1
- tccli/services/controlcenter/controlcenter_client.py +13 -1
- tccli/services/cpdp/cpdp_client.py +13 -1
- tccli/services/csip/csip_client.py +13 -1
- tccli/services/csxg/csxg_client.py +13 -1
- tccli/services/cvm/cvm_client.py +13 -1
- tccli/services/cwp/cwp_client.py +13 -1
- tccli/services/cwp/v20180228/api.json +1 -1
- tccli/services/cws/cws_client.py +13 -1
- tccli/services/cynosdb/cynosdb_client.py +13 -1
- tccli/services/dasb/dasb_client.py +13 -1
- tccli/services/dataintegration/dataintegration_client.py +13 -1
- tccli/services/dayu/dayu_client.py +13 -1
- tccli/services/dbbrain/dbbrain_client.py +13 -1
- tccli/services/dbdc/dbdc_client.py +13 -1
- tccli/services/dc/dc_client.py +13 -1
- tccli/services/dcdb/dcdb_client.py +13 -1
- tccli/services/dlc/dlc_client.py +13 -1
- tccli/services/dnspod/dnspod_client.py +13 -1
- tccli/services/domain/domain_client.py +13 -1
- tccli/services/drm/drm_client.py +13 -1
- tccli/services/ds/ds_client.py +13 -1
- tccli/services/dsgc/dsgc_client.py +13 -1
- tccli/services/dtf/dtf_client.py +13 -1
- tccli/services/dts/dts_client.py +13 -1
- tccli/services/eb/eb_client.py +13 -1
- tccli/services/ecc/ecc_client.py +13 -1
- tccli/services/ecdn/ecdn_client.py +13 -1
- tccli/services/ecm/ecm_client.py +13 -1
- tccli/services/eiam/eiam_client.py +13 -1
- tccli/services/eis/eis_client.py +13 -1
- tccli/services/emr/emr_client.py +13 -1
- tccli/services/es/es_client.py +13 -1
- tccli/services/es/v20180416/examples.json +2 -2
- tccli/services/ess/ess_client.py +13 -1
- tccli/services/ess/v20201111/api.json +9 -0
- tccli/services/essbasic/essbasic_client.py +13 -1
- tccli/services/essbasic/v20210526/api.json +9 -0
- tccli/services/facefusion/facefusion_client.py +13 -1
- tccli/services/faceid/faceid_client.py +13 -1
- tccli/services/faceid/v20180301/api.json +2 -2
- tccli/services/fmu/fmu_client.py +13 -1
- tccli/services/ft/ft_client.py +13 -1
- tccli/services/gaap/gaap_client.py +13 -1
- tccli/services/gme/gme_client.py +13 -1
- tccli/services/goosefs/goosefs_client.py +13 -1
- tccli/services/gpm/gpm_client.py +13 -1
- tccli/services/gs/gs_client.py +13 -1
- tccli/services/gse/gse_client.py +13 -1
- tccli/services/gwlb/gwlb_client.py +13 -1
- tccli/services/habo/habo_client.py +13 -1
- tccli/services/hai/hai_client.py +13 -1
- tccli/services/hasim/hasim_client.py +13 -1
- tccli/services/hcm/hcm_client.py +13 -1
- tccli/services/hunyuan/hunyuan_client.py +13 -1
- tccli/services/iai/iai_client.py +13 -1
- tccli/services/iai/v20180301/api.json +17 -13
- tccli/services/iai/v20200303/examples.json +200 -200
- tccli/services/iap/__init__.py +4 -0
- tccli/services/iap/iap_client.py +472 -0
- tccli/services/iap/v20240713/api.json +471 -0
- tccli/services/iap/v20240713/examples.json +59 -0
- tccli/services/ic/ic_client.py +13 -1
- tccli/services/icr/icr_client.py +13 -1
- tccli/services/ie/ie_client.py +13 -1
- tccli/services/iecp/iecp_client.py +13 -1
- tccli/services/ig/ig_client.py +13 -1
- tccli/services/iir/iir_client.py +13 -1
- tccli/services/ims/ims_client.py +13 -1
- tccli/services/ioa/ioa_client.py +13 -1
- tccli/services/iot/iot_client.py +13 -1
- tccli/services/iotcloud/iotcloud_client.py +13 -1
- tccli/services/iotexplorer/iotexplorer_client.py +13 -1
- tccli/services/iottid/iottid_client.py +13 -1
- tccli/services/iotvideo/iotvideo_client.py +13 -1
- tccli/services/iotvideoindustry/iotvideoindustry_client.py +13 -1
- tccli/services/irp/irp_client.py +13 -1
- tccli/services/iss/iss_client.py +13 -1
- tccli/services/ivld/ivld_client.py +13 -1
- tccli/services/keewidb/keewidb_client.py +13 -1
- tccli/services/kms/kms_client.py +13 -1
- tccli/services/lcic/lcic_client.py +13 -1
- tccli/services/lcic/v20220817/api.json +3 -3
- tccli/services/lighthouse/lighthouse_client.py +13 -1
- tccli/services/live/live_client.py +441 -5
- tccli/services/live/v20180801/api.json +1070 -68
- tccli/services/live/v20180801/examples.json +64 -0
- tccli/services/lke/lke_client.py +13 -1
- tccli/services/lowcode/lowcode_client.py +13 -1
- tccli/services/lp/lp_client.py +13 -1
- tccli/services/mall/mall_client.py +13 -1
- tccli/services/mariadb/mariadb_client.py +13 -1
- tccli/services/market/market_client.py +13 -1
- tccli/services/market/v20191010/api.json +4 -4
- tccli/services/market/v20191010/examples.json +2 -2
- tccli/services/memcached/memcached_client.py +13 -1
- tccli/services/mgobe/mgobe_client.py +13 -1
- tccli/services/mmps/mmps_client.py +13 -1
- tccli/services/mna/mna_client.py +13 -1
- tccli/services/mongodb/mongodb_client.py +13 -1
- tccli/services/monitor/monitor_client.py +13 -1
- tccli/services/mps/mps_client.py +13 -1
- tccli/services/mps/v20190612/api.json +20 -0
- tccli/services/mqtt/mqtt_client.py +13 -1
- tccli/services/mrs/mrs_client.py +13 -1
- tccli/services/ms/ms_client.py +13 -1
- tccli/services/msp/msp_client.py +13 -1
- tccli/services/mvj/mvj_client.py +13 -1
- tccli/services/nlp/nlp_client.py +13 -1
- tccli/services/npp/npp_client.py +13 -1
- tccli/services/oceanus/oceanus_client.py +13 -1
- tccli/services/ocr/ocr_client.py +13 -1
- tccli/services/omics/omics_client.py +13 -1
- tccli/services/organization/organization_client.py +13 -1
- tccli/services/partners/partners_client.py +13 -1
- tccli/services/partners/v20180321/api.json +4 -4
- tccli/services/pds/pds_client.py +13 -1
- tccli/services/postgres/postgres_client.py +13 -1
- tccli/services/privatedns/privatedns_client.py +13 -1
- tccli/services/pts/pts_client.py +13 -1
- tccli/services/pts/v20210728/api.json +3 -0
- tccli/services/rce/rce_client.py +13 -1
- tccli/services/redis/redis_client.py +13 -1
- tccli/services/redis/v20180412/api.json +169 -163
- tccli/services/redis/v20180412/examples.json +3 -3
- tccli/services/region/region_client.py +13 -1
- tccli/services/rkp/rkp_client.py +13 -1
- tccli/services/rp/rp_client.py +13 -1
- tccli/services/rum/rum_client.py +13 -1
- tccli/services/scf/scf_client.py +13 -1
- tccli/services/ses/ses_client.py +13 -1
- tccli/services/smh/smh_client.py +13 -1
- tccli/services/smop/smop_client.py +13 -1
- tccli/services/smpn/smpn_client.py +13 -1
- tccli/services/sms/sms_client.py +13 -1
- tccli/services/soe/soe_client.py +13 -1
- tccli/services/solar/solar_client.py +13 -1
- tccli/services/sqlserver/sqlserver_client.py +13 -1
- tccli/services/ssa/ssa_client.py +13 -1
- tccli/services/ssl/ssl_client.py +13 -1
- tccli/services/sslpod/sslpod_client.py +13 -1
- tccli/services/ssm/ssm_client.py +13 -1
- tccli/services/sts/sts_client.py +13 -1
- tccli/services/svp/svp_client.py +13 -1
- tccli/services/svp/v20240125/api.json +27 -27
- tccli/services/svp/v20240125/examples.json +1 -1
- tccli/services/taf/taf_client.py +13 -1
- tccli/services/tag/tag_client.py +13 -1
- tccli/services/tan/tan_client.py +13 -1
- tccli/services/tat/tat_client.py +13 -1
- tccli/services/tat/v20201028/api.json +5 -5
- tccli/services/tav/tav_client.py +13 -1
- tccli/services/tbaas/tbaas_client.py +13 -1
- tccli/services/tbm/tbm_client.py +13 -1
- tccli/services/tbp/tbp_client.py +13 -1
- tccli/services/tcaplusdb/tcaplusdb_client.py +13 -1
- tccli/services/tcb/tcb_client.py +13 -1
- tccli/services/tcbr/tcbr_client.py +13 -1
- tccli/services/tcex/tcex_client.py +13 -1
- tccli/services/tchd/tchd_client.py +13 -1
- tccli/services/tci/tci_client.py +13 -1
- tccli/services/tcm/tcm_client.py +13 -1
- tccli/services/tcr/tcr_client.py +13 -1
- tccli/services/tcss/tcss_client.py +13 -1
- tccli/services/tdcpg/tdcpg_client.py +13 -1
- tccli/services/tdid/tdid_client.py +13 -1
- tccli/services/tdmq/tdmq_client.py +13 -1
- tccli/services/tdmq/v20200217/api.json +1 -1
- tccli/services/tds/tds_client.py +13 -1
- tccli/services/tem/tem_client.py +13 -1
- tccli/services/teo/teo_client.py +13 -1
- tccli/services/thpc/thpc_client.py +13 -1
- tccli/services/tia/tia_client.py +13 -1
- tccli/services/tic/tic_client.py +13 -1
- tccli/services/ticm/ticm_client.py +13 -1
- tccli/services/tics/tics_client.py +13 -1
- tccli/services/tiems/tiems_client.py +13 -1
- tccli/services/tiia/tiia_client.py +13 -1
- tccli/services/tione/tione_client.py +13 -1
- tccli/services/tiw/tiw_client.py +13 -1
- tccli/services/tke/tke_client.py +13 -1
- tccli/services/tke/v20220501/api.json +2 -2
- tccli/services/tkgdq/tkgdq_client.py +13 -1
- tccli/services/tms/tms_client.py +13 -1
- tccli/services/tmt/tmt_client.py +13 -1
- tccli/services/tourism/tourism_client.py +13 -1
- tccli/services/trdp/trdp_client.py +13 -1
- tccli/services/trocket/trocket_client.py +13 -1
- tccli/services/trp/trp_client.py +13 -1
- tccli/services/trro/trro_client.py +13 -1
- tccli/services/trtc/trtc_client.py +13 -1
- tccli/services/tse/tse_client.py +13 -1
- tccli/services/tse/v20201207/api.json +199 -12
- tccli/services/tsf/tsf_client.py +13 -1
- tccli/services/tsi/tsi_client.py +13 -1
- tccli/services/tsw/tsw_client.py +13 -1
- tccli/services/tts/tts_client.py +13 -1
- tccli/services/ump/ump_client.py +13 -1
- tccli/services/vcg/v20240404/api.json +1 -1
- tccli/services/vcg/v20240404/examples.json +4 -4
- tccli/services/vcg/vcg_client.py +13 -1
- tccli/services/vclm/vclm_client.py +13 -1
- tccli/services/vdb/vdb_client.py +13 -1
- tccli/services/vm/vm_client.py +13 -1
- tccli/services/vms/vms_client.py +13 -1
- tccli/services/vod/vod_client.py +13 -1
- tccli/services/vpc/v20170312/api.json +492 -66
- tccli/services/vpc/v20170312/examples.json +59 -21
- tccli/services/vpc/vpc_client.py +225 -1
- tccli/services/vrs/vrs_client.py +13 -1
- tccli/services/vtc/vtc_client.py +13 -1
- tccli/services/waf/waf_client.py +13 -1
- tccli/services/wav/wav_client.py +13 -1
- tccli/services/wedata/wedata_client.py +13 -1
- tccli/services/weilingwith/weilingwith_client.py +13 -1
- tccli/services/wss/wss_client.py +13 -1
- tccli/services/yinsuda/yinsuda_client.py +13 -1
- tccli/services/youmall/youmall_client.py +13 -1
- tccli/services/yunjing/yunjing_client.py +13 -1
- tccli/services/yunsou/yunsou_client.py +13 -1
- tccli/utils.py +8 -0
- {tccli-3.0.1217.1.dist-info → tccli-3.0.1219.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1217.1.dist-info → tccli-3.0.1219.1.dist-info}/RECORD +303 -299
- {tccli-3.0.1217.1.dist-info → tccli-3.0.1219.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1217.1.dist-info → tccli-3.0.1219.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1217.1.dist-info → tccli-3.0.1219.1.dist-info}/license_files/LICENSE +0 -0
@@ -255,7 +255,13 @@ def action_caller():
|
|
255
255
|
|
256
256
|
def parse_global_arg(parsed_globals):
|
257
257
|
g_param = parsed_globals
|
258
|
-
|
258
|
+
cvm_role_flag = True
|
259
|
+
for param in parsed_globals.keys():
|
260
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
261
|
+
OptionsDefine.RoleSessionName]:
|
262
|
+
if parsed_globals[param] is not None:
|
263
|
+
cvm_role_flag = False
|
264
|
+
break
|
259
265
|
is_exist_profile = True
|
260
266
|
if not parsed_globals["profile"]:
|
261
267
|
is_exist_profile = False
|
@@ -286,6 +292,7 @@ def parse_global_arg(parsed_globals):
|
|
286
292
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
287
293
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
288
294
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
295
|
+
cvm_role_flag = False
|
289
296
|
|
290
297
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
291
298
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -293,6 +300,11 @@ def parse_global_arg(parsed_globals):
|
|
293
300
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
294
301
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
295
302
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
303
|
+
cvm_role_flag = False
|
304
|
+
|
305
|
+
if cvm_role_flag:
|
306
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
307
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
296
308
|
|
297
309
|
for param in g_param.keys():
|
298
310
|
if g_param[param] is None:
|
@@ -1368,7 +1368,13 @@ def action_caller():
|
|
1368
1368
|
|
1369
1369
|
def parse_global_arg(parsed_globals):
|
1370
1370
|
g_param = parsed_globals
|
1371
|
-
|
1371
|
+
cvm_role_flag = True
|
1372
|
+
for param in parsed_globals.keys():
|
1373
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1374
|
+
OptionsDefine.RoleSessionName]:
|
1375
|
+
if parsed_globals[param] is not None:
|
1376
|
+
cvm_role_flag = False
|
1377
|
+
break
|
1372
1378
|
is_exist_profile = True
|
1373
1379
|
if not parsed_globals["profile"]:
|
1374
1380
|
is_exist_profile = False
|
@@ -1399,6 +1405,7 @@ def parse_global_arg(parsed_globals):
|
|
1399
1405
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1400
1406
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1401
1407
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1408
|
+
cvm_role_flag = False
|
1402
1409
|
|
1403
1410
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1404
1411
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1406,6 +1413,11 @@ def parse_global_arg(parsed_globals):
|
|
1406
1413
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1407
1414
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1408
1415
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1416
|
+
cvm_role_flag = False
|
1417
|
+
|
1418
|
+
if cvm_role_flag:
|
1419
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1420
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1409
1421
|
|
1410
1422
|
for param in g_param.keys():
|
1411
1423
|
if g_param[param] is None:
|
@@ -1209,7 +1209,13 @@ def action_caller():
|
|
1209
1209
|
|
1210
1210
|
def parse_global_arg(parsed_globals):
|
1211
1211
|
g_param = parsed_globals
|
1212
|
-
|
1212
|
+
cvm_role_flag = True
|
1213
|
+
for param in parsed_globals.keys():
|
1214
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1215
|
+
OptionsDefine.RoleSessionName]:
|
1216
|
+
if parsed_globals[param] is not None:
|
1217
|
+
cvm_role_flag = False
|
1218
|
+
break
|
1213
1219
|
is_exist_profile = True
|
1214
1220
|
if not parsed_globals["profile"]:
|
1215
1221
|
is_exist_profile = False
|
@@ -1240,6 +1246,7 @@ def parse_global_arg(parsed_globals):
|
|
1240
1246
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1241
1247
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1242
1248
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1249
|
+
cvm_role_flag = False
|
1243
1250
|
|
1244
1251
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1245
1252
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1247,6 +1254,11 @@ def parse_global_arg(parsed_globals):
|
|
1247
1254
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1248
1255
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1249
1256
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1257
|
+
cvm_role_flag = False
|
1258
|
+
|
1259
|
+
if cvm_role_flag:
|
1260
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1261
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1250
1262
|
|
1251
1263
|
for param in g_param.keys():
|
1252
1264
|
if g_param[param] is None:
|
@@ -3228,7 +3228,13 @@ def action_caller():
|
|
3228
3228
|
|
3229
3229
|
def parse_global_arg(parsed_globals):
|
3230
3230
|
g_param = parsed_globals
|
3231
|
-
|
3231
|
+
cvm_role_flag = True
|
3232
|
+
for param in parsed_globals.keys():
|
3233
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
3234
|
+
OptionsDefine.RoleSessionName]:
|
3235
|
+
if parsed_globals[param] is not None:
|
3236
|
+
cvm_role_flag = False
|
3237
|
+
break
|
3232
3238
|
is_exist_profile = True
|
3233
3239
|
if not parsed_globals["profile"]:
|
3234
3240
|
is_exist_profile = False
|
@@ -3259,6 +3265,7 @@ def parse_global_arg(parsed_globals):
|
|
3259
3265
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
3260
3266
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
3261
3267
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
3268
|
+
cvm_role_flag = False
|
3262
3269
|
|
3263
3270
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
3264
3271
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -3266,6 +3273,11 @@ def parse_global_arg(parsed_globals):
|
|
3266
3273
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
3267
3274
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
3268
3275
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
3276
|
+
cvm_role_flag = False
|
3277
|
+
|
3278
|
+
if cvm_role_flag:
|
3279
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
3280
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
3269
3281
|
|
3270
3282
|
for param in g_param.keys():
|
3271
3283
|
if g_param[param] is None:
|
tccli/services/tiw/tiw_client.py
CHANGED
@@ -3223,7 +3223,13 @@ def action_caller():
|
|
3223
3223
|
|
3224
3224
|
def parse_global_arg(parsed_globals):
|
3225
3225
|
g_param = parsed_globals
|
3226
|
-
|
3226
|
+
cvm_role_flag = True
|
3227
|
+
for param in parsed_globals.keys():
|
3228
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
3229
|
+
OptionsDefine.RoleSessionName]:
|
3230
|
+
if parsed_globals[param] is not None:
|
3231
|
+
cvm_role_flag = False
|
3232
|
+
break
|
3227
3233
|
is_exist_profile = True
|
3228
3234
|
if not parsed_globals["profile"]:
|
3229
3235
|
is_exist_profile = False
|
@@ -3254,6 +3260,7 @@ def parse_global_arg(parsed_globals):
|
|
3254
3260
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
3255
3261
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
3256
3262
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
3263
|
+
cvm_role_flag = False
|
3257
3264
|
|
3258
3265
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
3259
3266
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -3261,6 +3268,11 @@ def parse_global_arg(parsed_globals):
|
|
3261
3268
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
3262
3269
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
3263
3270
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
3271
|
+
cvm_role_flag = False
|
3272
|
+
|
3273
|
+
if cvm_role_flag:
|
3274
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
3275
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
3264
3276
|
|
3265
3277
|
for param in g_param.keys():
|
3266
3278
|
if g_param[param] is None:
|
tccli/services/tke/tke_client.py
CHANGED
@@ -12821,7 +12821,13 @@ def action_caller():
|
|
12821
12821
|
|
12822
12822
|
def parse_global_arg(parsed_globals):
|
12823
12823
|
g_param = parsed_globals
|
12824
|
-
|
12824
|
+
cvm_role_flag = True
|
12825
|
+
for param in parsed_globals.keys():
|
12826
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
12827
|
+
OptionsDefine.RoleSessionName]:
|
12828
|
+
if parsed_globals[param] is not None:
|
12829
|
+
cvm_role_flag = False
|
12830
|
+
break
|
12825
12831
|
is_exist_profile = True
|
12826
12832
|
if not parsed_globals["profile"]:
|
12827
12833
|
is_exist_profile = False
|
@@ -12852,6 +12858,7 @@ def parse_global_arg(parsed_globals):
|
|
12852
12858
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
12853
12859
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
12854
12860
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
12861
|
+
cvm_role_flag = False
|
12855
12862
|
|
12856
12863
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
12857
12864
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -12859,6 +12866,11 @@ def parse_global_arg(parsed_globals):
|
|
12859
12866
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
12860
12867
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
12861
12868
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
12869
|
+
cvm_role_flag = False
|
12870
|
+
|
12871
|
+
if cvm_role_flag:
|
12872
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
12873
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
12862
12874
|
|
12863
12875
|
for param in g_param.keys():
|
12864
12876
|
if g_param[param] is None:
|
@@ -85,14 +85,14 @@
|
|
85
85
|
"status": "online"
|
86
86
|
},
|
87
87
|
"StartMachines": {
|
88
|
-
"document": "本接口 (StartMachines) 用于启动一个或多个原生节点实例。\n\n只有状态为 Stopped 的实例才可以进行此操作。\n接口调用成功后,等待一分钟左右,实例会进入 Running 状态。\n支持批量操作。每次请求批量实例的上限为100。\n本接口为同步接口,启动实例请求发送成功后会返回一个RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeClusterInstances
|
88
|
+
"document": "本接口 (StartMachines) 用于启动一个或多个原生节点实例。\n\n只有状态为 Stopped 的实例才可以进行此操作。\n接口调用成功后,等待一分钟左右,实例会进入 Running 状态。\n支持批量操作。每次请求批量实例的上限为100。\n本接口为同步接口,启动实例请求发送成功后会返回一个RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeClusterInstances 接口查询,如果实例的状态为 Running,则代表启动实例操作成功。",
|
89
89
|
"input": "StartMachinesRequest",
|
90
90
|
"name": "启动原生节点实例",
|
91
91
|
"output": "StartMachinesResponse",
|
92
92
|
"status": "online"
|
93
93
|
},
|
94
94
|
"StopMachines": {
|
95
|
-
"document": "本接口 (StopMachines) 用于关闭一个或多个原生节点实例。\n\n只有状态为 Running 的实例才可以进行此操作。\n接口调用成功时,实例会进入 Stopping 状态;关闭实例成功时,实例会进入 Stopped 状态。\n支持强制关闭。强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。\n支持批量操作。每次请求批量实例的上限为 100。\n本接口为同步接口,关闭实例请求发送成功后会返回一个RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeClusterInstances
|
95
|
+
"document": "本接口 (StopMachines) 用于关闭一个或多个原生节点实例。\n\n只有状态为 Running 的实例才可以进行此操作。\n接口调用成功时,实例会进入 Stopping 状态;关闭实例成功时,实例会进入 Stopped 状态。\n支持强制关闭。强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏,请仅在服务器不能正常关机时使用。\n支持批量操作。每次请求批量实例的上限为 100。\n本接口为同步接口,关闭实例请求发送成功后会返回一个RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeClusterInstances 接口查询,如果实例的状态为stopped_with_charging,则代表关闭实例操作成功。",
|
96
96
|
"input": "StopMachinesRequest",
|
97
97
|
"name": "关闭原生节点实例",
|
98
98
|
"output": "StopMachinesResponse",
|
@@ -202,7 +202,13 @@ def action_caller():
|
|
202
202
|
|
203
203
|
def parse_global_arg(parsed_globals):
|
204
204
|
g_param = parsed_globals
|
205
|
-
|
205
|
+
cvm_role_flag = True
|
206
|
+
for param in parsed_globals.keys():
|
207
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
208
|
+
OptionsDefine.RoleSessionName]:
|
209
|
+
if parsed_globals[param] is not None:
|
210
|
+
cvm_role_flag = False
|
211
|
+
break
|
206
212
|
is_exist_profile = True
|
207
213
|
if not parsed_globals["profile"]:
|
208
214
|
is_exist_profile = False
|
@@ -233,6 +239,7 @@ def parse_global_arg(parsed_globals):
|
|
233
239
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
234
240
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
235
241
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
242
|
+
cvm_role_flag = False
|
236
243
|
|
237
244
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
238
245
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -240,6 +247,11 @@ def parse_global_arg(parsed_globals):
|
|
240
247
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
241
248
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
242
249
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
250
|
+
cvm_role_flag = False
|
251
|
+
|
252
|
+
if cvm_role_flag:
|
253
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
254
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
243
255
|
|
244
256
|
for param in g_param.keys():
|
245
257
|
if g_param[param] is None:
|
tccli/services/tms/tms_client.py
CHANGED
@@ -260,7 +260,13 @@ def action_caller():
|
|
260
260
|
|
261
261
|
def parse_global_arg(parsed_globals):
|
262
262
|
g_param = parsed_globals
|
263
|
-
|
263
|
+
cvm_role_flag = True
|
264
|
+
for param in parsed_globals.keys():
|
265
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
266
|
+
OptionsDefine.RoleSessionName]:
|
267
|
+
if parsed_globals[param] is not None:
|
268
|
+
cvm_role_flag = False
|
269
|
+
break
|
264
270
|
is_exist_profile = True
|
265
271
|
if not parsed_globals["profile"]:
|
266
272
|
is_exist_profile = False
|
@@ -291,6 +297,7 @@ def parse_global_arg(parsed_globals):
|
|
291
297
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
292
298
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
293
299
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
300
|
+
cvm_role_flag = False
|
294
301
|
|
295
302
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
296
303
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -298,6 +305,11 @@ def parse_global_arg(parsed_globals):
|
|
298
305
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
299
306
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
300
307
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
308
|
+
cvm_role_flag = False
|
309
|
+
|
310
|
+
if cvm_role_flag:
|
311
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
312
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
301
313
|
|
302
314
|
for param in g_param.keys():
|
303
315
|
if g_param[param] is None:
|
tccli/services/tmt/tmt_client.py
CHANGED
@@ -414,7 +414,13 @@ def action_caller():
|
|
414
414
|
|
415
415
|
def parse_global_arg(parsed_globals):
|
416
416
|
g_param = parsed_globals
|
417
|
-
|
417
|
+
cvm_role_flag = True
|
418
|
+
for param in parsed_globals.keys():
|
419
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
420
|
+
OptionsDefine.RoleSessionName]:
|
421
|
+
if parsed_globals[param] is not None:
|
422
|
+
cvm_role_flag = False
|
423
|
+
break
|
418
424
|
is_exist_profile = True
|
419
425
|
if not parsed_globals["profile"]:
|
420
426
|
is_exist_profile = False
|
@@ -445,6 +451,7 @@ def parse_global_arg(parsed_globals):
|
|
445
451
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
446
452
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
447
453
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
454
|
+
cvm_role_flag = False
|
448
455
|
|
449
456
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
450
457
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -452,6 +459,11 @@ def parse_global_arg(parsed_globals):
|
|
452
459
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
453
460
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
454
461
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
462
|
+
cvm_role_flag = False
|
463
|
+
|
464
|
+
if cvm_role_flag:
|
465
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
466
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
455
467
|
|
456
468
|
for param in g_param.keys():
|
457
469
|
if g_param[param] is None:
|
@@ -96,7 +96,13 @@ def action_caller():
|
|
96
96
|
|
97
97
|
def parse_global_arg(parsed_globals):
|
98
98
|
g_param = parsed_globals
|
99
|
-
|
99
|
+
cvm_role_flag = True
|
100
|
+
for param in parsed_globals.keys():
|
101
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
102
|
+
OptionsDefine.RoleSessionName]:
|
103
|
+
if parsed_globals[param] is not None:
|
104
|
+
cvm_role_flag = False
|
105
|
+
break
|
100
106
|
is_exist_profile = True
|
101
107
|
if not parsed_globals["profile"]:
|
102
108
|
is_exist_profile = False
|
@@ -127,6 +133,7 @@ def parse_global_arg(parsed_globals):
|
|
127
133
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
128
134
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
129
135
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
136
|
+
cvm_role_flag = False
|
130
137
|
|
131
138
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
132
139
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -134,6 +141,11 @@ def parse_global_arg(parsed_globals):
|
|
134
141
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
135
142
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
136
143
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
144
|
+
cvm_role_flag = False
|
145
|
+
|
146
|
+
if cvm_role_flag:
|
147
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
148
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
137
149
|
|
138
150
|
for param in g_param.keys():
|
139
151
|
if g_param[param] is None:
|
@@ -96,7 +96,13 @@ def action_caller():
|
|
96
96
|
|
97
97
|
def parse_global_arg(parsed_globals):
|
98
98
|
g_param = parsed_globals
|
99
|
-
|
99
|
+
cvm_role_flag = True
|
100
|
+
for param in parsed_globals.keys():
|
101
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
102
|
+
OptionsDefine.RoleSessionName]:
|
103
|
+
if parsed_globals[param] is not None:
|
104
|
+
cvm_role_flag = False
|
105
|
+
break
|
100
106
|
is_exist_profile = True
|
101
107
|
if not parsed_globals["profile"]:
|
102
108
|
is_exist_profile = False
|
@@ -127,6 +133,7 @@ def parse_global_arg(parsed_globals):
|
|
127
133
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
128
134
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
129
135
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
136
|
+
cvm_role_flag = False
|
130
137
|
|
131
138
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
132
139
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -134,6 +141,11 @@ def parse_global_arg(parsed_globals):
|
|
134
141
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
135
142
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
136
143
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
144
|
+
cvm_role_flag = False
|
145
|
+
|
146
|
+
if cvm_role_flag:
|
147
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
148
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
137
149
|
|
138
150
|
for param in g_param.keys():
|
139
151
|
if g_param[param] is None:
|
@@ -2640,7 +2640,13 @@ def action_caller():
|
|
2640
2640
|
|
2641
2641
|
def parse_global_arg(parsed_globals):
|
2642
2642
|
g_param = parsed_globals
|
2643
|
-
|
2643
|
+
cvm_role_flag = True
|
2644
|
+
for param in parsed_globals.keys():
|
2645
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
2646
|
+
OptionsDefine.RoleSessionName]:
|
2647
|
+
if parsed_globals[param] is not None:
|
2648
|
+
cvm_role_flag = False
|
2649
|
+
break
|
2644
2650
|
is_exist_profile = True
|
2645
2651
|
if not parsed_globals["profile"]:
|
2646
2652
|
is_exist_profile = False
|
@@ -2671,6 +2677,7 @@ def parse_global_arg(parsed_globals):
|
|
2671
2677
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
2672
2678
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
2673
2679
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
2680
|
+
cvm_role_flag = False
|
2674
2681
|
|
2675
2682
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
2676
2683
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -2678,6 +2685,11 @@ def parse_global_arg(parsed_globals):
|
|
2678
2685
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
2679
2686
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
2680
2687
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
2688
|
+
cvm_role_flag = False
|
2689
|
+
|
2690
|
+
if cvm_role_flag:
|
2691
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
2692
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
2681
2693
|
|
2682
2694
|
for param in g_param.keys():
|
2683
2695
|
if g_param[param] is None:
|
tccli/services/trp/trp_client.py
CHANGED
@@ -2905,7 +2905,13 @@ def action_caller():
|
|
2905
2905
|
|
2906
2906
|
def parse_global_arg(parsed_globals):
|
2907
2907
|
g_param = parsed_globals
|
2908
|
-
|
2908
|
+
cvm_role_flag = True
|
2909
|
+
for param in parsed_globals.keys():
|
2910
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
2911
|
+
OptionsDefine.RoleSessionName]:
|
2912
|
+
if parsed_globals[param] is not None:
|
2913
|
+
cvm_role_flag = False
|
2914
|
+
break
|
2909
2915
|
is_exist_profile = True
|
2910
2916
|
if not parsed_globals["profile"]:
|
2911
2917
|
is_exist_profile = False
|
@@ -2936,6 +2942,7 @@ def parse_global_arg(parsed_globals):
|
|
2936
2942
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
2937
2943
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
2938
2944
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
2945
|
+
cvm_role_flag = False
|
2939
2946
|
|
2940
2947
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
2941
2948
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -2943,6 +2950,11 @@ def parse_global_arg(parsed_globals):
|
|
2943
2950
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
2944
2951
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
2945
2952
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
2953
|
+
cvm_role_flag = False
|
2954
|
+
|
2955
|
+
if cvm_role_flag:
|
2956
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
2957
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
2946
2958
|
|
2947
2959
|
for param in g_param.keys():
|
2948
2960
|
if g_param[param] is None:
|
@@ -1262,7 +1262,13 @@ def action_caller():
|
|
1262
1262
|
|
1263
1263
|
def parse_global_arg(parsed_globals):
|
1264
1264
|
g_param = parsed_globals
|
1265
|
-
|
1265
|
+
cvm_role_flag = True
|
1266
|
+
for param in parsed_globals.keys():
|
1267
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1268
|
+
OptionsDefine.RoleSessionName]:
|
1269
|
+
if parsed_globals[param] is not None:
|
1270
|
+
cvm_role_flag = False
|
1271
|
+
break
|
1266
1272
|
is_exist_profile = True
|
1267
1273
|
if not parsed_globals["profile"]:
|
1268
1274
|
is_exist_profile = False
|
@@ -1293,6 +1299,7 @@ def parse_global_arg(parsed_globals):
|
|
1293
1299
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1294
1300
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1295
1301
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1302
|
+
cvm_role_flag = False
|
1296
1303
|
|
1297
1304
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1298
1305
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1300,6 +1307,11 @@ def parse_global_arg(parsed_globals):
|
|
1300
1307
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1301
1308
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1302
1309
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1310
|
+
cvm_role_flag = False
|
1311
|
+
|
1312
|
+
if cvm_role_flag:
|
1313
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1314
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1303
1315
|
|
1304
1316
|
for param in g_param.keys():
|
1305
1317
|
if g_param[param] is None:
|
@@ -2958,7 +2958,13 @@ def action_caller():
|
|
2958
2958
|
|
2959
2959
|
def parse_global_arg(parsed_globals):
|
2960
2960
|
g_param = parsed_globals
|
2961
|
-
|
2961
|
+
cvm_role_flag = True
|
2962
|
+
for param in parsed_globals.keys():
|
2963
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
2964
|
+
OptionsDefine.RoleSessionName]:
|
2965
|
+
if parsed_globals[param] is not None:
|
2966
|
+
cvm_role_flag = False
|
2967
|
+
break
|
2962
2968
|
is_exist_profile = True
|
2963
2969
|
if not parsed_globals["profile"]:
|
2964
2970
|
is_exist_profile = False
|
@@ -2989,6 +2995,7 @@ def parse_global_arg(parsed_globals):
|
|
2989
2995
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
2990
2996
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
2991
2997
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
2998
|
+
cvm_role_flag = False
|
2992
2999
|
|
2993
3000
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
2994
3001
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -2996,6 +3003,11 @@ def parse_global_arg(parsed_globals):
|
|
2996
3003
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
2997
3004
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
2998
3005
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
3006
|
+
cvm_role_flag = False
|
3007
|
+
|
3008
|
+
if cvm_role_flag:
|
3009
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
3010
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
2999
3011
|
|
3000
3012
|
for param in g_param.keys():
|
3001
3013
|
if g_param[param] is None:
|
tccli/services/tse/tse_client.py
CHANGED
@@ -6085,7 +6085,13 @@ def action_caller():
|
|
6085
6085
|
|
6086
6086
|
def parse_global_arg(parsed_globals):
|
6087
6087
|
g_param = parsed_globals
|
6088
|
-
|
6088
|
+
cvm_role_flag = True
|
6089
|
+
for param in parsed_globals.keys():
|
6090
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
6091
|
+
OptionsDefine.RoleSessionName]:
|
6092
|
+
if parsed_globals[param] is not None:
|
6093
|
+
cvm_role_flag = False
|
6094
|
+
break
|
6089
6095
|
is_exist_profile = True
|
6090
6096
|
if not parsed_globals["profile"]:
|
6091
6097
|
is_exist_profile = False
|
@@ -6116,6 +6122,7 @@ def parse_global_arg(parsed_globals):
|
|
6116
6122
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
6117
6123
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
6118
6124
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
6125
|
+
cvm_role_flag = False
|
6119
6126
|
|
6120
6127
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
6121
6128
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -6123,6 +6130,11 @@ def parse_global_arg(parsed_globals):
|
|
6123
6130
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
6124
6131
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
6125
6132
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
6133
|
+
cvm_role_flag = False
|
6134
|
+
|
6135
|
+
if cvm_role_flag:
|
6136
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
6137
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
6126
6138
|
|
6127
6139
|
for param in g_param.keys():
|
6128
6140
|
if g_param[param] is None:
|