Skip to content

Commit ba48a88

Browse files
author
wenfeng.wf
committed
Add sts token support.
1 parent 90f9a3b commit ba48a88

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/alibabacloud_rds_openapi_mcp_server/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def get_rds_client(region_id: str):
7979
config = Config(
8080
access_key_id=os.getenv('ALIBABA_CLOUD_ACCESS_KEY_ID'),
8181
access_key_secret=os.getenv('ALIBABA_CLOUD_ACCESS_KEY_SECRET'),
82+
security_token=os.getenv('ALIBABA_CLOUD_SECURITY_TOKEN'),
8283
region_id=region_id,
8384
protocol="https",
8485
connect_timeout=10 * 1000,
@@ -100,6 +101,7 @@ def get_vpc_client(region_id: str) -> VpcClient:
100101
config = Config(
101102
access_key_id=os.getenv('ALIBABA_CLOUD_ACCESS_KEY_ID'),
102103
access_key_secret=os.getenv('ALIBABA_CLOUD_ACCESS_KEY_SECRET'),
104+
security_token=os.getenv('ALIBABA_CLOUD_SECURITY_TOKEN'),
103105
region_id=region_id,
104106
protocol="https",
105107
connect_timeout=10 * 1000,
@@ -112,6 +114,7 @@ def get_bill_client(region_id: str):
112114
config = Config(
113115
access_key_id=os.getenv('ALIBABA_CLOUD_ACCESS_KEY_ID'),
114116
access_key_secret=os.getenv('ALIBABA_CLOUD_ACCESS_KEY_SECRET'),
117+
security_token=os.getenv('ALIBABA_CLOUD_SECURITY_TOKEN'),
115118
region_id=region_id,
116119
protocol="https",
117120
connect_timeout=10 * 1000,

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)