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/asr/asr_client.py
CHANGED
@@ -1739,7 +1739,13 @@ def action_caller():
|
|
1739
1739
|
|
1740
1740
|
def parse_global_arg(parsed_globals):
|
1741
1741
|
g_param = parsed_globals
|
1742
|
-
|
1742
|
+
cvm_role_flag = True
|
1743
|
+
for param in parsed_globals.keys():
|
1744
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1745
|
+
OptionsDefine.RoleSessionName]:
|
1746
|
+
if parsed_globals[param] is not None:
|
1747
|
+
cvm_role_flag = False
|
1748
|
+
break
|
1743
1749
|
is_exist_profile = True
|
1744
1750
|
if not parsed_globals["profile"]:
|
1745
1751
|
is_exist_profile = False
|
@@ -1770,6 +1776,7 @@ def parse_global_arg(parsed_globals):
|
|
1770
1776
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1771
1777
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1772
1778
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1779
|
+
cvm_role_flag = False
|
1773
1780
|
|
1774
1781
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1775
1782
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1777,6 +1784,11 @@ def parse_global_arg(parsed_globals):
|
|
1777
1784
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1778
1785
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1779
1786
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1787
|
+
cvm_role_flag = False
|
1788
|
+
|
1789
|
+
if cvm_role_flag:
|
1790
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1791
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1780
1792
|
|
1781
1793
|
for param in g_param.keys():
|
1782
1794
|
if g_param[param] is None:
|
tccli/services/asw/asw_client.py
CHANGED
@@ -520,7 +520,13 @@ def action_caller():
|
|
520
520
|
|
521
521
|
def parse_global_arg(parsed_globals):
|
522
522
|
g_param = parsed_globals
|
523
|
-
|
523
|
+
cvm_role_flag = True
|
524
|
+
for param in parsed_globals.keys():
|
525
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
526
|
+
OptionsDefine.RoleSessionName]:
|
527
|
+
if parsed_globals[param] is not None:
|
528
|
+
cvm_role_flag = False
|
529
|
+
break
|
524
530
|
is_exist_profile = True
|
525
531
|
if not parsed_globals["profile"]:
|
526
532
|
is_exist_profile = False
|
@@ -551,6 +557,7 @@ def parse_global_arg(parsed_globals):
|
|
551
557
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
552
558
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
553
559
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
560
|
+
cvm_role_flag = False
|
554
561
|
|
555
562
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
556
563
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -558,6 +565,11 @@ def parse_global_arg(parsed_globals):
|
|
558
565
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
559
566
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
560
567
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
568
|
+
cvm_role_flag = False
|
569
|
+
|
570
|
+
if cvm_role_flag:
|
571
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
572
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
561
573
|
|
562
574
|
for param in g_param.keys():
|
563
575
|
if g_param[param] is None:
|
@@ -3064,7 +3064,13 @@ def action_caller():
|
|
3064
3064
|
|
3065
3065
|
def parse_global_arg(parsed_globals):
|
3066
3066
|
g_param = parsed_globals
|
3067
|
-
|
3067
|
+
cvm_role_flag = True
|
3068
|
+
for param in parsed_globals.keys():
|
3069
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
3070
|
+
OptionsDefine.RoleSessionName]:
|
3071
|
+
if parsed_globals[param] is not None:
|
3072
|
+
cvm_role_flag = False
|
3073
|
+
break
|
3068
3074
|
is_exist_profile = True
|
3069
3075
|
if not parsed_globals["profile"]:
|
3070
3076
|
is_exist_profile = False
|
@@ -3095,6 +3101,7 @@ def parse_global_arg(parsed_globals):
|
|
3095
3101
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
3096
3102
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
3097
3103
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
3104
|
+
cvm_role_flag = False
|
3098
3105
|
|
3099
3106
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
3100
3107
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -3102,6 +3109,11 @@ def parse_global_arg(parsed_globals):
|
|
3102
3109
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
3103
3110
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
3104
3111
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
3112
|
+
cvm_role_flag = False
|
3113
|
+
|
3114
|
+
if cvm_role_flag:
|
3115
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
3116
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
3105
3117
|
|
3106
3118
|
for param in g_param.keys():
|
3107
3119
|
if g_param[param] is None:
|
tccli/services/ba/ba_client.py
CHANGED
@@ -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:
|
@@ -1686,7 +1686,13 @@ def action_caller():
|
|
1686
1686
|
|
1687
1687
|
def parse_global_arg(parsed_globals):
|
1688
1688
|
g_param = parsed_globals
|
1689
|
-
|
1689
|
+
cvm_role_flag = True
|
1690
|
+
for param in parsed_globals.keys():
|
1691
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1692
|
+
OptionsDefine.RoleSessionName]:
|
1693
|
+
if parsed_globals[param] is not None:
|
1694
|
+
cvm_role_flag = False
|
1695
|
+
break
|
1690
1696
|
is_exist_profile = True
|
1691
1697
|
if not parsed_globals["profile"]:
|
1692
1698
|
is_exist_profile = False
|
@@ -1717,6 +1723,7 @@ def parse_global_arg(parsed_globals):
|
|
1717
1723
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1718
1724
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1719
1725
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1726
|
+
cvm_role_flag = False
|
1720
1727
|
|
1721
1728
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1722
1729
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1724,6 +1731,11 @@ def parse_global_arg(parsed_globals):
|
|
1724
1731
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1725
1732
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1726
1733
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1734
|
+
cvm_role_flag = False
|
1735
|
+
|
1736
|
+
if cvm_role_flag:
|
1737
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1738
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1727
1739
|
|
1728
1740
|
for param in g_param.keys():
|
1729
1741
|
if g_param[param] is None:
|
tccli/services/bda/bda_client.py
CHANGED
@@ -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:
|
tccli/services/bh/bh_client.py
CHANGED
@@ -3329,7 +3329,13 @@ def action_caller():
|
|
3329
3329
|
|
3330
3330
|
def parse_global_arg(parsed_globals):
|
3331
3331
|
g_param = parsed_globals
|
3332
|
-
|
3332
|
+
cvm_role_flag = True
|
3333
|
+
for param in parsed_globals.keys():
|
3334
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
3335
|
+
OptionsDefine.RoleSessionName]:
|
3336
|
+
if parsed_globals[param] is not None:
|
3337
|
+
cvm_role_flag = False
|
3338
|
+
break
|
3333
3339
|
is_exist_profile = True
|
3334
3340
|
if not parsed_globals["profile"]:
|
3335
3341
|
is_exist_profile = False
|
@@ -3360,6 +3366,7 @@ def parse_global_arg(parsed_globals):
|
|
3360
3366
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
3361
3367
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
3362
3368
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
3369
|
+
cvm_role_flag = False
|
3363
3370
|
|
3364
3371
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
3365
3372
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -3367,6 +3374,11 @@ def parse_global_arg(parsed_globals):
|
|
3367
3374
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
3368
3375
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
3369
3376
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
3377
|
+
cvm_role_flag = False
|
3378
|
+
|
3379
|
+
if cvm_role_flag:
|
3380
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
3381
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
3370
3382
|
|
3371
3383
|
for param in g_param.keys():
|
3372
3384
|
if g_param[param] is None:
|
tccli/services/bi/bi_client.py
CHANGED
@@ -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:
|
@@ -2481,7 +2481,13 @@ def action_caller():
|
|
2481
2481
|
|
2482
2482
|
def parse_global_arg(parsed_globals):
|
2483
2483
|
g_param = parsed_globals
|
2484
|
-
|
2484
|
+
cvm_role_flag = True
|
2485
|
+
for param in parsed_globals.keys():
|
2486
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
2487
|
+
OptionsDefine.RoleSessionName]:
|
2488
|
+
if parsed_globals[param] is not None:
|
2489
|
+
cvm_role_flag = False
|
2490
|
+
break
|
2485
2491
|
is_exist_profile = True
|
2486
2492
|
if not parsed_globals["profile"]:
|
2487
2493
|
is_exist_profile = False
|
@@ -2512,6 +2518,7 @@ def parse_global_arg(parsed_globals):
|
|
2512
2518
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
2513
2519
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
2514
2520
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
2521
|
+
cvm_role_flag = False
|
2515
2522
|
|
2516
2523
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
2517
2524
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -2519,6 +2526,11 @@ def parse_global_arg(parsed_globals):
|
|
2519
2526
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
2520
2527
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
2521
2528
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
2529
|
+
cvm_role_flag = False
|
2530
|
+
|
2531
|
+
if cvm_role_flag:
|
2532
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
2533
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
2522
2534
|
|
2523
2535
|
for param in g_param.keys():
|
2524
2536
|
if g_param[param] is None:
|