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
tccli/services/tcb/tcb_client.py
CHANGED
@@ -4760,7 +4760,13 @@ def action_caller():
|
|
4760
4760
|
|
4761
4761
|
def parse_global_arg(parsed_globals):
|
4762
4762
|
g_param = parsed_globals
|
4763
|
-
|
4763
|
+
cvm_role_flag = True
|
4764
|
+
for param in parsed_globals.keys():
|
4765
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
4766
|
+
OptionsDefine.RoleSessionName]:
|
4767
|
+
if parsed_globals[param] is not None:
|
4768
|
+
cvm_role_flag = False
|
4769
|
+
break
|
4764
4770
|
is_exist_profile = True
|
4765
4771
|
if not parsed_globals["profile"]:
|
4766
4772
|
is_exist_profile = False
|
@@ -4791,6 +4797,7 @@ def parse_global_arg(parsed_globals):
|
|
4791
4797
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
4792
4798
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
4793
4799
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
4800
|
+
cvm_role_flag = False
|
4794
4801
|
|
4795
4802
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
4796
4803
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -4798,6 +4805,11 @@ def parse_global_arg(parsed_globals):
|
|
4798
4805
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
4799
4806
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
4800
4807
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
4808
|
+
cvm_role_flag = False
|
4809
|
+
|
4810
|
+
if cvm_role_flag:
|
4811
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
4812
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
4801
4813
|
|
4802
4814
|
for param in g_param.keys():
|
4803
4815
|
if g_param[param] is None:
|
@@ -573,7 +573,13 @@ def action_caller():
|
|
573
573
|
|
574
574
|
def parse_global_arg(parsed_globals):
|
575
575
|
g_param = parsed_globals
|
576
|
-
|
576
|
+
cvm_role_flag = True
|
577
|
+
for param in parsed_globals.keys():
|
578
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
579
|
+
OptionsDefine.RoleSessionName]:
|
580
|
+
if parsed_globals[param] is not None:
|
581
|
+
cvm_role_flag = False
|
582
|
+
break
|
577
583
|
is_exist_profile = True
|
578
584
|
if not parsed_globals["profile"]:
|
579
585
|
is_exist_profile = False
|
@@ -604,6 +610,7 @@ def parse_global_arg(parsed_globals):
|
|
604
610
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
605
611
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
606
612
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
613
|
+
cvm_role_flag = False
|
607
614
|
|
608
615
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
609
616
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -611,6 +618,11 @@ def parse_global_arg(parsed_globals):
|
|
611
618
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
612
619
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
613
620
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
621
|
+
cvm_role_flag = False
|
622
|
+
|
623
|
+
if cvm_role_flag:
|
624
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
625
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
614
626
|
|
615
627
|
for param in g_param.keys():
|
616
628
|
if g_param[param] is None:
|
@@ -149,7 +149,13 @@ def action_caller():
|
|
149
149
|
|
150
150
|
def parse_global_arg(parsed_globals):
|
151
151
|
g_param = parsed_globals
|
152
|
-
|
152
|
+
cvm_role_flag = True
|
153
|
+
for param in parsed_globals.keys():
|
154
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
155
|
+
OptionsDefine.RoleSessionName]:
|
156
|
+
if parsed_globals[param] is not None:
|
157
|
+
cvm_role_flag = False
|
158
|
+
break
|
153
159
|
is_exist_profile = True
|
154
160
|
if not parsed_globals["profile"]:
|
155
161
|
is_exist_profile = False
|
@@ -180,6 +186,7 @@ def parse_global_arg(parsed_globals):
|
|
180
186
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
181
187
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
182
188
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
189
|
+
cvm_role_flag = False
|
183
190
|
|
184
191
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
185
192
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -187,6 +194,11 @@ def parse_global_arg(parsed_globals):
|
|
187
194
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
188
195
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
189
196
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
197
|
+
cvm_role_flag = False
|
198
|
+
|
199
|
+
if cvm_role_flag:
|
200
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
201
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
190
202
|
|
191
203
|
for param in g_param.keys():
|
192
204
|
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:
|
tccli/services/tci/tci_client.py
CHANGED
@@ -2216,7 +2216,13 @@ def action_caller():
|
|
2216
2216
|
|
2217
2217
|
def parse_global_arg(parsed_globals):
|
2218
2218
|
g_param = parsed_globals
|
2219
|
-
|
2219
|
+
cvm_role_flag = True
|
2220
|
+
for param in parsed_globals.keys():
|
2221
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
2222
|
+
OptionsDefine.RoleSessionName]:
|
2223
|
+
if parsed_globals[param] is not None:
|
2224
|
+
cvm_role_flag = False
|
2225
|
+
break
|
2220
2226
|
is_exist_profile = True
|
2221
2227
|
if not parsed_globals["profile"]:
|
2222
2228
|
is_exist_profile = False
|
@@ -2247,6 +2253,7 @@ def parse_global_arg(parsed_globals):
|
|
2247
2253
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
2248
2254
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
2249
2255
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
2256
|
+
cvm_role_flag = False
|
2250
2257
|
|
2251
2258
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
2252
2259
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -2254,6 +2261,11 @@ def parse_global_arg(parsed_globals):
|
|
2254
2261
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
2255
2262
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
2256
2263
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
2264
|
+
cvm_role_flag = False
|
2265
|
+
|
2266
|
+
if cvm_role_flag:
|
2267
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
2268
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
2257
2269
|
|
2258
2270
|
for param in g_param.keys():
|
2259
2271
|
if g_param[param] is None:
|
tccli/services/tcm/tcm_client.py
CHANGED
@@ -679,7 +679,13 @@ def action_caller():
|
|
679
679
|
|
680
680
|
def parse_global_arg(parsed_globals):
|
681
681
|
g_param = parsed_globals
|
682
|
-
|
682
|
+
cvm_role_flag = True
|
683
|
+
for param in parsed_globals.keys():
|
684
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
685
|
+
OptionsDefine.RoleSessionName]:
|
686
|
+
if parsed_globals[param] is not None:
|
687
|
+
cvm_role_flag = False
|
688
|
+
break
|
683
689
|
is_exist_profile = True
|
684
690
|
if not parsed_globals["profile"]:
|
685
691
|
is_exist_profile = False
|
@@ -710,6 +716,7 @@ def parse_global_arg(parsed_globals):
|
|
710
716
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
711
717
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
712
718
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
719
|
+
cvm_role_flag = False
|
713
720
|
|
714
721
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
715
722
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -717,6 +724,11 @@ def parse_global_arg(parsed_globals):
|
|
717
724
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
718
725
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
719
726
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
727
|
+
cvm_role_flag = False
|
728
|
+
|
729
|
+
if cvm_role_flag:
|
730
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
731
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
720
732
|
|
721
733
|
for param in g_param.keys():
|
722
734
|
if g_param[param] is None:
|
tccli/services/tcr/tcr_client.py
CHANGED
@@ -5873,7 +5873,13 @@ def action_caller():
|
|
5873
5873
|
|
5874
5874
|
def parse_global_arg(parsed_globals):
|
5875
5875
|
g_param = parsed_globals
|
5876
|
-
|
5876
|
+
cvm_role_flag = True
|
5877
|
+
for param in parsed_globals.keys():
|
5878
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
5879
|
+
OptionsDefine.RoleSessionName]:
|
5880
|
+
if parsed_globals[param] is not None:
|
5881
|
+
cvm_role_flag = False
|
5882
|
+
break
|
5877
5883
|
is_exist_profile = True
|
5878
5884
|
if not parsed_globals["profile"]:
|
5879
5885
|
is_exist_profile = False
|
@@ -5904,6 +5910,7 @@ def parse_global_arg(parsed_globals):
|
|
5904
5910
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
5905
5911
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
5906
5912
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
5913
|
+
cvm_role_flag = False
|
5907
5914
|
|
5908
5915
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
5909
5916
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -5911,6 +5918,11 @@ def parse_global_arg(parsed_globals):
|
|
5911
5918
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
5912
5919
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
5913
5920
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
5921
|
+
cvm_role_flag = False
|
5922
|
+
|
5923
|
+
if cvm_role_flag:
|
5924
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
5925
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
5914
5926
|
|
5915
5927
|
for param in g_param.keys():
|
5916
5928
|
if g_param[param] is None:
|
@@ -17957,7 +17957,13 @@ def action_caller():
|
|
17957
17957
|
|
17958
17958
|
def parse_global_arg(parsed_globals):
|
17959
17959
|
g_param = parsed_globals
|
17960
|
-
|
17960
|
+
cvm_role_flag = True
|
17961
|
+
for param in parsed_globals.keys():
|
17962
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
17963
|
+
OptionsDefine.RoleSessionName]:
|
17964
|
+
if parsed_globals[param] is not None:
|
17965
|
+
cvm_role_flag = False
|
17966
|
+
break
|
17961
17967
|
is_exist_profile = True
|
17962
17968
|
if not parsed_globals["profile"]:
|
17963
17969
|
is_exist_profile = False
|
@@ -17988,6 +17994,7 @@ def parse_global_arg(parsed_globals):
|
|
17988
17994
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
17989
17995
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
17990
17996
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
17997
|
+
cvm_role_flag = False
|
17991
17998
|
|
17992
17999
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
17993
18000
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -17995,6 +18002,11 @@ def parse_global_arg(parsed_globals):
|
|
17995
18002
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
17996
18003
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
17997
18004
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
18005
|
+
cvm_role_flag = False
|
18006
|
+
|
18007
|
+
if cvm_role_flag:
|
18008
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
18009
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
17998
18010
|
|
17999
18011
|
for param in g_param.keys():
|
18000
18012
|
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:
|
@@ -997,7 +997,13 @@ def action_caller():
|
|
997
997
|
|
998
998
|
def parse_global_arg(parsed_globals):
|
999
999
|
g_param = parsed_globals
|
1000
|
-
|
1000
|
+
cvm_role_flag = True
|
1001
|
+
for param in parsed_globals.keys():
|
1002
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1003
|
+
OptionsDefine.RoleSessionName]:
|
1004
|
+
if parsed_globals[param] is not None:
|
1005
|
+
cvm_role_flag = False
|
1006
|
+
break
|
1001
1007
|
is_exist_profile = True
|
1002
1008
|
if not parsed_globals["profile"]:
|
1003
1009
|
is_exist_profile = False
|
@@ -1028,6 +1034,7 @@ def parse_global_arg(parsed_globals):
|
|
1028
1034
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1029
1035
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1030
1036
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1037
|
+
cvm_role_flag = False
|
1031
1038
|
|
1032
1039
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1033
1040
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1035,6 +1042,11 @@ def parse_global_arg(parsed_globals):
|
|
1035
1042
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1036
1043
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1037
1044
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1045
|
+
cvm_role_flag = False
|
1046
|
+
|
1047
|
+
if cvm_role_flag:
|
1048
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1049
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1038
1050
|
|
1039
1051
|
for param in g_param.keys():
|
1040
1052
|
if g_param[param] is None:
|
@@ -7728,7 +7728,13 @@ def action_caller():
|
|
7728
7728
|
|
7729
7729
|
def parse_global_arg(parsed_globals):
|
7730
7730
|
g_param = parsed_globals
|
7731
|
-
|
7731
|
+
cvm_role_flag = True
|
7732
|
+
for param in parsed_globals.keys():
|
7733
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
7734
|
+
OptionsDefine.RoleSessionName]:
|
7735
|
+
if parsed_globals[param] is not None:
|
7736
|
+
cvm_role_flag = False
|
7737
|
+
break
|
7732
7738
|
is_exist_profile = True
|
7733
7739
|
if not parsed_globals["profile"]:
|
7734
7740
|
is_exist_profile = False
|
@@ -7759,6 +7765,7 @@ def parse_global_arg(parsed_globals):
|
|
7759
7765
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
7760
7766
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
7761
7767
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
7768
|
+
cvm_role_flag = False
|
7762
7769
|
|
7763
7770
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
7764
7771
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -7766,6 +7773,11 @@ def parse_global_arg(parsed_globals):
|
|
7766
7773
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
7767
7774
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
7768
7775
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
7776
|
+
cvm_role_flag = False
|
7777
|
+
|
7778
|
+
if cvm_role_flag:
|
7779
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
7780
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
7769
7781
|
|
7770
7782
|
for param in g_param.keys():
|
7771
7783
|
if g_param[param] is None:
|
tccli/services/tds/tds_client.py
CHANGED
@@ -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:
|
tccli/services/tem/tem_client.py
CHANGED
@@ -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/teo/teo_client.py
CHANGED
@@ -6514,7 +6514,13 @@ def action_caller():
|
|
6514
6514
|
|
6515
6515
|
def parse_global_arg(parsed_globals):
|
6516
6516
|
g_param = parsed_globals
|
6517
|
-
|
6517
|
+
cvm_role_flag = True
|
6518
|
+
for param in parsed_globals.keys():
|
6519
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
6520
|
+
OptionsDefine.RoleSessionName]:
|
6521
|
+
if parsed_globals[param] is not None:
|
6522
|
+
cvm_role_flag = False
|
6523
|
+
break
|
6518
6524
|
is_exist_profile = True
|
6519
6525
|
if not parsed_globals["profile"]:
|
6520
6526
|
is_exist_profile = False
|
@@ -6545,6 +6551,7 @@ def parse_global_arg(parsed_globals):
|
|
6545
6551
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
6546
6552
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
6547
6553
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
6554
|
+
cvm_role_flag = False
|
6548
6555
|
|
6549
6556
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
6550
6557
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -6552,6 +6559,11 @@ def parse_global_arg(parsed_globals):
|
|
6552
6559
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
6553
6560
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
6554
6561
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
6562
|
+
cvm_role_flag = False
|
6563
|
+
|
6564
|
+
if cvm_role_flag:
|
6565
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
6566
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
6555
6567
|
|
6556
6568
|
for param in g_param.keys():
|
6557
6569
|
if g_param[param] is None:
|
@@ -1325,7 +1325,13 @@ def action_caller():
|
|
1325
1325
|
|
1326
1326
|
def parse_global_arg(parsed_globals):
|
1327
1327
|
g_param = parsed_globals
|
1328
|
-
|
1328
|
+
cvm_role_flag = True
|
1329
|
+
for param in parsed_globals.keys():
|
1330
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1331
|
+
OptionsDefine.RoleSessionName]:
|
1332
|
+
if parsed_globals[param] is not None:
|
1333
|
+
cvm_role_flag = False
|
1334
|
+
break
|
1329
1335
|
is_exist_profile = True
|
1330
1336
|
if not parsed_globals["profile"]:
|
1331
1337
|
is_exist_profile = False
|
@@ -1356,6 +1362,7 @@ def parse_global_arg(parsed_globals):
|
|
1356
1362
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1357
1363
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1358
1364
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1365
|
+
cvm_role_flag = False
|
1359
1366
|
|
1360
1367
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1361
1368
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1363,6 +1370,11 @@ def parse_global_arg(parsed_globals):
|
|
1363
1370
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1364
1371
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1365
1372
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1373
|
+
cvm_role_flag = False
|
1374
|
+
|
1375
|
+
if cvm_role_flag:
|
1376
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1377
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1366
1378
|
|
1367
1379
|
for param in g_param.keys():
|
1368
1380
|
if g_param[param] is None:
|
tccli/services/tia/tia_client.py
CHANGED
@@ -573,7 +573,13 @@ def action_caller():
|
|
573
573
|
|
574
574
|
def parse_global_arg(parsed_globals):
|
575
575
|
g_param = parsed_globals
|
576
|
-
|
576
|
+
cvm_role_flag = True
|
577
|
+
for param in parsed_globals.keys():
|
578
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
579
|
+
OptionsDefine.RoleSessionName]:
|
580
|
+
if parsed_globals[param] is not None:
|
581
|
+
cvm_role_flag = False
|
582
|
+
break
|
577
583
|
is_exist_profile = True
|
578
584
|
if not parsed_globals["profile"]:
|
579
585
|
is_exist_profile = False
|
@@ -604,6 +610,7 @@ def parse_global_arg(parsed_globals):
|
|
604
610
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
605
611
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
606
612
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
613
|
+
cvm_role_flag = False
|
607
614
|
|
608
615
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
609
616
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -611,6 +618,11 @@ def parse_global_arg(parsed_globals):
|
|
611
618
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
612
619
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
613
620
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
621
|
+
cvm_role_flag = False
|
622
|
+
|
623
|
+
if cvm_role_flag:
|
624
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
625
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
614
626
|
|
615
627
|
for param in g_param.keys():
|
616
628
|
if g_param[param] is None:
|
tccli/services/tic/tic_client.py
CHANGED
@@ -732,7 +732,13 @@ def action_caller():
|
|
732
732
|
|
733
733
|
def parse_global_arg(parsed_globals):
|
734
734
|
g_param = parsed_globals
|
735
|
-
|
735
|
+
cvm_role_flag = True
|
736
|
+
for param in parsed_globals.keys():
|
737
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
738
|
+
OptionsDefine.RoleSessionName]:
|
739
|
+
if parsed_globals[param] is not None:
|
740
|
+
cvm_role_flag = False
|
741
|
+
break
|
736
742
|
is_exist_profile = True
|
737
743
|
if not parsed_globals["profile"]:
|
738
744
|
is_exist_profile = False
|
@@ -763,6 +769,7 @@ def parse_global_arg(parsed_globals):
|
|
763
769
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
764
770
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
765
771
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
772
|
+
cvm_role_flag = False
|
766
773
|
|
767
774
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
768
775
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -770,6 +777,11 @@ def parse_global_arg(parsed_globals):
|
|
770
777
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
771
778
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
772
779
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
780
|
+
cvm_role_flag = False
|
781
|
+
|
782
|
+
if cvm_role_flag:
|
783
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
784
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
773
785
|
|
774
786
|
for param in g_param.keys():
|
775
787
|
if g_param[param] is None:
|
@@ -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:
|