Skip to content

Commit 00cebd2

Browse files
release 3.1.165 source code
1 parent 9d8c044 commit 00cebd2

File tree

1,498 files changed

+120654
-31859
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,498 files changed

+120654
-31859
lines changed

CHANGELOG.md

Lines changed: 716 additions & 0 deletions
Large diffs are not rendered by default.

CHANGELOG_CN.md

Lines changed: 716 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ the [CHANGELOG.md](https://github.com/huaweicloud/huaweicloud-sdk-python-v3/blob
222222
* [3.3 Custom Configuration](#33-custom-configuration-top)
223223
* [3.3.1 IAM endpoint configuration](#331-iam-endpoint-configuration-top)
224224
* [3.3.2 Region configuration](#332-region-configuration-top)
225+
* [3.4 User Agent](#34-user-agent-top)
225226
* [4. Send Requests and Handle Responses](#4-send-requests-and-handle-responses-top)
226227
* [4.1 Exceptions](#41-exceptions-top)
227228
* [4.2 Get Response Object](#42-get-response-object-top)
@@ -819,6 +820,24 @@ region1 = EcsRegion.value_of("cn-north-1")
819820
region2 = EcsRegion.value_of("cn-north-9")
820821
```
821822

823+
#### 3.4 User Agent [:top:](#user-manual-top)
824+
825+
Additional information will be appended to the User-Agent in the request header by default since **v3.1.165**. It is used by service to identify what SDK language, python version, and platform info a client is using to call into their service, and a random identifier will be generated and appended to the User-Agent. The identifier will be stored in the user's home directory, as `~/.huaweicloud/application_id` on Linux and `C:\Users\USER_NAME\.huaweicloud\application_id` on Windows.
826+
827+
The above information will be used to protect the security of your and your users' Huawei Cloud accounts.
828+
829+
You can disable this automatic User-Agent augmentation by explicitly setting a custom User-Agent header value. The value is recommended to be less than 50 characters and should use US-ASCII visible characters:
830+
831+
```python
832+
http_config = HttpConfig.get_default_config()
833+
# Append custom User-Agent information to replace the default
834+
http_config.user_agent = "custom user agent..."
835+
836+
client = IamClient.new_builder() \
837+
.with_http_config(http_config) \
838+
.build()
839+
```
840+
822841
### 4. Send Requests and Handle Responses [:top:](#user-manual-top)
823842

824843
```python

README_CN.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ if __name__ == "__main__":
221221
* [3.3 自定义配置](#33-自定义配置-top)
222222
* [3.3.1 IAM endpoint配置](#331-IAM-endpoint配置-top)
223223
* [3.3.2 Region配置](#332-Region配置-top)
224+
* [3.4 用户代理](#34-用户代理--top)
224225
* [4. 发送请求并查看响应](#4-发送请求并查看响应-top)
225226
* [4.1 异常处理](#41-异常处理-top)
226227
* [4.2 获取响应对象](#42-获取响应对象-top)
@@ -811,6 +812,24 @@ region1 = EcsRegion.value_of("cn-north-1")
811812
region2 = EcsRegion.value_of("cn-north-9")
812813
```
813814

815+
#### 3.4 用户代理 [:top:](#用户手册-top)
816+
817+
**3.1.165**版本起,默认会在请求头User-Agent中附加额外信息,用于识别客户端调用服务时所使用的SDK语言、客户端库版本以及平台信息等。 User-Agent包含Python版本、操作系统信息,同时会生成一个随机标识符追加到User-Agent信息中。随机标识符会存储在用户主目录下,linux为 `~/.huaweicloud/application_id`,windows为`C:\Users\USER_NAME\.huaweicloud\application_id`
818+
819+
上述信息将用于保护您及您的用户的华为云账号安全。
820+
821+
您可以通过自定义User-Agent的方式关闭上述行为,自定义User-Agent信息建议长度不超过50个字符,仅可包含ASCII可打印字符:
822+
823+
```python
824+
http_config = HttpConfig.get_default_config()
825+
# 追加自定义User-Agent信息,替代默认追加内容
826+
http_config.user_agent = "custom user agent..."
827+
828+
client = IamClient.new_builder() \
829+
.with_http_config(http_config) \
830+
.build()
831+
```
832+
814833
### 4. 发送请求并查看响应 [:top:](#用户手册-top)
815834

816835
```python

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.164
1+
3.1.165
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
huaweicloudsdkcore>=3.1.164
1+
huaweicloudsdkcore>=3.1.165

huaweicloud-sdk-aad/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from setuptools import setup, find_packages
55

66
NAME = "huaweicloudsdkaad"
7-
VERSION = "3.1.164"
7+
VERSION = "3.1.165"
88
AUTHOR = "HuaweiCloud SDK"
99
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
1010
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
@@ -14,7 +14,7 @@
1414
with open(path.join(this_directory, 'README_PYPI.md'), encoding='utf-8') as f:
1515
LONG_DESCRIPTION = f.read()
1616

17-
REQUIRES = ["huaweicloudsdkcore>=3.1.164"]
17+
REQUIRES = ["huaweicloudsdkcore>=3.1.165"]
1818

1919
setup(
2020
name=NAME,

0 commit comments

Comments
 (0)