tccli 3.0.1217.1__py2.py3-none-any.whl → 3.0.1218.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (266) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/command.py +0 -1
  3. tccli/configure.py +11 -1
  4. tccli/services/aa/aa_client.py +13 -1
  5. tccli/services/aai/aai_client.py +13 -1
  6. tccli/services/acp/acp_client.py +13 -1
  7. tccli/services/advisor/advisor_client.py +13 -1
  8. tccli/services/af/af_client.py +13 -1
  9. tccli/services/afc/afc_client.py +13 -1
  10. tccli/services/aiart/aiart_client.py +13 -1
  11. tccli/services/ame/ame_client.py +13 -1
  12. tccli/services/ams/ams_client.py +13 -1
  13. tccli/services/anicloud/anicloud_client.py +13 -1
  14. tccli/services/antiddos/antiddos_client.py +13 -1
  15. tccli/services/apcas/apcas_client.py +13 -1
  16. tccli/services/ape/ape_client.py +13 -1
  17. tccli/services/api/api_client.py +13 -1
  18. tccli/services/apigateway/apigateway_client.py +13 -1
  19. tccli/services/apm/apm_client.py +13 -1
  20. tccli/services/asr/asr_client.py +13 -1
  21. tccli/services/asw/asw_client.py +13 -1
  22. tccli/services/autoscaling/autoscaling_client.py +13 -1
  23. tccli/services/ba/ba_client.py +13 -1
  24. tccli/services/batch/batch_client.py +13 -1
  25. tccli/services/bda/bda_client.py +13 -1
  26. tccli/services/bh/bh_client.py +13 -1
  27. tccli/services/bi/bi_client.py +13 -1
  28. tccli/services/billing/billing_client.py +13 -1
  29. tccli/services/bizlive/bizlive_client.py +13 -1
  30. tccli/services/bm/bm_client.py +13 -1
  31. tccli/services/bma/bma_client.py +13 -1
  32. tccli/services/bmeip/bmeip_client.py +13 -1
  33. tccli/services/bmlb/bmlb_client.py +13 -1
  34. tccli/services/bmvpc/bmvpc_client.py +13 -1
  35. tccli/services/bpaas/bpaas_client.py +13 -1
  36. tccli/services/bri/bri_client.py +13 -1
  37. tccli/services/bsca/bsca_client.py +13 -1
  38. tccli/services/btoe/btoe_client.py +13 -1
  39. tccli/services/ca/ca_client.py +13 -1
  40. tccli/services/cam/cam_client.py +13 -1
  41. tccli/services/captcha/captcha_client.py +13 -1
  42. tccli/services/car/car_client.py +13 -1
  43. tccli/services/cat/cat_client.py +13 -1
  44. tccli/services/cbs/cbs_client.py +13 -1
  45. tccli/services/ccc/ccc_client.py +13 -1
  46. tccli/services/cdb/cdb_client.py +13 -1
  47. tccli/services/cdc/cdc_client.py +13 -1
  48. tccli/services/cdn/cdn_client.py +13 -1
  49. tccli/services/cds/cds_client.py +13 -1
  50. tccli/services/cdwch/cdwch_client.py +13 -1
  51. tccli/services/cdwdoris/cdwdoris_client.py +13 -1
  52. tccli/services/cdwpg/cdwpg_client.py +13 -1
  53. tccli/services/cdz/cdz_client.py +13 -1
  54. tccli/services/cfg/cfg_client.py +13 -1
  55. tccli/services/cfs/cfs_client.py +13 -1
  56. tccli/services/cfw/cfw_client.py +13 -1
  57. tccli/services/chdfs/chdfs_client.py +13 -1
  58. tccli/services/ciam/ciam_client.py +13 -1
  59. tccli/services/cii/cii_client.py +13 -1
  60. tccli/services/cim/cim_client.py +13 -1
  61. tccli/services/cis/cis_client.py +13 -1
  62. tccli/services/ckafka/ckafka_client.py +13 -1
  63. tccli/services/clb/clb_client.py +13 -1
  64. tccli/services/cloudapp/cloudapp_client.py +13 -1
  65. tccli/services/cloudaudit/cloudaudit_client.py +13 -1
  66. tccli/services/cloudhsm/cloudhsm_client.py +13 -1
  67. tccli/services/cloudstudio/cloudstudio_client.py +13 -1
  68. tccli/services/cls/cls_client.py +13 -1
  69. tccli/services/cme/cme_client.py +13 -1
  70. tccli/services/cmq/cmq_client.py +13 -1
  71. tccli/services/cms/cms_client.py +13 -1
  72. tccli/services/config/config_client.py +13 -1
  73. tccli/services/controlcenter/controlcenter_client.py +13 -1
  74. tccli/services/cpdp/cpdp_client.py +13 -1
  75. tccli/services/csip/csip_client.py +13 -1
  76. tccli/services/csxg/csxg_client.py +13 -1
  77. tccli/services/cvm/cvm_client.py +13 -1
  78. tccli/services/cwp/cwp_client.py +13 -1
  79. tccli/services/cws/cws_client.py +13 -1
  80. tccli/services/cynosdb/cynosdb_client.py +13 -1
  81. tccli/services/dasb/dasb_client.py +13 -1
  82. tccli/services/dataintegration/dataintegration_client.py +13 -1
  83. tccli/services/dayu/dayu_client.py +13 -1
  84. tccli/services/dbbrain/dbbrain_client.py +13 -1
  85. tccli/services/dbdc/dbdc_client.py +13 -1
  86. tccli/services/dc/dc_client.py +13 -1
  87. tccli/services/dcdb/dcdb_client.py +13 -1
  88. tccli/services/dlc/dlc_client.py +13 -1
  89. tccli/services/dnspod/dnspod_client.py +13 -1
  90. tccli/services/domain/domain_client.py +13 -1
  91. tccli/services/drm/drm_client.py +13 -1
  92. tccli/services/ds/ds_client.py +13 -1
  93. tccli/services/dsgc/dsgc_client.py +13 -1
  94. tccli/services/dtf/dtf_client.py +13 -1
  95. tccli/services/dts/dts_client.py +13 -1
  96. tccli/services/eb/eb_client.py +13 -1
  97. tccli/services/ecc/ecc_client.py +13 -1
  98. tccli/services/ecdn/ecdn_client.py +13 -1
  99. tccli/services/ecm/ecm_client.py +13 -1
  100. tccli/services/eiam/eiam_client.py +13 -1
  101. tccli/services/eis/eis_client.py +13 -1
  102. tccli/services/emr/emr_client.py +13 -1
  103. tccli/services/es/es_client.py +13 -1
  104. tccli/services/ess/ess_client.py +13 -1
  105. tccli/services/essbasic/essbasic_client.py +13 -1
  106. tccli/services/facefusion/facefusion_client.py +13 -1
  107. tccli/services/faceid/faceid_client.py +13 -1
  108. tccli/services/fmu/fmu_client.py +13 -1
  109. tccli/services/ft/ft_client.py +13 -1
  110. tccli/services/gaap/gaap_client.py +13 -1
  111. tccli/services/gme/gme_client.py +13 -1
  112. tccli/services/goosefs/goosefs_client.py +13 -1
  113. tccli/services/gpm/gpm_client.py +13 -1
  114. tccli/services/gs/gs_client.py +13 -1
  115. tccli/services/gse/gse_client.py +13 -1
  116. tccli/services/gwlb/gwlb_client.py +13 -1
  117. tccli/services/habo/habo_client.py +13 -1
  118. tccli/services/hai/hai_client.py +13 -1
  119. tccli/services/hasim/hasim_client.py +13 -1
  120. tccli/services/hcm/hcm_client.py +13 -1
  121. tccli/services/hunyuan/hunyuan_client.py +13 -1
  122. tccli/services/iai/iai_client.py +13 -1
  123. tccli/services/ic/ic_client.py +13 -1
  124. tccli/services/icr/icr_client.py +13 -1
  125. tccli/services/ie/ie_client.py +13 -1
  126. tccli/services/iecp/iecp_client.py +13 -1
  127. tccli/services/ig/ig_client.py +13 -1
  128. tccli/services/iir/iir_client.py +13 -1
  129. tccli/services/ims/ims_client.py +13 -1
  130. tccli/services/ioa/ioa_client.py +13 -1
  131. tccli/services/iot/iot_client.py +13 -1
  132. tccli/services/iotcloud/iotcloud_client.py +13 -1
  133. tccli/services/iotexplorer/iotexplorer_client.py +13 -1
  134. tccli/services/iottid/iottid_client.py +13 -1
  135. tccli/services/iotvideo/iotvideo_client.py +13 -1
  136. tccli/services/iotvideoindustry/iotvideoindustry_client.py +13 -1
  137. tccli/services/irp/irp_client.py +13 -1
  138. tccli/services/iss/iss_client.py +13 -1
  139. tccli/services/ivld/ivld_client.py +13 -1
  140. tccli/services/keewidb/keewidb_client.py +13 -1
  141. tccli/services/kms/kms_client.py +13 -1
  142. tccli/services/lcic/lcic_client.py +13 -1
  143. tccli/services/lighthouse/lighthouse_client.py +13 -1
  144. tccli/services/live/live_client.py +13 -1
  145. tccli/services/lke/lke_client.py +13 -1
  146. tccli/services/lowcode/lowcode_client.py +13 -1
  147. tccli/services/lp/lp_client.py +13 -1
  148. tccli/services/mall/mall_client.py +13 -1
  149. tccli/services/mariadb/mariadb_client.py +13 -1
  150. tccli/services/market/market_client.py +13 -1
  151. tccli/services/memcached/memcached_client.py +13 -1
  152. tccli/services/mgobe/mgobe_client.py +13 -1
  153. tccli/services/mmps/mmps_client.py +13 -1
  154. tccli/services/mna/mna_client.py +13 -1
  155. tccli/services/mongodb/mongodb_client.py +13 -1
  156. tccli/services/monitor/monitor_client.py +13 -1
  157. tccli/services/mps/mps_client.py +13 -1
  158. tccli/services/mqtt/mqtt_client.py +13 -1
  159. tccli/services/mrs/mrs_client.py +13 -1
  160. tccli/services/ms/ms_client.py +13 -1
  161. tccli/services/msp/msp_client.py +13 -1
  162. tccli/services/mvj/mvj_client.py +13 -1
  163. tccli/services/nlp/nlp_client.py +13 -1
  164. tccli/services/npp/npp_client.py +13 -1
  165. tccli/services/oceanus/oceanus_client.py +13 -1
  166. tccli/services/ocr/ocr_client.py +13 -1
  167. tccli/services/omics/omics_client.py +13 -1
  168. tccli/services/organization/organization_client.py +13 -1
  169. tccli/services/partners/partners_client.py +13 -1
  170. tccli/services/pds/pds_client.py +13 -1
  171. tccli/services/postgres/postgres_client.py +13 -1
  172. tccli/services/privatedns/privatedns_client.py +13 -1
  173. tccli/services/pts/pts_client.py +13 -1
  174. tccli/services/rce/rce_client.py +13 -1
  175. tccli/services/redis/redis_client.py +13 -1
  176. tccli/services/region/region_client.py +13 -1
  177. tccli/services/rkp/rkp_client.py +13 -1
  178. tccli/services/rp/rp_client.py +13 -1
  179. tccli/services/rum/rum_client.py +13 -1
  180. tccli/services/scf/scf_client.py +13 -1
  181. tccli/services/ses/ses_client.py +13 -1
  182. tccli/services/smh/smh_client.py +13 -1
  183. tccli/services/smop/smop_client.py +13 -1
  184. tccli/services/smpn/smpn_client.py +13 -1
  185. tccli/services/sms/sms_client.py +13 -1
  186. tccli/services/soe/soe_client.py +13 -1
  187. tccli/services/solar/solar_client.py +13 -1
  188. tccli/services/sqlserver/sqlserver_client.py +13 -1
  189. tccli/services/ssa/ssa_client.py +13 -1
  190. tccli/services/ssl/ssl_client.py +13 -1
  191. tccli/services/sslpod/sslpod_client.py +13 -1
  192. tccli/services/ssm/ssm_client.py +13 -1
  193. tccli/services/sts/sts_client.py +13 -1
  194. tccli/services/svp/svp_client.py +13 -1
  195. tccli/services/taf/taf_client.py +13 -1
  196. tccli/services/tag/tag_client.py +13 -1
  197. tccli/services/tan/tan_client.py +13 -1
  198. tccli/services/tat/tat_client.py +13 -1
  199. tccli/services/tav/tav_client.py +13 -1
  200. tccli/services/tbaas/tbaas_client.py +13 -1
  201. tccli/services/tbm/tbm_client.py +13 -1
  202. tccli/services/tbp/tbp_client.py +13 -1
  203. tccli/services/tcaplusdb/tcaplusdb_client.py +13 -1
  204. tccli/services/tcb/tcb_client.py +13 -1
  205. tccli/services/tcbr/tcbr_client.py +13 -1
  206. tccli/services/tcex/tcex_client.py +13 -1
  207. tccli/services/tchd/tchd_client.py +13 -1
  208. tccli/services/tci/tci_client.py +13 -1
  209. tccli/services/tcm/tcm_client.py +13 -1
  210. tccli/services/tcr/tcr_client.py +13 -1
  211. tccli/services/tcss/tcss_client.py +13 -1
  212. tccli/services/tdcpg/tdcpg_client.py +13 -1
  213. tccli/services/tdid/tdid_client.py +13 -1
  214. tccli/services/tdmq/tdmq_client.py +13 -1
  215. tccli/services/tds/tds_client.py +13 -1
  216. tccli/services/tem/tem_client.py +13 -1
  217. tccli/services/teo/teo_client.py +13 -1
  218. tccli/services/thpc/thpc_client.py +13 -1
  219. tccli/services/tia/tia_client.py +13 -1
  220. tccli/services/tic/tic_client.py +13 -1
  221. tccli/services/ticm/ticm_client.py +13 -1
  222. tccli/services/tics/tics_client.py +13 -1
  223. tccli/services/tiems/tiems_client.py +13 -1
  224. tccli/services/tiia/tiia_client.py +13 -1
  225. tccli/services/tione/tione_client.py +13 -1
  226. tccli/services/tiw/tiw_client.py +13 -1
  227. tccli/services/tke/tke_client.py +13 -1
  228. tccli/services/tkgdq/tkgdq_client.py +13 -1
  229. tccli/services/tms/tms_client.py +13 -1
  230. tccli/services/tmt/tmt_client.py +13 -1
  231. tccli/services/tourism/tourism_client.py +13 -1
  232. tccli/services/trdp/trdp_client.py +13 -1
  233. tccli/services/trocket/trocket_client.py +13 -1
  234. tccli/services/trp/trp_client.py +13 -1
  235. tccli/services/trro/trro_client.py +13 -1
  236. tccli/services/trtc/trtc_client.py +13 -1
  237. tccli/services/tse/tse_client.py +13 -1
  238. tccli/services/tsf/tsf_client.py +13 -1
  239. tccli/services/tsi/tsi_client.py +13 -1
  240. tccli/services/tsw/tsw_client.py +13 -1
  241. tccli/services/tts/tts_client.py +13 -1
  242. tccli/services/ump/ump_client.py +13 -1
  243. tccli/services/vcg/vcg_client.py +13 -1
  244. tccli/services/vclm/vclm_client.py +13 -1
  245. tccli/services/vdb/vdb_client.py +13 -1
  246. tccli/services/vm/vm_client.py +13 -1
  247. tccli/services/vms/vms_client.py +13 -1
  248. tccli/services/vod/vod_client.py +13 -1
  249. tccli/services/vpc/vpc_client.py +13 -1
  250. tccli/services/vrs/vrs_client.py +13 -1
  251. tccli/services/vtc/vtc_client.py +13 -1
  252. tccli/services/waf/waf_client.py +13 -1
  253. tccli/services/wav/wav_client.py +13 -1
  254. tccli/services/wedata/wedata_client.py +13 -1
  255. tccli/services/weilingwith/weilingwith_client.py +13 -1
  256. tccli/services/wss/wss_client.py +13 -1
  257. tccli/services/yinsuda/yinsuda_client.py +13 -1
  258. tccli/services/youmall/youmall_client.py +13 -1
  259. tccli/services/yunjing/yunjing_client.py +13 -1
  260. tccli/services/yunsou/yunsou_client.py +13 -1
  261. tccli/utils.py +8 -0
  262. {tccli-3.0.1217.1.dist-info → tccli-3.0.1218.1.dist-info}/METADATA +2 -2
  263. {tccli-3.0.1217.1.dist-info → tccli-3.0.1218.1.dist-info}/RECORD +266 -266
  264. {tccli-3.0.1217.1.dist-info → tccli-3.0.1218.1.dist-info}/WHEEL +0 -0
  265. {tccli-3.0.1217.1.dist-info → tccli-3.0.1218.1.dist-info}/entry_points.txt +0 -0
  266. {tccli-3.0.1217.1.dist-info → tccli-3.0.1218.1.dist-info}/license_files/LICENSE +0 -0
@@ -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:
@@ -11809,7 +11809,13 @@ def action_caller():
11809
11809
 
11810
11810
  def parse_global_arg(parsed_globals):
11811
11811
  g_param = parsed_globals
11812
-
11812
+ cvm_role_flag = True
11813
+ for param in parsed_globals.keys():
11814
+ if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
11815
+ OptionsDefine.RoleSessionName]:
11816
+ if parsed_globals[param] is not None:
11817
+ cvm_role_flag = False
11818
+ break
11813
11819
  is_exist_profile = True
11814
11820
  if not parsed_globals["profile"]:
11815
11821
  is_exist_profile = False
@@ -11840,6 +11846,7 @@ def parse_global_arg(parsed_globals):
11840
11846
  cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
11841
11847
  cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
11842
11848
  cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
11849
+ cvm_role_flag = False
11843
11850
 
11844
11851
  if os.environ.get(OptionsDefine.ENV_REGION):
11845
11852
  conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
@@ -11847,6 +11854,11 @@ def parse_global_arg(parsed_globals):
11847
11854
  if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
11848
11855
  cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
11849
11856
  cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
11857
+ cvm_role_flag = False
11858
+
11859
+ if cvm_role_flag:
11860
+ if "type" in cred and cred["type"] == "cvm-role":
11861
+ g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
11850
11862
 
11851
11863
  for param in g_param.keys():
11852
11864
  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:
@@ -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:
@@ -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:
@@ -944,7 +944,13 @@ def action_caller():
944
944
 
945
945
  def parse_global_arg(parsed_globals):
946
946
  g_param = parsed_globals
947
-
947
+ cvm_role_flag = True
948
+ for param in parsed_globals.keys():
949
+ if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
950
+ OptionsDefine.RoleSessionName]:
951
+ if parsed_globals[param] is not None:
952
+ cvm_role_flag = False
953
+ break
948
954
  is_exist_profile = True
949
955
  if not parsed_globals["profile"]:
950
956
  is_exist_profile = False
@@ -975,6 +981,7 @@ def parse_global_arg(parsed_globals):
975
981
  cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
976
982
  cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
977
983
  cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
984
+ cvm_role_flag = False
978
985
 
979
986
  if os.environ.get(OptionsDefine.ENV_REGION):
980
987
  conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
@@ -982,6 +989,11 @@ def parse_global_arg(parsed_globals):
982
989
  if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
983
990
  cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
984
991
  cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
992
+ cvm_role_flag = False
993
+
994
+ if cvm_role_flag:
995
+ if "type" in cred and cred["type"] == "cvm-role":
996
+ g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
985
997
 
986
998
  for param in g_param.keys():
987
999
  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:
@@ -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:
@@ -361,7 +361,13 @@ def action_caller():
361
361
 
362
362
  def parse_global_arg(parsed_globals):
363
363
  g_param = parsed_globals
364
-
364
+ cvm_role_flag = True
365
+ for param in parsed_globals.keys():
366
+ if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
367
+ OptionsDefine.RoleSessionName]:
368
+ if parsed_globals[param] is not None:
369
+ cvm_role_flag = False
370
+ break
365
371
  is_exist_profile = True
366
372
  if not parsed_globals["profile"]:
367
373
  is_exist_profile = False
@@ -392,6 +398,7 @@ def parse_global_arg(parsed_globals):
392
398
  cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
393
399
  cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
394
400
  cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
401
+ cvm_role_flag = False
395
402
 
396
403
  if os.environ.get(OptionsDefine.ENV_REGION):
397
404
  conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
@@ -399,6 +406,11 @@ def parse_global_arg(parsed_globals):
399
406
  if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
400
407
  cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
401
408
  cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
409
+ cvm_role_flag = False
410
+
411
+ if cvm_role_flag:
412
+ if "type" in cred and cred["type"] == "cvm-role":
413
+ g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
402
414
 
403
415
  for param in g_param.keys():
404
416
  if g_param[param] is None:
@@ -371,7 +371,13 @@ def action_caller():
371
371
 
372
372
  def parse_global_arg(parsed_globals):
373
373
  g_param = parsed_globals
374
-
374
+ cvm_role_flag = True
375
+ for param in parsed_globals.keys():
376
+ if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
377
+ OptionsDefine.RoleSessionName]:
378
+ if parsed_globals[param] is not None:
379
+ cvm_role_flag = False
380
+ break
375
381
  is_exist_profile = True
376
382
  if not parsed_globals["profile"]:
377
383
  is_exist_profile = False
@@ -402,6 +408,7 @@ def parse_global_arg(parsed_globals):
402
408
  cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
403
409
  cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
404
410
  cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
411
+ cvm_role_flag = False
405
412
 
406
413
  if os.environ.get(OptionsDefine.ENV_REGION):
407
414
  conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
@@ -409,6 +416,11 @@ def parse_global_arg(parsed_globals):
409
416
  if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
410
417
  cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
411
418
  cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
419
+ cvm_role_flag = False
420
+
421
+ if cvm_role_flag:
422
+ if "type" in cred and cred["type"] == "cvm-role":
423
+ g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
412
424
 
413
425
  for param in g_param.keys():
414
426
  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:
@@ -9694,7 +9694,13 @@ def action_caller():
9694
9694
 
9695
9695
  def parse_global_arg(parsed_globals):
9696
9696
  g_param = parsed_globals
9697
-
9697
+ cvm_role_flag = True
9698
+ for param in parsed_globals.keys():
9699
+ if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
9700
+ OptionsDefine.RoleSessionName]:
9701
+ if parsed_globals[param] is not None:
9702
+ cvm_role_flag = False
9703
+ break
9698
9704
  is_exist_profile = True
9699
9705
  if not parsed_globals["profile"]:
9700
9706
  is_exist_profile = False
@@ -9725,6 +9731,7 @@ def parse_global_arg(parsed_globals):
9725
9731
  cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
9726
9732
  cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
9727
9733
  cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
9734
+ cvm_role_flag = False
9728
9735
 
9729
9736
  if os.environ.get(OptionsDefine.ENV_REGION):
9730
9737
  conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
@@ -9732,6 +9739,11 @@ def parse_global_arg(parsed_globals):
9732
9739
  if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
9733
9740
  cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
9734
9741
  cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
9742
+ cvm_role_flag = False
9743
+
9744
+ if cvm_role_flag:
9745
+ if "type" in cred and cred["type"] == "cvm-role":
9746
+ g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
9735
9747
 
9736
9748
  for param in g_param.keys():
9737
9749
  if g_param[param] is None:
@@ -19759,7 +19759,13 @@ def action_caller():
19759
19759
 
19760
19760
  def parse_global_arg(parsed_globals):
19761
19761
  g_param = parsed_globals
19762
-
19762
+ cvm_role_flag = True
19763
+ for param in parsed_globals.keys():
19764
+ if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
19765
+ OptionsDefine.RoleSessionName]:
19766
+ if parsed_globals[param] is not None:
19767
+ cvm_role_flag = False
19768
+ break
19763
19769
  is_exist_profile = True
19764
19770
  if not parsed_globals["profile"]:
19765
19771
  is_exist_profile = False
@@ -19790,6 +19796,7 @@ def parse_global_arg(parsed_globals):
19790
19796
  cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
19791
19797
  cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
19792
19798
  cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
19799
+ cvm_role_flag = False
19793
19800
 
19794
19801
  if os.environ.get(OptionsDefine.ENV_REGION):
19795
19802
  conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
@@ -19797,6 +19804,11 @@ def parse_global_arg(parsed_globals):
19797
19804
  if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
19798
19805
  cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
19799
19806
  cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
19807
+ cvm_role_flag = False
19808
+
19809
+ if cvm_role_flag:
19810
+ if "type" in cred and cred["type"] == "cvm-role":
19811
+ g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
19800
19812
 
19801
19813
  for param in g_param.keys():
19802
19814
  if g_param[param] is None:
@@ -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:
@@ -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:
@@ -7781,7 +7781,13 @@ def action_caller():
7781
7781
 
7782
7782
  def parse_global_arg(parsed_globals):
7783
7783
  g_param = parsed_globals
7784
-
7784
+ cvm_role_flag = True
7785
+ for param in parsed_globals.keys():
7786
+ if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
7787
+ OptionsDefine.RoleSessionName]:
7788
+ if parsed_globals[param] is not None:
7789
+ cvm_role_flag = False
7790
+ break
7785
7791
  is_exist_profile = True
7786
7792
  if not parsed_globals["profile"]:
7787
7793
  is_exist_profile = False
@@ -7812,6 +7818,7 @@ def parse_global_arg(parsed_globals):
7812
7818
  cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
7813
7819
  cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
7814
7820
  cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
7821
+ cvm_role_flag = False
7815
7822
 
7816
7823
  if os.environ.get(OptionsDefine.ENV_REGION):
7817
7824
  conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
@@ -7819,6 +7826,11 @@ def parse_global_arg(parsed_globals):
7819
7826
  if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
7820
7827
  cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
7821
7828
  cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
7829
+ cvm_role_flag = False
7830
+
7831
+ if cvm_role_flag:
7832
+ if "type" in cred and cred["type"] == "cvm-role":
7833
+ g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
7822
7834
 
7823
7835
  for param in g_param.keys():
7824
7836
  if g_param[param] is None:
@@ -1421,7 +1421,13 @@ def action_caller():
1421
1421
 
1422
1422
  def parse_global_arg(parsed_globals):
1423
1423
  g_param = parsed_globals
1424
-
1424
+ cvm_role_flag = True
1425
+ for param in parsed_globals.keys():
1426
+ if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
1427
+ OptionsDefine.RoleSessionName]:
1428
+ if parsed_globals[param] is not None:
1429
+ cvm_role_flag = False
1430
+ break
1425
1431
  is_exist_profile = True
1426
1432
  if not parsed_globals["profile"]:
1427
1433
  is_exist_profile = False
@@ -1452,6 +1458,7 @@ def parse_global_arg(parsed_globals):
1452
1458
  cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
1453
1459
  cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
1454
1460
  cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
1461
+ cvm_role_flag = False
1455
1462
 
1456
1463
  if os.environ.get(OptionsDefine.ENV_REGION):
1457
1464
  conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
@@ -1459,6 +1466,11 @@ def parse_global_arg(parsed_globals):
1459
1466
  if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
1460
1467
  cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
1461
1468
  cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
1469
+ cvm_role_flag = False
1470
+
1471
+ if cvm_role_flag:
1472
+ if "type" in cred and cred["type"] == "cvm-role":
1473
+ g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
1462
1474
 
1463
1475
  for param in g_param.keys():
1464
1476
  if g_param[param] is None:
@@ -12710,7 +12710,13 @@ def action_caller():
12710
12710
 
12711
12711
  def parse_global_arg(parsed_globals):
12712
12712
  g_param = parsed_globals
12713
-
12713
+ cvm_role_flag = True
12714
+ for param in parsed_globals.keys():
12715
+ if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
12716
+ OptionsDefine.RoleSessionName]:
12717
+ if parsed_globals[param] is not None:
12718
+ cvm_role_flag = False
12719
+ break
12714
12720
  is_exist_profile = True
12715
12721
  if not parsed_globals["profile"]:
12716
12722
  is_exist_profile = False
@@ -12741,6 +12747,7 @@ def parse_global_arg(parsed_globals):
12741
12747
  cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
12742
12748
  cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
12743
12749
  cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
12750
+ cvm_role_flag = False
12744
12751
 
12745
12752
  if os.environ.get(OptionsDefine.ENV_REGION):
12746
12753
  conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
@@ -12748,6 +12755,11 @@ def parse_global_arg(parsed_globals):
12748
12755
  if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
12749
12756
  cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
12750
12757
  cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
12758
+ cvm_role_flag = False
12759
+
12760
+ if cvm_role_flag:
12761
+ if "type" in cred and cred["type"] == "cvm-role":
12762
+ g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
12751
12763
 
12752
12764
  for param in g_param.keys():
12753
12765
  if g_param[param] is None: