tccli 3.0.1036.1__py2.py3-none-any.whl → 3.0.1037.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/examples/cdc/v20201214/DescribeDedicatedClusterHosts.md +2 -0
- tccli/examples/cdc/v20201214/DescribeDedicatedClusterOverview.md +59 -7
- tccli/examples/cdwch/v20200915/DescribeInstanceNodes.md +41 -0
- tccli/examples/cdwch/v20200915/DescribeSpec.md +27 -20
- tccli/examples/cwp/v20180228/CreateMalwareWhiteList.md +10 -4
- tccli/examples/cwp/v20180228/DescribeMachineFileTamperRules.md +9 -8
- tccli/examples/cwp/v20180228/ModifyLoginWhiteRecord.md +11 -10
- tccli/examples/hai/v20230812/DescribeApplications.md +6 -2
- tccli/examples/mrs/v20200910/ImageMaskAsync.md +25 -0
- tccli/examples/mrs/v20200910/ImageMaskAsyncGetResult.md +21 -0
- tccli/examples/tcss/v20201101/DescribeAssetSuperNodeList.md +41 -0
- tccli/examples/tcss/v20201101/DescribeClusterNodes.md +42 -0
- tccli/examples/tcss/v20201101/DescribeSuperNodePodList.md +41 -0
- tccli/examples/tcss/v20201101/DescribeUserPodList.md +56 -0
- tccli/services/aa/aa_client.py +2 -1
- tccli/services/aai/aai_client.py +5 -4
- tccli/services/acp/acp_client.py +9 -8
- tccli/services/advisor/advisor_client.py +3 -2
- tccli/services/af/af_client.py +4 -3
- tccli/services/afc/afc_client.py +4 -3
- tccli/services/aiart/aiart_client.py +3 -2
- tccli/services/aiart/v20221229/api.json +3 -3
- tccli/services/ame/ame_client.py +32 -31
- tccli/services/ams/ams_client.py +10 -9
- tccli/services/anicloud/anicloud_client.py +4 -3
- tccli/services/antiddos/antiddos_client.py +96 -95
- tccli/services/apcas/apcas_client.py +8 -7
- tccli/services/ape/ape_client.py +9 -8
- tccli/services/api/api_client.py +4 -3
- tccli/services/apigateway/apigateway_client.py +97 -96
- tccli/services/apm/apm_client.py +10 -9
- tccli/services/asr/asr_client.py +26 -25
- tccli/services/asw/asw_client.py +10 -9
- tccli/services/autoscaling/autoscaling_client.py +58 -57
- tccli/services/ba/ba_client.py +4 -3
- tccli/services/batch/batch_client.py +32 -31
- tccli/services/bda/bda_client.py +19 -18
- tccli/services/bi/bi_client.py +23 -22
- tccli/services/billing/billing_client.py +33 -32
- tccli/services/bizlive/bizlive_client.py +7 -6
- tccli/services/bm/bm_client.py +54 -53
- tccli/services/bma/bma_client.py +38 -37
- tccli/services/bmeip/bmeip_client.py +21 -20
- tccli/services/bmlb/bmlb_client.py +50 -49
- tccli/services/bmvpc/bmvpc_client.py +62 -61
- tccli/services/bpaas/bpaas_client.py +3 -2
- tccli/services/bri/bri_client.py +2 -1
- tccli/services/bsca/bsca_client.py +8 -7
- tccli/services/btoe/btoe_client.py +15 -14
- tccli/services/cam/cam_client.py +88 -87
- tccli/services/captcha/captcha_client.py +19 -18
- tccli/services/car/car_client.py +7 -6
- tccli/services/cat/cat_client.py +13 -12
- tccli/services/cbs/cbs_client.py +42 -41
- tccli/services/ccc/ccc_client.py +42 -41
- tccli/services/cdb/cdb_client.py +159 -158
- tccli/services/cdc/cdc_client.py +21 -20
- tccli/services/cdc/v20201214/api.json +110 -24
- tccli/services/cdc/v20201214/examples.json +2 -2
- tccli/services/cdn/cdn_client.py +82 -81
- tccli/services/cdn/v20180606/api.json +10 -1
- tccli/services/cds/cds_client.py +7 -6
- tccli/services/cdwch/cdwch_client.py +109 -55
- tccli/services/cdwch/v20200915/api.json +253 -3
- tccli/services/cdwch/v20200915/examples.json +10 -2
- tccli/services/cdwdoris/cdwdoris_client.py +18 -17
- tccli/services/cdwpg/cdwpg_client.py +9 -8
- tccli/services/cfg/cfg_client.py +13 -12
- tccli/services/cfs/cfs_client.py +44 -43
- tccli/services/cfw/cfw_client.py +112 -111
- tccli/services/chdfs/chdfs_client.py +30 -29
- tccli/services/ciam/ciam_client.py +24 -23
- tccli/services/cii/cii_client.py +14 -13
- tccli/services/cim/cim_client.py +2 -1
- tccli/services/cis/cis_client.py +8 -7
- tccli/services/ckafka/ckafka_client.py +82 -81
- tccli/services/clb/clb_client.py +86 -85
- tccli/services/cloudaudit/cloudaudit_client.py +20 -19
- tccli/services/cloudhsm/cloudhsm_client.py +15 -14
- tccli/services/cloudstudio/cloudstudio_client.py +10 -9
- tccli/services/cls/cls_client.py +90 -89
- tccli/services/cme/cme_client.py +51 -50
- tccli/services/cmq/cmq_client.py +18 -17
- tccli/services/cms/cms_client.py +7 -6
- tccli/services/config/config_client.py +4 -3
- tccli/services/cpdp/cpdp_client.py +220 -219
- tccli/services/cr/cr_client.py +29 -28
- tccli/services/csip/csip_client.py +35 -34
- tccli/services/csxg/csxg_client.py +6 -5
- tccli/services/cvm/cvm_client.py +95 -94
- tccli/services/cwp/cwp_client.py +519 -518
- tccli/services/cwp/v20180228/api.json +17 -16
- tccli/services/cwp/v20180228/examples.json +5 -5
- tccli/services/cws/cws_client.py +20 -19
- tccli/services/cynosdb/cynosdb_client.py +131 -130
- tccli/services/dasb/dasb_client.py +56 -55
- tccli/services/dataintegration/dataintegration_client.py +2 -1
- tccli/services/dayu/dayu_client.py +113 -112
- tccli/services/dbbrain/dbbrain_client.py +62 -61
- tccli/services/dbdc/dbdc_client.py +7 -6
- tccli/services/dc/dc_client.py +22 -21
- tccli/services/dcdb/dcdb_client.py +74 -73
- tccli/services/dlc/dlc_client.py +124 -123
- tccli/services/dnspod/dnspod_client.py +73 -72
- tccli/services/domain/domain_client.py +34 -33
- tccli/services/drm/drm_client.py +12 -11
- tccli/services/ds/ds_client.py +13 -12
- tccli/services/dsgc/dsgc_client.py +149 -148
- tccli/services/dtf/dtf_client.py +2 -1
- tccli/services/dts/dts_client.py +69 -68
- tccli/services/dts/v20211206/api.json +1 -0
- tccli/services/eb/eb_client.py +33 -32
- tccli/services/ecc/ecc_client.py +5 -4
- tccli/services/ecdn/ecdn_client.py +17 -16
- tccli/services/ecm/ecm_client.py +140 -139
- tccli/services/eiam/eiam_client.py +43 -42
- tccli/services/eis/eis_client.py +9 -8
- tccli/services/emr/emr_client.py +36 -35
- tccli/services/es/es_client.py +43 -42
- tccli/services/ess/ess_client.py +72 -71
- tccli/services/ess/v20201111/api.json +2 -2
- tccli/services/essbasic/essbasic_client.py +123 -122
- tccli/services/essbasic/v20210526/api.json +11 -11
- tccli/services/facefusion/facefusion_client.py +5 -4
- tccli/services/faceid/faceid_client.py +36 -35
- tccli/services/fmu/fmu_client.py +11 -10
- tccli/services/ft/ft_client.py +7 -6
- tccli/services/gaap/gaap_client.py +104 -103
- tccli/services/gme/gme_client.py +29 -28
- tccli/services/goosefs/goosefs_client.py +21 -20
- tccli/services/gpm/gpm_client.py +19 -18
- tccli/services/gs/gs_client.py +9 -8
- tccli/services/gse/gse_client.py +75 -74
- tccli/services/habo/habo_client.py +3 -2
- tccli/services/hai/hai_client.py +12 -11
- tccli/services/hai/v20230812/api.json +59 -1
- tccli/services/hai/v20230812/examples.json +1 -1
- tccli/services/hasim/hasim_client.py +23 -22
- tccli/services/hcm/hcm_client.py +2 -1
- tccli/services/hunyuan/hunyuan_client.py +4 -3
- tccli/services/iai/iai_client.py +36 -35
- tccli/services/ic/ic_client.py +10 -9
- tccli/services/icr/icr_client.py +2 -1
- tccli/services/ie/ie_client.py +11 -10
- tccli/services/iecp/iecp_client.py +103 -102
- tccli/services/iir/iir_client.py +2 -1
- tccli/services/ims/ims_client.py +3 -2
- tccli/services/ioa/ioa_client.py +2 -1
- tccli/services/iot/iot_client.py +46 -45
- tccli/services/iotcloud/iotcloud_client.py +86 -85
- tccli/services/iotexplorer/iotexplorer_client.py +93 -92
- tccli/services/iottid/iottid_client.py +10 -9
- tccli/services/iotvideo/iotvideo_client.py +158 -157
- tccli/services/iotvideoindustry/iotvideoindustry_client.py +105 -104
- tccli/services/irp/irp_client.py +12 -11
- tccli/services/iss/iss_client.py +83 -82
- tccli/services/ivld/ivld_client.py +26 -25
- tccli/services/keewidb/keewidb_client.py +39 -38
- tccli/services/kms/kms_client.py +54 -53
- tccli/services/lcic/lcic_client.py +61 -60
- tccli/services/lighthouse/lighthouse_client.py +108 -107
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/live/live_client.py +154 -153
- tccli/services/lowcode/lowcode_client.py +2 -1
- tccli/services/lp/lp_client.py +2 -1
- tccli/services/mall/mall_client.py +2 -1
- tccli/services/mariadb/mariadb_client.py +73 -72
- tccli/services/market/market_client.py +3 -2
- tccli/services/memcached/memcached_client.py +2 -1
- tccli/services/mgobe/mgobe_client.py +8 -7
- tccli/services/mmps/mmps_client.py +16 -15
- tccli/services/mna/mna_client.py +24 -23
- tccli/services/mongodb/mongodb_client.py +43 -42
- tccli/services/monitor/monitor_client.py +151 -150
- tccli/services/mps/mps_client.py +101 -100
- tccli/services/mrs/mrs_client.py +115 -8
- tccli/services/mrs/v20200910/api.json +97 -0
- tccli/services/mrs/v20200910/examples.json +16 -0
- tccli/services/ms/ms_client.py +24 -23
- tccli/services/msp/msp_client.py +8 -7
- tccli/services/mvj/mvj_client.py +2 -1
- tccli/services/nlp/nlp_client.py +13 -12
- tccli/services/npp/npp_client.py +9 -8
- tccli/services/oceanus/oceanus_client.py +39 -38
- tccli/services/oceanus/v20190422/api.json +4 -4
- tccli/services/ocr/ocr_client.py +82 -81
- tccli/services/omics/omics_client.py +16 -15
- tccli/services/organization/organization_client.py +48 -47
- tccli/services/partners/partners_client.py +20 -19
- tccli/services/pds/pds_client.py +3 -2
- tccli/services/postgres/postgres_client.py +91 -90
- tccli/services/privatedns/privatedns_client.py +26 -25
- tccli/services/pts/pts_client.py +45 -44
- tccli/services/rce/rce_client.py +4 -3
- tccli/services/redis/redis_client.py +96 -95
- tccli/services/region/region_client.py +4 -3
- tccli/services/rkp/rkp_client.py +4 -3
- tccli/services/rp/rp_client.py +2 -1
- tccli/services/rum/rum_client.py +66 -65
- tccli/services/scf/scf_client.py +47 -46
- tccli/services/ses/ses_client.py +28 -27
- tccli/services/smh/smh_client.py +11 -10
- tccli/services/smop/smop_client.py +2 -1
- tccli/services/smpn/smpn_client.py +6 -5
- tccli/services/sms/sms_client.py +19 -18
- tccli/services/soe/soe_client.py +5 -4
- tccli/services/solar/solar_client.py +18 -17
- tccli/services/sqlserver/sqlserver_client.py +145 -144
- tccli/services/ssa/ssa_client.py +24 -23
- tccli/services/ssl/ssl_client.py +58 -57
- tccli/services/sslpod/sslpod_client.py +11 -10
- tccli/services/ssm/ssm_client.py +25 -24
- tccli/services/sts/sts_client.py +7 -6
- tccli/services/taf/taf_client.py +4 -3
- tccli/services/tag/tag_client.py +32 -31
- tccli/services/tan/tan_client.py +2 -1
- tccli/services/tat/tat_client.py +29 -28
- tccli/services/tav/tav_client.py +5 -4
- tccli/services/tbaas/tbaas_client.py +26 -25
- tccli/services/tbm/tbm_client.py +10 -9
- tccli/services/tbp/tbp_client.py +5 -4
- tccli/services/tcaplusdb/tcaplusdb_client.py +54 -53
- tccli/services/tcb/tcb_client.py +90 -89
- tccli/services/tcbr/tcbr_client.py +11 -10
- tccli/services/tcex/tcex_client.py +3 -2
- tccli/services/tchd/tchd_client.py +2 -1
- tccli/services/tci/tci_client.py +42 -41
- tccli/services/tcm/tcm_client.py +13 -12
- tccli/services/tcr/tcr_client.py +110 -109
- tccli/services/tcss/tcss_client.py +558 -345
- tccli/services/tcss/v20201101/api.json +1200 -0
- tccli/services/tcss/v20201101/examples.json +32 -0
- tccli/services/tdcpg/tdcpg_client.py +26 -25
- tccli/services/tdid/tdid_client.py +14 -13
- tccli/services/tdmq/tdmq_client.py +128 -127
- tccli/services/tds/tds_client.py +5 -4
- tccli/services/tem/tem_client.py +61 -60
- tccli/services/teo/teo_client.py +79 -78
- tccli/services/thpc/thpc_client.py +19 -18
- tccli/services/tia/tia_client.py +11 -10
- tccli/services/tic/tic_client.py +14 -13
- tccli/services/ticm/ticm_client.py +4 -3
- tccli/services/tics/tics_client.py +5 -4
- tccli/services/tiems/tiems_client.py +26 -25
- tccli/services/tiia/tiia_client.py +24 -23
- tccli/services/tione/tione_client.py +98 -97
- tccli/services/tiw/tiw_client.py +61 -60
- tccli/services/tke/tke_client.py +219 -218
- tccli/services/tkgdq/tkgdq_client.py +4 -3
- tccli/services/tms/tms_client.py +6 -5
- tccli/services/tmt/tmt_client.py +8 -7
- tccli/services/tourism/tourism_client.py +2 -1
- tccli/services/trdp/trdp_client.py +2 -1
- tccli/services/trocket/trocket_client.py +23 -22
- tccli/services/trp/trp_client.py +54 -53
- tccli/services/trro/trro_client.py +24 -23
- tccli/services/trtc/trtc_client.py +44 -43
- tccli/services/tse/tse_client.py +66 -65
- tccli/services/tsf/tsf_client.py +220 -219
- tccli/services/tsw/tsw_client.py +5 -4
- tccli/services/tts/tts_client.py +4 -3
- tccli/services/ump/ump_client.py +18 -17
- tccli/services/vm/vm_client.py +7 -6
- tccli/services/vms/vms_client.py +3 -2
- tccli/services/vod/vod_client.py +169 -168
- tccli/services/vpc/vpc_client.py +317 -316
- tccli/services/vrs/vrs_client.py +8 -7
- tccli/services/waf/waf_client.py +133 -132
- tccli/services/wav/wav_client.py +27 -26
- tccli/services/wedata/wedata_client.py +319 -318
- tccli/services/weilingwith/weilingwith_client.py +58 -57
- tccli/services/wss/wss_client.py +4 -3
- tccli/services/yinsuda/yinsuda_client.py +21 -20
- tccli/services/youmall/youmall_client.py +32 -31
- tccli/services/yunjing/yunjing_client.py +101 -100
- tccli/services/yunsou/yunsou_client.py +3 -2
- {tccli-3.0.1036.1.dist-info → tccli-3.0.1037.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1036.1.dist-info → tccli-3.0.1037.1.dist-info}/RECORD +282 -275
- {tccli-3.0.1036.1.dist-info → tccli-3.0.1037.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1036.1.dist-info → tccli-3.0.1037.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1036.1.dist-info → tccli-3.0.1037.1.dist-info}/license_files/LICENSE +0 -0
@@ -25,7 +25,7 @@ def doDeleteEscapeWhiteList(args, parsed_globals):
|
|
25
25
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
26
26
|
cred = credential.STSAssumeRoleCredential(
|
27
27
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
28
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
28
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
29
29
|
)
|
30
30
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
31
31
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -77,7 +77,7 @@ def doCreateK8sApiAbnormalEventExportJob(args, parsed_globals):
|
|
77
77
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
78
78
|
cred = credential.STSAssumeRoleCredential(
|
79
79
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
80
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
80
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
81
81
|
)
|
82
82
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
83
83
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -129,7 +129,7 @@ def doDescribeAssetWebServiceList(args, parsed_globals):
|
|
129
129
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
130
130
|
cred = credential.STSAssumeRoleCredential(
|
131
131
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
132
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
132
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
133
133
|
)
|
134
134
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
135
135
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -181,7 +181,7 @@ def doModifySecLogDeliveryClsSetting(args, parsed_globals):
|
|
181
181
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
182
182
|
cred = credential.STSAssumeRoleCredential(
|
183
183
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
184
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
184
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
185
185
|
)
|
186
186
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
187
187
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -233,7 +233,7 @@ def doDescribeAbnormalProcessEventsExport(args, parsed_globals):
|
|
233
233
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
234
234
|
cred = credential.STSAssumeRoleCredential(
|
235
235
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
236
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
236
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
237
237
|
)
|
238
238
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
239
239
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -285,7 +285,7 @@ def doDescribeVirusScanTimeoutSetting(args, parsed_globals):
|
|
285
285
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
286
286
|
cred = credential.STSAssumeRoleCredential(
|
287
287
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
288
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
288
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
289
289
|
)
|
290
290
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
291
291
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -337,7 +337,7 @@ def doDescribeVirusSummary(args, parsed_globals):
|
|
337
337
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
338
338
|
cred = credential.STSAssumeRoleCredential(
|
339
339
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
340
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
340
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
341
341
|
)
|
342
342
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
343
343
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -389,7 +389,7 @@ def doCreateAbnormalProcessRulesExportJob(args, parsed_globals):
|
|
389
389
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
390
390
|
cred = credential.STSAssumeRoleCredential(
|
391
391
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
392
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
392
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
393
393
|
)
|
394
394
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
395
395
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -441,7 +441,7 @@ def doDescribeAssetHostList(args, parsed_globals):
|
|
441
441
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
442
442
|
cred = credential.STSAssumeRoleCredential(
|
443
443
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
444
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
444
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
445
445
|
)
|
446
446
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
447
447
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -493,7 +493,7 @@ def doDescribeAssetImageRegistryScanStatusOneKey(args, parsed_globals):
|
|
493
493
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
494
494
|
cred = credential.STSAssumeRoleCredential(
|
495
495
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
496
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
496
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
497
497
|
)
|
498
498
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
499
499
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -545,7 +545,7 @@ def doDescribeIndexList(args, parsed_globals):
|
|
545
545
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
546
546
|
cred = credential.STSAssumeRoleCredential(
|
547
547
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
548
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
548
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
549
549
|
)
|
550
550
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
551
551
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -597,7 +597,7 @@ def doDescribePublicKey(args, parsed_globals):
|
|
597
597
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
598
598
|
cred = credential.STSAssumeRoleCredential(
|
599
599
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
600
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
600
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
601
601
|
)
|
602
602
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
603
603
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -649,7 +649,7 @@ def doDescribeSearchExportList(args, parsed_globals):
|
|
649
649
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
650
650
|
cred = credential.STSAssumeRoleCredential(
|
651
651
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
652
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
652
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
653
653
|
)
|
654
654
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
655
655
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -701,7 +701,7 @@ def doModifyAccessControlRuleStatus(args, parsed_globals):
|
|
701
701
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
702
702
|
cred = credential.STSAssumeRoleCredential(
|
703
703
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
704
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
704
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
705
705
|
)
|
706
706
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
707
707
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -753,7 +753,7 @@ def doDescribeAbnormalProcessRulesExport(args, parsed_globals):
|
|
753
753
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
754
754
|
cred = credential.STSAssumeRoleCredential(
|
755
755
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
756
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
756
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
757
757
|
)
|
758
758
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
759
759
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -805,7 +805,7 @@ def doDescribeNetworkFirewallPolicyStatus(args, parsed_globals):
|
|
805
805
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
806
806
|
cred = credential.STSAssumeRoleCredential(
|
807
807
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
808
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
808
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
809
809
|
)
|
810
810
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
811
811
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -857,7 +857,7 @@ def doDescribeEscapeEventDetail(args, parsed_globals):
|
|
857
857
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
858
858
|
cred = credential.STSAssumeRoleCredential(
|
859
859
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
860
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
860
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
861
861
|
)
|
862
862
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
863
863
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -909,7 +909,7 @@ def doCreateVulDefenceEventExportJob(args, parsed_globals):
|
|
909
909
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
910
910
|
cred = credential.STSAssumeRoleCredential(
|
911
911
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
912
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
912
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
913
913
|
)
|
914
914
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
915
915
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -961,7 +961,7 @@ def doDescribeAssetAppServiceList(args, parsed_globals):
|
|
961
961
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
962
962
|
cred = credential.STSAssumeRoleCredential(
|
963
963
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
964
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
964
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
965
965
|
)
|
966
966
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
967
967
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1013,7 +1013,7 @@ def doDescribeAssetImageRegistryRegistryDetail(args, parsed_globals):
|
|
1013
1013
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1014
1014
|
cred = credential.STSAssumeRoleCredential(
|
1015
1015
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1016
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1016
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1017
1017
|
)
|
1018
1018
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1019
1019
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1065,7 +1065,7 @@ def doDeleteSearchTemplate(args, parsed_globals):
|
|
1065
1065
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1066
1066
|
cred = credential.STSAssumeRoleCredential(
|
1067
1067
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1068
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1068
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1069
1069
|
)
|
1070
1070
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1071
1071
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1117,7 +1117,7 @@ def doCreateVulImageExportJob(args, parsed_globals):
|
|
1117
1117
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1118
1118
|
cred = credential.STSAssumeRoleCredential(
|
1119
1119
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1120
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1120
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1121
1121
|
)
|
1122
1122
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1123
1123
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1169,7 +1169,7 @@ def doRemoveAssetImageRegistryRegistryDetail(args, parsed_globals):
|
|
1169
1169
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1170
1170
|
cred = credential.STSAssumeRoleCredential(
|
1171
1171
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1172
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1172
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1173
1173
|
)
|
1174
1174
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1175
1175
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1221,7 +1221,7 @@ def doCreateRefreshTask(args, parsed_globals):
|
|
1221
1221
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1222
1222
|
cred = credential.STSAssumeRoleCredential(
|
1223
1223
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1224
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1224
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1225
1225
|
)
|
1226
1226
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1227
1227
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1273,7 +1273,7 @@ def doDescribeRiskSyscallDetail(args, parsed_globals):
|
|
1273
1273
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1274
1274
|
cred = credential.STSAssumeRoleCredential(
|
1275
1275
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1276
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1276
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1277
1277
|
)
|
1278
1278
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1279
1279
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1325,7 +1325,7 @@ def doCreateRiskDnsEventExportJob(args, parsed_globals):
|
|
1325
1325
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1326
1326
|
cred = credential.STSAssumeRoleCredential(
|
1327
1327
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1328
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1328
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1329
1329
|
)
|
1330
1330
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1331
1331
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1377,7 +1377,7 @@ def doDescribeReverseShellWhiteLists(args, parsed_globals):
|
|
1377
1377
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1378
1378
|
cred = credential.STSAssumeRoleCredential(
|
1379
1379
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1380
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1380
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1381
1381
|
)
|
1382
1382
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1383
1383
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1429,7 +1429,7 @@ def doCreateComponentExportJob(args, parsed_globals):
|
|
1429
1429
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1430
1430
|
cred = credential.STSAssumeRoleCredential(
|
1431
1431
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1432
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1432
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1433
1433
|
)
|
1434
1434
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1435
1435
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1481,7 +1481,7 @@ def doDescribeVirusAutoIsolateSampleDownloadURL(args, parsed_globals):
|
|
1481
1481
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1482
1482
|
cred = credential.STSAssumeRoleCredential(
|
1483
1483
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1484
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1484
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1485
1485
|
)
|
1486
1486
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1487
1487
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1533,7 +1533,7 @@ def doDescribeExportJobResult(args, parsed_globals):
|
|
1533
1533
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1534
1534
|
cred = credential.STSAssumeRoleCredential(
|
1535
1535
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1536
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1536
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1537
1537
|
)
|
1538
1538
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1539
1539
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1585,7 +1585,7 @@ def doDescribeScanIgnoreVulList(args, parsed_globals):
|
|
1585
1585
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1586
1586
|
cred = credential.STSAssumeRoleCredential(
|
1587
1587
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1588
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1588
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1589
1589
|
)
|
1590
1590
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1591
1591
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1637,7 +1637,7 @@ def doDescribeNetworkFirewallPodLabelsList(args, parsed_globals):
|
|
1637
1637
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1638
1638
|
cred = credential.STSAssumeRoleCredential(
|
1639
1639
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1640
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1640
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1641
1641
|
)
|
1642
1642
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1643
1643
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1689,7 +1689,7 @@ def doDescribeAssetComponentList(args, parsed_globals):
|
|
1689
1689
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1690
1690
|
cred = credential.STSAssumeRoleCredential(
|
1691
1691
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1692
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1692
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1693
1693
|
)
|
1694
1694
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1695
1695
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1741,7 +1741,7 @@ def doDescribeAssetImageScanStatus(args, parsed_globals):
|
|
1741
1741
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1742
1742
|
cred = credential.STSAssumeRoleCredential(
|
1743
1743
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1744
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1744
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1745
1745
|
)
|
1746
1746
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1747
1747
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1785,6 +1785,58 @@ def doDescribeAssetImageScanStatus(args, parsed_globals):
|
|
1785
1785
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1786
1786
|
|
1787
1787
|
|
1788
|
+
def doDescribeClusterNodes(args, parsed_globals):
|
1789
|
+
g_param = parse_global_arg(parsed_globals)
|
1790
|
+
|
1791
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1792
|
+
cred = credential.CVMRoleCredential()
|
1793
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1794
|
+
cred = credential.STSAssumeRoleCredential(
|
1795
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1796
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1797
|
+
)
|
1798
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1799
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1800
|
+
else:
|
1801
|
+
cred = credential.Credential(
|
1802
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1803
|
+
)
|
1804
|
+
http_profile = HttpProfile(
|
1805
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1806
|
+
reqMethod="POST",
|
1807
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1808
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1809
|
+
)
|
1810
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1811
|
+
if g_param[OptionsDefine.Language]:
|
1812
|
+
profile.language = g_param[OptionsDefine.Language]
|
1813
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1814
|
+
client = mod.TcssClient(cred, g_param[OptionsDefine.Region], profile)
|
1815
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1816
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1817
|
+
model = models.DescribeClusterNodesRequest()
|
1818
|
+
model.from_json_string(json.dumps(args))
|
1819
|
+
start_time = time.time()
|
1820
|
+
while True:
|
1821
|
+
rsp = client.DescribeClusterNodes(model)
|
1822
|
+
result = rsp.to_json_string()
|
1823
|
+
try:
|
1824
|
+
json_obj = json.loads(result)
|
1825
|
+
except TypeError as e:
|
1826
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1827
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1828
|
+
break
|
1829
|
+
cur_time = time.time()
|
1830
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1831
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1832
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1833
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1834
|
+
else:
|
1835
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1836
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1837
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1838
|
+
|
1839
|
+
|
1788
1840
|
def doCreateAssetImageScanTask(args, parsed_globals):
|
1789
1841
|
g_param = parse_global_arg(parsed_globals)
|
1790
1842
|
|
@@ -1793,7 +1845,7 @@ def doCreateAssetImageScanTask(args, parsed_globals):
|
|
1793
1845
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1794
1846
|
cred = credential.STSAssumeRoleCredential(
|
1795
1847
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1796
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1848
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1797
1849
|
)
|
1798
1850
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1799
1851
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1845,7 +1897,7 @@ def doCreateK8sApiAbnormalRuleExportJob(args, parsed_globals):
|
|
1845
1897
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1846
1898
|
cred = credential.STSAssumeRoleCredential(
|
1847
1899
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1848
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1900
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1849
1901
|
)
|
1850
1902
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1851
1903
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1897,7 +1949,7 @@ def doCreateNetworkFirewallPolicyDiscover(args, parsed_globals):
|
|
1897
1949
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1898
1950
|
cred = credential.STSAssumeRoleCredential(
|
1899
1951
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1900
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1952
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1901
1953
|
)
|
1902
1954
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1903
1955
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -1949,7 +2001,7 @@ def doCreateClusterCheckTask(args, parsed_globals):
|
|
1949
2001
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1950
2002
|
cred = credential.STSAssumeRoleCredential(
|
1951
2003
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1952
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2004
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1953
2005
|
)
|
1954
2006
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1955
2007
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2001,7 +2053,7 @@ def doModifyVulDefenceSetting(args, parsed_globals):
|
|
2001
2053
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2002
2054
|
cred = credential.STSAssumeRoleCredential(
|
2003
2055
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2004
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2056
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2005
2057
|
)
|
2006
2058
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2007
2059
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2053,7 +2105,7 @@ def doSwitchImageAutoAuthorizedRule(args, parsed_globals):
|
|
2053
2105
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2054
2106
|
cred = credential.STSAssumeRoleCredential(
|
2055
2107
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2056
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2108
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2057
2109
|
)
|
2058
2110
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2059
2111
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2105,7 +2157,7 @@ def doModifyVirusScanSetting(args, parsed_globals):
|
|
2105
2157
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2106
2158
|
cred = credential.STSAssumeRoleCredential(
|
2107
2159
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2108
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2160
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2109
2161
|
)
|
2110
2162
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2111
2163
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2157,7 +2209,7 @@ def doDescribeSecLogDeliveryKafkaOptions(args, parsed_globals):
|
|
2157
2209
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2158
2210
|
cred = credential.STSAssumeRoleCredential(
|
2159
2211
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2160
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2212
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2161
2213
|
)
|
2162
2214
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2163
2215
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2209,7 +2261,7 @@ def doDescribeAssetImageRegistryVirusListExport(args, parsed_globals):
|
|
2209
2261
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2210
2262
|
cred = credential.STSAssumeRoleCredential(
|
2211
2263
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2212
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2264
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2213
2265
|
)
|
2214
2266
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2215
2267
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2261,7 +2313,7 @@ def doModifyAssetImageRegistryScanStopOneKey(args, parsed_globals):
|
|
2261
2313
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2262
2314
|
cred = credential.STSAssumeRoleCredential(
|
2263
2315
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2264
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2316
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2265
2317
|
)
|
2266
2318
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2267
2319
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2313,7 +2365,7 @@ def doDeleteComplianceAssetPolicySetFromWhitelist(args, parsed_globals):
|
|
2313
2365
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2314
2366
|
cred = credential.STSAssumeRoleCredential(
|
2315
2367
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2316
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2368
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2317
2369
|
)
|
2318
2370
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2319
2371
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2365,7 +2417,7 @@ def doUpdateAndPublishNetworkFirewallPolicyDetail(args, parsed_globals):
|
|
2365
2417
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2366
2418
|
cred = credential.STSAssumeRoleCredential(
|
2367
2419
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2368
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2420
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2369
2421
|
)
|
2370
2422
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2371
2423
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2417,7 +2469,7 @@ def doDescribeEscapeEventInfo(args, parsed_globals):
|
|
2417
2469
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2418
2470
|
cred = credential.STSAssumeRoleCredential(
|
2419
2471
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2420
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2472
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2421
2473
|
)
|
2422
2474
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2423
2475
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2469,7 +2521,7 @@ def doDescribeAssetImageRegistryAssetStatus(args, parsed_globals):
|
|
2469
2521
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2470
2522
|
cred = credential.STSAssumeRoleCredential(
|
2471
2523
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2472
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2524
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2473
2525
|
)
|
2474
2526
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2475
2527
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2521,7 +2573,7 @@ def doDeleteMachine(args, parsed_globals):
|
|
2521
2573
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2522
2574
|
cred = credential.STSAssumeRoleCredential(
|
2523
2575
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2524
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2576
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2525
2577
|
)
|
2526
2578
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2527
2579
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2573,7 +2625,7 @@ def doDescribeAssetImageRegistryRegistryList(args, parsed_globals):
|
|
2573
2625
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2574
2626
|
cred = credential.STSAssumeRoleCredential(
|
2575
2627
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2576
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2628
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2577
2629
|
)
|
2578
2630
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2579
2631
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2625,7 +2677,7 @@ def doModifyAssetImageRegistryScanStop(args, parsed_globals):
|
|
2625
2677
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2626
2678
|
cred = credential.STSAssumeRoleCredential(
|
2627
2679
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2628
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2680
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2629
2681
|
)
|
2630
2682
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2631
2683
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2677,7 +2729,7 @@ def doDescribeClusterDetail(args, parsed_globals):
|
|
2677
2729
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2678
2730
|
cred = credential.STSAssumeRoleCredential(
|
2679
2731
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2680
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2732
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2681
2733
|
)
|
2682
2734
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2683
2735
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2729,7 +2781,7 @@ def doDescribeAssetImageRegistryVirusList(args, parsed_globals):
|
|
2729
2781
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2730
2782
|
cred = credential.STSAssumeRoleCredential(
|
2731
2783
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2732
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2784
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2733
2785
|
)
|
2734
2786
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2735
2787
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2781,7 +2833,7 @@ def doUpdateImageRegistryTimingScanTask(args, parsed_globals):
|
|
2781
2833
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2782
2834
|
cred = credential.STSAssumeRoleCredential(
|
2783
2835
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2784
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2836
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2785
2837
|
)
|
2786
2838
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2787
2839
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2833,7 +2885,7 @@ def doCreateAssetImageRegistryScanTaskOneKey(args, parsed_globals):
|
|
2833
2885
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2834
2886
|
cred = credential.STSAssumeRoleCredential(
|
2835
2887
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2836
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2888
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2837
2889
|
)
|
2838
2890
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2839
2891
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2885,7 +2937,7 @@ def doModifyAssetImageScanStop(args, parsed_globals):
|
|
2885
2937
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2886
2938
|
cred = credential.STSAssumeRoleCredential(
|
2887
2939
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2888
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2940
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2889
2941
|
)
|
2890
2942
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2891
2943
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2937,7 +2989,7 @@ def doDescribeNetworkFirewallPolicyYamlDetail(args, parsed_globals):
|
|
2937
2989
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2938
2990
|
cred = credential.STSAssumeRoleCredential(
|
2939
2991
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2940
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2992
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2941
2993
|
)
|
2942
2994
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2943
2995
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -2989,7 +3041,7 @@ def doDescribeEscapeEventsExport(args, parsed_globals):
|
|
2989
3041
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2990
3042
|
cred = credential.STSAssumeRoleCredential(
|
2991
3043
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2992
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3044
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2993
3045
|
)
|
2994
3046
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2995
3047
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3041,7 +3093,7 @@ def doCheckNetworkFirewallPolicyYaml(args, parsed_globals):
|
|
3041
3093
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3042
3094
|
cred = credential.STSAssumeRoleCredential(
|
3043
3095
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3044
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3096
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3045
3097
|
)
|
3046
3098
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3047
3099
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3093,7 +3145,7 @@ def doDescribeComplianceAssetPolicyItemList(args, parsed_globals):
|
|
3093
3145
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3094
3146
|
cred = credential.STSAssumeRoleCredential(
|
3095
3147
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3096
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3148
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3097
3149
|
)
|
3098
3150
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3099
3151
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3145,7 +3197,7 @@ def doDescribeAssetImageListExport(args, parsed_globals):
|
|
3145
3197
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3146
3198
|
cred = credential.STSAssumeRoleCredential(
|
3147
3199
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3148
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3200
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3149
3201
|
)
|
3150
3202
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3151
3203
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3197,7 +3249,7 @@ def doDescribeAssetImageScanSetting(args, parsed_globals):
|
|
3197
3249
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3198
3250
|
cred = credential.STSAssumeRoleCredential(
|
3199
3251
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3200
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3252
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3201
3253
|
)
|
3202
3254
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3203
3255
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3249,7 +3301,7 @@ def doCreateCheckComponent(args, parsed_globals):
|
|
3249
3301
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3250
3302
|
cred = credential.STSAssumeRoleCredential(
|
3251
3303
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3252
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3304
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3253
3305
|
)
|
3254
3306
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3255
3307
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3301,7 +3353,7 @@ def doModifySecLogDeliveryKafkaSetting(args, parsed_globals):
|
|
3301
3353
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3302
3354
|
cred = credential.STSAssumeRoleCredential(
|
3303
3355
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3304
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3356
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3305
3357
|
)
|
3306
3358
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3307
3359
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3353,7 +3405,7 @@ def doDescribeExportJobDownloadURL(args, parsed_globals):
|
|
3353
3405
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3354
3406
|
cred = credential.STSAssumeRoleCredential(
|
3355
3407
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3356
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3408
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3357
3409
|
)
|
3358
3410
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3359
3411
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3405,7 +3457,7 @@ def doAddEditAccessControlRule(args, parsed_globals):
|
|
3405
3457
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3406
3458
|
cred = credential.STSAssumeRoleCredential(
|
3407
3459
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3408
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3460
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3409
3461
|
)
|
3410
3462
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3411
3463
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3457,7 +3509,7 @@ def doDescribeAbnormalProcessRules(args, parsed_globals):
|
|
3457
3509
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3458
3510
|
cred = credential.STSAssumeRoleCredential(
|
3459
3511
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3460
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3512
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3461
3513
|
)
|
3462
3514
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3463
3515
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3509,7 +3561,7 @@ def doModifyK8sApiAbnormalRuleInfo(args, parsed_globals):
|
|
3509
3561
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3510
3562
|
cred = credential.STSAssumeRoleCredential(
|
3511
3563
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3512
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3564
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3513
3565
|
)
|
3514
3566
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3515
3567
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3561,7 +3613,7 @@ def doDescribeCompliancePeriodTaskList(args, parsed_globals):
|
|
3561
3613
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3562
3614
|
cred = credential.STSAssumeRoleCredential(
|
3563
3615
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3564
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3616
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3565
3617
|
)
|
3566
3618
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3567
3619
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3613,7 +3665,7 @@ def doDeleteAccessControlRules(args, parsed_globals):
|
|
3613
3665
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3614
3666
|
cred = credential.STSAssumeRoleCredential(
|
3615
3667
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3616
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3668
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3617
3669
|
)
|
3618
3670
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3619
3671
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3665,7 +3717,7 @@ def doCreateDefenceVulExportJob(args, parsed_globals):
|
|
3665
3717
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3666
3718
|
cred = credential.STSAssumeRoleCredential(
|
3667
3719
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3668
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3720
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3669
3721
|
)
|
3670
3722
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3671
3723
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3717,7 +3769,7 @@ def doDescribeAbnormalProcessLevelSummary(args, parsed_globals):
|
|
3717
3769
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3718
3770
|
cred = credential.STSAssumeRoleCredential(
|
3719
3771
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3720
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3772
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3721
3773
|
)
|
3722
3774
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3723
3775
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3769,7 +3821,7 @@ def doDescribePurchaseStateInfo(args, parsed_globals):
|
|
3769
3821
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3770
3822
|
cred = credential.STSAssumeRoleCredential(
|
3771
3823
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3772
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3824
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3773
3825
|
)
|
3774
3826
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3775
3827
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3821,7 +3873,7 @@ def doDescribeRiskSyscallWhiteListDetail(args, parsed_globals):
|
|
3821
3873
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3822
3874
|
cred = credential.STSAssumeRoleCredential(
|
3823
3875
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3824
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3876
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3825
3877
|
)
|
3826
3878
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3827
3879
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3873,7 +3925,7 @@ def doDescribeAssetImageRegistryDetail(args, parsed_globals):
|
|
3873
3925
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3874
3926
|
cred = credential.STSAssumeRoleCredential(
|
3875
3927
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3876
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3928
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3877
3929
|
)
|
3878
3930
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3879
3931
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3925,7 +3977,7 @@ def doModifyEscapeWhiteList(args, parsed_globals):
|
|
3925
3977
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3926
3978
|
cred = credential.STSAssumeRoleCredential(
|
3927
3979
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3928
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
3980
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3929
3981
|
)
|
3930
3982
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3931
3983
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -3977,7 +4029,7 @@ def doDescribeVirusManualScanEstimateTimeout(args, parsed_globals):
|
|
3977
4029
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3978
4030
|
cred = credential.STSAssumeRoleCredential(
|
3979
4031
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3980
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4032
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3981
4033
|
)
|
3982
4034
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3983
4035
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4029,7 +4081,7 @@ def doDescribeRiskSyscallEventsExport(args, parsed_globals):
|
|
4029
4081
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4030
4082
|
cred = credential.STSAssumeRoleCredential(
|
4031
4083
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4032
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4084
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4033
4085
|
)
|
4034
4086
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4035
4087
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4081,7 +4133,7 @@ def doDescribeImageAutoAuthorizedRule(args, parsed_globals):
|
|
4081
4133
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4082
4134
|
cred = credential.STSAssumeRoleCredential(
|
4083
4135
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4084
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4136
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4085
4137
|
)
|
4086
4138
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4087
4139
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4133,7 +4185,7 @@ def doDescribeAbnormalProcessRuleDetail(args, parsed_globals):
|
|
4133
4185
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4134
4186
|
cred = credential.STSAssumeRoleCredential(
|
4135
4187
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4136
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4188
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4137
4189
|
)
|
4138
4190
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4139
4191
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4185,7 +4237,7 @@ def doCreateVulDefenceHostExportJob(args, parsed_globals):
|
|
4185
4237
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4186
4238
|
cred = credential.STSAssumeRoleCredential(
|
4187
4239
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4188
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4240
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4189
4241
|
)
|
4190
4242
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4191
4243
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4237,7 +4289,7 @@ def doDescribeValueAddedSrvInfo(args, parsed_globals):
|
|
4237
4289
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4238
4290
|
cred = credential.STSAssumeRoleCredential(
|
4239
4291
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4240
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4292
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4241
4293
|
)
|
4242
4294
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4243
4295
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4289,7 +4341,7 @@ def doAddEditReverseShellWhiteList(args, parsed_globals):
|
|
4289
4341
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4290
4342
|
cred = credential.STSAssumeRoleCredential(
|
4291
4343
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4292
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4344
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4293
4345
|
)
|
4294
4346
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4295
4347
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4341,7 +4393,7 @@ def doDescribeReverseShellDetail(args, parsed_globals):
|
|
4341
4393
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4342
4394
|
cred = credential.STSAssumeRoleCredential(
|
4343
4395
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4344
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4396
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4345
4397
|
)
|
4346
4398
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4347
4399
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4393,7 +4445,7 @@ def doDescribeESAggregations(args, parsed_globals):
|
|
4393
4445
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4394
4446
|
cred = credential.STSAssumeRoleCredential(
|
4395
4447
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4396
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4448
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4397
4449
|
)
|
4398
4450
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4399
4451
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4445,7 +4497,7 @@ def doDescribeAssetImageBindRuleInfo(args, parsed_globals):
|
|
4445
4497
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4446
4498
|
cred = credential.STSAssumeRoleCredential(
|
4447
4499
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4448
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4500
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4449
4501
|
)
|
4450
4502
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4451
4503
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4497,7 +4549,7 @@ def doUpdateNetworkFirewallPolicyDetail(args, parsed_globals):
|
|
4497
4549
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4498
4550
|
cred = credential.STSAssumeRoleCredential(
|
4499
4551
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4500
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4552
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4501
4553
|
)
|
4502
4554
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4503
4555
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4549,7 +4601,7 @@ def doCreateAssetImageVirusExportJob(args, parsed_globals):
|
|
4549
4601
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4550
4602
|
cred = credential.STSAssumeRoleCredential(
|
4551
4603
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4552
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4604
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4553
4605
|
)
|
4554
4606
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4555
4607
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4601,7 +4653,7 @@ def doDescribeNetworkFirewallPolicyDiscover(args, parsed_globals):
|
|
4601
4653
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4602
4654
|
cred = credential.STSAssumeRoleCredential(
|
4603
4655
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4604
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4656
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4605
4657
|
)
|
4606
4658
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4607
4659
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4653,7 +4705,7 @@ def doDescribeSecLogDeliveryClsOptions(args, parsed_globals):
|
|
4653
4705
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4654
4706
|
cred = credential.STSAssumeRoleCredential(
|
4655
4707
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4656
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4708
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4657
4709
|
)
|
4658
4710
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4659
4711
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4705,7 +4757,7 @@ def doResetSecLogTopicConfig(args, parsed_globals):
|
|
4705
4757
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4706
4758
|
cred = credential.STSAssumeRoleCredential(
|
4707
4759
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4708
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4760
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4709
4761
|
)
|
4710
4762
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4711
4763
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4757,7 +4809,7 @@ def doDescribeTaskResultSummary(args, parsed_globals):
|
|
4757
4809
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4758
4810
|
cred = credential.STSAssumeRoleCredential(
|
4759
4811
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4760
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4812
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4761
4813
|
)
|
4762
4814
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4763
4815
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4809,7 +4861,7 @@ def doDescribeAssetContainerDetail(args, parsed_globals):
|
|
4809
4861
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4810
4862
|
cred = credential.STSAssumeRoleCredential(
|
4811
4863
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4812
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4864
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4813
4865
|
)
|
4814
4866
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4815
4867
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4861,7 +4913,7 @@ def doDescribeAssetImageRegistryRiskInfoList(args, parsed_globals):
|
|
4861
4913
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4862
4914
|
cred = credential.STSAssumeRoleCredential(
|
4863
4915
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4864
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4916
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4865
4917
|
)
|
4866
4918
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4867
4919
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4913,7 +4965,7 @@ def doModifyEscapeRule(args, parsed_globals):
|
|
4913
4965
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4914
4966
|
cred = credential.STSAssumeRoleCredential(
|
4915
4967
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4916
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
4968
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4917
4969
|
)
|
4918
4970
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4919
4971
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -4965,7 +5017,7 @@ def doDescribeCompliancePolicyItemAffectedSummary(args, parsed_globals):
|
|
4965
5017
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4966
5018
|
cred = credential.STSAssumeRoleCredential(
|
4967
5019
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4968
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5020
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4969
5021
|
)
|
4970
5022
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4971
5023
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5017,7 +5069,7 @@ def doModifyEscapeEventStatus(args, parsed_globals):
|
|
5017
5069
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5018
5070
|
cred = credential.STSAssumeRoleCredential(
|
5019
5071
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5020
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5072
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5021
5073
|
)
|
5022
5074
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5023
5075
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5069,7 +5121,7 @@ def doCreateNetworkFirewallClusterRefresh(args, parsed_globals):
|
|
5069
5121
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5070
5122
|
cred = credential.STSAssumeRoleCredential(
|
5071
5123
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5072
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5124
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5073
5125
|
)
|
5074
5126
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5075
5127
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5121,7 +5173,7 @@ def doCreateNetworkFirewallPublish(args, parsed_globals):
|
|
5121
5173
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5122
5174
|
cred = credential.STSAssumeRoleCredential(
|
5123
5175
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5124
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5176
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5125
5177
|
)
|
5126
5178
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5127
5179
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5173,7 +5225,7 @@ def doAddComplianceAssetPolicySetToWhitelist(args, parsed_globals):
|
|
5173
5225
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5174
5226
|
cred = credential.STSAssumeRoleCredential(
|
5175
5227
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5176
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5228
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5177
5229
|
)
|
5178
5230
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5179
5231
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5225,7 +5277,7 @@ def doModifySecLogJoinObjects(args, parsed_globals):
|
|
5225
5277
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5226
5278
|
cred = credential.STSAssumeRoleCredential(
|
5227
5279
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5228
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5280
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5229
5281
|
)
|
5230
5282
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5231
5283
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5277,7 +5329,7 @@ def doDescribeContainerAssetSummary(args, parsed_globals):
|
|
5277
5329
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5278
5330
|
cred = credential.STSAssumeRoleCredential(
|
5279
5331
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5280
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5332
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5281
5333
|
)
|
5282
5334
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5283
5335
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5321,6 +5373,58 @@ def doDescribeContainerAssetSummary(args, parsed_globals):
|
|
5321
5373
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5322
5374
|
|
5323
5375
|
|
5376
|
+
def doDescribeAssetSuperNodeList(args, parsed_globals):
|
5377
|
+
g_param = parse_global_arg(parsed_globals)
|
5378
|
+
|
5379
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5380
|
+
cred = credential.CVMRoleCredential()
|
5381
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5382
|
+
cred = credential.STSAssumeRoleCredential(
|
5383
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5384
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5385
|
+
)
|
5386
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5387
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5388
|
+
else:
|
5389
|
+
cred = credential.Credential(
|
5390
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5391
|
+
)
|
5392
|
+
http_profile = HttpProfile(
|
5393
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5394
|
+
reqMethod="POST",
|
5395
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5396
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5397
|
+
)
|
5398
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5399
|
+
if g_param[OptionsDefine.Language]:
|
5400
|
+
profile.language = g_param[OptionsDefine.Language]
|
5401
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5402
|
+
client = mod.TcssClient(cred, g_param[OptionsDefine.Region], profile)
|
5403
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5404
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5405
|
+
model = models.DescribeAssetSuperNodeListRequest()
|
5406
|
+
model.from_json_string(json.dumps(args))
|
5407
|
+
start_time = time.time()
|
5408
|
+
while True:
|
5409
|
+
rsp = client.DescribeAssetSuperNodeList(model)
|
5410
|
+
result = rsp.to_json_string()
|
5411
|
+
try:
|
5412
|
+
json_obj = json.loads(result)
|
5413
|
+
except TypeError as e:
|
5414
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5415
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5416
|
+
break
|
5417
|
+
cur_time = time.time()
|
5418
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5419
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5420
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5421
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5422
|
+
else:
|
5423
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5424
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5425
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5426
|
+
|
5427
|
+
|
5324
5428
|
def doDescribeImageRegistryTimingScanTask(args, parsed_globals):
|
5325
5429
|
g_param = parse_global_arg(parsed_globals)
|
5326
5430
|
|
@@ -5329,7 +5433,7 @@ def doDescribeImageRegistryTimingScanTask(args, parsed_globals):
|
|
5329
5433
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5330
5434
|
cred = credential.STSAssumeRoleCredential(
|
5331
5435
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5332
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5436
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5333
5437
|
)
|
5334
5438
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5335
5439
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5381,7 +5485,7 @@ def doDescribeReverseShellEventsExport(args, parsed_globals):
|
|
5381
5485
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5382
5486
|
cred = credential.STSAssumeRoleCredential(
|
5383
5487
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5384
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5488
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5385
5489
|
)
|
5386
5490
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5387
5491
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5433,7 +5537,7 @@ def doDescribeAssetDBServiceList(args, parsed_globals):
|
|
5433
5537
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5434
5538
|
cred = credential.STSAssumeRoleCredential(
|
5435
5539
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5436
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5540
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5437
5541
|
)
|
5438
5542
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5439
5543
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5485,7 +5589,7 @@ def doDescribeVulImageList(args, parsed_globals):
|
|
5485
5589
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5486
5590
|
cred = credential.STSAssumeRoleCredential(
|
5487
5591
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5488
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5592
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5489
5593
|
)
|
5490
5594
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5491
5595
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5537,7 +5641,7 @@ def doDeleteRiskSyscallWhiteLists(args, parsed_globals):
|
|
5537
5641
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5538
5642
|
cred = credential.STSAssumeRoleCredential(
|
5539
5643
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5540
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5644
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5541
5645
|
)
|
5542
5646
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5543
5647
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5589,7 +5693,7 @@ def doDescribeAssetSummary(args, parsed_globals):
|
|
5589
5693
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5590
5694
|
cred = credential.STSAssumeRoleCredential(
|
5591
5695
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5592
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5696
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5593
5697
|
)
|
5594
5698
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5595
5699
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5641,7 +5745,7 @@ def doDescribeAssetHostDetail(args, parsed_globals):
|
|
5641
5745
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5642
5746
|
cred = credential.STSAssumeRoleCredential(
|
5643
5747
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5644
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5748
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5645
5749
|
)
|
5646
5750
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5647
5751
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5693,7 +5797,7 @@ def doDescribeVulIgnoreRegistryImageList(args, parsed_globals):
|
|
5693
5797
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5694
5798
|
cred = credential.STSAssumeRoleCredential(
|
5695
5799
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5696
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5800
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5697
5801
|
)
|
5698
5802
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5699
5803
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5745,7 +5849,7 @@ def doDescribeVulScanInfo(args, parsed_globals):
|
|
5745
5849
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5746
5850
|
cred = credential.STSAssumeRoleCredential(
|
5747
5851
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5748
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5852
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5749
5853
|
)
|
5750
5854
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5751
5855
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5797,7 +5901,7 @@ def doDescribeVulImageSummary(args, parsed_globals):
|
|
5797
5901
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5798
5902
|
cred = credential.STSAssumeRoleCredential(
|
5799
5903
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5800
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5904
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5801
5905
|
)
|
5802
5906
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5803
5907
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5849,7 +5953,7 @@ def doCreateWebVulExportJob(args, parsed_globals):
|
|
5849
5953
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5850
5954
|
cred = credential.STSAssumeRoleCredential(
|
5851
5955
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5852
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5956
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5853
5957
|
)
|
5854
5958
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5855
5959
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5901,7 +6005,7 @@ def doModifyContainerNetStatus(args, parsed_globals):
|
|
5901
6005
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5902
6006
|
cred = credential.STSAssumeRoleCredential(
|
5903
6007
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5904
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6008
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5905
6009
|
)
|
5906
6010
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5907
6011
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -5953,7 +6057,7 @@ def doDescribeImageRiskTendency(args, parsed_globals):
|
|
5953
6057
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5954
6058
|
cred = credential.STSAssumeRoleCredential(
|
5955
6059
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5956
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6060
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5957
6061
|
)
|
5958
6062
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5959
6063
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6005,7 +6109,7 @@ def doDescribeAgentInstallCommand(args, parsed_globals):
|
|
6005
6109
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6006
6110
|
cred = credential.STSAssumeRoleCredential(
|
6007
6111
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6008
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6112
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6009
6113
|
)
|
6010
6114
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6011
6115
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6057,7 +6161,7 @@ def doDescribeImageRegistryNamespaceList(args, parsed_globals):
|
|
6057
6161
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6058
6162
|
cred = credential.STSAssumeRoleCredential(
|
6059
6163
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6060
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6164
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6061
6165
|
)
|
6062
6166
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6063
6167
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6109,7 +6213,7 @@ def doDescribeAgentDaemonSetCmd(args, parsed_globals):
|
|
6109
6213
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6110
6214
|
cred = credential.STSAssumeRoleCredential(
|
6111
6215
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6112
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6216
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6113
6217
|
)
|
6114
6218
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6115
6219
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6161,7 +6265,7 @@ def doCreateEmergencyVulExportJob(args, parsed_globals):
|
|
6161
6265
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6162
6266
|
cred = credential.STSAssumeRoleCredential(
|
6163
6267
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6164
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6268
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6165
6269
|
)
|
6166
6270
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6167
6271
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6213,7 +6317,7 @@ def doDescribeAssetImageScanTask(args, parsed_globals):
|
|
6213
6317
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6214
6318
|
cred = credential.STSAssumeRoleCredential(
|
6215
6319
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6216
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6320
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6217
6321
|
)
|
6218
6322
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6219
6323
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6265,7 +6369,7 @@ def doDescribeAssetImageRegistryListExport(args, parsed_globals):
|
|
6265
6369
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6266
6370
|
cred = credential.STSAssumeRoleCredential(
|
6267
6371
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6268
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6372
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6269
6373
|
)
|
6270
6374
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6271
6375
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6317,7 +6421,7 @@ def doDescribeVulDefencePlugin(args, parsed_globals):
|
|
6317
6421
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6318
6422
|
cred = credential.STSAssumeRoleCredential(
|
6319
6423
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6320
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6424
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6321
6425
|
)
|
6322
6426
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6323
6427
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6369,7 +6473,7 @@ def doDescribeK8sApiAbnormalEventList(args, parsed_globals):
|
|
6369
6473
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6370
6474
|
cred = credential.STSAssumeRoleCredential(
|
6371
6475
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6372
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6476
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6373
6477
|
)
|
6374
6478
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6375
6479
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6421,7 +6525,7 @@ def doDescribeComplianceTaskAssetSummary(args, parsed_globals):
|
|
6421
6525
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6422
6526
|
cred = credential.STSAssumeRoleCredential(
|
6423
6527
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6424
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6528
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6425
6529
|
)
|
6426
6530
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6427
6531
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6473,7 +6577,7 @@ def doDeleteReverseShellEvents(args, parsed_globals):
|
|
6473
6577
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6474
6578
|
cred = credential.STSAssumeRoleCredential(
|
6475
6579
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6476
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6580
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6477
6581
|
)
|
6478
6582
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6479
6583
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6525,7 +6629,7 @@ def doDescribeAccessControlRules(args, parsed_globals):
|
|
6525
6629
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6526
6630
|
cred = credential.STSAssumeRoleCredential(
|
6527
6631
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6528
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6632
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6529
6633
|
)
|
6530
6634
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6531
6635
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6577,7 +6681,7 @@ def doDescribeAssetImageVirusListExport(args, parsed_globals):
|
|
6577
6681
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6578
6682
|
cred = credential.STSAssumeRoleCredential(
|
6579
6683
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6580
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6684
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6581
6685
|
)
|
6582
6686
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6583
6687
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6629,7 +6733,7 @@ def doDescribeAssetContainerList(args, parsed_globals):
|
|
6629
6733
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6630
6734
|
cred = credential.STSAssumeRoleCredential(
|
6631
6735
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6632
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6736
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6633
6737
|
)
|
6634
6738
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6635
6739
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6681,7 +6785,7 @@ def doCreateSearchTemplate(args, parsed_globals):
|
|
6681
6785
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6682
6786
|
cred = credential.STSAssumeRoleCredential(
|
6683
6787
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6684
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6788
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6685
6789
|
)
|
6686
6790
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6687
6791
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6733,7 +6837,7 @@ def doDescribePostPayDetail(args, parsed_globals):
|
|
6733
6837
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6734
6838
|
cred = credential.STSAssumeRoleCredential(
|
6735
6839
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6736
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6840
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6737
6841
|
)
|
6738
6842
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6739
6843
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6777,6 +6881,58 @@ def doDescribePostPayDetail(args, parsed_globals):
|
|
6777
6881
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6778
6882
|
|
6779
6883
|
|
6884
|
+
def doDescribeSuperNodePodList(args, parsed_globals):
|
6885
|
+
g_param = parse_global_arg(parsed_globals)
|
6886
|
+
|
6887
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6888
|
+
cred = credential.CVMRoleCredential()
|
6889
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6890
|
+
cred = credential.STSAssumeRoleCredential(
|
6891
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6892
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6893
|
+
)
|
6894
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6895
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6896
|
+
else:
|
6897
|
+
cred = credential.Credential(
|
6898
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6899
|
+
)
|
6900
|
+
http_profile = HttpProfile(
|
6901
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6902
|
+
reqMethod="POST",
|
6903
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
6904
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6905
|
+
)
|
6906
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6907
|
+
if g_param[OptionsDefine.Language]:
|
6908
|
+
profile.language = g_param[OptionsDefine.Language]
|
6909
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6910
|
+
client = mod.TcssClient(cred, g_param[OptionsDefine.Region], profile)
|
6911
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
6912
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6913
|
+
model = models.DescribeSuperNodePodListRequest()
|
6914
|
+
model.from_json_string(json.dumps(args))
|
6915
|
+
start_time = time.time()
|
6916
|
+
while True:
|
6917
|
+
rsp = client.DescribeSuperNodePodList(model)
|
6918
|
+
result = rsp.to_json_string()
|
6919
|
+
try:
|
6920
|
+
json_obj = json.loads(result)
|
6921
|
+
except TypeError as e:
|
6922
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6923
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6924
|
+
break
|
6925
|
+
cur_time = time.time()
|
6926
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6927
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6928
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6929
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6930
|
+
else:
|
6931
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6932
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6933
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6934
|
+
|
6935
|
+
|
6780
6936
|
def doAddNetworkFirewallPolicyYamlDetail(args, parsed_globals):
|
6781
6937
|
g_param = parse_global_arg(parsed_globals)
|
6782
6938
|
|
@@ -6785,7 +6941,7 @@ def doAddNetworkFirewallPolicyYamlDetail(args, parsed_globals):
|
|
6785
6941
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6786
6942
|
cred = credential.STSAssumeRoleCredential(
|
6787
6943
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6788
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6944
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6789
6945
|
)
|
6790
6946
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6791
6947
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6837,7 +6993,7 @@ def doDescribeAffectedClusterCount(args, parsed_globals):
|
|
6837
6993
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6838
6994
|
cred = credential.STSAssumeRoleCredential(
|
6839
6995
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6840
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6996
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6841
6997
|
)
|
6842
6998
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6843
6999
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6889,7 +7045,7 @@ def doModifyVirusMonitorSetting(args, parsed_globals):
|
|
6889
7045
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6890
7046
|
cred = credential.STSAssumeRoleCredential(
|
6891
7047
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6892
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7048
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6893
7049
|
)
|
6894
7050
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6895
7051
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6941,7 +7097,7 @@ def doDescribeVirusAutoIsolateSampleDetail(args, parsed_globals):
|
|
6941
7097
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6942
7098
|
cred = credential.STSAssumeRoleCredential(
|
6943
7099
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6944
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7100
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6945
7101
|
)
|
6946
7102
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6947
7103
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -6993,7 +7149,7 @@ def doAddEscapeWhiteList(args, parsed_globals):
|
|
6993
7149
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6994
7150
|
cred = credential.STSAssumeRoleCredential(
|
6995
7151
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6996
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7152
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6997
7153
|
)
|
6998
7154
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6999
7155
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7045,7 +7201,7 @@ def doCreateImageExportJob(args, parsed_globals):
|
|
7045
7201
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7046
7202
|
cred = credential.STSAssumeRoleCredential(
|
7047
7203
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7048
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7204
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7049
7205
|
)
|
7050
7206
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7051
7207
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7097,7 +7253,7 @@ def doAddEditWarningRules(args, parsed_globals):
|
|
7097
7253
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7098
7254
|
cred = credential.STSAssumeRoleCredential(
|
7099
7255
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7100
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7256
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7101
7257
|
)
|
7102
7258
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7103
7259
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7149,7 +7305,7 @@ def doScanComplianceAssets(args, parsed_globals):
|
|
7149
7305
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7150
7306
|
cred = credential.STSAssumeRoleCredential(
|
7151
7307
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7152
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7308
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7153
7309
|
)
|
7154
7310
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7155
7311
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7201,7 +7357,7 @@ def doStopVirusScanTask(args, parsed_globals):
|
|
7201
7357
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7202
7358
|
cred = credential.STSAssumeRoleCredential(
|
7203
7359
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7204
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7360
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7205
7361
|
)
|
7206
7362
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7207
7363
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7253,7 +7409,7 @@ def doAddIgnoreVul(args, parsed_globals):
|
|
7253
7409
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7254
7410
|
cred = credential.STSAssumeRoleCredential(
|
7255
7411
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7256
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7412
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7257
7413
|
)
|
7258
7414
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7259
7415
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7305,7 +7461,7 @@ def doDescribeCheckItemList(args, parsed_globals):
|
|
7305
7461
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7306
7462
|
cred = credential.STSAssumeRoleCredential(
|
7307
7463
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7308
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7464
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7309
7465
|
)
|
7310
7466
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7311
7467
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7357,7 +7513,7 @@ def doDescribeAccessControlEventsExport(args, parsed_globals):
|
|
7357
7513
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7358
7514
|
cred = credential.STSAssumeRoleCredential(
|
7359
7515
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7360
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7516
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7361
7517
|
)
|
7362
7518
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7363
7519
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7409,7 +7565,7 @@ def doModifyK8sApiAbnormalEventStatus(args, parsed_globals):
|
|
7409
7565
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7410
7566
|
cred = credential.STSAssumeRoleCredential(
|
7411
7567
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7412
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7568
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7413
7569
|
)
|
7414
7570
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7415
7571
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7461,7 +7617,7 @@ def doDescribeVirusDetail(args, parsed_globals):
|
|
7461
7617
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7462
7618
|
cred = credential.STSAssumeRoleCredential(
|
7463
7619
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7464
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7620
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7465
7621
|
)
|
7466
7622
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7467
7623
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7513,7 +7669,7 @@ def doCreateVulExportJob(args, parsed_globals):
|
|
7513
7669
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7514
7670
|
cred = credential.STSAssumeRoleCredential(
|
7515
7671
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7516
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7672
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7517
7673
|
)
|
7518
7674
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7519
7675
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7565,7 +7721,7 @@ def doDescribeComplianceWhitelistItemList(args, parsed_globals):
|
|
7565
7721
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7566
7722
|
cred = credential.STSAssumeRoleCredential(
|
7567
7723
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7568
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7724
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7569
7725
|
)
|
7570
7726
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7571
7727
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7617,7 +7773,7 @@ def doDescribeNetworkFirewallPolicyList(args, parsed_globals):
|
|
7617
7773
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7618
7774
|
cred = credential.STSAssumeRoleCredential(
|
7619
7775
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7620
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7776
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7621
7777
|
)
|
7622
7778
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7623
7779
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7669,7 +7825,7 @@ def doAddEditImageAutoAuthorizedRule(args, parsed_globals):
|
|
7669
7825
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7670
7826
|
cred = credential.STSAssumeRoleCredential(
|
7671
7827
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7672
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7828
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7673
7829
|
)
|
7674
7830
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7675
7831
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7721,7 +7877,7 @@ def doCreateComplianceTask(args, parsed_globals):
|
|
7721
7877
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7722
7878
|
cred = credential.STSAssumeRoleCredential(
|
7723
7879
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7724
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7880
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7725
7881
|
)
|
7726
7882
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7727
7883
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7773,7 +7929,7 @@ def doDescribeComplianceScanFailedAssetList(args, parsed_globals):
|
|
7773
7929
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7774
7930
|
cred = credential.STSAssumeRoleCredential(
|
7775
7931
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7776
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7932
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7777
7933
|
)
|
7778
7934
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7779
7935
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7825,7 +7981,7 @@ def doDescribeK8sApiAbnormalRuleScopeList(args, parsed_globals):
|
|
7825
7981
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7826
7982
|
cred = credential.STSAssumeRoleCredential(
|
7827
7983
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7828
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7984
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7829
7985
|
)
|
7830
7986
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7831
7987
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7877,7 +8033,7 @@ def doDescribeAssetClusterList(args, parsed_globals):
|
|
7877
8033
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7878
8034
|
cred = credential.STSAssumeRoleCredential(
|
7879
8035
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7880
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8036
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7881
8037
|
)
|
7882
8038
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7883
8039
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7929,7 +8085,7 @@ def doDeleteRiskSyscallEvents(args, parsed_globals):
|
|
7929
8085
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7930
8086
|
cred = credential.STSAssumeRoleCredential(
|
7931
8087
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7932
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8088
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7933
8089
|
)
|
7934
8090
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7935
8091
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -7981,7 +8137,7 @@ def doDescribeAffectedWorkloadList(args, parsed_globals):
|
|
7981
8137
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7982
8138
|
cred = credential.STSAssumeRoleCredential(
|
7983
8139
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7984
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8140
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7985
8141
|
)
|
7986
8142
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7987
8143
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8033,7 +8189,7 @@ def doAddCompliancePolicyAssetSetToWhitelist(args, parsed_globals):
|
|
8033
8189
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8034
8190
|
cred = credential.STSAssumeRoleCredential(
|
8035
8191
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8036
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8192
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8037
8193
|
)
|
8038
8194
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8039
8195
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8085,7 +8241,7 @@ def doDeleteAbnormalProcessRules(args, parsed_globals):
|
|
8085
8241
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8086
8242
|
cred = credential.STSAssumeRoleCredential(
|
8087
8243
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8088
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8244
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8089
8245
|
)
|
8090
8246
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8091
8247
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8137,7 +8293,7 @@ def doDescribeVulDetail(args, parsed_globals):
|
|
8137
8293
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8138
8294
|
cred = credential.STSAssumeRoleCredential(
|
8139
8295
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8140
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8296
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8141
8297
|
)
|
8142
8298
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8143
8299
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8189,7 +8345,7 @@ def doDescribeRefreshTask(args, parsed_globals):
|
|
8189
8345
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8190
8346
|
cred = credential.STSAssumeRoleCredential(
|
8191
8347
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8192
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8348
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8193
8349
|
)
|
8194
8350
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8195
8351
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8241,7 +8397,7 @@ def doCreateVulScanTask(args, parsed_globals):
|
|
8241
8397
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8242
8398
|
cred = credential.STSAssumeRoleCredential(
|
8243
8399
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8244
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8400
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8245
8401
|
)
|
8246
8402
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8247
8403
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8293,7 +8449,7 @@ def doDescribeNetworkFirewallClusterList(args, parsed_globals):
|
|
8293
8449
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8294
8450
|
cred = credential.STSAssumeRoleCredential(
|
8295
8451
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8296
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8452
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8297
8453
|
)
|
8298
8454
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8299
8455
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8345,7 +8501,7 @@ def doDescribeAssetPortList(args, parsed_globals):
|
|
8345
8501
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8346
8502
|
cred = credential.STSAssumeRoleCredential(
|
8347
8503
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8348
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8504
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8349
8505
|
)
|
8350
8506
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8351
8507
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8397,7 +8553,7 @@ def doStopVulScanTask(args, parsed_globals):
|
|
8397
8553
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8398
8554
|
cred = credential.STSAssumeRoleCredential(
|
8399
8555
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8400
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8556
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8401
8557
|
)
|
8402
8558
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8403
8559
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8449,7 +8605,7 @@ def doDescribeAssetImageRegistryRiskListExport(args, parsed_globals):
|
|
8449
8605
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8450
8606
|
cred = credential.STSAssumeRoleCredential(
|
8451
8607
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8452
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8608
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8453
8609
|
)
|
8454
8610
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8455
8611
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8493,6 +8649,58 @@ def doDescribeAssetImageRegistryRiskListExport(args, parsed_globals):
|
|
8493
8649
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8494
8650
|
|
8495
8651
|
|
8652
|
+
def doDeleteNetworkFirewallPolicyDetail(args, parsed_globals):
|
8653
|
+
g_param = parse_global_arg(parsed_globals)
|
8654
|
+
|
8655
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
8656
|
+
cred = credential.CVMRoleCredential()
|
8657
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8658
|
+
cred = credential.STSAssumeRoleCredential(
|
8659
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8660
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8661
|
+
)
|
8662
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8663
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
8664
|
+
else:
|
8665
|
+
cred = credential.Credential(
|
8666
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
8667
|
+
)
|
8668
|
+
http_profile = HttpProfile(
|
8669
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
8670
|
+
reqMethod="POST",
|
8671
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
8672
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
8673
|
+
)
|
8674
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
8675
|
+
if g_param[OptionsDefine.Language]:
|
8676
|
+
profile.language = g_param[OptionsDefine.Language]
|
8677
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
8678
|
+
client = mod.TcssClient(cred, g_param[OptionsDefine.Region], profile)
|
8679
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
8680
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
8681
|
+
model = models.DeleteNetworkFirewallPolicyDetailRequest()
|
8682
|
+
model.from_json_string(json.dumps(args))
|
8683
|
+
start_time = time.time()
|
8684
|
+
while True:
|
8685
|
+
rsp = client.DeleteNetworkFirewallPolicyDetail(model)
|
8686
|
+
result = rsp.to_json_string()
|
8687
|
+
try:
|
8688
|
+
json_obj = json.loads(result)
|
8689
|
+
except TypeError as e:
|
8690
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
8691
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
8692
|
+
break
|
8693
|
+
cur_time = time.time()
|
8694
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
8695
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
8696
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
8697
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
8698
|
+
else:
|
8699
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
8700
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
8701
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8702
|
+
|
8703
|
+
|
8496
8704
|
def doDescribeSupportDefenceVul(args, parsed_globals):
|
8497
8705
|
g_param = parse_global_arg(parsed_globals)
|
8498
8706
|
|
@@ -8501,7 +8709,7 @@ def doDescribeSupportDefenceVul(args, parsed_globals):
|
|
8501
8709
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8502
8710
|
cred = credential.STSAssumeRoleCredential(
|
8503
8711
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8504
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8712
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8505
8713
|
)
|
8506
8714
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8507
8715
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8553,7 +8761,7 @@ def doDescribeVulDefenceHost(args, parsed_globals):
|
|
8553
8761
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8554
8762
|
cred = credential.STSAssumeRoleCredential(
|
8555
8763
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8556
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8764
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8557
8765
|
)
|
8558
8766
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8559
8767
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8605,7 +8813,7 @@ def doDescribeK8sApiAbnormalSummary(args, parsed_globals):
|
|
8605
8813
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8606
8814
|
cred = credential.STSAssumeRoleCredential(
|
8607
8815
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8608
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8816
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8609
8817
|
)
|
8610
8818
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8611
8819
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8657,7 +8865,7 @@ def doCreateSystemVulExportJob(args, parsed_globals):
|
|
8657
8865
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8658
8866
|
cred = credential.STSAssumeRoleCredential(
|
8659
8867
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8660
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8868
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8661
8869
|
)
|
8662
8870
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8663
8871
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8709,7 +8917,7 @@ def doDescribeVulDefenceEventTendency(args, parsed_globals):
|
|
8709
8917
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8710
8918
|
cred = credential.STSAssumeRoleCredential(
|
8711
8919
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8712
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8920
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8713
8921
|
)
|
8714
8922
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8715
8923
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8761,7 +8969,7 @@ def doDescribeEscapeWhiteList(args, parsed_globals):
|
|
8761
8969
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8762
8970
|
cred = credential.STSAssumeRoleCredential(
|
8763
8971
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8764
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
8972
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8765
8973
|
)
|
8766
8974
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8767
8975
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8813,7 +9021,7 @@ def doModifyRiskSyscallStatus(args, parsed_globals):
|
|
8813
9021
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8814
9022
|
cred = credential.STSAssumeRoleCredential(
|
8815
9023
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8816
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9024
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8817
9025
|
)
|
8818
9026
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8819
9027
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8865,7 +9073,7 @@ def doDescribeComplianceAssetDetailInfo(args, parsed_globals):
|
|
8865
9073
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8866
9074
|
cred = credential.STSAssumeRoleCredential(
|
8867
9075
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8868
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9076
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8869
9077
|
)
|
8870
9078
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8871
9079
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8917,7 +9125,7 @@ def doCreateVulContainerExportJob(args, parsed_globals):
|
|
8917
9125
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8918
9126
|
cred = credential.STSAssumeRoleCredential(
|
8919
9127
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8920
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9128
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8921
9129
|
)
|
8922
9130
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8923
9131
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -8969,7 +9177,7 @@ def doUpdateAndPublishNetworkFirewallPolicyYamlDetail(args, parsed_globals):
|
|
8969
9177
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8970
9178
|
cred = credential.STSAssumeRoleCredential(
|
8971
9179
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8972
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9180
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8973
9181
|
)
|
8974
9182
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
8975
9183
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9021,7 +9229,7 @@ def doModifyImageAuthorized(args, parsed_globals):
|
|
9021
9229
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9022
9230
|
cred = credential.STSAssumeRoleCredential(
|
9023
9231
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9024
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9232
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9025
9233
|
)
|
9026
9234
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9027
9235
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9073,7 +9281,7 @@ def doModifyAbnormalProcessStatus(args, parsed_globals):
|
|
9073
9281
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9074
9282
|
cred = credential.STSAssumeRoleCredential(
|
9075
9283
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9076
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9284
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9077
9285
|
)
|
9078
9286
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9079
9287
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9125,7 +9333,7 @@ def doCreateExportComplianceStatusListJob(args, parsed_globals):
|
|
9125
9333
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9126
9334
|
cred = credential.STSAssumeRoleCredential(
|
9127
9335
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9128
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9336
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9129
9337
|
)
|
9130
9338
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9131
9339
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9177,7 +9385,7 @@ def doDescribeAssetImageSimpleList(args, parsed_globals):
|
|
9177
9385
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9178
9386
|
cred = credential.STSAssumeRoleCredential(
|
9179
9387
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9180
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9388
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9181
9389
|
)
|
9182
9390
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9183
9391
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9229,7 +9437,7 @@ def doDeleteIgnoreVul(args, parsed_globals):
|
|
9229
9437
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9230
9438
|
cred = credential.STSAssumeRoleCredential(
|
9231
9439
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9232
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9440
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9233
9441
|
)
|
9234
9442
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9235
9443
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9281,7 +9489,7 @@ def doModifyAccessControlStatus(args, parsed_globals):
|
|
9281
9489
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9282
9490
|
cred = credential.STSAssumeRoleCredential(
|
9283
9491
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9284
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9492
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9285
9493
|
)
|
9286
9494
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9287
9495
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9333,7 +9541,7 @@ def doCreateEscapeWhiteListExportJob(args, parsed_globals):
|
|
9333
9541
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9334
9542
|
cred = credential.STSAssumeRoleCredential(
|
9335
9543
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9336
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9544
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9337
9545
|
)
|
9338
9546
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9339
9547
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9385,7 +9593,7 @@ def doDescribeEscapeRuleInfo(args, parsed_globals):
|
|
9385
9593
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9386
9594
|
cred = credential.STSAssumeRoleCredential(
|
9387
9595
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9388
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9596
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9389
9597
|
)
|
9390
9598
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9391
9599
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9437,7 +9645,7 @@ def doDescribeAssetImageRiskList(args, parsed_globals):
|
|
9437
9645
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9438
9646
|
cred = credential.STSAssumeRoleCredential(
|
9439
9647
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9440
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9648
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9441
9649
|
)
|
9442
9650
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9443
9651
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9489,7 +9697,7 @@ def doDescribeAssetImageHostList(args, parsed_globals):
|
|
9489
9697
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9490
9698
|
cred = credential.STSAssumeRoleCredential(
|
9491
9699
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9492
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9700
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9493
9701
|
)
|
9494
9702
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9495
9703
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9541,7 +9749,7 @@ def doDescribeClusterSummary(args, parsed_globals):
|
|
9541
9749
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9542
9750
|
cred = credential.STSAssumeRoleCredential(
|
9543
9751
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9544
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9752
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9545
9753
|
)
|
9546
9754
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9547
9755
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9593,7 +9801,7 @@ def doDescribeVulDefenceEventDetail(args, parsed_globals):
|
|
9593
9801
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9594
9802
|
cred = credential.STSAssumeRoleCredential(
|
9595
9803
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9596
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9804
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9597
9805
|
)
|
9598
9806
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9599
9807
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9645,7 +9853,7 @@ def doDescribeNewestVul(args, parsed_globals):
|
|
9645
9853
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9646
9854
|
cred = credential.STSAssumeRoleCredential(
|
9647
9855
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9648
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9856
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9649
9857
|
)
|
9650
9858
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9651
9859
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9697,7 +9905,7 @@ def doDescribeVirusTaskList(args, parsed_globals):
|
|
9697
9905
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9698
9906
|
cred = credential.STSAssumeRoleCredential(
|
9699
9907
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9700
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9908
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9701
9909
|
)
|
9702
9910
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9703
9911
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9749,7 +9957,7 @@ def doDescribeSearchLogs(args, parsed_globals):
|
|
9749
9957
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9750
9958
|
cred = credential.STSAssumeRoleCredential(
|
9751
9959
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9752
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
9960
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9753
9961
|
)
|
9754
9962
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9755
9963
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9801,7 +10009,7 @@ def doAddAssetImageRegistryRegistryDetail(args, parsed_globals):
|
|
9801
10009
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9802
10010
|
cred = credential.STSAssumeRoleCredential(
|
9803
10011
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9804
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10012
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9805
10013
|
)
|
9806
10014
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9807
10015
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9853,7 +10061,7 @@ def doDescribeVirusList(args, parsed_globals):
|
|
9853
10061
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9854
10062
|
cred = credential.STSAssumeRoleCredential(
|
9855
10063
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9856
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10064
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9857
10065
|
)
|
9858
10066
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9859
10067
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9905,7 +10113,7 @@ def doAddAndPublishNetworkFirewallPolicyDetail(args, parsed_globals):
|
|
9905
10113
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9906
10114
|
cred = credential.STSAssumeRoleCredential(
|
9907
10115
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9908
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10116
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9909
10117
|
)
|
9910
10118
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9911
10119
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -9957,7 +10165,7 @@ def doDescribeAbnormalProcessEventTendency(args, parsed_globals):
|
|
9957
10165
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9958
10166
|
cred = credential.STSAssumeRoleCredential(
|
9959
10167
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9960
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10168
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9961
10169
|
)
|
9962
10170
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
9963
10171
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10009,7 +10217,7 @@ def doSyncAssetImageRegistryAsset(args, parsed_globals):
|
|
10009
10217
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10010
10218
|
cred = credential.STSAssumeRoleCredential(
|
10011
10219
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10012
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10220
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10013
10221
|
)
|
10014
10222
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10015
10223
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10061,7 +10269,7 @@ def doDescribeNetworkFirewallClusterRefreshStatus(args, parsed_globals):
|
|
10061
10269
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10062
10270
|
cred = credential.STSAssumeRoleCredential(
|
10063
10271
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10064
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10272
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10065
10273
|
)
|
10066
10274
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10067
10275
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10113,7 +10321,7 @@ def doDescribeImageRiskSummary(args, parsed_globals):
|
|
10113
10321
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10114
10322
|
cred = credential.STSAssumeRoleCredential(
|
10115
10323
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10116
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10324
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10117
10325
|
)
|
10118
10326
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10119
10327
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10165,7 +10373,7 @@ def doDescribeEmergencyVulList(args, parsed_globals):
|
|
10165
10373
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10166
10374
|
cred = credential.STSAssumeRoleCredential(
|
10167
10375
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10168
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10376
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10169
10377
|
)
|
10170
10378
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10171
10379
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10217,7 +10425,7 @@ def doDescribeVulLevelSummary(args, parsed_globals):
|
|
10217
10425
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10218
10426
|
cred = credential.STSAssumeRoleCredential(
|
10219
10427
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10220
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10428
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10221
10429
|
)
|
10222
10430
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10223
10431
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10269,7 +10477,7 @@ def doScanCompliancePolicyItems(args, parsed_globals):
|
|
10269
10477
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10270
10478
|
cred = credential.STSAssumeRoleCredential(
|
10271
10479
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10272
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10480
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10273
10481
|
)
|
10274
10482
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10275
10483
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10321,7 +10529,7 @@ def doModifyVirusAutoIsolateExampleSwitch(args, parsed_globals):
|
|
10321
10529
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10322
10530
|
cred = credential.STSAssumeRoleCredential(
|
10323
10531
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10324
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10532
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10325
10533
|
)
|
10326
10534
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10327
10535
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10373,7 +10581,7 @@ def doDescribeTcssSummary(args, parsed_globals):
|
|
10373
10581
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10374
10582
|
cred = credential.STSAssumeRoleCredential(
|
10375
10583
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10376
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10584
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10377
10585
|
)
|
10378
10586
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10379
10587
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10425,7 +10633,7 @@ def doDescribeVirusMonitorSetting(args, parsed_globals):
|
|
10425
10633
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10426
10634
|
cred = credential.STSAssumeRoleCredential(
|
10427
10635
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10428
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10636
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10429
10637
|
)
|
10430
10638
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10431
10639
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10477,7 +10685,7 @@ def doDescribeVirusAutoIsolateSetting(args, parsed_globals):
|
|
10477
10685
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10478
10686
|
cred = credential.STSAssumeRoleCredential(
|
10479
10687
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10480
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10688
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10481
10689
|
)
|
10482
10690
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10483
10691
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10529,7 +10737,7 @@ def doDescribeEscapeEventTendency(args, parsed_globals):
|
|
10529
10737
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10530
10738
|
cred = credential.STSAssumeRoleCredential(
|
10531
10739
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10532
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10740
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10533
10741
|
)
|
10534
10742
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10535
10743
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10581,7 +10789,7 @@ def doModifyVirusScanTimeoutSetting(args, parsed_globals):
|
|
10581
10789
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10582
10790
|
cred = credential.STSAssumeRoleCredential(
|
10583
10791
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10584
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10792
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10585
10793
|
)
|
10586
10794
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10587
10795
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10633,7 +10841,7 @@ def doDescribeSecLogCleanSettingInfo(args, parsed_globals):
|
|
10633
10841
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10634
10842
|
cred = credential.STSAssumeRoleCredential(
|
10635
10843
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10636
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10844
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10637
10845
|
)
|
10638
10846
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10639
10847
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10685,7 +10893,7 @@ def doDescribeSystemVulList(args, parsed_globals):
|
|
10685
10893
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10686
10894
|
cred = credential.STSAssumeRoleCredential(
|
10687
10895
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10688
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10896
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10689
10897
|
)
|
10690
10898
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10691
10899
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10737,7 +10945,7 @@ def doDescribeVulScanLocalImageList(args, parsed_globals):
|
|
10737
10945
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10738
10946
|
cred = credential.STSAssumeRoleCredential(
|
10739
10947
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10740
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
10948
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10741
10949
|
)
|
10742
10950
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10743
10951
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10789,7 +10997,7 @@ def doDescribeSecLogVasInfo(args, parsed_globals):
|
|
10789
10997
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10790
10998
|
cred = credential.STSAssumeRoleCredential(
|
10791
10999
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10792
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11000
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10793
11001
|
)
|
10794
11002
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10795
11003
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10841,7 +11049,7 @@ def doDescribeEscapeSafeState(args, parsed_globals):
|
|
10841
11049
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10842
11050
|
cred = credential.STSAssumeRoleCredential(
|
10843
11051
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10844
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11052
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10845
11053
|
)
|
10846
11054
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10847
11055
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10893,7 +11101,7 @@ def doDescribeNetworkFirewallNamespaceLabelList(args, parsed_globals):
|
|
10893
11101
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10894
11102
|
cred = credential.STSAssumeRoleCredential(
|
10895
11103
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10896
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11104
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10897
11105
|
)
|
10898
11106
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10899
11107
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10945,7 +11153,7 @@ def doDescribeSecLogDeliveryClsSetting(args, parsed_globals):
|
|
10945
11153
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10946
11154
|
cred = credential.STSAssumeRoleCredential(
|
10947
11155
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10948
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11156
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10949
11157
|
)
|
10950
11158
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
10951
11159
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -10997,7 +11205,7 @@ def doDescribeNetworkFirewallAuditRecord(args, parsed_globals):
|
|
10997
11205
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10998
11206
|
cred = credential.STSAssumeRoleCredential(
|
10999
11207
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11000
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11208
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11001
11209
|
)
|
11002
11210
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11003
11211
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11049,7 +11257,7 @@ def doDescribeContainerSecEventSummary(args, parsed_globals):
|
|
11049
11257
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11050
11258
|
cred = credential.STSAssumeRoleCredential(
|
11051
11259
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11052
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11260
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11053
11261
|
)
|
11054
11262
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11055
11263
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11101,7 +11309,7 @@ def doDescribeImageAutoAuthorizedTaskList(args, parsed_globals):
|
|
11101
11309
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11102
11310
|
cred = credential.STSAssumeRoleCredential(
|
11103
11311
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11104
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11312
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11105
11313
|
)
|
11106
11314
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11107
11315
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11153,7 +11361,7 @@ def doDescribeComplianceTaskPolicyItemSummaryList(args, parsed_globals):
|
|
11153
11361
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11154
11362
|
cred = credential.STSAssumeRoleCredential(
|
11155
11363
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11156
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11364
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11157
11365
|
)
|
11158
11366
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11159
11367
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11205,7 +11413,7 @@ def doDescribeAssetImageList(args, parsed_globals):
|
|
11205
11413
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11206
11414
|
cred = credential.STSAssumeRoleCredential(
|
11207
11415
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11208
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11416
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11209
11417
|
)
|
11210
11418
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11211
11419
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11257,7 +11465,7 @@ def doDeleteK8sApiAbnormalRule(args, parsed_globals):
|
|
11257
11465
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11258
11466
|
cred = credential.STSAssumeRoleCredential(
|
11259
11467
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11260
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11468
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11261
11469
|
)
|
11262
11470
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11263
11471
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11301,7 +11509,7 @@ def doDeleteK8sApiAbnormalRule(args, parsed_globals):
|
|
11301
11509
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11302
11510
|
|
11303
11511
|
|
11304
|
-
def
|
11512
|
+
def doExportVirusList(args, parsed_globals):
|
11305
11513
|
g_param = parse_global_arg(parsed_globals)
|
11306
11514
|
|
11307
11515
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -11309,7 +11517,7 @@ def doDescribeReverseShellEvents(args, parsed_globals):
|
|
11309
11517
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11310
11518
|
cred = credential.STSAssumeRoleCredential(
|
11311
11519
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11312
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11520
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11313
11521
|
)
|
11314
11522
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11315
11523
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11330,11 +11538,11 @@ def doDescribeReverseShellEvents(args, parsed_globals):
|
|
11330
11538
|
client = mod.TcssClient(cred, g_param[OptionsDefine.Region], profile)
|
11331
11539
|
client._sdkVersion += ("_CLI_" + __version__)
|
11332
11540
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11333
|
-
model = models.
|
11541
|
+
model = models.ExportVirusListRequest()
|
11334
11542
|
model.from_json_string(json.dumps(args))
|
11335
11543
|
start_time = time.time()
|
11336
11544
|
while True:
|
11337
|
-
rsp = client.
|
11545
|
+
rsp = client.ExportVirusList(model)
|
11338
11546
|
result = rsp.to_json_string()
|
11339
11547
|
try:
|
11340
11548
|
json_obj = json.loads(result)
|
@@ -11361,7 +11569,7 @@ def doCreateProcessEventsExportJob(args, parsed_globals):
|
|
11361
11569
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11362
11570
|
cred = credential.STSAssumeRoleCredential(
|
11363
11571
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11364
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11572
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11365
11573
|
)
|
11366
11574
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11367
11575
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11413,7 +11621,7 @@ def doDescribeAccessControlEvents(args, parsed_globals):
|
|
11413
11621
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11414
11622
|
cred = credential.STSAssumeRoleCredential(
|
11415
11623
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11416
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11624
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11417
11625
|
)
|
11418
11626
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11419
11627
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11465,7 +11673,7 @@ def doCreateAssetImageRegistryScanTask(args, parsed_globals):
|
|
11465
11673
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11466
11674
|
cred = credential.STSAssumeRoleCredential(
|
11467
11675
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11468
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11676
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11469
11677
|
)
|
11470
11678
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11471
11679
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11517,7 +11725,7 @@ def doModifySecLogKafkaUIN(args, parsed_globals):
|
|
11517
11725
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11518
11726
|
cred = credential.STSAssumeRoleCredential(
|
11519
11727
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11520
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11728
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11521
11729
|
)
|
11522
11730
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11523
11731
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11569,7 +11777,7 @@ def doDescribeUnfinishRefreshTask(args, parsed_globals):
|
|
11569
11777
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11570
11778
|
cred = credential.STSAssumeRoleCredential(
|
11571
11779
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11572
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11780
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11573
11781
|
)
|
11574
11782
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11575
11783
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11621,7 +11829,7 @@ def doModifySecLogJoinState(args, parsed_globals):
|
|
11621
11829
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11622
11830
|
cred = credential.STSAssumeRoleCredential(
|
11623
11831
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11624
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11832
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11625
11833
|
)
|
11626
11834
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11627
11835
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11673,7 +11881,7 @@ def doDeleteCompliancePolicyAssetSetFromWhitelist(args, parsed_globals):
|
|
11673
11881
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11674
11882
|
cred = credential.STSAssumeRoleCredential(
|
11675
11883
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11676
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11884
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11677
11885
|
)
|
11678
11886
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11679
11887
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11725,7 +11933,7 @@ def doScanComplianceScanFailedAssets(args, parsed_globals):
|
|
11725
11933
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11726
11934
|
cred = credential.STSAssumeRoleCredential(
|
11727
11935
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11728
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11936
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11729
11937
|
)
|
11730
11938
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11731
11939
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11777,7 +11985,7 @@ def doDescribeAccessControlDetail(args, parsed_globals):
|
|
11777
11985
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11778
11986
|
cred = credential.STSAssumeRoleCredential(
|
11779
11987
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11780
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
11988
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11781
11989
|
)
|
11782
11990
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11783
11991
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11829,7 +12037,7 @@ def doDescribeAssetImageVulListExport(args, parsed_globals):
|
|
11829
12037
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11830
12038
|
cred = credential.STSAssumeRoleCredential(
|
11831
12039
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11832
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12040
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11833
12041
|
)
|
11834
12042
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11835
12043
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11881,7 +12089,7 @@ def doDescribeAssetImageRegistryList(args, parsed_globals):
|
|
11881
12089
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11882
12090
|
cred = credential.STSAssumeRoleCredential(
|
11883
12091
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11884
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12092
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11885
12093
|
)
|
11886
12094
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11887
12095
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11933,7 +12141,7 @@ def doDescribeAssetProcessList(args, parsed_globals):
|
|
11933
12141
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11934
12142
|
cred = credential.STSAssumeRoleCredential(
|
11935
12143
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11936
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12144
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11937
12145
|
)
|
11938
12146
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11939
12147
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -11985,7 +12193,7 @@ def doDescribeSecLogJoinObjectList(args, parsed_globals):
|
|
11985
12193
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11986
12194
|
cred = credential.STSAssumeRoleCredential(
|
11987
12195
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11988
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12196
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11989
12197
|
)
|
11990
12198
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
11991
12199
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12037,7 +12245,7 @@ def doDescribeK8sApiAbnormalTendency(args, parsed_globals):
|
|
12037
12245
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12038
12246
|
cred = credential.STSAssumeRoleCredential(
|
12039
12247
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12040
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12248
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12041
12249
|
)
|
12042
12250
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12043
12251
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12089,7 +12297,7 @@ def doDescribeAbnormalProcessEvents(args, parsed_globals):
|
|
12089
12297
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12090
12298
|
cred = credential.STSAssumeRoleCredential(
|
12091
12299
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12092
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12300
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12093
12301
|
)
|
12094
12302
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12095
12303
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12141,7 +12349,7 @@ def doUpdateAssetImageRegistryRegistryDetail(args, parsed_globals):
|
|
12141
12349
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12142
12350
|
cred = credential.STSAssumeRoleCredential(
|
12143
12351
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12144
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12352
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12145
12353
|
)
|
12146
12354
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12147
12355
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12193,7 +12401,7 @@ def doDescribeProVersionInfo(args, parsed_globals):
|
|
12193
12401
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12194
12402
|
cred = credential.STSAssumeRoleCredential(
|
12195
12403
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12196
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12404
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12197
12405
|
)
|
12198
12406
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12199
12407
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12245,7 +12453,7 @@ def doDescribeNetworkFirewallNamespaceList(args, parsed_globals):
|
|
12245
12453
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12246
12454
|
cred = credential.STSAssumeRoleCredential(
|
12247
12455
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12248
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12456
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12249
12457
|
)
|
12250
12458
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12251
12459
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12297,7 +12505,7 @@ def doSetCheckMode(args, parsed_globals):
|
|
12297
12505
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12298
12506
|
cred = credential.STSAssumeRoleCredential(
|
12299
12507
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12300
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12508
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12301
12509
|
)
|
12302
12510
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12303
12511
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12349,7 +12557,7 @@ def doModifyVirusFileStatus(args, parsed_globals):
|
|
12349
12557
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12350
12558
|
cred = credential.STSAssumeRoleCredential(
|
12351
12559
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12352
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12560
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12353
12561
|
)
|
12354
12562
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12355
12563
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12401,7 +12609,7 @@ def doDescribeAssetSyncLastTime(args, parsed_globals):
|
|
12401
12609
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12402
12610
|
cred = credential.STSAssumeRoleCredential(
|
12403
12611
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12404
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12612
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12405
12613
|
)
|
12406
12614
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12407
12615
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12453,7 +12661,7 @@ def doDescribeK8sApiAbnormalRuleInfo(args, parsed_globals):
|
|
12453
12661
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12454
12662
|
cred = credential.STSAssumeRoleCredential(
|
12455
12663
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12456
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12664
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12457
12665
|
)
|
12458
12666
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12459
12667
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12505,7 +12713,7 @@ def doDescribeRiskDnsEventDetail(args, parsed_globals):
|
|
12505
12713
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12506
12714
|
cred = credential.STSAssumeRoleCredential(
|
12507
12715
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12508
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12716
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12509
12717
|
)
|
12510
12718
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12511
12719
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12557,7 +12765,7 @@ def doDescribeImageSimpleList(args, parsed_globals):
|
|
12557
12765
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12558
12766
|
cred = credential.STSAssumeRoleCredential(
|
12559
12767
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12560
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12768
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12561
12769
|
)
|
12562
12770
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12563
12771
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12609,7 +12817,7 @@ def doCreateVirusScanTask(args, parsed_globals):
|
|
12609
12817
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12610
12818
|
cred = credential.STSAssumeRoleCredential(
|
12611
12819
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12612
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12820
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12613
12821
|
)
|
12614
12822
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12615
12823
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12661,7 +12869,7 @@ def doDescribeVirusScanSetting(args, parsed_globals):
|
|
12661
12869
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12662
12870
|
cred = credential.STSAssumeRoleCredential(
|
12663
12871
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12664
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12872
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12665
12873
|
)
|
12666
12874
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12667
12875
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12713,7 +12921,7 @@ def doDescribePromotionActivity(args, parsed_globals):
|
|
12713
12921
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12714
12922
|
cred = credential.STSAssumeRoleCredential(
|
12715
12923
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12716
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12924
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12717
12925
|
)
|
12718
12926
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12719
12927
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12765,7 +12973,7 @@ def doDescribeComplianceAssetList(args, parsed_globals):
|
|
12765
12973
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12766
12974
|
cred = credential.STSAssumeRoleCredential(
|
12767
12975
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12768
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
12976
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12769
12977
|
)
|
12770
12978
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12771
12979
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12817,7 +13025,7 @@ def doDescribeCompliancePolicyItemAffectedAssetList(args, parsed_globals):
|
|
12817
13025
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12818
13026
|
cred = credential.STSAssumeRoleCredential(
|
12819
13027
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12820
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13028
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12821
13029
|
)
|
12822
13030
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12823
13031
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12869,7 +13077,7 @@ def doDescribeLogStorageStatistic(args, parsed_globals):
|
|
12869
13077
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12870
13078
|
cred = credential.STSAssumeRoleCredential(
|
12871
13079
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12872
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13080
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12873
13081
|
)
|
12874
13082
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12875
13083
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12921,7 +13129,7 @@ def doModifyAsset(args, parsed_globals):
|
|
12921
13129
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12922
13130
|
cred = credential.STSAssumeRoleCredential(
|
12923
13131
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12924
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13132
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12925
13133
|
)
|
12926
13134
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12927
13135
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -12973,7 +13181,7 @@ def doDescribeAccessControlRulesExport(args, parsed_globals):
|
|
12973
13181
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
12974
13182
|
cred = credential.STSAssumeRoleCredential(
|
12975
13183
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
12976
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13184
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
12977
13185
|
)
|
12978
13186
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
12979
13187
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13025,7 +13233,7 @@ def doDeleteCompliancePolicyItemFromWhitelist(args, parsed_globals):
|
|
13025
13233
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13026
13234
|
cred = credential.STSAssumeRoleCredential(
|
13027
13235
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13028
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13236
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13029
13237
|
)
|
13030
13238
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13031
13239
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13077,7 +13285,7 @@ def doModifyVirusAutoIsolateSetting(args, parsed_globals):
|
|
13077
13285
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13078
13286
|
cred = credential.STSAssumeRoleCredential(
|
13079
13287
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13080
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13288
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13081
13289
|
)
|
13082
13290
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13083
13291
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13129,7 +13337,7 @@ def doDescribeSecLogKafkaUIN(args, parsed_globals):
|
|
13129
13337
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13130
13338
|
cred = credential.STSAssumeRoleCredential(
|
13131
13339
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13132
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13340
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13133
13341
|
)
|
13134
13342
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13135
13343
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13181,7 +13389,7 @@ def doDescribeAbnormalProcessDetail(args, parsed_globals):
|
|
13181
13389
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13182
13390
|
cred = credential.STSAssumeRoleCredential(
|
13183
13391
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13184
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13392
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13185
13393
|
)
|
13186
13394
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13187
13395
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13233,7 +13441,7 @@ def doDescribeWebVulList(args, parsed_globals):
|
|
13233
13441
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13234
13442
|
cred = credential.STSAssumeRoleCredential(
|
13235
13443
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13236
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13444
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13237
13445
|
)
|
13238
13446
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13239
13447
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13285,7 +13493,7 @@ def doDescribeExportJobManageList(args, parsed_globals):
|
|
13285
13493
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13286
13494
|
cred = credential.STSAssumeRoleCredential(
|
13287
13495
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13288
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13496
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13289
13497
|
)
|
13290
13498
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13291
13499
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13337,7 +13545,7 @@ def doConfirmNetworkFirewallPolicy(args, parsed_globals):
|
|
13337
13545
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13338
13546
|
cred = credential.STSAssumeRoleCredential(
|
13339
13547
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13340
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13548
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13341
13549
|
)
|
13342
13550
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13343
13551
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13389,7 +13597,7 @@ def doDescribeAccessControlRuleDetail(args, parsed_globals):
|
|
13389
13597
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13390
13598
|
cred = credential.STSAssumeRoleCredential(
|
13391
13599
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13392
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13600
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13393
13601
|
)
|
13394
13602
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13395
13603
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13441,7 +13649,7 @@ def doDescribeAffectedNodeList(args, parsed_globals):
|
|
13441
13649
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13442
13650
|
cred = credential.STSAssumeRoleCredential(
|
13443
13651
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13444
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13652
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13445
13653
|
)
|
13446
13654
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13447
13655
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13493,7 +13701,7 @@ def doDescribeRiskDnsList(args, parsed_globals):
|
|
13493
13701
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13494
13702
|
cred = credential.STSAssumeRoleCredential(
|
13495
13703
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13496
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13704
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13497
13705
|
)
|
13498
13706
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13499
13707
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13545,7 +13753,7 @@ def doDescribeVirusEventTendency(args, parsed_globals):
|
|
13545
13753
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13546
13754
|
cred = credential.STSAssumeRoleCredential(
|
13547
13755
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13548
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13756
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13549
13757
|
)
|
13550
13758
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13551
13759
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13597,7 +13805,7 @@ def doDescribeImageAutoAuthorizedLogList(args, parsed_globals):
|
|
13597
13805
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13598
13806
|
cred = credential.STSAssumeRoleCredential(
|
13599
13807
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13600
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13808
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13601
13809
|
)
|
13602
13810
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13603
13811
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13649,7 +13857,7 @@ def doDescribeVirusScanTaskStatus(args, parsed_globals):
|
|
13649
13857
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13650
13858
|
cred = credential.STSAssumeRoleCredential(
|
13651
13859
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13652
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13860
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13653
13861
|
)
|
13654
13862
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13655
13863
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13701,7 +13909,7 @@ def doDescribeAssetImageRiskListExport(args, parsed_globals):
|
|
13701
13909
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13702
13910
|
cred = credential.STSAssumeRoleCredential(
|
13703
13911
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13704
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13912
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13705
13913
|
)
|
13706
13914
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13707
13915
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13753,7 +13961,7 @@ def doModifyReverseShellStatus(args, parsed_globals):
|
|
13753
13961
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13754
13962
|
cred = credential.STSAssumeRoleCredential(
|
13755
13963
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13756
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
13964
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13757
13965
|
)
|
13758
13966
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13759
13967
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13805,7 +14013,7 @@ def doDescribeUserCluster(args, parsed_globals):
|
|
13805
14013
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13806
14014
|
cred = credential.STSAssumeRoleCredential(
|
13807
14015
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13808
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14016
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13809
14017
|
)
|
13810
14018
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13811
14019
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13857,7 +14065,7 @@ def doDescribeSecLogJoinTypeList(args, parsed_globals):
|
|
13857
14065
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13858
14066
|
cred = credential.STSAssumeRoleCredential(
|
13859
14067
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13860
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14068
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13861
14069
|
)
|
13862
14070
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13863
14071
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13909,7 +14117,7 @@ def doDescribeVulIgnoreLocalImageList(args, parsed_globals):
|
|
13909
14117
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13910
14118
|
cred = credential.STSAssumeRoleCredential(
|
13911
14119
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13912
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14120
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13913
14121
|
)
|
13914
14122
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13915
14123
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -13961,7 +14169,7 @@ def doDescribeVulRegistryImageList(args, parsed_globals):
|
|
13961
14169
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
13962
14170
|
cred = credential.STSAssumeRoleCredential(
|
13963
14171
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
13964
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14172
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
13965
14173
|
)
|
13966
14174
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
13967
14175
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14013,7 +14221,7 @@ def doDescribeVulLevelImageSummary(args, parsed_globals):
|
|
14013
14221
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14014
14222
|
cred = credential.STSAssumeRoleCredential(
|
14015
14223
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14016
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14224
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14017
14225
|
)
|
14018
14226
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14019
14227
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14065,7 +14273,7 @@ def doModifySecLogCleanSettingInfo(args, parsed_globals):
|
|
14065
14273
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14066
14274
|
cred = credential.STSAssumeRoleCredential(
|
14067
14275
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14068
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14276
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14069
14277
|
)
|
14070
14278
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14071
14279
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14117,7 +14325,7 @@ def doCreateVirusScanAgain(args, parsed_globals):
|
|
14117
14325
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14118
14326
|
cred = credential.STSAssumeRoleCredential(
|
14119
14327
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14120
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14328
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14121
14329
|
)
|
14122
14330
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14123
14331
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14169,7 +14377,7 @@ def doDescribeAutoAuthorizedRuleHost(args, parsed_globals):
|
|
14169
14377
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14170
14378
|
cred = credential.STSAssumeRoleCredential(
|
14171
14379
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14172
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14380
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14173
14381
|
)
|
14174
14382
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14175
14383
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14221,7 +14429,7 @@ def doDescribeRiskList(args, parsed_globals):
|
|
14221
14429
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14222
14430
|
cred = credential.STSAssumeRoleCredential(
|
14223
14431
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14224
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14432
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14225
14433
|
)
|
14226
14434
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14227
14435
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14273,7 +14481,7 @@ def doDescribeVirusSampleDownloadUrl(args, parsed_globals):
|
|
14273
14481
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14274
14482
|
cred = credential.STSAssumeRoleCredential(
|
14275
14483
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14276
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14484
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14277
14485
|
)
|
14278
14486
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14279
14487
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14325,7 +14533,7 @@ def doDescribeESHits(args, parsed_globals):
|
|
14325
14533
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14326
14534
|
cred = credential.STSAssumeRoleCredential(
|
14327
14535
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14328
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14536
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14329
14537
|
)
|
14330
14538
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14331
14539
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14377,7 +14585,7 @@ def doAddAndPublishNetworkFirewallPolicyYamlDetail(args, parsed_globals):
|
|
14377
14585
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14378
14586
|
cred = credential.STSAssumeRoleCredential(
|
14379
14587
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14380
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14588
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14381
14589
|
)
|
14382
14590
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14383
14591
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14429,7 +14637,7 @@ def doDescribeUnauthorizedCoresTendency(args, parsed_globals):
|
|
14429
14637
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14430
14638
|
cred = credential.STSAssumeRoleCredential(
|
14431
14639
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14432
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14640
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14433
14641
|
)
|
14434
14642
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14435
14643
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14481,7 +14689,7 @@ def doCreateEscapeEventsExportJob(args, parsed_globals):
|
|
14481
14689
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14482
14690
|
cred = credential.STSAssumeRoleCredential(
|
14483
14691
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14484
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14692
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14485
14693
|
)
|
14486
14694
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14487
14695
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14533,7 +14741,7 @@ def doDescribeAssetImageVulList(args, parsed_globals):
|
|
14533
14741
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14534
14742
|
cred = credential.STSAssumeRoleCredential(
|
14535
14743
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14536
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14744
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14537
14745
|
)
|
14538
14746
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14539
14747
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14585,7 +14793,7 @@ def doDescribeVulTopRanking(args, parsed_globals):
|
|
14585
14793
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14586
14794
|
cred = credential.STSAssumeRoleCredential(
|
14587
14795
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14588
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14796
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14589
14797
|
)
|
14590
14798
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14591
14799
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14637,7 +14845,7 @@ def doDescribeWarningRules(args, parsed_globals):
|
|
14637
14845
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14638
14846
|
cred = credential.STSAssumeRoleCredential(
|
14639
14847
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14640
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14848
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14641
14849
|
)
|
14642
14850
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14643
14851
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14689,7 +14897,7 @@ def doDescribeVulScanAuthorizedImageSummary(args, parsed_globals):
|
|
14689
14897
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14690
14898
|
cred = credential.STSAssumeRoleCredential(
|
14691
14899
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14692
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14900
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14693
14901
|
)
|
14694
14902
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14695
14903
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14741,7 +14949,7 @@ def doAddCompliancePolicyItemToWhitelist(args, parsed_globals):
|
|
14741
14949
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14742
14950
|
cred = credential.STSAssumeRoleCredential(
|
14743
14951
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14744
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
14952
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14745
14953
|
)
|
14746
14954
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14747
14955
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14793,7 +15001,7 @@ def doInitializeUserComplianceEnvironment(args, parsed_globals):
|
|
14793
15001
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14794
15002
|
cred = credential.STSAssumeRoleCredential(
|
14795
15003
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14796
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15004
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14797
15005
|
)
|
14798
15006
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14799
15007
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14845,7 +15053,7 @@ def doCreateOrModifyPostPayCores(args, parsed_globals):
|
|
14845
15053
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14846
15054
|
cred = credential.STSAssumeRoleCredential(
|
14847
15055
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14848
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15056
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14849
15057
|
)
|
14850
15058
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14851
15059
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14897,7 +15105,7 @@ def doModifyCompliancePeriodTask(args, parsed_globals):
|
|
14897
15105
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14898
15106
|
cred = credential.STSAssumeRoleCredential(
|
14899
15107
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14900
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15108
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14901
15109
|
)
|
14902
15110
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14903
15111
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -14949,7 +15157,7 @@ def doDescribeAssetImageRegistrySummary(args, parsed_globals):
|
|
14949
15157
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
14950
15158
|
cred = credential.STSAssumeRoleCredential(
|
14951
15159
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
14952
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15160
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
14953
15161
|
)
|
14954
15162
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
14955
15163
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15001,7 +15209,7 @@ def doOpenTcssTrial(args, parsed_globals):
|
|
15001
15209
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15002
15210
|
cred = credential.STSAssumeRoleCredential(
|
15003
15211
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15004
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15212
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15005
15213
|
)
|
15006
15214
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15007
15215
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15053,7 +15261,7 @@ def doDescribeRiskSyscallNames(args, parsed_globals):
|
|
15053
15261
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15054
15262
|
cred = credential.STSAssumeRoleCredential(
|
15055
15263
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15056
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15264
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15057
15265
|
)
|
15058
15266
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15059
15267
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15105,7 +15313,7 @@ def doScanComplianceAssetsByPolicyItem(args, parsed_globals):
|
|
15105
15313
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15106
15314
|
cred = credential.STSAssumeRoleCredential(
|
15107
15315
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15108
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15316
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15109
15317
|
)
|
15110
15318
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15111
15319
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15157,7 +15365,7 @@ def doDescribeImageAuthorizedInfo(args, parsed_globals):
|
|
15157
15365
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15158
15366
|
cred = credential.STSAssumeRoleCredential(
|
15159
15367
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15160
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15368
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15161
15369
|
)
|
15162
15370
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15163
15371
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15209,7 +15417,7 @@ def doDescribeRiskSyscallEvents(args, parsed_globals):
|
|
15209
15417
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15210
15418
|
cred = credential.STSAssumeRoleCredential(
|
15211
15419
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15212
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15420
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15213
15421
|
)
|
15214
15422
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15215
15423
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15261,7 +15469,7 @@ def doCreateNetworkFirewallUndoPublish(args, parsed_globals):
|
|
15261
15469
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15262
15470
|
cred = credential.STSAssumeRoleCredential(
|
15263
15471
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15264
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15472
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15265
15473
|
)
|
15266
15474
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15267
15475
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15313,7 +15521,7 @@ def doModifyAbnormalProcessRuleStatus(args, parsed_globals):
|
|
15313
15521
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15314
15522
|
cred = credential.STSAssumeRoleCredential(
|
15315
15523
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15316
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15524
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15317
15525
|
)
|
15318
15526
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15319
15527
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15365,7 +15573,7 @@ def doDescribeABTestConfig(args, parsed_globals):
|
|
15365
15573
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15366
15574
|
cred = credential.STSAssumeRoleCredential(
|
15367
15575
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15368
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15576
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15369
15577
|
)
|
15370
15578
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15371
15579
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15417,7 +15625,7 @@ def doDescribeVulTendency(args, parsed_globals):
|
|
15417
15625
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15418
15626
|
cred = credential.STSAssumeRoleCredential(
|
15419
15627
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15420
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15628
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15421
15629
|
)
|
15422
15630
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15423
15631
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15469,7 +15677,7 @@ def doDescribeReverseShellWhiteListDetail(args, parsed_globals):
|
|
15469
15677
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15470
15678
|
cred = credential.STSAssumeRoleCredential(
|
15471
15679
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15472
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15680
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15473
15681
|
)
|
15474
15682
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15475
15683
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15521,7 +15729,7 @@ def doCreateAssetImageScanSetting(args, parsed_globals):
|
|
15521
15729
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15522
15730
|
cred = credential.STSAssumeRoleCredential(
|
15523
15731
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15524
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15732
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15525
15733
|
)
|
15526
15734
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15527
15735
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15573,7 +15781,7 @@ def doDescribeAssetImageVirusList(args, parsed_globals):
|
|
15573
15781
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15574
15782
|
cred = credential.STSAssumeRoleCredential(
|
15575
15783
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15576
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15784
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15577
15785
|
)
|
15578
15786
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15579
15787
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15625,7 +15833,7 @@ def doDescribeSecEventsTendency(args, parsed_globals):
|
|
15625
15833
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15626
15834
|
cred = credential.STSAssumeRoleCredential(
|
15627
15835
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15628
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15836
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15629
15837
|
)
|
15630
15838
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15631
15839
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15677,7 +15885,7 @@ def doCreateK8sApiAbnormalRuleInfo(args, parsed_globals):
|
|
15677
15885
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15678
15886
|
cred = credential.STSAssumeRoleCredential(
|
15679
15887
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15680
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15888
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15681
15889
|
)
|
15682
15890
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15683
15891
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15729,7 +15937,7 @@ def doDescribeVulDefenceEvent(args, parsed_globals):
|
|
15729
15937
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15730
15938
|
cred = credential.STSAssumeRoleCredential(
|
15731
15939
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15732
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15940
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15733
15941
|
)
|
15734
15942
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15735
15943
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15781,7 +15989,7 @@ def doDescribeSecLogDeliveryKafkaSetting(args, parsed_globals):
|
|
15781
15989
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15782
15990
|
cred = credential.STSAssumeRoleCredential(
|
15783
15991
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15784
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
15992
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15785
15993
|
)
|
15786
15994
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15787
15995
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15833,7 +16041,7 @@ def doDescribeInspectionReport(args, parsed_globals):
|
|
15833
16041
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15834
16042
|
cred = credential.STSAssumeRoleCredential(
|
15835
16043
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15836
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16044
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15837
16045
|
)
|
15838
16046
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15839
16047
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15877,7 +16085,7 @@ def doDescribeInspectionReport(args, parsed_globals):
|
|
15877
16085
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
15878
16086
|
|
15879
16087
|
|
15880
|
-
def
|
16088
|
+
def doDescribeReverseShellEvents(args, parsed_globals):
|
15881
16089
|
g_param = parse_global_arg(parsed_globals)
|
15882
16090
|
|
15883
16091
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -15885,7 +16093,7 @@ def doDeleteNetworkFirewallPolicyDetail(args, parsed_globals):
|
|
15885
16093
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15886
16094
|
cred = credential.STSAssumeRoleCredential(
|
15887
16095
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15888
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16096
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15889
16097
|
)
|
15890
16098
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15891
16099
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15906,11 +16114,11 @@ def doDeleteNetworkFirewallPolicyDetail(args, parsed_globals):
|
|
15906
16114
|
client = mod.TcssClient(cred, g_param[OptionsDefine.Region], profile)
|
15907
16115
|
client._sdkVersion += ("_CLI_" + __version__)
|
15908
16116
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
15909
|
-
model = models.
|
16117
|
+
model = models.DescribeReverseShellEventsRequest()
|
15910
16118
|
model.from_json_string(json.dumps(args))
|
15911
16119
|
start_time = time.time()
|
15912
16120
|
while True:
|
15913
|
-
rsp = client.
|
16121
|
+
rsp = client.DescribeReverseShellEvents(model)
|
15914
16122
|
result = rsp.to_json_string()
|
15915
16123
|
try:
|
15916
16124
|
json_obj = json.loads(result)
|
@@ -15937,7 +16145,7 @@ def doCreateHostExportJob(args, parsed_globals):
|
|
15937
16145
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15938
16146
|
cred = credential.STSAssumeRoleCredential(
|
15939
16147
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15940
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16148
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15941
16149
|
)
|
15942
16150
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15943
16151
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -15989,7 +16197,7 @@ def doDescribeSearchTemplates(args, parsed_globals):
|
|
15989
16197
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
15990
16198
|
cred = credential.STSAssumeRoleCredential(
|
15991
16199
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
15992
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16200
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
15993
16201
|
)
|
15994
16202
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
15995
16203
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16041,7 +16249,7 @@ def doDescribeImageComponentList(args, parsed_globals):
|
|
16041
16249
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16042
16250
|
cred = credential.STSAssumeRoleCredential(
|
16043
16251
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16044
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16252
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16045
16253
|
)
|
16046
16254
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16047
16255
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16093,7 +16301,7 @@ def doCheckRepeatAssetImageRegistry(args, parsed_globals):
|
|
16093
16301
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16094
16302
|
cred = credential.STSAssumeRoleCredential(
|
16095
16303
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16096
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16304
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16097
16305
|
)
|
16098
16306
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16099
16307
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16145,7 +16353,7 @@ def doAddNetworkFirewallPolicyDetail(args, parsed_globals):
|
|
16145
16353
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16146
16354
|
cred = credential.STSAssumeRoleCredential(
|
16147
16355
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16148
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16356
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16149
16357
|
)
|
16150
16358
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16151
16359
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16197,7 +16405,7 @@ def doModifyVulDefenceEventStatus(args, parsed_globals):
|
|
16197
16405
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16198
16406
|
cred = credential.STSAssumeRoleCredential(
|
16199
16407
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16200
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16408
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16201
16409
|
)
|
16202
16410
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16203
16411
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16249,7 +16457,7 @@ def doAddEditAbnormalProcessRule(args, parsed_globals):
|
|
16249
16457
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16250
16458
|
cred = credential.STSAssumeRoleCredential(
|
16251
16459
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16252
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16460
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16253
16461
|
)
|
16254
16462
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16255
16463
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16301,7 +16509,7 @@ def doDescribeVulContainerList(args, parsed_globals):
|
|
16301
16509
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16302
16510
|
cred = credential.STSAssumeRoleCredential(
|
16303
16511
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16304
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16512
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16305
16513
|
)
|
16306
16514
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16307
16515
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16353,7 +16561,7 @@ def doDescribeVulDefenceSetting(args, parsed_globals):
|
|
16353
16561
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16354
16562
|
cred = credential.STSAssumeRoleCredential(
|
16355
16563
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16356
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16564
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16357
16565
|
)
|
16358
16566
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16359
16567
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16397,7 +16605,7 @@ def doDescribeVulDefenceSetting(args, parsed_globals):
|
|
16397
16605
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
16398
16606
|
|
16399
16607
|
|
16400
|
-
def
|
16608
|
+
def doDescribeUserPodList(args, parsed_globals):
|
16401
16609
|
g_param = parse_global_arg(parsed_globals)
|
16402
16610
|
|
16403
16611
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -16405,7 +16613,7 @@ def doExportVirusList(args, parsed_globals):
|
|
16405
16613
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16406
16614
|
cred = credential.STSAssumeRoleCredential(
|
16407
16615
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16408
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16616
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16409
16617
|
)
|
16410
16618
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16411
16619
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16426,11 +16634,11 @@ def doExportVirusList(args, parsed_globals):
|
|
16426
16634
|
client = mod.TcssClient(cred, g_param[OptionsDefine.Region], profile)
|
16427
16635
|
client._sdkVersion += ("_CLI_" + __version__)
|
16428
16636
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
16429
|
-
model = models.
|
16637
|
+
model = models.DescribeUserPodListRequest()
|
16430
16638
|
model.from_json_string(json.dumps(args))
|
16431
16639
|
start_time = time.time()
|
16432
16640
|
while True:
|
16433
|
-
rsp = client.
|
16641
|
+
rsp = client.DescribeUserPodList(model)
|
16434
16642
|
result = rsp.to_json_string()
|
16435
16643
|
try:
|
16436
16644
|
json_obj = json.loads(result)
|
@@ -16457,7 +16665,7 @@ def doDescribeNetworkFirewallPolicyDetail(args, parsed_globals):
|
|
16457
16665
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16458
16666
|
cred = credential.STSAssumeRoleCredential(
|
16459
16667
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16460
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16668
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16461
16669
|
)
|
16462
16670
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16463
16671
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16509,7 +16717,7 @@ def doDescribeAssetImageRegistryVulListExport(args, parsed_globals):
|
|
16509
16717
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16510
16718
|
cred = credential.STSAssumeRoleCredential(
|
16511
16719
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16512
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16720
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16513
16721
|
)
|
16514
16722
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16515
16723
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16561,7 +16769,7 @@ def doRenewImageAuthorizeState(args, parsed_globals):
|
|
16561
16769
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16562
16770
|
cred = credential.STSAssumeRoleCredential(
|
16563
16771
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16564
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16772
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16565
16773
|
)
|
16566
16774
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16567
16775
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16613,7 +16821,7 @@ def doDescribeRiskSyscallWhiteLists(args, parsed_globals):
|
|
16613
16821
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16614
16822
|
cred = credential.STSAssumeRoleCredential(
|
16615
16823
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16616
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16824
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16617
16825
|
)
|
16618
16826
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16619
16827
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16665,7 +16873,7 @@ def doDescribeAssetImageRegistryVulList(args, parsed_globals):
|
|
16665
16873
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16666
16874
|
cred = credential.STSAssumeRoleCredential(
|
16667
16875
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16668
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16876
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16669
16877
|
)
|
16670
16878
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16671
16879
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16717,7 +16925,7 @@ def doDescribeEscapeEventTypeSummary(args, parsed_globals):
|
|
16717
16925
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16718
16926
|
cred = credential.STSAssumeRoleCredential(
|
16719
16927
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16720
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16928
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16721
16929
|
)
|
16722
16930
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16723
16931
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16769,7 +16977,7 @@ def doDescribeVirusAutoIsolateSampleList(args, parsed_globals):
|
|
16769
16977
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16770
16978
|
cred = credential.STSAssumeRoleCredential(
|
16771
16979
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16772
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
16980
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16773
16981
|
)
|
16774
16982
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16775
16983
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16821,7 +17029,7 @@ def doDescribeSecLogAlertMsg(args, parsed_globals):
|
|
16821
17029
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16822
17030
|
cred = credential.STSAssumeRoleCredential(
|
16823
17031
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16824
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
17032
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16825
17033
|
)
|
16826
17034
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16827
17035
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16873,7 +17081,7 @@ def doModifyK8sApiAbnormalRuleStatus(args, parsed_globals):
|
|
16873
17081
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16874
17082
|
cred = credential.STSAssumeRoleCredential(
|
16875
17083
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16876
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
17084
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16877
17085
|
)
|
16878
17086
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16879
17087
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16925,7 +17133,7 @@ def doDescribeVulSummary(args, parsed_globals):
|
|
16925
17133
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16926
17134
|
cred = credential.STSAssumeRoleCredential(
|
16927
17135
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16928
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
17136
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16929
17137
|
)
|
16930
17138
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16931
17139
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -16977,7 +17185,7 @@ def doDescribeAssetImageDetail(args, parsed_globals):
|
|
16977
17185
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
16978
17186
|
cred = credential.STSAssumeRoleCredential(
|
16979
17187
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
16980
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
17188
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
16981
17189
|
)
|
16982
17190
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
16983
17191
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -17029,7 +17237,7 @@ def doDeleteReverseShellWhiteLists(args, parsed_globals):
|
|
17029
17237
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
17030
17238
|
cred = credential.STSAssumeRoleCredential(
|
17031
17239
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
17032
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
17240
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
17033
17241
|
)
|
17034
17242
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
17035
17243
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -17081,7 +17289,7 @@ def doDescribeK8sApiAbnormalEventInfo(args, parsed_globals):
|
|
17081
17289
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
17082
17290
|
cred = credential.STSAssumeRoleCredential(
|
17083
17291
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
17084
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
17292
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
17085
17293
|
)
|
17086
17294
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
17087
17295
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -17133,7 +17341,7 @@ def doDescribeK8sApiAbnormalRuleList(args, parsed_globals):
|
|
17133
17341
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
17134
17342
|
cred = credential.STSAssumeRoleCredential(
|
17135
17343
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
17136
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
17344
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
17137
17345
|
)
|
17138
17346
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
17139
17347
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -17185,7 +17393,7 @@ def doCreateAccessControlsRuleExportJob(args, parsed_globals):
|
|
17185
17393
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
17186
17394
|
cred = credential.STSAssumeRoleCredential(
|
17187
17395
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
17188
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
17396
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
17189
17397
|
)
|
17190
17398
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
17191
17399
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -17237,7 +17445,7 @@ def doUpdateNetworkFirewallPolicyYamlDetail(args, parsed_globals):
|
|
17237
17445
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
17238
17446
|
cred = credential.STSAssumeRoleCredential(
|
17239
17447
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
17240
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
17448
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
17241
17449
|
)
|
17242
17450
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
17243
17451
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -17289,7 +17497,7 @@ def doAddEditRiskSyscallWhiteList(args, parsed_globals):
|
|
17289
17497
|
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
17290
17498
|
cred = credential.STSAssumeRoleCredential(
|
17291
17499
|
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
17292
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
17500
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
17293
17501
|
)
|
17294
17502
|
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
17295
17503
|
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
@@ -17378,6 +17586,7 @@ ACTION_MAP = {
|
|
17378
17586
|
"DescribeNetworkFirewallPodLabelsList": doDescribeNetworkFirewallPodLabelsList,
|
17379
17587
|
"DescribeAssetComponentList": doDescribeAssetComponentList,
|
17380
17588
|
"DescribeAssetImageScanStatus": doDescribeAssetImageScanStatus,
|
17589
|
+
"DescribeClusterNodes": doDescribeClusterNodes,
|
17381
17590
|
"CreateAssetImageScanTask": doCreateAssetImageScanTask,
|
17382
17591
|
"CreateK8sApiAbnormalRuleExportJob": doCreateK8sApiAbnormalRuleExportJob,
|
17383
17592
|
"CreateNetworkFirewallPolicyDiscover": doCreateNetworkFirewallPolicyDiscover,
|
@@ -17446,6 +17655,7 @@ ACTION_MAP = {
|
|
17446
17655
|
"AddComplianceAssetPolicySetToWhitelist": doAddComplianceAssetPolicySetToWhitelist,
|
17447
17656
|
"ModifySecLogJoinObjects": doModifySecLogJoinObjects,
|
17448
17657
|
"DescribeContainerAssetSummary": doDescribeContainerAssetSummary,
|
17658
|
+
"DescribeAssetSuperNodeList": doDescribeAssetSuperNodeList,
|
17449
17659
|
"DescribeImageRegistryTimingScanTask": doDescribeImageRegistryTimingScanTask,
|
17450
17660
|
"DescribeReverseShellEventsExport": doDescribeReverseShellEventsExport,
|
17451
17661
|
"DescribeAssetDBServiceList": doDescribeAssetDBServiceList,
|
@@ -17474,6 +17684,7 @@ ACTION_MAP = {
|
|
17474
17684
|
"DescribeAssetContainerList": doDescribeAssetContainerList,
|
17475
17685
|
"CreateSearchTemplate": doCreateSearchTemplate,
|
17476
17686
|
"DescribePostPayDetail": doDescribePostPayDetail,
|
17687
|
+
"DescribeSuperNodePodList": doDescribeSuperNodePodList,
|
17477
17688
|
"AddNetworkFirewallPolicyYamlDetail": doAddNetworkFirewallPolicyYamlDetail,
|
17478
17689
|
"DescribeAffectedClusterCount": doDescribeAffectedClusterCount,
|
17479
17690
|
"ModifyVirusMonitorSetting": doModifyVirusMonitorSetting,
|
@@ -17507,6 +17718,7 @@ ACTION_MAP = {
|
|
17507
17718
|
"DescribeAssetPortList": doDescribeAssetPortList,
|
17508
17719
|
"StopVulScanTask": doStopVulScanTask,
|
17509
17720
|
"DescribeAssetImageRegistryRiskListExport": doDescribeAssetImageRegistryRiskListExport,
|
17721
|
+
"DeleteNetworkFirewallPolicyDetail": doDeleteNetworkFirewallPolicyDetail,
|
17510
17722
|
"DescribeSupportDefenceVul": doDescribeSupportDefenceVul,
|
17511
17723
|
"DescribeVulDefenceHost": doDescribeVulDefenceHost,
|
17512
17724
|
"DescribeK8sApiAbnormalSummary": doDescribeK8sApiAbnormalSummary,
|
@@ -17561,7 +17773,7 @@ ACTION_MAP = {
|
|
17561
17773
|
"DescribeComplianceTaskPolicyItemSummaryList": doDescribeComplianceTaskPolicyItemSummaryList,
|
17562
17774
|
"DescribeAssetImageList": doDescribeAssetImageList,
|
17563
17775
|
"DeleteK8sApiAbnormalRule": doDeleteK8sApiAbnormalRule,
|
17564
|
-
"
|
17776
|
+
"ExportVirusList": doExportVirusList,
|
17565
17777
|
"CreateProcessEventsExportJob": doCreateProcessEventsExportJob,
|
17566
17778
|
"DescribeAccessControlEvents": doDescribeAccessControlEvents,
|
17567
17779
|
"CreateAssetImageRegistryScanTask": doCreateAssetImageRegistryScanTask,
|
@@ -17649,7 +17861,7 @@ ACTION_MAP = {
|
|
17649
17861
|
"DescribeVulDefenceEvent": doDescribeVulDefenceEvent,
|
17650
17862
|
"DescribeSecLogDeliveryKafkaSetting": doDescribeSecLogDeliveryKafkaSetting,
|
17651
17863
|
"DescribeInspectionReport": doDescribeInspectionReport,
|
17652
|
-
"
|
17864
|
+
"DescribeReverseShellEvents": doDescribeReverseShellEvents,
|
17653
17865
|
"CreateHostExportJob": doCreateHostExportJob,
|
17654
17866
|
"DescribeSearchTemplates": doDescribeSearchTemplates,
|
17655
17867
|
"DescribeImageComponentList": doDescribeImageComponentList,
|
@@ -17659,7 +17871,7 @@ ACTION_MAP = {
|
|
17659
17871
|
"AddEditAbnormalProcessRule": doAddEditAbnormalProcessRule,
|
17660
17872
|
"DescribeVulContainerList": doDescribeVulContainerList,
|
17661
17873
|
"DescribeVulDefenceSetting": doDescribeVulDefenceSetting,
|
17662
|
-
"
|
17874
|
+
"DescribeUserPodList": doDescribeUserPodList,
|
17663
17875
|
"DescribeNetworkFirewallPolicyDetail": doDescribeNetworkFirewallPolicyDetail,
|
17664
17876
|
"DescribeAssetImageRegistryVulListExport": doDescribeAssetImageRegistryVulListExport,
|
17665
17877
|
"RenewImageAuthorizeState": doRenewImageAuthorizeState,
|
@@ -17757,6 +17969,7 @@ def parse_global_arg(parsed_globals):
|
|
17757
17969
|
|
17758
17970
|
if g_param[OptionsDefine.Endpoint] is None:
|
17759
17971
|
g_param[OptionsDefine.Endpoint] = conf["tcss"][OptionsDefine.Endpoint]
|
17972
|
+
g_param["sts_cred_endpoint"] = conf.get("sts", {}).get("endpoint")
|
17760
17973
|
except Exception as err:
|
17761
17974
|
raise ConfigurationError("config file:%s error, %s" % (conf_path, str(err)))
|
17762
17975
|
|