This is an automated email from the ASF dual-hosted git repository.
timsaucer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-python.git
The following commit(s) were added to refs/heads/main by this push:
new 60123493 feat: support session token parameter for AmaoznS3 (#1275)
60123493 is described below
commit 60123493fe438acb0a85b4b294975f63e954f40f
Author: GCHQDeveloper028 <[email protected]>
AuthorDate: Thu Oct 16 17:33:26 2025 +0100
feat: support session token parameter for AmaoznS3 (#1275)
---
src/store.rs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/store.rs b/src/store.rs
index 99868185..08702e90 100644
--- a/src/store.rs
+++ b/src/store.rs
@@ -179,13 +179,14 @@ pub struct PyAmazonS3Context {
#[pymethods]
impl PyAmazonS3Context {
#[allow(clippy::too_many_arguments)]
- #[pyo3(signature = (bucket_name, region=None, access_key_id=None,
secret_access_key=None, endpoint=None, allow_http=false,
imdsv1_fallback=false))]
+ #[pyo3(signature = (bucket_name, region=None, access_key_id=None,
secret_access_key=None, session_token=None, endpoint=None, allow_http=false,
imdsv1_fallback=false))]
#[new]
fn new(
bucket_name: String,
region: Option<String>,
access_key_id: Option<String>,
secret_access_key: Option<String>,
+ session_token: Option<String>,
endpoint: Option<String>,
//retry_config: RetryConfig,
allow_http: bool,
@@ -206,6 +207,10 @@ impl PyAmazonS3Context {
builder = builder.with_secret_access_key(secret_access_key);
};
+ if let Some(session_token) = session_token {
+ builder = builder.with_token(session_token);
+ }
+
if let Some(endpoint) = endpoint {
builder = builder.with_endpoint(endpoint);
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]