Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/testPython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: pip install alibabacloud-tea coverage pytest
- name: Test with unittest
run: |
coverage run --source="./alibabcloud_credentials" -m pytest tests/
coverage run -m unittest discover
env:
SUB_ALIBABA_CLOUD_ACCESS_KEY: ${{ secrets.SUB_ALIBABA_CLOUD_ACCESS_KEY }}
SUB_ALIBABA_CLOUD_SECRET_KEY: ${{ secrets.SUB_ALIBABA_CLOUD_SECRET_KEY }}
Expand Down
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 2024-05-24 Version 0.3.3
* Support IMDSv2 for ecs ram role.
* Support env ALIBABA_CLOUD_ECS_IMDSV2_ENABLE.

### 2023-02-28 Version 0.3.2
* Support credentials.ini under $HOME.

Expand Down
3 changes: 2 additions & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ from alibabacloud_credentials.models import Config

config = Config(
type='ecs_ram_role', # 凭证类型
role_name='roleName' # 账户RoleName,非必填,不填则自动获取,建议设置,可以减少请求
role_name='roleName', # 账户RoleName,非必填,不填则自动获取,建议设置,可以减少请求
enable_imds_v2=True # 开启 V2 安全访问,非必填,可以设置环境变量来开启:ALIBABA_CLOUD_ECS_IMDSV2_ENABLE=true
)
cred = Client(config)

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ from alibabacloud_credentials.models import Config

config = Config(
type='ecs_ram_role', # credential type
role_name='roleName' # `roleName` is optional. It will be retrieved automatically if not set. It is highly recommended to set it up to reduce requests.
role_name='roleName', # `role_name` is optional. It will be retrieved automatically if not set. It is highly recommended to set it up to reduce requests.
enable_imds_v2=True # `enable_imds_v2` is optional and is recommended to be turned on. It can be replaced by setting environment variable: ALIBABA_CLOUD_ECS_IMDSV2_ENABLE
)
cred = Client(config)

Expand Down
2 changes: 1 addition & 1 deletion alibabacloud_credentials/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.2"
__version__ = "0.3.3"