tccli-intl-en 3.0.1237.1__py2.py3-none-any.whl → 3.0.1282.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +17 -1
- tccli/services/advisor/advisor_client.py +8 -2
- tccli/services/aiart/aiart_client.py +4 -1
- tccli/services/ams/ams_client.py +16 -4
- tccli/services/antiddos/antiddos_client.py +280 -70
- tccli/services/apigateway/apigateway_client.py +372 -93
- tccli/services/apm/apm_client.py +52 -13
- tccli/services/asr/asr_client.py +8 -2
- tccli/services/autoscaling/autoscaling_client.py +232 -58
- tccli/services/autoscaling/v20180419/api.json +1 -1
- tccli/services/batch/batch_client.py +112 -28
- tccli/services/bi/bi_client.py +1242 -4
- tccli/services/bi/v20220105/api.json +5340 -107
- tccli/services/bi/v20220105/examples.json +196 -1
- tccli/services/billing/billing_client.py +168 -42
- tccli/services/cam/cam_client.py +324 -81
- tccli/services/captcha/captcha_client.py +4 -1
- tccli/services/car/car_client.py +132 -33
- tccli/services/cbs/cbs_client.py +152 -38
- tccli/services/ccc/ccc_client.py +732 -98
- tccli/services/ccc/v20200210/api.json +1727 -196
- tccli/services/ccc/v20200210/examples.json +64 -0
- tccli/services/cdb/cdb_client.py +532 -133
- tccli/services/cdc/cdc_client.py +80 -20
- tccli/services/cdc/v20201214/api.json +2 -2
- tccli/services/cdc/v20201214/examples.json +4 -4
- tccli/services/cdn/cdn_client.py +176 -44
- tccli/services/cdwdoris/cdwdoris_client.py +308 -77
- tccli/services/cdwpg/cdwpg_client.py +96 -24
- tccli/services/cdz/__init__.py +4 -0
- tccli/services/cdz/cdz_client.py +210 -0
- tccli/services/cdz/v20221123/api.json +233 -0
- tccli/services/cdz/v20221123/examples.json +12 -0
- tccli/services/cfg/cfg_client.py +64 -16
- tccli/services/cfs/cfs_client.py +156 -39
- tccli/services/cfw/cfw_client.py +264 -66
- tccli/services/chdfs/chdfs_client.py +116 -29
- tccli/services/ciam/ciam_client.py +64 -16
- tccli/services/ckafka/ckafka_client.py +575 -77
- tccli/services/ckafka/v20190819/api.json +2749 -1470
- tccli/services/ckafka/v20190819/examples.json +209 -155
- tccli/services/clb/clb_client.py +332 -83
- tccli/services/clb/v20180317/api.json +29 -14
- tccli/services/cloudaudit/cloudaudit_client.py +72 -18
- tccli/services/cls/cls_client.py +348 -87
- tccli/services/cmq/cmq_client.py +12 -801
- tccli/services/cmq/v20190304/api.json +173 -1367
- tccli/services/cmq/v20190304/examples.json +0 -120
- tccli/services/config/config_client.py +24 -6
- tccli/services/controlcenter/controlcenter_client.py +4 -1
- tccli/services/csip/csip_client.py +136 -34
- tccli/services/ctsdb/ctsdb_client.py +8 -2
- tccli/services/cvm/cvm_client.py +627 -110
- tccli/services/cvm/v20170312/api.json +750 -340
- tccli/services/cvm/v20170312/examples.json +105 -59
- tccli/services/cwp/cwp_client.py +1860 -465
- tccli/services/cynosdb/cynosdb_client.py +1749 -439
- tccli/services/cynosdb/v20190107/api.json +11763 -7697
- tccli/services/cynosdb/v20190107/examples.json +132 -4
- tccli/services/dataintegration/dataintegration_client.py +4 -1
- tccli/services/dayu/dayu_client.py +412 -103
- tccli/services/dbbrain/dbbrain_client.py +168 -42
- tccli/services/dc/dc_client.py +72 -18
- tccli/services/dcdb/dcdb_client.py +248 -62
- tccli/services/dlc/dlc_client.py +756 -111
- tccli/services/dlc/v20210125/api.json +637 -13
- tccli/services/dlc/v20210125/examples.json +48 -0
- tccli/services/dms/dms_client.py +8 -2
- tccli/services/dnspod/dnspod_client.py +353 -74
- tccli/services/dnspod/v20210323/api.json +196 -0
- tccli/services/dnspod/v20210323/examples.json +24 -0
- tccli/services/domain/domain_client.py +96 -24
- tccli/services/dts/dts_client.py +332 -83
- tccli/services/eb/eb_client.py +104 -26
- tccli/services/ecdn/ecdn_client.py +60 -15
- tccli/services/ecm/ecm_client.py +496 -124
- tccli/services/eiam/eiam_client.py +160 -40
- tccli/services/emr/emr_client.py +2784 -115
- tccli/services/emr/v20190103/api.json +14647 -4756
- tccli/services/emr/v20190103/examples.json +408 -40
- tccli/services/es/es_client.py +84 -21
- tccli/services/facefusion/facefusion_client.py +12 -3
- tccli/services/faceid/faceid_client.py +76 -19
- tccli/services/faceid/v20180301/api.json +79 -14
- tccli/services/faceid/v20180301/examples.json +3 -3
- tccli/services/gaap/gaap_client.py +352 -88
- tccli/services/gme/gme_client.py +40 -10
- tccli/services/gpm/gpm_client.py +72 -18
- tccli/services/gse/gse_client.py +88 -22
- tccli/services/gwlb/gwlb_client.py +72 -18
- tccli/services/iai/iai_client.py +116 -29
- tccli/services/iap/iap_client.py +24 -6
- tccli/services/ims/ims_client.py +4 -1
- tccli/services/intlpartnersmgt/intlpartnersmgt_client.py +168 -42
- tccli/services/intlpartnersmgt/v20220928/api.json +11 -11
- tccli/services/iotcloud/iotcloud_client.py +80 -20
- tccli/services/ip/ip_client.py +24 -6
- tccli/services/kms/kms_client.py +272 -68
- tccli/services/lcic/lcic_client.py +212 -53
- tccli/services/lighthouse/lighthouse_client.py +296 -74
- tccli/services/lighthouse/v20200324/api.json +14 -14
- tccli/services/lighthouse/v20200324/examples.json +5 -5
- tccli/services/live/live_client.py +480 -120
- tccli/services/lke/lke_client.py +360 -90
- tccli/services/lke/v20231130/api.json +182 -39
- tccli/services/lkeap/__init__.py +4 -0
- tccli/services/lkeap/lkeap_client.py +546 -0
- tccli/services/lkeap/v20240522/api.json +855 -0
- tccli/services/lkeap/v20240522/examples.json +72 -0
- tccli/services/mariadb/mariadb_client.py +200 -50
- tccli/services/mdc/mdc_client.py +72 -18
- tccli/services/mdl/mdl_client.py +132 -33
- tccli/services/mdl/v20200326/api.json +186 -12
- tccli/services/mdl/v20200326/examples.json +16 -16
- tccli/services/mdp/mdp_client.py +680 -70
- tccli/services/mdp/v20200527/api.json +748 -23
- tccli/services/mdp/v20200527/examples.json +143 -79
- tccli/services/message/__init__.py +4 -0
- tccli/services/message/message_client.py +210 -0
- tccli/services/message/v20181225/api.json +72 -0
- tccli/services/message/v20181225/examples.json +13 -0
- tccli/services/mongodb/mongodb_client.py +340 -29
- tccli/services/mongodb/v20190725/api.json +811 -226
- tccli/services/mongodb/v20190725/examples.json +54 -22
- tccli/services/monitor/monitor_client.py +864 -152
- tccli/services/monitor/v20180724/api.json +657 -8
- tccli/services/monitor/v20180724/examples.json +152 -4
- tccli/services/mps/mps_client.py +592 -92
- tccli/services/mps/v20190612/api.json +2931 -399
- tccli/services/mps/v20190612/examples.json +64 -14
- tccli/services/msp/msp_client.py +28 -7
- tccli/services/ocr/ocr_client.py +212 -45
- tccli/services/ocr/v20181119/api.json +872 -112
- tccli/services/ocr/v20181119/examples.json +12 -4
- tccli/services/omics/omics_client.py +80 -20
- tccli/services/organization/organization_client.py +464 -116
- tccli/services/postgres/postgres_client.py +364 -91
- tccli/services/postgres/v20170312/api.json +134 -109
- tccli/services/postgres/v20170312/examples.json +14 -14
- tccli/services/privatedns/privatedns_client.py +124 -31
- tccli/services/pts/pts_client.py +192 -48
- tccli/services/quota/__init__.py +4 -0
- tccli/services/quota/quota_client.py +434 -0
- tccli/services/quota/v20241204/api.json +548 -0
- tccli/services/quota/v20241204/examples.json +51 -0
- tccli/services/rce/rce_client.py +4 -1
- tccli/services/redis/redis_client.py +592 -106
- tccli/services/redis/v20180412/api.json +636 -240
- tccli/services/redis/v20180412/examples.json +98 -56
- tccli/services/region/region_client.py +12 -3
- tccli/services/rum/rum_client.py +240 -60
- tccli/services/scf/scf_client.py +168 -42
- tccli/services/ses/ses_client.py +116 -29
- tccli/services/sms/sms_client.py +72 -18
- tccli/services/sqlserver/sqlserver_client.py +3772 -387
- tccli/services/sqlserver/v20180328/api.json +9760 -3380
- tccli/services/sqlserver/v20180328/examples.json +478 -18
- tccli/services/ssl/ssl_client.py +152 -38
- tccli/services/ssm/ssm_client.py +96 -24
- tccli/services/sts/sts_client.py +20 -5
- tccli/services/tag/tag_client.py +120 -30
- tccli/services/tat/tat_client.py +76 -19
- tccli/services/tbaas/tbaas_client.py +16 -4
- tccli/services/tcaplusdb/tcaplusdb_client.py +208 -52
- tccli/services/tcaplusdb/v20190823/api.json +836 -760
- tccli/services/tcaplusdb/v20190823/examples.json +3 -3
- tccli/services/tchd/tchd_client.py +4 -1
- tccli/services/tcmpp/tcmpp_client.py +416 -104
- tccli/services/tcr/tcr_client.py +304 -76
- tccli/services/tcsas/tcsas_client.py +236 -59
- tccli/services/tcsas/v20250106/api.json +155 -79
- tccli/services/tcsas/v20250106/examples.json +3 -3
- tccli/services/tcss/tcss_client.py +1320 -330
- tccli/services/tdid/tdid_client.py +192 -48
- tccli/services/tdmq/tdmq_client.py +376 -94
- tccli/services/tem/tem_client.py +224 -56
- tccli/services/teo/teo_client.py +1127 -245
- tccli/services/teo/v20220901/api.json +382 -58
- tccli/services/teo/v20220901/examples.json +24 -0
- tccli/services/tione/__init__.py +4 -0
- tccli/services/tione/tione_client.py +210 -0
- tccli/services/tione/v20211111/api.json +3074 -0
- tccli/services/tione/v20211111/examples.json +12 -0
- tccli/services/tiw/tiw_client.py +204 -51
- tccli/services/tke/tke_client.py +552 -138
- tccli/services/tms/tms_client.py +4 -1
- tccli/services/tmt/tmt_client.py +4 -1
- tccli/services/trabbit/trabbit_client.py +116 -29
- tccli/services/trro/trro_client.py +76 -19
- tccli/services/trtc/trtc_client.py +420 -55
- tccli/services/trtc/v20190722/api.json +685 -23
- tccli/services/trtc/v20190722/examples.json +39 -7
- tccli/services/tts/tts_client.py +4 -1
- tccli/services/vclm/vclm_client.py +8 -2
- tccli/services/vm/vm_client.py +16 -4
- tccli/services/vod/v20180717/examples.json +1 -1
- tccli/services/vod/vod_client.py +716 -179
- tccli/services/vpc/v20170312/api.json +970 -75
- tccli/services/vpc/v20170312/examples.json +106 -10
- tccli/services/vpc/vpc_client.py +1876 -361
- tccli/services/waf/v20180125/api.json +1372 -194
- tccli/services/waf/v20180125/examples.json +89 -1
- tccli/services/waf/waf_client.py +1051 -147
- tccli/services/wedata/v20250806/api.json +13644 -0
- tccli/services/wedata/v20250806/examples.json +621 -0
- tccli/services/wedata/wedata_client.py +5830 -1026
- tccli/services/yunjing/yunjing_client.py +284 -71
- {tccli_intl_en-3.0.1237.1.dist-info → tccli_intl_en-3.0.1282.1.dist-info}/METADATA +4 -7
- {tccli_intl_en-3.0.1237.1.dist-info → tccli_intl_en-3.0.1282.1.dist-info}/RECORD +214 -192
- {tccli_intl_en-3.0.1237.1.dist-info → tccli_intl_en-3.0.1282.1.dist-info}/WHEEL +1 -1
- {tccli_intl_en-3.0.1237.1.dist-info → tccli_intl_en-3.0.1282.1.dist-info}/entry_points.txt +0 -1
- {tccli_intl_en-3.0.1237.1.dist-info → tccli_intl_en-3.0.1282.1.dist-info}/LICENSE +0 -0
- {tccli_intl_en-3.0.1237.1.dist-info → tccli_intl_en-3.0.1282.1.dist-info}/top_level.txt +0 -0
|
@@ -27,7 +27,10 @@ def doDeleteEscapeWhiteList(args, parsed_globals):
|
|
|
27
27
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
28
28
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
29
29
|
)
|
|
30
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
30
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
31
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
32
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
33
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
31
34
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
32
35
|
else:
|
|
33
36
|
cred = credential.Credential(
|
|
@@ -79,7 +82,10 @@ def doCreateK8sApiAbnormalEventExportJob(args, parsed_globals):
|
|
|
79
82
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
80
83
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
81
84
|
)
|
|
82
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
85
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
86
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
87
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
88
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
83
89
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
84
90
|
else:
|
|
85
91
|
cred = credential.Credential(
|
|
@@ -131,7 +137,10 @@ def doDescribeAssetWebServiceList(args, parsed_globals):
|
|
|
131
137
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
132
138
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
133
139
|
)
|
|
134
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
140
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
141
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
142
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
143
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
135
144
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
136
145
|
else:
|
|
137
146
|
cred = credential.Credential(
|
|
@@ -183,7 +192,10 @@ def doModifySecLogDeliveryClsSetting(args, parsed_globals):
|
|
|
183
192
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
184
193
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
185
194
|
)
|
|
186
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
195
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
196
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
197
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
198
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
187
199
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
188
200
|
else:
|
|
189
201
|
cred = credential.Credential(
|
|
@@ -235,7 +247,10 @@ def doDescribeAbnormalProcessEventsExport(args, parsed_globals):
|
|
|
235
247
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
236
248
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
237
249
|
)
|
|
238
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
250
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
251
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
252
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
253
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
239
254
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
240
255
|
else:
|
|
241
256
|
cred = credential.Credential(
|
|
@@ -287,7 +302,10 @@ def doDescribeVirusScanTimeoutSetting(args, parsed_globals):
|
|
|
287
302
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
288
303
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
289
304
|
)
|
|
290
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
305
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
306
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
307
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
308
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
291
309
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
292
310
|
else:
|
|
293
311
|
cred = credential.Credential(
|
|
@@ -339,7 +357,10 @@ def doDescribeVirusSummary(args, parsed_globals):
|
|
|
339
357
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
340
358
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
341
359
|
)
|
|
342
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
360
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
361
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
362
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
363
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
343
364
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
344
365
|
else:
|
|
345
366
|
cred = credential.Credential(
|
|
@@ -391,7 +412,10 @@ def doCreateAbnormalProcessRulesExportJob(args, parsed_globals):
|
|
|
391
412
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
392
413
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
393
414
|
)
|
|
394
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
415
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
416
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
417
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
418
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
395
419
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
396
420
|
else:
|
|
397
421
|
cred = credential.Credential(
|
|
@@ -443,7 +467,10 @@ def doDescribeAssetHostList(args, parsed_globals):
|
|
|
443
467
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
444
468
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
445
469
|
)
|
|
446
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
470
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
471
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
472
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
473
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
447
474
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
448
475
|
else:
|
|
449
476
|
cred = credential.Credential(
|
|
@@ -495,7 +522,10 @@ def doDescribeAssetImageRegistryScanStatusOneKey(args, parsed_globals):
|
|
|
495
522
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
496
523
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
497
524
|
)
|
|
498
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
525
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
526
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
527
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
528
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
499
529
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
500
530
|
else:
|
|
501
531
|
cred = credential.Credential(
|
|
@@ -547,7 +577,10 @@ def doDescribeIndexList(args, parsed_globals):
|
|
|
547
577
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
548
578
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
549
579
|
)
|
|
550
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
580
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
581
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
582
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
583
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
551
584
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
552
585
|
else:
|
|
553
586
|
cred = credential.Credential(
|
|
@@ -599,7 +632,10 @@ def doDescribePublicKey(args, parsed_globals):
|
|
|
599
632
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
600
633
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
601
634
|
)
|
|
602
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
635
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
636
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
637
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
638
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
603
639
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
604
640
|
else:
|
|
605
641
|
cred = credential.Credential(
|
|
@@ -651,7 +687,10 @@ def doDescribeSearchExportList(args, parsed_globals):
|
|
|
651
687
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
652
688
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
653
689
|
)
|
|
654
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
690
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
691
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
692
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
693
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
655
694
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
656
695
|
else:
|
|
657
696
|
cred = credential.Credential(
|
|
@@ -703,7 +742,10 @@ def doModifyAccessControlRuleStatus(args, parsed_globals):
|
|
|
703
742
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
704
743
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
705
744
|
)
|
|
706
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
745
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
746
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
747
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
748
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
707
749
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
708
750
|
else:
|
|
709
751
|
cred = credential.Credential(
|
|
@@ -755,7 +797,10 @@ def doDescribeAbnormalProcessRulesExport(args, parsed_globals):
|
|
|
755
797
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
756
798
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
757
799
|
)
|
|
758
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
800
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
801
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
802
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
803
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
759
804
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
760
805
|
else:
|
|
761
806
|
cred = credential.Credential(
|
|
@@ -807,7 +852,10 @@ def doDescribeNetworkFirewallPolicyStatus(args, parsed_globals):
|
|
|
807
852
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
808
853
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
809
854
|
)
|
|
810
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
855
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
856
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
857
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
858
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
811
859
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
812
860
|
else:
|
|
813
861
|
cred = credential.Credential(
|
|
@@ -859,7 +907,10 @@ def doDescribeEscapeEventDetail(args, parsed_globals):
|
|
|
859
907
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
860
908
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
861
909
|
)
|
|
862
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
910
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
911
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
912
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
913
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
863
914
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
864
915
|
else:
|
|
865
916
|
cred = credential.Credential(
|
|
@@ -911,7 +962,10 @@ def doCreateVulDefenceEventExportJob(args, parsed_globals):
|
|
|
911
962
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
912
963
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
913
964
|
)
|
|
914
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
965
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
966
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
967
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
968
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
915
969
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
916
970
|
else:
|
|
917
971
|
cred = credential.Credential(
|
|
@@ -963,7 +1017,10 @@ def doDescribeAssetAppServiceList(args, parsed_globals):
|
|
|
963
1017
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
964
1018
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
965
1019
|
)
|
|
966
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1020
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1021
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1022
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1023
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
967
1024
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
968
1025
|
else:
|
|
969
1026
|
cred = credential.Credential(
|
|
@@ -1015,7 +1072,10 @@ def doDescribeAssetImageRegistryRegistryDetail(args, parsed_globals):
|
|
|
1015
1072
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1016
1073
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1017
1074
|
)
|
|
1018
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1075
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1076
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1077
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1078
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1019
1079
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1020
1080
|
else:
|
|
1021
1081
|
cred = credential.Credential(
|
|
@@ -1067,7 +1127,10 @@ def doDeleteSearchTemplate(args, parsed_globals):
|
|
|
1067
1127
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1068
1128
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1069
1129
|
)
|
|
1070
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1130
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1131
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1132
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1133
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1071
1134
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1072
1135
|
else:
|
|
1073
1136
|
cred = credential.Credential(
|
|
@@ -1119,7 +1182,10 @@ def doCreateVulImageExportJob(args, parsed_globals):
|
|
|
1119
1182
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1120
1183
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1121
1184
|
)
|
|
1122
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1185
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1186
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1187
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1188
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1123
1189
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1124
1190
|
else:
|
|
1125
1191
|
cred = credential.Credential(
|
|
@@ -1171,7 +1237,10 @@ def doRemoveAssetImageRegistryRegistryDetail(args, parsed_globals):
|
|
|
1171
1237
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1172
1238
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1173
1239
|
)
|
|
1174
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1240
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1241
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1242
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1243
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1175
1244
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1176
1245
|
else:
|
|
1177
1246
|
cred = credential.Credential(
|
|
@@ -1223,7 +1292,10 @@ def doCreateRefreshTask(args, parsed_globals):
|
|
|
1223
1292
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1224
1293
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1225
1294
|
)
|
|
1226
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1295
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1296
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1297
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1298
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1227
1299
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1228
1300
|
else:
|
|
1229
1301
|
cred = credential.Credential(
|
|
@@ -1275,7 +1347,10 @@ def doDescribeRiskSyscallDetail(args, parsed_globals):
|
|
|
1275
1347
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1276
1348
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1277
1349
|
)
|
|
1278
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1350
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1351
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1352
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1353
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1279
1354
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1280
1355
|
else:
|
|
1281
1356
|
cred = credential.Credential(
|
|
@@ -1327,7 +1402,10 @@ def doCreateRiskDnsEventExportJob(args, parsed_globals):
|
|
|
1327
1402
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1328
1403
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1329
1404
|
)
|
|
1330
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1405
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1406
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1407
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1408
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1331
1409
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1332
1410
|
else:
|
|
1333
1411
|
cred = credential.Credential(
|
|
@@ -1379,7 +1457,10 @@ def doDescribeReverseShellWhiteLists(args, parsed_globals):
|
|
|
1379
1457
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1380
1458
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1381
1459
|
)
|
|
1382
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1460
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1461
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1462
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1463
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1383
1464
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1384
1465
|
else:
|
|
1385
1466
|
cred = credential.Credential(
|
|
@@ -1431,7 +1512,10 @@ def doCreateComponentExportJob(args, parsed_globals):
|
|
|
1431
1512
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1432
1513
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1433
1514
|
)
|
|
1434
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1515
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1516
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1517
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1518
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1435
1519
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1436
1520
|
else:
|
|
1437
1521
|
cred = credential.Credential(
|
|
@@ -1483,7 +1567,10 @@ def doDescribeVirusAutoIsolateSampleDownloadURL(args, parsed_globals):
|
|
|
1483
1567
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1484
1568
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1485
1569
|
)
|
|
1486
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1570
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1571
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1572
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1573
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1487
1574
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1488
1575
|
else:
|
|
1489
1576
|
cred = credential.Credential(
|
|
@@ -1535,7 +1622,10 @@ def doDescribeExportJobResult(args, parsed_globals):
|
|
|
1535
1622
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1536
1623
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1537
1624
|
)
|
|
1538
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1625
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1626
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1627
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1628
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1539
1629
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1540
1630
|
else:
|
|
1541
1631
|
cred = credential.Credential(
|
|
@@ -1587,7 +1677,10 @@ def doDescribeScanIgnoreVulList(args, parsed_globals):
|
|
|
1587
1677
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1588
1678
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1589
1679
|
)
|
|
1590
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1680
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1681
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1682
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1683
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1591
1684
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1592
1685
|
else:
|
|
1593
1686
|
cred = credential.Credential(
|
|
@@ -1639,7 +1732,10 @@ def doDescribeNetworkFirewallPodLabelsList(args, parsed_globals):
|
|
|
1639
1732
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1640
1733
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1641
1734
|
)
|
|
1642
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1735
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1736
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1737
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1738
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1643
1739
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1644
1740
|
else:
|
|
1645
1741
|
cred = credential.Credential(
|
|
@@ -1691,7 +1787,10 @@ def doDescribeAssetComponentList(args, parsed_globals):
|
|
|
1691
1787
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1692
1788
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1693
1789
|
)
|
|
1694
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1790
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1791
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1792
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1793
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1695
1794
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1696
1795
|
else:
|
|
1697
1796
|
cred = credential.Credential(
|
|
@@ -1743,7 +1842,10 @@ def doDescribeAssetImageScanStatus(args, parsed_globals):
|
|
|
1743
1842
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1744
1843
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1745
1844
|
)
|
|
1746
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1845
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1846
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1847
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1848
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1747
1849
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1748
1850
|
else:
|
|
1749
1851
|
cred = credential.Credential(
|
|
@@ -1795,7 +1897,10 @@ def doCreateAssetImageScanTask(args, parsed_globals):
|
|
|
1795
1897
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1796
1898
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1797
1899
|
)
|
|
1798
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1900
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1901
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1902
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1903
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1799
1904
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1800
1905
|
else:
|
|
1801
1906
|
cred = credential.Credential(
|
|
@@ -1847,7 +1952,10 @@ def doCreateK8sApiAbnormalRuleExportJob(args, parsed_globals):
|
|
|
1847
1952
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1848
1953
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1849
1954
|
)
|
|
1850
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
1955
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1956
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1957
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1958
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1851
1959
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1852
1960
|
else:
|
|
1853
1961
|
cred = credential.Credential(
|
|
@@ -1899,7 +2007,10 @@ def doCreateNetworkFirewallPolicyDiscover(args, parsed_globals):
|
|
|
1899
2007
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1900
2008
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1901
2009
|
)
|
|
1902
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2010
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2011
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2012
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2013
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1903
2014
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1904
2015
|
else:
|
|
1905
2016
|
cred = credential.Credential(
|
|
@@ -1951,7 +2062,10 @@ def doCreateClusterCheckTask(args, parsed_globals):
|
|
|
1951
2062
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1952
2063
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1953
2064
|
)
|
|
1954
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2065
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2066
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2067
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2068
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1955
2069
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1956
2070
|
else:
|
|
1957
2071
|
cred = credential.Credential(
|
|
@@ -2003,7 +2117,10 @@ def doModifyVulDefenceSetting(args, parsed_globals):
|
|
|
2003
2117
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2004
2118
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2005
2119
|
)
|
|
2006
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2120
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2121
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2122
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2123
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2007
2124
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2008
2125
|
else:
|
|
2009
2126
|
cred = credential.Credential(
|
|
@@ -2055,7 +2172,10 @@ def doSwitchImageAutoAuthorizedRule(args, parsed_globals):
|
|
|
2055
2172
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2056
2173
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2057
2174
|
)
|
|
2058
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2175
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2176
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2177
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2178
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2059
2179
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2060
2180
|
else:
|
|
2061
2181
|
cred = credential.Credential(
|
|
@@ -2107,7 +2227,10 @@ def doModifyVirusScanSetting(args, parsed_globals):
|
|
|
2107
2227
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2108
2228
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2109
2229
|
)
|
|
2110
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2230
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2231
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2232
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2233
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2111
2234
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2112
2235
|
else:
|
|
2113
2236
|
cred = credential.Credential(
|
|
@@ -2159,7 +2282,10 @@ def doDescribeSecLogDeliveryKafkaOptions(args, parsed_globals):
|
|
|
2159
2282
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2160
2283
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2161
2284
|
)
|
|
2162
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2285
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2286
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2287
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2288
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2163
2289
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2164
2290
|
else:
|
|
2165
2291
|
cred = credential.Credential(
|
|
@@ -2211,7 +2337,10 @@ def doDescribeAssetImageRegistryVirusListExport(args, parsed_globals):
|
|
|
2211
2337
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2212
2338
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2213
2339
|
)
|
|
2214
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2340
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2341
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2342
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2343
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2215
2344
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2216
2345
|
else:
|
|
2217
2346
|
cred = credential.Credential(
|
|
@@ -2263,7 +2392,10 @@ def doModifyAssetImageRegistryScanStopOneKey(args, parsed_globals):
|
|
|
2263
2392
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2264
2393
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2265
2394
|
)
|
|
2266
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2395
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2396
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2397
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2398
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2267
2399
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2268
2400
|
else:
|
|
2269
2401
|
cred = credential.Credential(
|
|
@@ -2315,7 +2447,10 @@ def doDeleteComplianceAssetPolicySetFromWhitelist(args, parsed_globals):
|
|
|
2315
2447
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2316
2448
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2317
2449
|
)
|
|
2318
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2450
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2451
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2452
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2453
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2319
2454
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2320
2455
|
else:
|
|
2321
2456
|
cred = credential.Credential(
|
|
@@ -2367,7 +2502,10 @@ def doUpdateAndPublishNetworkFirewallPolicyDetail(args, parsed_globals):
|
|
|
2367
2502
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2368
2503
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2369
2504
|
)
|
|
2370
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2505
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2506
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2507
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2508
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2371
2509
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2372
2510
|
else:
|
|
2373
2511
|
cred = credential.Credential(
|
|
@@ -2419,7 +2557,10 @@ def doDescribeEscapeEventInfo(args, parsed_globals):
|
|
|
2419
2557
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2420
2558
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2421
2559
|
)
|
|
2422
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2560
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2561
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2562
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2563
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2423
2564
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2424
2565
|
else:
|
|
2425
2566
|
cred = credential.Credential(
|
|
@@ -2471,7 +2612,10 @@ def doDescribeAssetImageRegistryAssetStatus(args, parsed_globals):
|
|
|
2471
2612
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2472
2613
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2473
2614
|
)
|
|
2474
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2615
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2616
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2617
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2618
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2475
2619
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2476
2620
|
else:
|
|
2477
2621
|
cred = credential.Credential(
|
|
@@ -2523,7 +2667,10 @@ def doDeleteMachine(args, parsed_globals):
|
|
|
2523
2667
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2524
2668
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2525
2669
|
)
|
|
2526
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2670
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2671
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2672
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2673
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2527
2674
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2528
2675
|
else:
|
|
2529
2676
|
cred = credential.Credential(
|
|
@@ -2575,7 +2722,10 @@ def doDescribeAssetImageRegistryRegistryList(args, parsed_globals):
|
|
|
2575
2722
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2576
2723
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2577
2724
|
)
|
|
2578
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2725
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2726
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2727
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2728
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2579
2729
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2580
2730
|
else:
|
|
2581
2731
|
cred = credential.Credential(
|
|
@@ -2627,7 +2777,10 @@ def doModifyAssetImageRegistryScanStop(args, parsed_globals):
|
|
|
2627
2777
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2628
2778
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2629
2779
|
)
|
|
2630
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2780
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2781
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2782
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2783
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2631
2784
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2632
2785
|
else:
|
|
2633
2786
|
cred = credential.Credential(
|
|
@@ -2679,7 +2832,10 @@ def doDescribeClusterDetail(args, parsed_globals):
|
|
|
2679
2832
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2680
2833
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2681
2834
|
)
|
|
2682
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2835
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2836
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2837
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2838
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2683
2839
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2684
2840
|
else:
|
|
2685
2841
|
cred = credential.Credential(
|
|
@@ -2731,7 +2887,10 @@ def doDescribeAssetImageRegistryVirusList(args, parsed_globals):
|
|
|
2731
2887
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2732
2888
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2733
2889
|
)
|
|
2734
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2890
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2891
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2892
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2893
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2735
2894
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2736
2895
|
else:
|
|
2737
2896
|
cred = credential.Credential(
|
|
@@ -2783,7 +2942,10 @@ def doUpdateImageRegistryTimingScanTask(args, parsed_globals):
|
|
|
2783
2942
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2784
2943
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2785
2944
|
)
|
|
2786
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
2945
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
2946
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
2947
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
2948
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2787
2949
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2788
2950
|
else:
|
|
2789
2951
|
cred = credential.Credential(
|
|
@@ -2835,7 +2997,10 @@ def doCreateAssetImageRegistryScanTaskOneKey(args, parsed_globals):
|
|
|
2835
2997
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2836
2998
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2837
2999
|
)
|
|
2838
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3000
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3001
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3002
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3003
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2839
3004
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2840
3005
|
else:
|
|
2841
3006
|
cred = credential.Credential(
|
|
@@ -2887,7 +3052,10 @@ def doModifyAssetImageScanStop(args, parsed_globals):
|
|
|
2887
3052
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2888
3053
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2889
3054
|
)
|
|
2890
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3055
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3056
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3057
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3058
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2891
3059
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2892
3060
|
else:
|
|
2893
3061
|
cred = credential.Credential(
|
|
@@ -2939,7 +3107,10 @@ def doDescribeNetworkFirewallPolicyYamlDetail(args, parsed_globals):
|
|
|
2939
3107
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2940
3108
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2941
3109
|
)
|
|
2942
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3110
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3111
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3112
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3113
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2943
3114
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2944
3115
|
else:
|
|
2945
3116
|
cred = credential.Credential(
|
|
@@ -2991,7 +3162,10 @@ def doDescribeEscapeEventsExport(args, parsed_globals):
|
|
|
2991
3162
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2992
3163
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2993
3164
|
)
|
|
2994
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3165
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3166
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3167
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3168
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
2995
3169
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2996
3170
|
else:
|
|
2997
3171
|
cred = credential.Credential(
|
|
@@ -3043,7 +3217,10 @@ def doCheckNetworkFirewallPolicyYaml(args, parsed_globals):
|
|
|
3043
3217
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3044
3218
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3045
3219
|
)
|
|
3046
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3220
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3221
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3222
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3223
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3047
3224
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3048
3225
|
else:
|
|
3049
3226
|
cred = credential.Credential(
|
|
@@ -3095,7 +3272,10 @@ def doDescribeAssetImageListExport(args, parsed_globals):
|
|
|
3095
3272
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3096
3273
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3097
3274
|
)
|
|
3098
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3275
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3276
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3277
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3278
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3099
3279
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3100
3280
|
else:
|
|
3101
3281
|
cred = credential.Credential(
|
|
@@ -3147,7 +3327,10 @@ def doDescribeAssetImageScanSetting(args, parsed_globals):
|
|
|
3147
3327
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3148
3328
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3149
3329
|
)
|
|
3150
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3330
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3331
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3332
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3333
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3151
3334
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3152
3335
|
else:
|
|
3153
3336
|
cred = credential.Credential(
|
|
@@ -3199,7 +3382,10 @@ def doCreateCheckComponent(args, parsed_globals):
|
|
|
3199
3382
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3200
3383
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3201
3384
|
)
|
|
3202
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3385
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3386
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3387
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3388
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3203
3389
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3204
3390
|
else:
|
|
3205
3391
|
cred = credential.Credential(
|
|
@@ -3251,7 +3437,10 @@ def doModifySecLogDeliveryKafkaSetting(args, parsed_globals):
|
|
|
3251
3437
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3252
3438
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3253
3439
|
)
|
|
3254
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3440
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3441
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3442
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3443
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3255
3444
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3256
3445
|
else:
|
|
3257
3446
|
cred = credential.Credential(
|
|
@@ -3303,7 +3492,10 @@ def doDescribeExportJobDownloadURL(args, parsed_globals):
|
|
|
3303
3492
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3304
3493
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3305
3494
|
)
|
|
3306
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3495
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3496
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3497
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3498
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3307
3499
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3308
3500
|
else:
|
|
3309
3501
|
cred = credential.Credential(
|
|
@@ -3355,7 +3547,10 @@ def doAddEditAccessControlRule(args, parsed_globals):
|
|
|
3355
3547
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3356
3548
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3357
3549
|
)
|
|
3358
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3550
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3551
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3552
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3553
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3359
3554
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3360
3555
|
else:
|
|
3361
3556
|
cred = credential.Credential(
|
|
@@ -3407,7 +3602,10 @@ def doDescribeAbnormalProcessRules(args, parsed_globals):
|
|
|
3407
3602
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3408
3603
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3409
3604
|
)
|
|
3410
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3605
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3606
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3607
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3608
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3411
3609
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3412
3610
|
else:
|
|
3413
3611
|
cred = credential.Credential(
|
|
@@ -3459,7 +3657,10 @@ def doModifyK8sApiAbnormalRuleInfo(args, parsed_globals):
|
|
|
3459
3657
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3460
3658
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3461
3659
|
)
|
|
3462
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3660
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3661
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3662
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3663
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3463
3664
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3464
3665
|
else:
|
|
3465
3666
|
cred = credential.Credential(
|
|
@@ -3511,7 +3712,10 @@ def doDescribeCompliancePeriodTaskList(args, parsed_globals):
|
|
|
3511
3712
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3512
3713
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3513
3714
|
)
|
|
3514
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3715
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3716
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3717
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3718
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3515
3719
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3516
3720
|
else:
|
|
3517
3721
|
cred = credential.Credential(
|
|
@@ -3563,7 +3767,10 @@ def doDeleteAccessControlRules(args, parsed_globals):
|
|
|
3563
3767
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3564
3768
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3565
3769
|
)
|
|
3566
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3770
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3771
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3772
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3773
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3567
3774
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3568
3775
|
else:
|
|
3569
3776
|
cred = credential.Credential(
|
|
@@ -3615,7 +3822,10 @@ def doCreateDefenceVulExportJob(args, parsed_globals):
|
|
|
3615
3822
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3616
3823
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3617
3824
|
)
|
|
3618
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3825
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3826
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3827
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3828
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3619
3829
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3620
3830
|
else:
|
|
3621
3831
|
cred = credential.Credential(
|
|
@@ -3667,7 +3877,10 @@ def doDescribeAbnormalProcessLevelSummary(args, parsed_globals):
|
|
|
3667
3877
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3668
3878
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3669
3879
|
)
|
|
3670
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3880
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3881
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3882
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3883
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3671
3884
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3672
3885
|
else:
|
|
3673
3886
|
cred = credential.Credential(
|
|
@@ -3719,7 +3932,10 @@ def doDescribePurchaseStateInfo(args, parsed_globals):
|
|
|
3719
3932
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3720
3933
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3721
3934
|
)
|
|
3722
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3935
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3936
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3937
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3938
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3723
3939
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3724
3940
|
else:
|
|
3725
3941
|
cred = credential.Credential(
|
|
@@ -3771,7 +3987,10 @@ def doDescribeRiskSyscallWhiteListDetail(args, parsed_globals):
|
|
|
3771
3987
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3772
3988
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3773
3989
|
)
|
|
3774
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
3990
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3991
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3992
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3993
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3775
3994
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3776
3995
|
else:
|
|
3777
3996
|
cred = credential.Credential(
|
|
@@ -3823,7 +4042,10 @@ def doDescribeAssetImageRegistryDetail(args, parsed_globals):
|
|
|
3823
4042
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3824
4043
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3825
4044
|
)
|
|
3826
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4045
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4046
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4047
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4048
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3827
4049
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3828
4050
|
else:
|
|
3829
4051
|
cred = credential.Credential(
|
|
@@ -3875,7 +4097,10 @@ def doModifyEscapeWhiteList(args, parsed_globals):
|
|
|
3875
4097
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3876
4098
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3877
4099
|
)
|
|
3878
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4100
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4101
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4102
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4103
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3879
4104
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3880
4105
|
else:
|
|
3881
4106
|
cred = credential.Credential(
|
|
@@ -3927,7 +4152,10 @@ def doDescribeVirusManualScanEstimateTimeout(args, parsed_globals):
|
|
|
3927
4152
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3928
4153
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3929
4154
|
)
|
|
3930
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4155
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4156
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4157
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4158
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3931
4159
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3932
4160
|
else:
|
|
3933
4161
|
cred = credential.Credential(
|
|
@@ -3979,7 +4207,10 @@ def doDescribeRiskSyscallEventsExport(args, parsed_globals):
|
|
|
3979
4207
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3980
4208
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3981
4209
|
)
|
|
3982
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4210
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4211
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4212
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4213
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3983
4214
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3984
4215
|
else:
|
|
3985
4216
|
cred = credential.Credential(
|
|
@@ -4031,7 +4262,10 @@ def doDescribeImageAutoAuthorizedRule(args, parsed_globals):
|
|
|
4031
4262
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4032
4263
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4033
4264
|
)
|
|
4034
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4265
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4266
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4267
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4268
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4035
4269
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4036
4270
|
else:
|
|
4037
4271
|
cred = credential.Credential(
|
|
@@ -4083,7 +4317,10 @@ def doDescribeAbnormalProcessRuleDetail(args, parsed_globals):
|
|
|
4083
4317
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4084
4318
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4085
4319
|
)
|
|
4086
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4320
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4321
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4322
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4323
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4087
4324
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4088
4325
|
else:
|
|
4089
4326
|
cred = credential.Credential(
|
|
@@ -4135,7 +4372,10 @@ def doCreateVulDefenceHostExportJob(args, parsed_globals):
|
|
|
4135
4372
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4136
4373
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4137
4374
|
)
|
|
4138
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4375
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4376
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4377
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4378
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4139
4379
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4140
4380
|
else:
|
|
4141
4381
|
cred = credential.Credential(
|
|
@@ -4187,7 +4427,10 @@ def doDescribeValueAddedSrvInfo(args, parsed_globals):
|
|
|
4187
4427
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4188
4428
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4189
4429
|
)
|
|
4190
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4430
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4431
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4432
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4433
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4191
4434
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4192
4435
|
else:
|
|
4193
4436
|
cred = credential.Credential(
|
|
@@ -4239,7 +4482,10 @@ def doAddEditReverseShellWhiteList(args, parsed_globals):
|
|
|
4239
4482
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4240
4483
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4241
4484
|
)
|
|
4242
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4485
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4486
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4487
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4488
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4243
4489
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4244
4490
|
else:
|
|
4245
4491
|
cred = credential.Credential(
|
|
@@ -4291,7 +4537,10 @@ def doDescribeReverseShellDetail(args, parsed_globals):
|
|
|
4291
4537
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4292
4538
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4293
4539
|
)
|
|
4294
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4540
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4541
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4542
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4543
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4295
4544
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4296
4545
|
else:
|
|
4297
4546
|
cred = credential.Credential(
|
|
@@ -4343,7 +4592,10 @@ def doDescribeESAggregations(args, parsed_globals):
|
|
|
4343
4592
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4344
4593
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4345
4594
|
)
|
|
4346
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4595
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4596
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4597
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4598
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4347
4599
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4348
4600
|
else:
|
|
4349
4601
|
cred = credential.Credential(
|
|
@@ -4395,7 +4647,10 @@ def doDescribeAssetImageBindRuleInfo(args, parsed_globals):
|
|
|
4395
4647
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4396
4648
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4397
4649
|
)
|
|
4398
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4650
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4651
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4652
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4653
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4399
4654
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4400
4655
|
else:
|
|
4401
4656
|
cred = credential.Credential(
|
|
@@ -4447,7 +4702,10 @@ def doUpdateNetworkFirewallPolicyDetail(args, parsed_globals):
|
|
|
4447
4702
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4448
4703
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4449
4704
|
)
|
|
4450
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4705
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4706
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4707
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4708
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4451
4709
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4452
4710
|
else:
|
|
4453
4711
|
cred = credential.Credential(
|
|
@@ -4499,7 +4757,10 @@ def doCreateAssetImageVirusExportJob(args, parsed_globals):
|
|
|
4499
4757
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4500
4758
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4501
4759
|
)
|
|
4502
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4760
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4761
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4762
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4763
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4503
4764
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4504
4765
|
else:
|
|
4505
4766
|
cred = credential.Credential(
|
|
@@ -4551,7 +4812,10 @@ def doDescribeNetworkFirewallPolicyDiscover(args, parsed_globals):
|
|
|
4551
4812
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4552
4813
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4553
4814
|
)
|
|
4554
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4815
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4816
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4817
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4818
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4555
4819
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4556
4820
|
else:
|
|
4557
4821
|
cred = credential.Credential(
|
|
@@ -4603,7 +4867,10 @@ def doDescribeSecLogDeliveryClsOptions(args, parsed_globals):
|
|
|
4603
4867
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4604
4868
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4605
4869
|
)
|
|
4606
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4870
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4871
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4872
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4873
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4607
4874
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4608
4875
|
else:
|
|
4609
4876
|
cred = credential.Credential(
|
|
@@ -4655,7 +4922,10 @@ def doResetSecLogTopicConfig(args, parsed_globals):
|
|
|
4655
4922
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4656
4923
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4657
4924
|
)
|
|
4658
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4925
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4926
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4927
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4928
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4659
4929
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4660
4930
|
else:
|
|
4661
4931
|
cred = credential.Credential(
|
|
@@ -4707,7 +4977,10 @@ def doDescribeTaskResultSummary(args, parsed_globals):
|
|
|
4707
4977
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4708
4978
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4709
4979
|
)
|
|
4710
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
4980
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4981
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4982
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4983
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4711
4984
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4712
4985
|
else:
|
|
4713
4986
|
cred = credential.Credential(
|
|
@@ -4759,7 +5032,10 @@ def doDescribeAssetContainerDetail(args, parsed_globals):
|
|
|
4759
5032
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4760
5033
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4761
5034
|
)
|
|
4762
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5035
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5036
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5037
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5038
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4763
5039
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4764
5040
|
else:
|
|
4765
5041
|
cred = credential.Credential(
|
|
@@ -4811,7 +5087,10 @@ def doDescribeAssetImageRegistryRiskInfoList(args, parsed_globals):
|
|
|
4811
5087
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4812
5088
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4813
5089
|
)
|
|
4814
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5090
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5091
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5092
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5093
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4815
5094
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4816
5095
|
else:
|
|
4817
5096
|
cred = credential.Credential(
|
|
@@ -4863,7 +5142,10 @@ def doModifyEscapeRule(args, parsed_globals):
|
|
|
4863
5142
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4864
5143
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4865
5144
|
)
|
|
4866
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5145
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5146
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5147
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5148
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4867
5149
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4868
5150
|
else:
|
|
4869
5151
|
cred = credential.Credential(
|
|
@@ -4915,7 +5197,10 @@ def doDescribeCompliancePolicyItemAffectedSummary(args, parsed_globals):
|
|
|
4915
5197
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4916
5198
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4917
5199
|
)
|
|
4918
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5200
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5201
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5202
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5203
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4919
5204
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4920
5205
|
else:
|
|
4921
5206
|
cred = credential.Credential(
|
|
@@ -4967,7 +5252,10 @@ def doModifyEscapeEventStatus(args, parsed_globals):
|
|
|
4967
5252
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4968
5253
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4969
5254
|
)
|
|
4970
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5255
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5256
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5257
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5258
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4971
5259
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4972
5260
|
else:
|
|
4973
5261
|
cred = credential.Credential(
|
|
@@ -5019,7 +5307,10 @@ def doCreateNetworkFirewallClusterRefresh(args, parsed_globals):
|
|
|
5019
5307
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5020
5308
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5021
5309
|
)
|
|
5022
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5310
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5311
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5312
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5313
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5023
5314
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5024
5315
|
else:
|
|
5025
5316
|
cred = credential.Credential(
|
|
@@ -5071,7 +5362,10 @@ def doCreateNetworkFirewallPublish(args, parsed_globals):
|
|
|
5071
5362
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5072
5363
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5073
5364
|
)
|
|
5074
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5365
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5366
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5367
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5368
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5075
5369
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5076
5370
|
else:
|
|
5077
5371
|
cred = credential.Credential(
|
|
@@ -5123,7 +5417,10 @@ def doAddComplianceAssetPolicySetToWhitelist(args, parsed_globals):
|
|
|
5123
5417
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5124
5418
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5125
5419
|
)
|
|
5126
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5420
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5421
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5422
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5423
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5127
5424
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5128
5425
|
else:
|
|
5129
5426
|
cred = credential.Credential(
|
|
@@ -5175,7 +5472,10 @@ def doModifySecLogJoinObjects(args, parsed_globals):
|
|
|
5175
5472
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5176
5473
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5177
5474
|
)
|
|
5178
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5475
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5476
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5477
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5478
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5179
5479
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5180
5480
|
else:
|
|
5181
5481
|
cred = credential.Credential(
|
|
@@ -5227,7 +5527,10 @@ def doDescribeContainerAssetSummary(args, parsed_globals):
|
|
|
5227
5527
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5228
5528
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5229
5529
|
)
|
|
5230
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5530
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5531
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5532
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5533
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5231
5534
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5232
5535
|
else:
|
|
5233
5536
|
cred = credential.Credential(
|
|
@@ -5279,7 +5582,10 @@ def doDescribeImageRegistryTimingScanTask(args, parsed_globals):
|
|
|
5279
5582
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5280
5583
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5281
5584
|
)
|
|
5282
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5585
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5586
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5587
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5588
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5283
5589
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5284
5590
|
else:
|
|
5285
5591
|
cred = credential.Credential(
|
|
@@ -5331,7 +5637,10 @@ def doDescribeReverseShellEventsExport(args, parsed_globals):
|
|
|
5331
5637
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5332
5638
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5333
5639
|
)
|
|
5334
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5640
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5641
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5642
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5643
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5335
5644
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5336
5645
|
else:
|
|
5337
5646
|
cred = credential.Credential(
|
|
@@ -5383,7 +5692,10 @@ def doDescribeAssetDBServiceList(args, parsed_globals):
|
|
|
5383
5692
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5384
5693
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5385
5694
|
)
|
|
5386
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5695
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5696
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5697
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5698
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5387
5699
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5388
5700
|
else:
|
|
5389
5701
|
cred = credential.Credential(
|
|
@@ -5435,7 +5747,10 @@ def doDescribeVulImageList(args, parsed_globals):
|
|
|
5435
5747
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5436
5748
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5437
5749
|
)
|
|
5438
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5750
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5751
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5752
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5753
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5439
5754
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5440
5755
|
else:
|
|
5441
5756
|
cred = credential.Credential(
|
|
@@ -5487,7 +5802,10 @@ def doDeleteRiskSyscallWhiteLists(args, parsed_globals):
|
|
|
5487
5802
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5488
5803
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5489
5804
|
)
|
|
5490
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5805
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5806
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5807
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5808
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5491
5809
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5492
5810
|
else:
|
|
5493
5811
|
cred = credential.Credential(
|
|
@@ -5539,7 +5857,10 @@ def doDescribeAssetSummary(args, parsed_globals):
|
|
|
5539
5857
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5540
5858
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5541
5859
|
)
|
|
5542
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5860
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5861
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5862
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5863
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5543
5864
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5544
5865
|
else:
|
|
5545
5866
|
cred = credential.Credential(
|
|
@@ -5591,7 +5912,10 @@ def doDescribeAssetHostDetail(args, parsed_globals):
|
|
|
5591
5912
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5592
5913
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5593
5914
|
)
|
|
5594
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5915
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5916
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5917
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5918
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5595
5919
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5596
5920
|
else:
|
|
5597
5921
|
cred = credential.Credential(
|
|
@@ -5643,7 +5967,10 @@ def doDescribeVulIgnoreRegistryImageList(args, parsed_globals):
|
|
|
5643
5967
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5644
5968
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5645
5969
|
)
|
|
5646
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
5970
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5971
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5972
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5973
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5647
5974
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5648
5975
|
else:
|
|
5649
5976
|
cred = credential.Credential(
|
|
@@ -5695,7 +6022,10 @@ def doDescribeVulScanInfo(args, parsed_globals):
|
|
|
5695
6022
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5696
6023
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5697
6024
|
)
|
|
5698
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6025
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6026
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6027
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6028
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5699
6029
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5700
6030
|
else:
|
|
5701
6031
|
cred = credential.Credential(
|
|
@@ -5747,7 +6077,10 @@ def doDescribeVulImageSummary(args, parsed_globals):
|
|
|
5747
6077
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5748
6078
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5749
6079
|
)
|
|
5750
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6080
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6081
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6082
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6083
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5751
6084
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5752
6085
|
else:
|
|
5753
6086
|
cred = credential.Credential(
|
|
@@ -5799,7 +6132,10 @@ def doCreateWebVulExportJob(args, parsed_globals):
|
|
|
5799
6132
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5800
6133
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5801
6134
|
)
|
|
5802
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6135
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6136
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6137
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6138
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5803
6139
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5804
6140
|
else:
|
|
5805
6141
|
cred = credential.Credential(
|
|
@@ -5851,7 +6187,10 @@ def doModifyContainerNetStatus(args, parsed_globals):
|
|
|
5851
6187
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5852
6188
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5853
6189
|
)
|
|
5854
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6190
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6191
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6192
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6193
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5855
6194
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5856
6195
|
else:
|
|
5857
6196
|
cred = credential.Credential(
|
|
@@ -5903,7 +6242,10 @@ def doDescribeImageRiskTendency(args, parsed_globals):
|
|
|
5903
6242
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5904
6243
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5905
6244
|
)
|
|
5906
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6245
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6246
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6247
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6248
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5907
6249
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5908
6250
|
else:
|
|
5909
6251
|
cred = credential.Credential(
|
|
@@ -5955,7 +6297,10 @@ def doDescribeAgentInstallCommand(args, parsed_globals):
|
|
|
5955
6297
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5956
6298
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5957
6299
|
)
|
|
5958
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6300
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6301
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6302
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6303
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5959
6304
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5960
6305
|
else:
|
|
5961
6306
|
cred = credential.Credential(
|
|
@@ -6007,7 +6352,10 @@ def doDescribeImageRegistryNamespaceList(args, parsed_globals):
|
|
|
6007
6352
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6008
6353
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6009
6354
|
)
|
|
6010
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6355
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6356
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6357
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6358
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6011
6359
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6012
6360
|
else:
|
|
6013
6361
|
cred = credential.Credential(
|
|
@@ -6059,7 +6407,10 @@ def doDescribeAgentDaemonSetCmd(args, parsed_globals):
|
|
|
6059
6407
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6060
6408
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6061
6409
|
)
|
|
6062
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6410
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6411
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6412
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6413
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6063
6414
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6064
6415
|
else:
|
|
6065
6416
|
cred = credential.Credential(
|
|
@@ -6111,7 +6462,10 @@ def doCreateEmergencyVulExportJob(args, parsed_globals):
|
|
|
6111
6462
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6112
6463
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6113
6464
|
)
|
|
6114
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6465
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6466
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6467
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6468
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6115
6469
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6116
6470
|
else:
|
|
6117
6471
|
cred = credential.Credential(
|
|
@@ -6163,7 +6517,10 @@ def doDescribeAssetImageScanTask(args, parsed_globals):
|
|
|
6163
6517
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6164
6518
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6165
6519
|
)
|
|
6166
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6520
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6521
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6522
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6523
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6167
6524
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6168
6525
|
else:
|
|
6169
6526
|
cred = credential.Credential(
|
|
@@ -6215,7 +6572,10 @@ def doDescribeAssetImageRegistryListExport(args, parsed_globals):
|
|
|
6215
6572
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6216
6573
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6217
6574
|
)
|
|
6218
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6575
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6576
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6577
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6578
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6219
6579
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6220
6580
|
else:
|
|
6221
6581
|
cred = credential.Credential(
|
|
@@ -6267,7 +6627,10 @@ def doDescribeVulDefencePlugin(args, parsed_globals):
|
|
|
6267
6627
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6268
6628
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6269
6629
|
)
|
|
6270
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6630
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6631
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6632
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6633
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6271
6634
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6272
6635
|
else:
|
|
6273
6636
|
cred = credential.Credential(
|
|
@@ -6319,7 +6682,10 @@ def doDescribeK8sApiAbnormalEventList(args, parsed_globals):
|
|
|
6319
6682
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6320
6683
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6321
6684
|
)
|
|
6322
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6685
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6686
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6687
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6688
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6323
6689
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6324
6690
|
else:
|
|
6325
6691
|
cred = credential.Credential(
|
|
@@ -6371,7 +6737,10 @@ def doDescribeComplianceTaskAssetSummary(args, parsed_globals):
|
|
|
6371
6737
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6372
6738
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6373
6739
|
)
|
|
6374
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6740
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6741
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6742
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6743
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6375
6744
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6376
6745
|
else:
|
|
6377
6746
|
cred = credential.Credential(
|
|
@@ -6423,7 +6792,10 @@ def doDeleteReverseShellEvents(args, parsed_globals):
|
|
|
6423
6792
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6424
6793
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6425
6794
|
)
|
|
6426
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6795
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6796
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6797
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6798
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6427
6799
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6428
6800
|
else:
|
|
6429
6801
|
cred = credential.Credential(
|
|
@@ -6475,7 +6847,10 @@ def doDescribeAccessControlRules(args, parsed_globals):
|
|
|
6475
6847
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6476
6848
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6477
6849
|
)
|
|
6478
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6850
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6851
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6852
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6853
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6479
6854
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6480
6855
|
else:
|
|
6481
6856
|
cred = credential.Credential(
|
|
@@ -6527,7 +6902,10 @@ def doDescribeAssetImageVirusListExport(args, parsed_globals):
|
|
|
6527
6902
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6528
6903
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6529
6904
|
)
|
|
6530
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6905
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6906
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6907
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6908
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6531
6909
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6532
6910
|
else:
|
|
6533
6911
|
cred = credential.Credential(
|
|
@@ -6579,7 +6957,10 @@ def doDescribeAssetContainerList(args, parsed_globals):
|
|
|
6579
6957
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6580
6958
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6581
6959
|
)
|
|
6582
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
6960
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
6961
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
6962
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
6963
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6583
6964
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6584
6965
|
else:
|
|
6585
6966
|
cred = credential.Credential(
|
|
@@ -6631,7 +7012,10 @@ def doCreateSearchTemplate(args, parsed_globals):
|
|
|
6631
7012
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6632
7013
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6633
7014
|
)
|
|
6634
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7015
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7016
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7017
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7018
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6635
7019
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6636
7020
|
else:
|
|
6637
7021
|
cred = credential.Credential(
|
|
@@ -6683,7 +7067,10 @@ def doDescribePostPayDetail(args, parsed_globals):
|
|
|
6683
7067
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6684
7068
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6685
7069
|
)
|
|
6686
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7070
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7071
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7072
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7073
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6687
7074
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6688
7075
|
else:
|
|
6689
7076
|
cred = credential.Credential(
|
|
@@ -6735,7 +7122,10 @@ def doAddNetworkFirewallPolicyYamlDetail(args, parsed_globals):
|
|
|
6735
7122
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6736
7123
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6737
7124
|
)
|
|
6738
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7125
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7126
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7127
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7128
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6739
7129
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6740
7130
|
else:
|
|
6741
7131
|
cred = credential.Credential(
|
|
@@ -6787,7 +7177,10 @@ def doDescribeAffectedClusterCount(args, parsed_globals):
|
|
|
6787
7177
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6788
7178
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6789
7179
|
)
|
|
6790
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7180
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7181
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7182
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7183
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6791
7184
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6792
7185
|
else:
|
|
6793
7186
|
cred = credential.Credential(
|
|
@@ -6839,7 +7232,10 @@ def doModifyVirusMonitorSetting(args, parsed_globals):
|
|
|
6839
7232
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6840
7233
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6841
7234
|
)
|
|
6842
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7235
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7236
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7237
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7238
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6843
7239
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6844
7240
|
else:
|
|
6845
7241
|
cred = credential.Credential(
|
|
@@ -6891,7 +7287,10 @@ def doDescribeVirusAutoIsolateSampleDetail(args, parsed_globals):
|
|
|
6891
7287
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6892
7288
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6893
7289
|
)
|
|
6894
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7290
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7291
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7292
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7293
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6895
7294
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6896
7295
|
else:
|
|
6897
7296
|
cred = credential.Credential(
|
|
@@ -6943,7 +7342,10 @@ def doAddEscapeWhiteList(args, parsed_globals):
|
|
|
6943
7342
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6944
7343
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6945
7344
|
)
|
|
6946
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7345
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7346
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7347
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7348
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6947
7349
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
6948
7350
|
else:
|
|
6949
7351
|
cred = credential.Credential(
|
|
@@ -6995,7 +7397,10 @@ def doCreateImageExportJob(args, parsed_globals):
|
|
|
6995
7397
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
6996
7398
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
6997
7399
|
)
|
|
6998
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7400
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7401
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7402
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7403
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
6999
7404
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7000
7405
|
else:
|
|
7001
7406
|
cred = credential.Credential(
|
|
@@ -7047,7 +7452,10 @@ def doAddEditWarningRules(args, parsed_globals):
|
|
|
7047
7452
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7048
7453
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7049
7454
|
)
|
|
7050
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7455
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7456
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7457
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7458
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7051
7459
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7052
7460
|
else:
|
|
7053
7461
|
cred = credential.Credential(
|
|
@@ -7099,7 +7507,10 @@ def doScanComplianceAssets(args, parsed_globals):
|
|
|
7099
7507
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7100
7508
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7101
7509
|
)
|
|
7102
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7510
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7511
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7512
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7513
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7103
7514
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7104
7515
|
else:
|
|
7105
7516
|
cred = credential.Credential(
|
|
@@ -7151,7 +7562,10 @@ def doStopVirusScanTask(args, parsed_globals):
|
|
|
7151
7562
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7152
7563
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7153
7564
|
)
|
|
7154
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7565
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7566
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7567
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7568
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7155
7569
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7156
7570
|
else:
|
|
7157
7571
|
cred = credential.Credential(
|
|
@@ -7203,7 +7617,10 @@ def doAddIgnoreVul(args, parsed_globals):
|
|
|
7203
7617
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7204
7618
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7205
7619
|
)
|
|
7206
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7620
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7621
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7622
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7623
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7207
7624
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7208
7625
|
else:
|
|
7209
7626
|
cred = credential.Credential(
|
|
@@ -7255,7 +7672,10 @@ def doDescribeCheckItemList(args, parsed_globals):
|
|
|
7255
7672
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7256
7673
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7257
7674
|
)
|
|
7258
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7675
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7676
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7677
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7678
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7259
7679
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7260
7680
|
else:
|
|
7261
7681
|
cred = credential.Credential(
|
|
@@ -7307,7 +7727,10 @@ def doDescribeAccessControlEventsExport(args, parsed_globals):
|
|
|
7307
7727
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7308
7728
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7309
7729
|
)
|
|
7310
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7730
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7731
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7732
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7733
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7311
7734
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7312
7735
|
else:
|
|
7313
7736
|
cred = credential.Credential(
|
|
@@ -7359,7 +7782,10 @@ def doModifyK8sApiAbnormalEventStatus(args, parsed_globals):
|
|
|
7359
7782
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7360
7783
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7361
7784
|
)
|
|
7362
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7785
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7786
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7787
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7788
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7363
7789
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7364
7790
|
else:
|
|
7365
7791
|
cred = credential.Credential(
|
|
@@ -7411,7 +7837,10 @@ def doDescribeVirusDetail(args, parsed_globals):
|
|
|
7411
7837
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7412
7838
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7413
7839
|
)
|
|
7414
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7840
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7841
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7842
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7843
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7415
7844
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7416
7845
|
else:
|
|
7417
7846
|
cred = credential.Credential(
|
|
@@ -7463,7 +7892,10 @@ def doCreateVulExportJob(args, parsed_globals):
|
|
|
7463
7892
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7464
7893
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7465
7894
|
)
|
|
7466
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7895
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7896
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7897
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7898
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7467
7899
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7468
7900
|
else:
|
|
7469
7901
|
cred = credential.Credential(
|
|
@@ -7515,7 +7947,10 @@ def doDescribeComplianceWhitelistItemList(args, parsed_globals):
|
|
|
7515
7947
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7516
7948
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7517
7949
|
)
|
|
7518
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
7950
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
7951
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
7952
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
7953
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7519
7954
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7520
7955
|
else:
|
|
7521
7956
|
cred = credential.Credential(
|
|
@@ -7567,7 +8002,10 @@ def doDescribeNetworkFirewallPolicyList(args, parsed_globals):
|
|
|
7567
8002
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7568
8003
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7569
8004
|
)
|
|
7570
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8005
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8006
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8007
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8008
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7571
8009
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7572
8010
|
else:
|
|
7573
8011
|
cred = credential.Credential(
|
|
@@ -7619,7 +8057,10 @@ def doAddEditImageAutoAuthorizedRule(args, parsed_globals):
|
|
|
7619
8057
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7620
8058
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7621
8059
|
)
|
|
7622
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8060
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8061
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8062
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8063
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7623
8064
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7624
8065
|
else:
|
|
7625
8066
|
cred = credential.Credential(
|
|
@@ -7671,7 +8112,10 @@ def doCreateComplianceTask(args, parsed_globals):
|
|
|
7671
8112
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7672
8113
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7673
8114
|
)
|
|
7674
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8115
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8116
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8117
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8118
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7675
8119
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7676
8120
|
else:
|
|
7677
8121
|
cred = credential.Credential(
|
|
@@ -7723,7 +8167,10 @@ def doDescribeComplianceScanFailedAssetList(args, parsed_globals):
|
|
|
7723
8167
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7724
8168
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7725
8169
|
)
|
|
7726
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8170
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8171
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8172
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8173
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7727
8174
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7728
8175
|
else:
|
|
7729
8176
|
cred = credential.Credential(
|
|
@@ -7775,7 +8222,10 @@ def doDescribeK8sApiAbnormalRuleScopeList(args, parsed_globals):
|
|
|
7775
8222
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7776
8223
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7777
8224
|
)
|
|
7778
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8225
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8226
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8227
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8228
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7779
8229
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7780
8230
|
else:
|
|
7781
8231
|
cred = credential.Credential(
|
|
@@ -7827,7 +8277,10 @@ def doDescribeAssetClusterList(args, parsed_globals):
|
|
|
7827
8277
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7828
8278
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7829
8279
|
)
|
|
7830
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8280
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8281
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8282
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8283
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7831
8284
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7832
8285
|
else:
|
|
7833
8286
|
cred = credential.Credential(
|
|
@@ -7879,7 +8332,10 @@ def doDeleteRiskSyscallEvents(args, parsed_globals):
|
|
|
7879
8332
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7880
8333
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7881
8334
|
)
|
|
7882
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8335
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8336
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8337
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8338
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7883
8339
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7884
8340
|
else:
|
|
7885
8341
|
cred = credential.Credential(
|
|
@@ -7931,7 +8387,10 @@ def doDescribeAffectedWorkloadList(args, parsed_globals):
|
|
|
7931
8387
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7932
8388
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7933
8389
|
)
|
|
7934
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8390
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8391
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8392
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8393
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7935
8394
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7936
8395
|
else:
|
|
7937
8396
|
cred = credential.Credential(
|
|
@@ -7983,7 +8442,10 @@ def doAddCompliancePolicyAssetSetToWhitelist(args, parsed_globals):
|
|
|
7983
8442
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7984
8443
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7985
8444
|
)
|
|
7986
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8445
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8446
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8447
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8448
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
7987
8449
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7988
8450
|
else:
|
|
7989
8451
|
cred = credential.Credential(
|
|
@@ -8035,7 +8497,10 @@ def doDeleteAbnormalProcessRules(args, parsed_globals):
|
|
|
8035
8497
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8036
8498
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8037
8499
|
)
|
|
8038
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8500
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8501
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8502
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8503
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8039
8504
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8040
8505
|
else:
|
|
8041
8506
|
cred = credential.Credential(
|
|
@@ -8087,7 +8552,10 @@ def doDescribeVulDetail(args, parsed_globals):
|
|
|
8087
8552
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8088
8553
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8089
8554
|
)
|
|
8090
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8555
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8556
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8557
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8558
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8091
8559
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8092
8560
|
else:
|
|
8093
8561
|
cred = credential.Credential(
|
|
@@ -8139,7 +8607,10 @@ def doDescribeRefreshTask(args, parsed_globals):
|
|
|
8139
8607
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8140
8608
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8141
8609
|
)
|
|
8142
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8610
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8611
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8612
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8613
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8143
8614
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8144
8615
|
else:
|
|
8145
8616
|
cred = credential.Credential(
|
|
@@ -8191,7 +8662,10 @@ def doCreateVulScanTask(args, parsed_globals):
|
|
|
8191
8662
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8192
8663
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8193
8664
|
)
|
|
8194
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8665
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8666
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8667
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8668
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8195
8669
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8196
8670
|
else:
|
|
8197
8671
|
cred = credential.Credential(
|
|
@@ -8243,7 +8717,10 @@ def doDescribeNetworkFirewallClusterList(args, parsed_globals):
|
|
|
8243
8717
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8244
8718
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8245
8719
|
)
|
|
8246
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8720
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8721
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8722
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8723
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8247
8724
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8248
8725
|
else:
|
|
8249
8726
|
cred = credential.Credential(
|
|
@@ -8295,7 +8772,10 @@ def doDescribeAssetPortList(args, parsed_globals):
|
|
|
8295
8772
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8296
8773
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8297
8774
|
)
|
|
8298
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8775
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8776
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8777
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8778
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8299
8779
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8300
8780
|
else:
|
|
8301
8781
|
cred = credential.Credential(
|
|
@@ -8347,7 +8827,10 @@ def doStopVulScanTask(args, parsed_globals):
|
|
|
8347
8827
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8348
8828
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8349
8829
|
)
|
|
8350
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8830
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8831
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8832
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8833
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8351
8834
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8352
8835
|
else:
|
|
8353
8836
|
cred = credential.Credential(
|
|
@@ -8399,7 +8882,10 @@ def doDescribeAssetImageRegistryRiskListExport(args, parsed_globals):
|
|
|
8399
8882
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8400
8883
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8401
8884
|
)
|
|
8402
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8885
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8886
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8887
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8888
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8403
8889
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8404
8890
|
else:
|
|
8405
8891
|
cred = credential.Credential(
|
|
@@ -8451,7 +8937,10 @@ def doDescribeSupportDefenceVul(args, parsed_globals):
|
|
|
8451
8937
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8452
8938
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8453
8939
|
)
|
|
8454
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8940
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8941
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8942
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8943
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8455
8944
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8456
8945
|
else:
|
|
8457
8946
|
cred = credential.Credential(
|
|
@@ -8503,7 +8992,10 @@ def doDescribeVulDefenceHost(args, parsed_globals):
|
|
|
8503
8992
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8504
8993
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8505
8994
|
)
|
|
8506
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
8995
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
8996
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
8997
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
8998
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8507
8999
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8508
9000
|
else:
|
|
8509
9001
|
cred = credential.Credential(
|
|
@@ -8555,7 +9047,10 @@ def doDescribeK8sApiAbnormalSummary(args, parsed_globals):
|
|
|
8555
9047
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8556
9048
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8557
9049
|
)
|
|
8558
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9050
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9051
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9052
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9053
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8559
9054
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8560
9055
|
else:
|
|
8561
9056
|
cred = credential.Credential(
|
|
@@ -8607,7 +9102,10 @@ def doCreateSystemVulExportJob(args, parsed_globals):
|
|
|
8607
9102
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8608
9103
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8609
9104
|
)
|
|
8610
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9105
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9106
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9107
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9108
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8611
9109
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8612
9110
|
else:
|
|
8613
9111
|
cred = credential.Credential(
|
|
@@ -8659,7 +9157,10 @@ def doDescribeVulDefenceEventTendency(args, parsed_globals):
|
|
|
8659
9157
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8660
9158
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8661
9159
|
)
|
|
8662
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9160
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9161
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9162
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9163
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8663
9164
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8664
9165
|
else:
|
|
8665
9166
|
cred = credential.Credential(
|
|
@@ -8711,7 +9212,10 @@ def doDescribeEscapeWhiteList(args, parsed_globals):
|
|
|
8711
9212
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8712
9213
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8713
9214
|
)
|
|
8714
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9215
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9216
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9217
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9218
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8715
9219
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8716
9220
|
else:
|
|
8717
9221
|
cred = credential.Credential(
|
|
@@ -8763,7 +9267,10 @@ def doModifyRiskSyscallStatus(args, parsed_globals):
|
|
|
8763
9267
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8764
9268
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8765
9269
|
)
|
|
8766
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9270
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9271
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9272
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9273
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8767
9274
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8768
9275
|
else:
|
|
8769
9276
|
cred = credential.Credential(
|
|
@@ -8815,7 +9322,10 @@ def doDescribeComplianceAssetDetailInfo(args, parsed_globals):
|
|
|
8815
9322
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8816
9323
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8817
9324
|
)
|
|
8818
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9325
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9326
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9327
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9328
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8819
9329
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8820
9330
|
else:
|
|
8821
9331
|
cred = credential.Credential(
|
|
@@ -8867,7 +9377,10 @@ def doCreateVulContainerExportJob(args, parsed_globals):
|
|
|
8867
9377
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8868
9378
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8869
9379
|
)
|
|
8870
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9380
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9381
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9382
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9383
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8871
9384
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8872
9385
|
else:
|
|
8873
9386
|
cred = credential.Credential(
|
|
@@ -8919,7 +9432,10 @@ def doUpdateAndPublishNetworkFirewallPolicyYamlDetail(args, parsed_globals):
|
|
|
8919
9432
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8920
9433
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8921
9434
|
)
|
|
8922
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9435
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9436
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9437
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9438
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8923
9439
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8924
9440
|
else:
|
|
8925
9441
|
cred = credential.Credential(
|
|
@@ -8971,7 +9487,10 @@ def doModifyImageAuthorized(args, parsed_globals):
|
|
|
8971
9487
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
8972
9488
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
8973
9489
|
)
|
|
8974
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9490
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9491
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9492
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9493
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
8975
9494
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
8976
9495
|
else:
|
|
8977
9496
|
cred = credential.Credential(
|
|
@@ -9023,7 +9542,10 @@ def doModifyAbnormalProcessStatus(args, parsed_globals):
|
|
|
9023
9542
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9024
9543
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9025
9544
|
)
|
|
9026
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9545
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9546
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9547
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9548
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9027
9549
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9028
9550
|
else:
|
|
9029
9551
|
cred = credential.Credential(
|
|
@@ -9075,7 +9597,10 @@ def doCreateExportComplianceStatusListJob(args, parsed_globals):
|
|
|
9075
9597
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9076
9598
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9077
9599
|
)
|
|
9078
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9600
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9601
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9602
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9603
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9079
9604
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9080
9605
|
else:
|
|
9081
9606
|
cred = credential.Credential(
|
|
@@ -9127,7 +9652,10 @@ def doDescribeAssetImageSimpleList(args, parsed_globals):
|
|
|
9127
9652
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9128
9653
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9129
9654
|
)
|
|
9130
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9655
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9656
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9657
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9658
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9131
9659
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9132
9660
|
else:
|
|
9133
9661
|
cred = credential.Credential(
|
|
@@ -9179,7 +9707,10 @@ def doDeleteIgnoreVul(args, parsed_globals):
|
|
|
9179
9707
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9180
9708
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9181
9709
|
)
|
|
9182
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9710
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9711
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9712
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9713
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9183
9714
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9184
9715
|
else:
|
|
9185
9716
|
cred = credential.Credential(
|
|
@@ -9231,7 +9762,10 @@ def doModifyAccessControlStatus(args, parsed_globals):
|
|
|
9231
9762
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9232
9763
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9233
9764
|
)
|
|
9234
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9765
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9766
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9767
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9768
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9235
9769
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9236
9770
|
else:
|
|
9237
9771
|
cred = credential.Credential(
|
|
@@ -9283,7 +9817,10 @@ def doCreateEscapeWhiteListExportJob(args, parsed_globals):
|
|
|
9283
9817
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9284
9818
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9285
9819
|
)
|
|
9286
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9820
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9821
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9822
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9823
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9287
9824
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9288
9825
|
else:
|
|
9289
9826
|
cred = credential.Credential(
|
|
@@ -9335,7 +9872,10 @@ def doDescribeEscapeRuleInfo(args, parsed_globals):
|
|
|
9335
9872
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9336
9873
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9337
9874
|
)
|
|
9338
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9875
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9876
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9877
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9878
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9339
9879
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9340
9880
|
else:
|
|
9341
9881
|
cred = credential.Credential(
|
|
@@ -9387,7 +9927,10 @@ def doDescribeAssetImageRiskList(args, parsed_globals):
|
|
|
9387
9927
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9388
9928
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9389
9929
|
)
|
|
9390
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9930
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9931
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9932
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9933
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9391
9934
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9392
9935
|
else:
|
|
9393
9936
|
cred = credential.Credential(
|
|
@@ -9439,7 +9982,10 @@ def doDescribeAssetImageVulListExport(args, parsed_globals):
|
|
|
9439
9982
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9440
9983
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9441
9984
|
)
|
|
9442
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
9985
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
9986
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
9987
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
9988
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9443
9989
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9444
9990
|
else:
|
|
9445
9991
|
cred = credential.Credential(
|
|
@@ -9491,7 +10037,10 @@ def doDescribeClusterSummary(args, parsed_globals):
|
|
|
9491
10037
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9492
10038
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9493
10039
|
)
|
|
9494
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10040
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10041
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10042
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10043
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9495
10044
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9496
10045
|
else:
|
|
9497
10046
|
cred = credential.Credential(
|
|
@@ -9543,7 +10092,10 @@ def doDescribeVulDefenceEventDetail(args, parsed_globals):
|
|
|
9543
10092
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9544
10093
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9545
10094
|
)
|
|
9546
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10095
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10096
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10097
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10098
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9547
10099
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9548
10100
|
else:
|
|
9549
10101
|
cred = credential.Credential(
|
|
@@ -9595,7 +10147,10 @@ def doDescribeNewestVul(args, parsed_globals):
|
|
|
9595
10147
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9596
10148
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9597
10149
|
)
|
|
9598
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10150
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10151
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10152
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10153
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9599
10154
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9600
10155
|
else:
|
|
9601
10156
|
cred = credential.Credential(
|
|
@@ -9647,7 +10202,10 @@ def doDescribeVirusTaskList(args, parsed_globals):
|
|
|
9647
10202
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9648
10203
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9649
10204
|
)
|
|
9650
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10205
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10206
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10207
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10208
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9651
10209
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9652
10210
|
else:
|
|
9653
10211
|
cred = credential.Credential(
|
|
@@ -9699,7 +10257,10 @@ def doDescribeSearchLogs(args, parsed_globals):
|
|
|
9699
10257
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9700
10258
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9701
10259
|
)
|
|
9702
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10260
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10261
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10262
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10263
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9703
10264
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9704
10265
|
else:
|
|
9705
10266
|
cred = credential.Credential(
|
|
@@ -9751,7 +10312,10 @@ def doAddAssetImageRegistryRegistryDetail(args, parsed_globals):
|
|
|
9751
10312
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9752
10313
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9753
10314
|
)
|
|
9754
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10315
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10316
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10317
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10318
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9755
10319
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9756
10320
|
else:
|
|
9757
10321
|
cred = credential.Credential(
|
|
@@ -9803,7 +10367,10 @@ def doDescribeVirusList(args, parsed_globals):
|
|
|
9803
10367
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9804
10368
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9805
10369
|
)
|
|
9806
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10370
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10371
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10372
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10373
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9807
10374
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9808
10375
|
else:
|
|
9809
10376
|
cred = credential.Credential(
|
|
@@ -9855,7 +10422,10 @@ def doAddAndPublishNetworkFirewallPolicyDetail(args, parsed_globals):
|
|
|
9855
10422
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9856
10423
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9857
10424
|
)
|
|
9858
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10425
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10426
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10427
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10428
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9859
10429
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9860
10430
|
else:
|
|
9861
10431
|
cred = credential.Credential(
|
|
@@ -9907,7 +10477,10 @@ def doDescribeAbnormalProcessEventTendency(args, parsed_globals):
|
|
|
9907
10477
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9908
10478
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9909
10479
|
)
|
|
9910
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10480
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10481
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10482
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10483
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9911
10484
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9912
10485
|
else:
|
|
9913
10486
|
cred = credential.Credential(
|
|
@@ -9959,7 +10532,10 @@ def doSyncAssetImageRegistryAsset(args, parsed_globals):
|
|
|
9959
10532
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
9960
10533
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
9961
10534
|
)
|
|
9962
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10535
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10536
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10537
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10538
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
9963
10539
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
9964
10540
|
else:
|
|
9965
10541
|
cred = credential.Credential(
|
|
@@ -10011,7 +10587,10 @@ def doDescribeNetworkFirewallClusterRefreshStatus(args, parsed_globals):
|
|
|
10011
10587
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10012
10588
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10013
10589
|
)
|
|
10014
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10590
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10591
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10592
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10593
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10015
10594
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10016
10595
|
else:
|
|
10017
10596
|
cred = credential.Credential(
|
|
@@ -10063,7 +10642,10 @@ def doDescribeImageRiskSummary(args, parsed_globals):
|
|
|
10063
10642
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10064
10643
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10065
10644
|
)
|
|
10066
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10645
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10646
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10647
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10648
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10067
10649
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10068
10650
|
else:
|
|
10069
10651
|
cred = credential.Credential(
|
|
@@ -10115,7 +10697,10 @@ def doDescribeEmergencyVulList(args, parsed_globals):
|
|
|
10115
10697
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10116
10698
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10117
10699
|
)
|
|
10118
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10700
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10701
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10702
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10703
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10119
10704
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10120
10705
|
else:
|
|
10121
10706
|
cred = credential.Credential(
|
|
@@ -10167,7 +10752,10 @@ def doDescribeVulLevelSummary(args, parsed_globals):
|
|
|
10167
10752
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10168
10753
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10169
10754
|
)
|
|
10170
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10755
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10756
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10757
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10758
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10171
10759
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10172
10760
|
else:
|
|
10173
10761
|
cred = credential.Credential(
|
|
@@ -10219,7 +10807,10 @@ def doScanCompliancePolicyItems(args, parsed_globals):
|
|
|
10219
10807
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10220
10808
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10221
10809
|
)
|
|
10222
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10810
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10811
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10812
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10813
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10223
10814
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10224
10815
|
else:
|
|
10225
10816
|
cred = credential.Credential(
|
|
@@ -10271,7 +10862,10 @@ def doModifyVirusAutoIsolateExampleSwitch(args, parsed_globals):
|
|
|
10271
10862
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10272
10863
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10273
10864
|
)
|
|
10274
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10865
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10866
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10867
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10868
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10275
10869
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10276
10870
|
else:
|
|
10277
10871
|
cred = credential.Credential(
|
|
@@ -10323,7 +10917,10 @@ def doDescribeTcssSummary(args, parsed_globals):
|
|
|
10323
10917
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10324
10918
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10325
10919
|
)
|
|
10326
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10920
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10921
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10922
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10923
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10327
10924
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10328
10925
|
else:
|
|
10329
10926
|
cred = credential.Credential(
|
|
@@ -10375,7 +10972,10 @@ def doDescribeVirusMonitorSetting(args, parsed_globals):
|
|
|
10375
10972
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10376
10973
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10377
10974
|
)
|
|
10378
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
10975
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
10976
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
10977
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
10978
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10379
10979
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10380
10980
|
else:
|
|
10381
10981
|
cred = credential.Credential(
|
|
@@ -10427,7 +11027,10 @@ def doDescribeVirusAutoIsolateSetting(args, parsed_globals):
|
|
|
10427
11027
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10428
11028
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10429
11029
|
)
|
|
10430
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11030
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11031
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11032
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11033
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10431
11034
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10432
11035
|
else:
|
|
10433
11036
|
cred = credential.Credential(
|
|
@@ -10479,7 +11082,10 @@ def doDescribeEscapeEventTendency(args, parsed_globals):
|
|
|
10479
11082
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10480
11083
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10481
11084
|
)
|
|
10482
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11085
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11086
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11087
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11088
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10483
11089
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10484
11090
|
else:
|
|
10485
11091
|
cred = credential.Credential(
|
|
@@ -10531,7 +11137,10 @@ def doModifyVirusScanTimeoutSetting(args, parsed_globals):
|
|
|
10531
11137
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10532
11138
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10533
11139
|
)
|
|
10534
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11140
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11141
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11142
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11143
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10535
11144
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10536
11145
|
else:
|
|
10537
11146
|
cred = credential.Credential(
|
|
@@ -10583,7 +11192,10 @@ def doDescribeSecLogCleanSettingInfo(args, parsed_globals):
|
|
|
10583
11192
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10584
11193
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10585
11194
|
)
|
|
10586
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11195
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11196
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11197
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11198
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10587
11199
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10588
11200
|
else:
|
|
10589
11201
|
cred = credential.Credential(
|
|
@@ -10635,7 +11247,10 @@ def doDescribeSystemVulList(args, parsed_globals):
|
|
|
10635
11247
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10636
11248
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10637
11249
|
)
|
|
10638
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11250
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11251
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11252
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11253
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10639
11254
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10640
11255
|
else:
|
|
10641
11256
|
cred = credential.Credential(
|
|
@@ -10687,7 +11302,10 @@ def doDescribeVulScanLocalImageList(args, parsed_globals):
|
|
|
10687
11302
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10688
11303
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10689
11304
|
)
|
|
10690
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11305
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11306
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11307
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11308
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10691
11309
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10692
11310
|
else:
|
|
10693
11311
|
cred = credential.Credential(
|
|
@@ -10739,7 +11357,10 @@ def doDescribeSecLogVasInfo(args, parsed_globals):
|
|
|
10739
11357
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10740
11358
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10741
11359
|
)
|
|
10742
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11360
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11361
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11362
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11363
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10743
11364
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10744
11365
|
else:
|
|
10745
11366
|
cred = credential.Credential(
|
|
@@ -10791,7 +11412,10 @@ def doDescribeEscapeSafeState(args, parsed_globals):
|
|
|
10791
11412
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10792
11413
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10793
11414
|
)
|
|
10794
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11415
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11416
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11417
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11418
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10795
11419
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10796
11420
|
else:
|
|
10797
11421
|
cred = credential.Credential(
|
|
@@ -10843,7 +11467,10 @@ def doDescribeNetworkFirewallNamespaceLabelList(args, parsed_globals):
|
|
|
10843
11467
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10844
11468
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10845
11469
|
)
|
|
10846
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11470
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11471
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11472
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11473
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10847
11474
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10848
11475
|
else:
|
|
10849
11476
|
cred = credential.Credential(
|
|
@@ -10895,7 +11522,10 @@ def doDescribeSecLogDeliveryClsSetting(args, parsed_globals):
|
|
|
10895
11522
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10896
11523
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10897
11524
|
)
|
|
10898
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11525
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11526
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11527
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11528
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10899
11529
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10900
11530
|
else:
|
|
10901
11531
|
cred = credential.Credential(
|
|
@@ -10947,7 +11577,10 @@ def doDescribeNetworkFirewallAuditRecord(args, parsed_globals):
|
|
|
10947
11577
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
10948
11578
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
10949
11579
|
)
|
|
10950
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11580
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11581
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11582
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11583
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
10951
11584
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
10952
11585
|
else:
|
|
10953
11586
|
cred = credential.Credential(
|
|
@@ -10999,7 +11632,10 @@ def doDescribeContainerSecEventSummary(args, parsed_globals):
|
|
|
10999
11632
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11000
11633
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11001
11634
|
)
|
|
11002
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11635
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11636
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11637
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11638
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11003
11639
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11004
11640
|
else:
|
|
11005
11641
|
cred = credential.Credential(
|
|
@@ -11051,7 +11687,10 @@ def doDescribeImageAutoAuthorizedTaskList(args, parsed_globals):
|
|
|
11051
11687
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11052
11688
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11053
11689
|
)
|
|
11054
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11690
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11691
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11692
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11693
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11055
11694
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11056
11695
|
else:
|
|
11057
11696
|
cred = credential.Credential(
|
|
@@ -11103,7 +11742,10 @@ def doDescribeComplianceTaskPolicyItemSummaryList(args, parsed_globals):
|
|
|
11103
11742
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11104
11743
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11105
11744
|
)
|
|
11106
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11745
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11746
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11747
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11748
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11107
11749
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11108
11750
|
else:
|
|
11109
11751
|
cred = credential.Credential(
|
|
@@ -11155,7 +11797,10 @@ def doDescribeAssetImageList(args, parsed_globals):
|
|
|
11155
11797
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11156
11798
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11157
11799
|
)
|
|
11158
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11800
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11801
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11802
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11803
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11159
11804
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11160
11805
|
else:
|
|
11161
11806
|
cred = credential.Credential(
|
|
@@ -11207,7 +11852,10 @@ def doDeleteK8sApiAbnormalRule(args, parsed_globals):
|
|
|
11207
11852
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11208
11853
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11209
11854
|
)
|
|
11210
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11855
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11856
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11857
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11858
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11211
11859
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11212
11860
|
else:
|
|
11213
11861
|
cred = credential.Credential(
|
|
@@ -11259,7 +11907,10 @@ def doDescribeReverseShellEvents(args, parsed_globals):
|
|
|
11259
11907
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11260
11908
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11261
11909
|
)
|
|
11262
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11910
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11911
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11912
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11913
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11263
11914
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11264
11915
|
else:
|
|
11265
11916
|
cred = credential.Credential(
|
|
@@ -11311,7 +11962,10 @@ def doCreateProcessEventsExportJob(args, parsed_globals):
|
|
|
11311
11962
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11312
11963
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11313
11964
|
)
|
|
11314
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
11965
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
11966
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
11967
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
11968
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11315
11969
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11316
11970
|
else:
|
|
11317
11971
|
cred = credential.Credential(
|
|
@@ -11363,7 +12017,10 @@ def doDescribeAccessControlEvents(args, parsed_globals):
|
|
|
11363
12017
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11364
12018
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11365
12019
|
)
|
|
11366
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12020
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12021
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12022
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12023
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11367
12024
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11368
12025
|
else:
|
|
11369
12026
|
cred = credential.Credential(
|
|
@@ -11415,7 +12072,10 @@ def doCreateAssetImageRegistryScanTask(args, parsed_globals):
|
|
|
11415
12072
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11416
12073
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11417
12074
|
)
|
|
11418
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12075
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12076
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12077
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12078
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11419
12079
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11420
12080
|
else:
|
|
11421
12081
|
cred = credential.Credential(
|
|
@@ -11467,7 +12127,10 @@ def doModifySecLogKafkaUIN(args, parsed_globals):
|
|
|
11467
12127
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11468
12128
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11469
12129
|
)
|
|
11470
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12130
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12131
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12132
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12133
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11471
12134
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11472
12135
|
else:
|
|
11473
12136
|
cred = credential.Credential(
|
|
@@ -11519,7 +12182,10 @@ def doDescribeUnfinishRefreshTask(args, parsed_globals):
|
|
|
11519
12182
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11520
12183
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11521
12184
|
)
|
|
11522
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12185
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12186
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12187
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12188
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11523
12189
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11524
12190
|
else:
|
|
11525
12191
|
cred = credential.Credential(
|
|
@@ -11571,7 +12237,10 @@ def doModifySecLogJoinState(args, parsed_globals):
|
|
|
11571
12237
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11572
12238
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11573
12239
|
)
|
|
11574
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12240
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12241
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12242
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12243
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11575
12244
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11576
12245
|
else:
|
|
11577
12246
|
cred = credential.Credential(
|
|
@@ -11623,7 +12292,10 @@ def doDeleteCompliancePolicyAssetSetFromWhitelist(args, parsed_globals):
|
|
|
11623
12292
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11624
12293
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11625
12294
|
)
|
|
11626
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12295
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12296
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12297
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12298
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11627
12299
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11628
12300
|
else:
|
|
11629
12301
|
cred = credential.Credential(
|
|
@@ -11675,7 +12347,10 @@ def doScanComplianceScanFailedAssets(args, parsed_globals):
|
|
|
11675
12347
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11676
12348
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11677
12349
|
)
|
|
11678
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12350
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12351
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12352
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12353
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11679
12354
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11680
12355
|
else:
|
|
11681
12356
|
cred = credential.Credential(
|
|
@@ -11727,7 +12402,10 @@ def doDescribeAccessControlDetail(args, parsed_globals):
|
|
|
11727
12402
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11728
12403
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11729
12404
|
)
|
|
11730
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12405
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12406
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12407
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12408
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11731
12409
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11732
12410
|
else:
|
|
11733
12411
|
cred = credential.Credential(
|
|
@@ -11779,7 +12457,10 @@ def doDescribeAssetImageRegistryList(args, parsed_globals):
|
|
|
11779
12457
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11780
12458
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11781
12459
|
)
|
|
11782
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12460
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12461
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12462
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12463
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11783
12464
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11784
12465
|
else:
|
|
11785
12466
|
cred = credential.Credential(
|
|
@@ -11831,7 +12512,10 @@ def doDescribeAssetProcessList(args, parsed_globals):
|
|
|
11831
12512
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11832
12513
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11833
12514
|
)
|
|
11834
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12515
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12516
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12517
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12518
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11835
12519
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11836
12520
|
else:
|
|
11837
12521
|
cred = credential.Credential(
|
|
@@ -11883,7 +12567,10 @@ def doDescribeSecLogJoinObjectList(args, parsed_globals):
|
|
|
11883
12567
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11884
12568
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11885
12569
|
)
|
|
11886
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12570
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12571
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12572
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12573
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11887
12574
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11888
12575
|
else:
|
|
11889
12576
|
cred = credential.Credential(
|
|
@@ -11935,7 +12622,10 @@ def doDescribeK8sApiAbnormalTendency(args, parsed_globals):
|
|
|
11935
12622
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11936
12623
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11937
12624
|
)
|
|
11938
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12625
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12626
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12627
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12628
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11939
12629
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11940
12630
|
else:
|
|
11941
12631
|
cred = credential.Credential(
|
|
@@ -11987,7 +12677,10 @@ def doDescribeAbnormalProcessEvents(args, parsed_globals):
|
|
|
11987
12677
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
11988
12678
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
11989
12679
|
)
|
|
11990
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12680
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12681
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12682
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12683
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
11991
12684
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
11992
12685
|
else:
|
|
11993
12686
|
cred = credential.Credential(
|
|
@@ -12039,7 +12732,10 @@ def doUpdateAssetImageRegistryRegistryDetail(args, parsed_globals):
|
|
|
12039
12732
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12040
12733
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12041
12734
|
)
|
|
12042
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12735
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12736
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12737
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12738
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12043
12739
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12044
12740
|
else:
|
|
12045
12741
|
cred = credential.Credential(
|
|
@@ -12091,7 +12787,10 @@ def doDescribeProVersionInfo(args, parsed_globals):
|
|
|
12091
12787
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12092
12788
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12093
12789
|
)
|
|
12094
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12790
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12791
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12792
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12793
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12095
12794
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12096
12795
|
else:
|
|
12097
12796
|
cred = credential.Credential(
|
|
@@ -12143,7 +12842,10 @@ def doDescribeComplianceAssetPolicyItemList(args, parsed_globals):
|
|
|
12143
12842
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12144
12843
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12145
12844
|
)
|
|
12146
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12845
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12846
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12847
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12848
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12147
12849
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12148
12850
|
else:
|
|
12149
12851
|
cred = credential.Credential(
|
|
@@ -12195,7 +12897,10 @@ def doSetCheckMode(args, parsed_globals):
|
|
|
12195
12897
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12196
12898
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12197
12899
|
)
|
|
12198
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12900
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12901
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12902
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12903
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12199
12904
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12200
12905
|
else:
|
|
12201
12906
|
cred = credential.Credential(
|
|
@@ -12247,7 +12952,10 @@ def doModifyVirusFileStatus(args, parsed_globals):
|
|
|
12247
12952
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12248
12953
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12249
12954
|
)
|
|
12250
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
12955
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
12956
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
12957
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
12958
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12251
12959
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12252
12960
|
else:
|
|
12253
12961
|
cred = credential.Credential(
|
|
@@ -12299,7 +13007,10 @@ def doDescribeAssetSyncLastTime(args, parsed_globals):
|
|
|
12299
13007
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12300
13008
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12301
13009
|
)
|
|
12302
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13010
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13011
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13012
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13013
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12303
13014
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12304
13015
|
else:
|
|
12305
13016
|
cred = credential.Credential(
|
|
@@ -12351,7 +13062,10 @@ def doDescribeK8sApiAbnormalRuleInfo(args, parsed_globals):
|
|
|
12351
13062
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12352
13063
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12353
13064
|
)
|
|
12354
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13065
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13066
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13067
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13068
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12355
13069
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12356
13070
|
else:
|
|
12357
13071
|
cred = credential.Credential(
|
|
@@ -12403,7 +13117,10 @@ def doDescribeImageSimpleList(args, parsed_globals):
|
|
|
12403
13117
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12404
13118
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12405
13119
|
)
|
|
12406
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13120
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13121
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13122
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13123
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12407
13124
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12408
13125
|
else:
|
|
12409
13126
|
cred = credential.Credential(
|
|
@@ -12455,7 +13172,10 @@ def doCreateVirusScanTask(args, parsed_globals):
|
|
|
12455
13172
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12456
13173
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12457
13174
|
)
|
|
12458
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13175
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13176
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13177
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13178
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12459
13179
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12460
13180
|
else:
|
|
12461
13181
|
cred = credential.Credential(
|
|
@@ -12507,7 +13227,10 @@ def doDescribeVirusScanSetting(args, parsed_globals):
|
|
|
12507
13227
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12508
13228
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12509
13229
|
)
|
|
12510
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13230
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13231
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13232
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13233
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12511
13234
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12512
13235
|
else:
|
|
12513
13236
|
cred = credential.Credential(
|
|
@@ -12559,7 +13282,10 @@ def doDescribePromotionActivity(args, parsed_globals):
|
|
|
12559
13282
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12560
13283
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12561
13284
|
)
|
|
12562
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13285
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13286
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13287
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13288
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12563
13289
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12564
13290
|
else:
|
|
12565
13291
|
cred = credential.Credential(
|
|
@@ -12611,7 +13337,10 @@ def doDescribeComplianceAssetList(args, parsed_globals):
|
|
|
12611
13337
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12612
13338
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12613
13339
|
)
|
|
12614
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13340
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13341
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13342
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13343
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12615
13344
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12616
13345
|
else:
|
|
12617
13346
|
cred = credential.Credential(
|
|
@@ -12663,7 +13392,10 @@ def doDescribeCompliancePolicyItemAffectedAssetList(args, parsed_globals):
|
|
|
12663
13392
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12664
13393
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12665
13394
|
)
|
|
12666
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13395
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13396
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13397
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13398
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12667
13399
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12668
13400
|
else:
|
|
12669
13401
|
cred = credential.Credential(
|
|
@@ -12715,7 +13447,10 @@ def doDescribeLogStorageStatistic(args, parsed_globals):
|
|
|
12715
13447
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12716
13448
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12717
13449
|
)
|
|
12718
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13450
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13451
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13452
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13453
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12719
13454
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12720
13455
|
else:
|
|
12721
13456
|
cred = credential.Credential(
|
|
@@ -12767,7 +13502,10 @@ def doModifyAsset(args, parsed_globals):
|
|
|
12767
13502
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12768
13503
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12769
13504
|
)
|
|
12770
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13505
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13506
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13507
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13508
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12771
13509
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12772
13510
|
else:
|
|
12773
13511
|
cred = credential.Credential(
|
|
@@ -12819,7 +13557,10 @@ def doDescribeAccessControlRulesExport(args, parsed_globals):
|
|
|
12819
13557
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12820
13558
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12821
13559
|
)
|
|
12822
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13560
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13561
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13562
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13563
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12823
13564
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12824
13565
|
else:
|
|
12825
13566
|
cred = credential.Credential(
|
|
@@ -12871,7 +13612,10 @@ def doDeleteCompliancePolicyItemFromWhitelist(args, parsed_globals):
|
|
|
12871
13612
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12872
13613
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12873
13614
|
)
|
|
12874
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13615
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13616
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13617
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13618
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12875
13619
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12876
13620
|
else:
|
|
12877
13621
|
cred = credential.Credential(
|
|
@@ -12923,7 +13667,10 @@ def doModifyVirusAutoIsolateSetting(args, parsed_globals):
|
|
|
12923
13667
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12924
13668
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12925
13669
|
)
|
|
12926
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13670
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13671
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13672
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13673
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12927
13674
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12928
13675
|
else:
|
|
12929
13676
|
cred = credential.Credential(
|
|
@@ -12975,7 +13722,10 @@ def doDescribeSecLogKafkaUIN(args, parsed_globals):
|
|
|
12975
13722
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
12976
13723
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
12977
13724
|
)
|
|
12978
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13725
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13726
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13727
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13728
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
12979
13729
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
12980
13730
|
else:
|
|
12981
13731
|
cred = credential.Credential(
|
|
@@ -13027,7 +13777,10 @@ def doDescribeAbnormalProcessDetail(args, parsed_globals):
|
|
|
13027
13777
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13028
13778
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13029
13779
|
)
|
|
13030
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13780
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13781
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13782
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13783
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13031
13784
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13032
13785
|
else:
|
|
13033
13786
|
cred = credential.Credential(
|
|
@@ -13079,7 +13832,10 @@ def doDescribeWebVulList(args, parsed_globals):
|
|
|
13079
13832
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13080
13833
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13081
13834
|
)
|
|
13082
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13835
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13836
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13837
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13838
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13083
13839
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13084
13840
|
else:
|
|
13085
13841
|
cred = credential.Credential(
|
|
@@ -13131,7 +13887,10 @@ def doDescribeExportJobManageList(args, parsed_globals):
|
|
|
13131
13887
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13132
13888
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13133
13889
|
)
|
|
13134
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13890
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13891
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13892
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13893
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13135
13894
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13136
13895
|
else:
|
|
13137
13896
|
cred = credential.Credential(
|
|
@@ -13183,7 +13942,10 @@ def doConfirmNetworkFirewallPolicy(args, parsed_globals):
|
|
|
13183
13942
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13184
13943
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13185
13944
|
)
|
|
13186
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
13945
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
13946
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
13947
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
13948
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13187
13949
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13188
13950
|
else:
|
|
13189
13951
|
cred = credential.Credential(
|
|
@@ -13235,7 +13997,10 @@ def doDescribeAccessControlRuleDetail(args, parsed_globals):
|
|
|
13235
13997
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13236
13998
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13237
13999
|
)
|
|
13238
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14000
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14001
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14002
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14003
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13239
14004
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13240
14005
|
else:
|
|
13241
14006
|
cred = credential.Credential(
|
|
@@ -13287,7 +14052,10 @@ def doDescribeAffectedNodeList(args, parsed_globals):
|
|
|
13287
14052
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13288
14053
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13289
14054
|
)
|
|
13290
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14055
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14056
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14057
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14058
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13291
14059
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13292
14060
|
else:
|
|
13293
14061
|
cred = credential.Credential(
|
|
@@ -13339,7 +14107,10 @@ def doDescribeAssetImageHostList(args, parsed_globals):
|
|
|
13339
14107
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13340
14108
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13341
14109
|
)
|
|
13342
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14110
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14111
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14112
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14113
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13343
14114
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13344
14115
|
else:
|
|
13345
14116
|
cred = credential.Credential(
|
|
@@ -13391,7 +14162,10 @@ def doDescribeVirusEventTendency(args, parsed_globals):
|
|
|
13391
14162
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13392
14163
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13393
14164
|
)
|
|
13394
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14165
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14166
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14167
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14168
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13395
14169
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13396
14170
|
else:
|
|
13397
14171
|
cred = credential.Credential(
|
|
@@ -13443,7 +14217,10 @@ def doDescribeImageAutoAuthorizedLogList(args, parsed_globals):
|
|
|
13443
14217
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13444
14218
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13445
14219
|
)
|
|
13446
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14220
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14221
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14222
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14223
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13447
14224
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13448
14225
|
else:
|
|
13449
14226
|
cred = credential.Credential(
|
|
@@ -13495,7 +14272,10 @@ def doDescribeVirusScanTaskStatus(args, parsed_globals):
|
|
|
13495
14272
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13496
14273
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13497
14274
|
)
|
|
13498
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14275
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14276
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14277
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14278
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13499
14279
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13500
14280
|
else:
|
|
13501
14281
|
cred = credential.Credential(
|
|
@@ -13547,7 +14327,10 @@ def doDescribeAssetImageRiskListExport(args, parsed_globals):
|
|
|
13547
14327
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13548
14328
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13549
14329
|
)
|
|
13550
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14330
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14331
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14332
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14333
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13551
14334
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13552
14335
|
else:
|
|
13553
14336
|
cred = credential.Credential(
|
|
@@ -13599,7 +14382,10 @@ def doModifyReverseShellStatus(args, parsed_globals):
|
|
|
13599
14382
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13600
14383
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13601
14384
|
)
|
|
13602
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14385
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14386
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14387
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14388
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13603
14389
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13604
14390
|
else:
|
|
13605
14391
|
cred = credential.Credential(
|
|
@@ -13651,7 +14437,10 @@ def doDescribeUserCluster(args, parsed_globals):
|
|
|
13651
14437
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13652
14438
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13653
14439
|
)
|
|
13654
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14440
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14441
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14442
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14443
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13655
14444
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13656
14445
|
else:
|
|
13657
14446
|
cred = credential.Credential(
|
|
@@ -13703,7 +14492,10 @@ def doDescribeSecLogJoinTypeList(args, parsed_globals):
|
|
|
13703
14492
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13704
14493
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13705
14494
|
)
|
|
13706
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14495
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14496
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14497
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14498
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13707
14499
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13708
14500
|
else:
|
|
13709
14501
|
cred = credential.Credential(
|
|
@@ -13755,7 +14547,10 @@ def doDescribeVulIgnoreLocalImageList(args, parsed_globals):
|
|
|
13755
14547
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13756
14548
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13757
14549
|
)
|
|
13758
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14550
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14551
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14552
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14553
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13759
14554
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13760
14555
|
else:
|
|
13761
14556
|
cred = credential.Credential(
|
|
@@ -13807,7 +14602,10 @@ def doDescribeVulRegistryImageList(args, parsed_globals):
|
|
|
13807
14602
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13808
14603
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13809
14604
|
)
|
|
13810
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14605
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14606
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14607
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14608
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13811
14609
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13812
14610
|
else:
|
|
13813
14611
|
cred = credential.Credential(
|
|
@@ -13859,7 +14657,10 @@ def doDescribeVulLevelImageSummary(args, parsed_globals):
|
|
|
13859
14657
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13860
14658
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13861
14659
|
)
|
|
13862
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14660
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14661
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14662
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14663
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13863
14664
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13864
14665
|
else:
|
|
13865
14666
|
cred = credential.Credential(
|
|
@@ -13911,7 +14712,10 @@ def doModifySecLogCleanSettingInfo(args, parsed_globals):
|
|
|
13911
14712
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13912
14713
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13913
14714
|
)
|
|
13914
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14715
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14716
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14717
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14718
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13915
14719
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13916
14720
|
else:
|
|
13917
14721
|
cred = credential.Credential(
|
|
@@ -13963,7 +14767,10 @@ def doCreateVirusScanAgain(args, parsed_globals):
|
|
|
13963
14767
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
13964
14768
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
13965
14769
|
)
|
|
13966
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14770
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14771
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14772
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14773
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
13967
14774
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
13968
14775
|
else:
|
|
13969
14776
|
cred = credential.Credential(
|
|
@@ -14015,7 +14822,10 @@ def doDescribeAutoAuthorizedRuleHost(args, parsed_globals):
|
|
|
14015
14822
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14016
14823
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14017
14824
|
)
|
|
14018
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14825
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14826
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14827
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14828
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14019
14829
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14020
14830
|
else:
|
|
14021
14831
|
cred = credential.Credential(
|
|
@@ -14067,7 +14877,10 @@ def doDescribeRiskList(args, parsed_globals):
|
|
|
14067
14877
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14068
14878
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14069
14879
|
)
|
|
14070
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14880
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14881
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14882
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14883
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14071
14884
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14072
14885
|
else:
|
|
14073
14886
|
cred = credential.Credential(
|
|
@@ -14119,7 +14932,10 @@ def doDescribeVirusSampleDownloadUrl(args, parsed_globals):
|
|
|
14119
14932
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14120
14933
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14121
14934
|
)
|
|
14122
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14935
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14936
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14937
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14938
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14123
14939
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14124
14940
|
else:
|
|
14125
14941
|
cred = credential.Credential(
|
|
@@ -14171,7 +14987,10 @@ def doDescribeESHits(args, parsed_globals):
|
|
|
14171
14987
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14172
14988
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14173
14989
|
)
|
|
14174
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
14990
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
14991
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
14992
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
14993
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14175
14994
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14176
14995
|
else:
|
|
14177
14996
|
cred = credential.Credential(
|
|
@@ -14223,7 +15042,10 @@ def doAddAndPublishNetworkFirewallPolicyYamlDetail(args, parsed_globals):
|
|
|
14223
15042
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14224
15043
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14225
15044
|
)
|
|
14226
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15045
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15046
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15047
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15048
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14227
15049
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14228
15050
|
else:
|
|
14229
15051
|
cred = credential.Credential(
|
|
@@ -14275,7 +15097,10 @@ def doDescribeUnauthorizedCoresTendency(args, parsed_globals):
|
|
|
14275
15097
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14276
15098
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14277
15099
|
)
|
|
14278
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15100
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15101
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15102
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15103
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14279
15104
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14280
15105
|
else:
|
|
14281
15106
|
cred = credential.Credential(
|
|
@@ -14327,7 +15152,10 @@ def doCreateEscapeEventsExportJob(args, parsed_globals):
|
|
|
14327
15152
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14328
15153
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14329
15154
|
)
|
|
14330
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15155
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15156
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15157
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15158
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14331
15159
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14332
15160
|
else:
|
|
14333
15161
|
cred = credential.Credential(
|
|
@@ -14379,7 +15207,10 @@ def doDescribeAssetImageVulList(args, parsed_globals):
|
|
|
14379
15207
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14380
15208
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14381
15209
|
)
|
|
14382
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15210
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15211
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15212
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15213
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14383
15214
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14384
15215
|
else:
|
|
14385
15216
|
cred = credential.Credential(
|
|
@@ -14431,7 +15262,10 @@ def doDescribeVulTopRanking(args, parsed_globals):
|
|
|
14431
15262
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14432
15263
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14433
15264
|
)
|
|
14434
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15265
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15266
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15267
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15268
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14435
15269
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14436
15270
|
else:
|
|
14437
15271
|
cred = credential.Credential(
|
|
@@ -14483,7 +15317,10 @@ def doDescribeWarningRules(args, parsed_globals):
|
|
|
14483
15317
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14484
15318
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14485
15319
|
)
|
|
14486
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15320
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15321
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15322
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15323
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14487
15324
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14488
15325
|
else:
|
|
14489
15326
|
cred = credential.Credential(
|
|
@@ -14535,7 +15372,10 @@ def doDescribeVulScanAuthorizedImageSummary(args, parsed_globals):
|
|
|
14535
15372
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14536
15373
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14537
15374
|
)
|
|
14538
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15375
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15376
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15377
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15378
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14539
15379
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14540
15380
|
else:
|
|
14541
15381
|
cred = credential.Credential(
|
|
@@ -14587,7 +15427,10 @@ def doAddCompliancePolicyItemToWhitelist(args, parsed_globals):
|
|
|
14587
15427
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14588
15428
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14589
15429
|
)
|
|
14590
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15430
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15431
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15432
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15433
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14591
15434
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14592
15435
|
else:
|
|
14593
15436
|
cred = credential.Credential(
|
|
@@ -14639,7 +15482,10 @@ def doInitializeUserComplianceEnvironment(args, parsed_globals):
|
|
|
14639
15482
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14640
15483
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14641
15484
|
)
|
|
14642
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15485
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15486
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15487
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15488
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14643
15489
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14644
15490
|
else:
|
|
14645
15491
|
cred = credential.Credential(
|
|
@@ -14691,7 +15537,10 @@ def doCreateOrModifyPostPayCores(args, parsed_globals):
|
|
|
14691
15537
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14692
15538
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14693
15539
|
)
|
|
14694
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15540
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15541
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15542
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15543
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14695
15544
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14696
15545
|
else:
|
|
14697
15546
|
cred = credential.Credential(
|
|
@@ -14743,7 +15592,10 @@ def doModifyCompliancePeriodTask(args, parsed_globals):
|
|
|
14743
15592
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14744
15593
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14745
15594
|
)
|
|
14746
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15595
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15596
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15597
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15598
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14747
15599
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14748
15600
|
else:
|
|
14749
15601
|
cred = credential.Credential(
|
|
@@ -14795,7 +15647,10 @@ def doDescribeAssetImageRegistrySummary(args, parsed_globals):
|
|
|
14795
15647
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14796
15648
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14797
15649
|
)
|
|
14798
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15650
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15651
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15652
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15653
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14799
15654
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14800
15655
|
else:
|
|
14801
15656
|
cred = credential.Credential(
|
|
@@ -14847,7 +15702,10 @@ def doOpenTcssTrial(args, parsed_globals):
|
|
|
14847
15702
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14848
15703
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14849
15704
|
)
|
|
14850
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15705
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15706
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15707
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15708
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14851
15709
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14852
15710
|
else:
|
|
14853
15711
|
cred = credential.Credential(
|
|
@@ -14899,7 +15757,10 @@ def doDescribeRiskSyscallNames(args, parsed_globals):
|
|
|
14899
15757
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14900
15758
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14901
15759
|
)
|
|
14902
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15760
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15761
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15762
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15763
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14903
15764
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14904
15765
|
else:
|
|
14905
15766
|
cred = credential.Credential(
|
|
@@ -14951,7 +15812,10 @@ def doScanComplianceAssetsByPolicyItem(args, parsed_globals):
|
|
|
14951
15812
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
14952
15813
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
14953
15814
|
)
|
|
14954
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15815
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15816
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15817
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15818
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
14955
15819
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
14956
15820
|
else:
|
|
14957
15821
|
cred = credential.Credential(
|
|
@@ -15003,7 +15867,10 @@ def doDescribeImageAuthorizedInfo(args, parsed_globals):
|
|
|
15003
15867
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15004
15868
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15005
15869
|
)
|
|
15006
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15870
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15871
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15872
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15873
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15007
15874
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15008
15875
|
else:
|
|
15009
15876
|
cred = credential.Credential(
|
|
@@ -15055,7 +15922,10 @@ def doDescribeRiskSyscallEvents(args, parsed_globals):
|
|
|
15055
15922
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15056
15923
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15057
15924
|
)
|
|
15058
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15925
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15926
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15927
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15928
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15059
15929
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15060
15930
|
else:
|
|
15061
15931
|
cred = credential.Credential(
|
|
@@ -15107,7 +15977,10 @@ def doCreateNetworkFirewallUndoPublish(args, parsed_globals):
|
|
|
15107
15977
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15108
15978
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15109
15979
|
)
|
|
15110
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
15980
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
15981
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
15982
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
15983
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15111
15984
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15112
15985
|
else:
|
|
15113
15986
|
cred = credential.Credential(
|
|
@@ -15159,7 +16032,10 @@ def doModifyAbnormalProcessRuleStatus(args, parsed_globals):
|
|
|
15159
16032
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15160
16033
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15161
16034
|
)
|
|
15162
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16035
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16036
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16037
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16038
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15163
16039
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15164
16040
|
else:
|
|
15165
16041
|
cred = credential.Credential(
|
|
@@ -15211,7 +16087,10 @@ def doDescribeABTestConfig(args, parsed_globals):
|
|
|
15211
16087
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15212
16088
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15213
16089
|
)
|
|
15214
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16090
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16091
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16092
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16093
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15215
16094
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15216
16095
|
else:
|
|
15217
16096
|
cred = credential.Credential(
|
|
@@ -15263,7 +16142,10 @@ def doDescribeVulTendency(args, parsed_globals):
|
|
|
15263
16142
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15264
16143
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15265
16144
|
)
|
|
15266
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16145
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16146
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16147
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16148
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15267
16149
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15268
16150
|
else:
|
|
15269
16151
|
cred = credential.Credential(
|
|
@@ -15315,7 +16197,10 @@ def doDescribeReverseShellWhiteListDetail(args, parsed_globals):
|
|
|
15315
16197
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15316
16198
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15317
16199
|
)
|
|
15318
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16200
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16201
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16202
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16203
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15319
16204
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15320
16205
|
else:
|
|
15321
16206
|
cred = credential.Credential(
|
|
@@ -15367,7 +16252,10 @@ def doCreateAssetImageScanSetting(args, parsed_globals):
|
|
|
15367
16252
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15368
16253
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15369
16254
|
)
|
|
15370
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16255
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16256
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16257
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16258
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15371
16259
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15372
16260
|
else:
|
|
15373
16261
|
cred = credential.Credential(
|
|
@@ -15419,7 +16307,10 @@ def doDescribeAssetImageVirusList(args, parsed_globals):
|
|
|
15419
16307
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15420
16308
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15421
16309
|
)
|
|
15422
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16310
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16311
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16312
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16313
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15423
16314
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15424
16315
|
else:
|
|
15425
16316
|
cred = credential.Credential(
|
|
@@ -15471,7 +16362,10 @@ def doDescribeSecEventsTendency(args, parsed_globals):
|
|
|
15471
16362
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15472
16363
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15473
16364
|
)
|
|
15474
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16365
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16366
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16367
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16368
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15475
16369
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15476
16370
|
else:
|
|
15477
16371
|
cred = credential.Credential(
|
|
@@ -15523,7 +16417,10 @@ def doCreateK8sApiAbnormalRuleInfo(args, parsed_globals):
|
|
|
15523
16417
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15524
16418
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15525
16419
|
)
|
|
15526
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16420
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16421
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16422
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16423
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15527
16424
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15528
16425
|
else:
|
|
15529
16426
|
cred = credential.Credential(
|
|
@@ -15575,7 +16472,10 @@ def doDescribeVulDefenceEvent(args, parsed_globals):
|
|
|
15575
16472
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15576
16473
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15577
16474
|
)
|
|
15578
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16475
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16476
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16477
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16478
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15579
16479
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15580
16480
|
else:
|
|
15581
16481
|
cred = credential.Credential(
|
|
@@ -15627,7 +16527,10 @@ def doDescribeSecLogDeliveryKafkaSetting(args, parsed_globals):
|
|
|
15627
16527
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15628
16528
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15629
16529
|
)
|
|
15630
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16530
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16531
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16532
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16533
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15631
16534
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15632
16535
|
else:
|
|
15633
16536
|
cred = credential.Credential(
|
|
@@ -15679,7 +16582,10 @@ def doDescribeInspectionReport(args, parsed_globals):
|
|
|
15679
16582
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15680
16583
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15681
16584
|
)
|
|
15682
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16585
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16586
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16587
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16588
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15683
16589
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15684
16590
|
else:
|
|
15685
16591
|
cred = credential.Credential(
|
|
@@ -15731,7 +16637,10 @@ def doDeleteNetworkFirewallPolicyDetail(args, parsed_globals):
|
|
|
15731
16637
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15732
16638
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15733
16639
|
)
|
|
15734
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16640
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16641
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16642
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16643
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15735
16644
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15736
16645
|
else:
|
|
15737
16646
|
cred = credential.Credential(
|
|
@@ -15783,7 +16692,10 @@ def doCreateHostExportJob(args, parsed_globals):
|
|
|
15783
16692
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15784
16693
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15785
16694
|
)
|
|
15786
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16695
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16696
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16697
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16698
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15787
16699
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15788
16700
|
else:
|
|
15789
16701
|
cred = credential.Credential(
|
|
@@ -15835,7 +16747,10 @@ def doDescribeSearchTemplates(args, parsed_globals):
|
|
|
15835
16747
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15836
16748
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15837
16749
|
)
|
|
15838
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16750
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16751
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16752
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16753
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15839
16754
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15840
16755
|
else:
|
|
15841
16756
|
cred = credential.Credential(
|
|
@@ -15887,7 +16802,10 @@ def doDescribeImageComponentList(args, parsed_globals):
|
|
|
15887
16802
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15888
16803
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15889
16804
|
)
|
|
15890
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16805
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16806
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16807
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16808
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15891
16809
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15892
16810
|
else:
|
|
15893
16811
|
cred = credential.Credential(
|
|
@@ -15939,7 +16857,10 @@ def doCheckRepeatAssetImageRegistry(args, parsed_globals):
|
|
|
15939
16857
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15940
16858
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15941
16859
|
)
|
|
15942
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16860
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16861
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16862
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16863
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15943
16864
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15944
16865
|
else:
|
|
15945
16866
|
cred = credential.Credential(
|
|
@@ -15991,7 +16912,10 @@ def doAddNetworkFirewallPolicyDetail(args, parsed_globals):
|
|
|
15991
16912
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
15992
16913
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
15993
16914
|
)
|
|
15994
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16915
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16916
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16917
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16918
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
15995
16919
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
15996
16920
|
else:
|
|
15997
16921
|
cred = credential.Credential(
|
|
@@ -16043,7 +16967,10 @@ def doModifyVulDefenceEventStatus(args, parsed_globals):
|
|
|
16043
16967
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16044
16968
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16045
16969
|
)
|
|
16046
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
16970
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
16971
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
16972
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
16973
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16047
16974
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16048
16975
|
else:
|
|
16049
16976
|
cred = credential.Credential(
|
|
@@ -16095,7 +17022,10 @@ def doAddEditAbnormalProcessRule(args, parsed_globals):
|
|
|
16095
17022
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16096
17023
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16097
17024
|
)
|
|
16098
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17025
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17026
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17027
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17028
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16099
17029
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16100
17030
|
else:
|
|
16101
17031
|
cred = credential.Credential(
|
|
@@ -16147,7 +17077,10 @@ def doDescribeVulContainerList(args, parsed_globals):
|
|
|
16147
17077
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16148
17078
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16149
17079
|
)
|
|
16150
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17080
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17081
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17082
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17083
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16151
17084
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16152
17085
|
else:
|
|
16153
17086
|
cred = credential.Credential(
|
|
@@ -16199,7 +17132,10 @@ def doDescribeVulDefenceSetting(args, parsed_globals):
|
|
|
16199
17132
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16200
17133
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16201
17134
|
)
|
|
16202
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17135
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17136
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17137
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17138
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16203
17139
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16204
17140
|
else:
|
|
16205
17141
|
cred = credential.Credential(
|
|
@@ -16251,7 +17187,10 @@ def doExportVirusList(args, parsed_globals):
|
|
|
16251
17187
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16252
17188
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16253
17189
|
)
|
|
16254
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17190
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17191
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17192
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17193
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16255
17194
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16256
17195
|
else:
|
|
16257
17196
|
cred = credential.Credential(
|
|
@@ -16303,7 +17242,10 @@ def doDescribeNetworkFirewallPolicyDetail(args, parsed_globals):
|
|
|
16303
17242
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16304
17243
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16305
17244
|
)
|
|
16306
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17245
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17246
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17247
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17248
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16307
17249
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16308
17250
|
else:
|
|
16309
17251
|
cred = credential.Credential(
|
|
@@ -16355,7 +17297,10 @@ def doDescribeAssetImageRegistryVulListExport(args, parsed_globals):
|
|
|
16355
17297
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16356
17298
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16357
17299
|
)
|
|
16358
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17300
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17301
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17302
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17303
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16359
17304
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16360
17305
|
else:
|
|
16361
17306
|
cred = credential.Credential(
|
|
@@ -16407,7 +17352,10 @@ def doRenewImageAuthorizeState(args, parsed_globals):
|
|
|
16407
17352
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16408
17353
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16409
17354
|
)
|
|
16410
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17355
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17356
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17357
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17358
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16411
17359
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16412
17360
|
else:
|
|
16413
17361
|
cred = credential.Credential(
|
|
@@ -16459,7 +17407,10 @@ def doDescribeRiskSyscallWhiteLists(args, parsed_globals):
|
|
|
16459
17407
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16460
17408
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16461
17409
|
)
|
|
16462
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17410
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17411
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17412
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17413
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16463
17414
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16464
17415
|
else:
|
|
16465
17416
|
cred = credential.Credential(
|
|
@@ -16511,7 +17462,10 @@ def doDescribeAssetImageRegistryVulList(args, parsed_globals):
|
|
|
16511
17462
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16512
17463
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16513
17464
|
)
|
|
16514
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17465
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17466
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17467
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17468
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16515
17469
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16516
17470
|
else:
|
|
16517
17471
|
cred = credential.Credential(
|
|
@@ -16563,7 +17517,10 @@ def doDescribeEscapeEventTypeSummary(args, parsed_globals):
|
|
|
16563
17517
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16564
17518
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16565
17519
|
)
|
|
16566
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17520
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17521
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17522
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17523
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16567
17524
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16568
17525
|
else:
|
|
16569
17526
|
cred = credential.Credential(
|
|
@@ -16615,7 +17572,10 @@ def doDescribeVirusAutoIsolateSampleList(args, parsed_globals):
|
|
|
16615
17572
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16616
17573
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16617
17574
|
)
|
|
16618
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17575
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17576
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17577
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17578
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16619
17579
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16620
17580
|
else:
|
|
16621
17581
|
cred = credential.Credential(
|
|
@@ -16667,7 +17627,10 @@ def doDescribeSecLogAlertMsg(args, parsed_globals):
|
|
|
16667
17627
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16668
17628
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16669
17629
|
)
|
|
16670
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17630
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17631
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17632
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17633
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16671
17634
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16672
17635
|
else:
|
|
16673
17636
|
cred = credential.Credential(
|
|
@@ -16719,7 +17682,10 @@ def doModifyK8sApiAbnormalRuleStatus(args, parsed_globals):
|
|
|
16719
17682
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16720
17683
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16721
17684
|
)
|
|
16722
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17685
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17686
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17687
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17688
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16723
17689
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16724
17690
|
else:
|
|
16725
17691
|
cred = credential.Credential(
|
|
@@ -16771,7 +17737,10 @@ def doDescribeVulSummary(args, parsed_globals):
|
|
|
16771
17737
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16772
17738
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16773
17739
|
)
|
|
16774
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17740
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17741
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17742
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17743
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16775
17744
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16776
17745
|
else:
|
|
16777
17746
|
cred = credential.Credential(
|
|
@@ -16823,7 +17792,10 @@ def doDescribeAssetImageDetail(args, parsed_globals):
|
|
|
16823
17792
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16824
17793
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16825
17794
|
)
|
|
16826
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17795
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17796
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17797
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17798
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16827
17799
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16828
17800
|
else:
|
|
16829
17801
|
cred = credential.Credential(
|
|
@@ -16875,7 +17847,10 @@ def doDeleteReverseShellWhiteLists(args, parsed_globals):
|
|
|
16875
17847
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16876
17848
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16877
17849
|
)
|
|
16878
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17850
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17851
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17852
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17853
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16879
17854
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16880
17855
|
else:
|
|
16881
17856
|
cred = credential.Credential(
|
|
@@ -16927,7 +17902,10 @@ def doDescribeK8sApiAbnormalEventInfo(args, parsed_globals):
|
|
|
16927
17902
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16928
17903
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16929
17904
|
)
|
|
16930
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17905
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17906
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17907
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17908
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16931
17909
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16932
17910
|
else:
|
|
16933
17911
|
cred = credential.Credential(
|
|
@@ -16979,7 +17957,10 @@ def doDescribeK8sApiAbnormalRuleList(args, parsed_globals):
|
|
|
16979
17957
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
16980
17958
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
16981
17959
|
)
|
|
16982
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
17960
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
17961
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
17962
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
17963
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
16983
17964
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
16984
17965
|
else:
|
|
16985
17966
|
cred = credential.Credential(
|
|
@@ -17031,7 +18012,10 @@ def doCreateAccessControlsRuleExportJob(args, parsed_globals):
|
|
|
17031
18012
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
17032
18013
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
17033
18014
|
)
|
|
17034
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
18015
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
18016
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
18017
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
18018
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
17035
18019
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
17036
18020
|
else:
|
|
17037
18021
|
cred = credential.Credential(
|
|
@@ -17083,7 +18067,10 @@ def doUpdateNetworkFirewallPolicyYamlDetail(args, parsed_globals):
|
|
|
17083
18067
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
17084
18068
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
17085
18069
|
)
|
|
17086
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
18070
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
18071
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
18072
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
18073
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
17087
18074
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
17088
18075
|
else:
|
|
17089
18076
|
cred = credential.Credential(
|
|
@@ -17135,7 +18122,10 @@ def doAddEditRiskSyscallWhiteList(args, parsed_globals):
|
|
|
17135
18122
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
17136
18123
|
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
17137
18124
|
)
|
|
17138
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION)
|
|
18125
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
18126
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
18127
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
18128
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
17139
18129
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
17140
18130
|
else:
|
|
17141
18131
|
cred = credential.Credential(
|