Skip to content

Commit

Permalink
release 3.1.62 source code
Browse files Browse the repository at this point in the history
  • Loading branch information
Huaweicloud-SDK committed Oct 19, 2023
1 parent 97a3933 commit 4c7d3f8
Show file tree
Hide file tree
Showing 1,224 changed files with 109,542 additions and 12,589 deletions.
697 changes: 697 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

697 changes: 697 additions & 0 deletions CHANGELOG_CN.md

Large diffs are not rendered by default.

38 changes: 26 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -849,14 +849,18 @@ Notice: the name of environment variable is UPPER-CASE, replacing hyphens with u
// Take ECS and IoTDA services as examples
// linux
export HUAWEICLOUD_SDK_REGION_ECS_CN_NORTH_99=https://ecs.cn-north-99.myhuaweicloud.com
export HUAWEICLOUD_SDK_REGION_IOTDA_AP_SOUTHEAST_10=https://iotda.ap-southwest-10.myhuaweicloud.com
export HUAWEICLOUD_SDK_REGION_ECS_CN_NORTH_9=https://ecs.cn-north-9.myhuaweicloud.com
export HUAWEICLOUD_SDK_REGION_IOTDA_AP_SOUTHEAST_1=https://iotda.ap-southwest-1.myhuaweicloud.com
// windows
set HUAWEICLOUD_SDK_REGION_ECS_CN_NORTH_99=https://ecs.cn-north-99.myhuaweicloud.com
set HUAWEICLOUD_SDK_REGION_IOTDA_AP_SOUTHEAST_10=https://iotda.ap-southwest-10.myhuaweicloud.com
set HUAWEICLOUD_SDK_REGION_ECS_CN_NORTH_9=https://ecs.cn-north-9.myhuaweicloud.com
set HUAWEICLOUD_SDK_REGION_IOTDA_AP_SOUTHEAST_1=https://iotda.ap-southwest-1.myhuaweicloud.com
```

A region corresponding to multiple endpoints is supported since **v3.1.60**, if the main endpoint cannot be connected, it will automatically switch to the backup endpoint.

The format is `HUAWEICLOUD_SDK_REGION_{SERIVCE_NAME}_{REGION_ID}={endpoint1},{endpoint2}`, separate multiple endpoints with commas, such as `HUAWEICLOUD_SDK_REGION_ECS_CN_NORTH_9=https://ecs.cn-north-9.myhuaweicloud.com,https://ecs.cn-north-9.myhuaweicloud.cn`

###### 3.3.2.2 Profile [:top:](#user-manual-top)

The profile will be read from the user's home directory by default, linux`~/.huaweicloud/regions.yaml`,windows`C:\Users\USER_NAME\.huaweicloud\regions.yaml`,the default file may not exist, but if the file exists and the content format is incorrect, an exception will be thrown for parsing errors.
Expand All @@ -868,13 +872,23 @@ The file content format is as follows:
```yaml
# Serivce name is case-insensitive
ECS:
- id: 'cn-north-10'
endpoint: 'https://ecs.cn-north-10.myhuaweicloud.com'
- id: 'cn-north-11'
endpoint: 'https://ecs.cn-north-11.myhuaweicloud.com'
- id: 'cn-north-1'
endpoint: 'https://ecs.cn-north-1.myhuaweicloud.com'
- id: 'cn-north-9'
endpoint: 'https://ecs.cn-north-9.myhuaweicloud.com'
IoTDA:
- id: 'ap-southwest-9'
endpoint: 'https://iotda.ap-southwest-9.myhuaweicloud.com'
- id: 'ap-southwest-1'
endpoint: 'https://iotda.ap-southwest-1.myhuaweicloud.com'
```
A region corresponding to multiple endpoints is supported since v3.1.62, if the main endpoint cannot be connected, it will automatically switch to the backup endpoint.
```yaml
ECS:
- id: 'cn-north-1'
endpoints:
- 'https://ecs.cn-north-1.myhuaweicloud.com'
- 'https://ecs.cn-north-1.myhuaweicloud.cn'
```
###### 3.3.2.3 Region supply chain [:top:](#user-manual-top)
Expand All @@ -885,8 +899,8 @@ The default order is **environment variables -> profile -> region defined in SDK
import com.huaweicloud.sdk.core.region.Region;
import com.huaweicloud.sdk.ecs.v2.region.EcsRegion;

Region region1 = EcsRegion.valueOf("cn-north-10");
Region region2 = EcsRegion.valueOf("cn-north-11");
Region region1 = EcsRegion.valueOf("cn-north-1");
Region region2 = EcsRegion.valueOf("cn-north-9");
```

### 4. Send Requests and Handle Responses [:top:](#user-manual-top)
Expand Down
42 changes: 28 additions & 14 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -805,9 +805,9 @@ IamClient iamClient = IamClient.newBuilder()

**注:** 3.0.93版本起支持

##### 3.3.1 IAM endpoint配置
##### 3.3.1 IAM endpoint配置 [:top:](#用户手册-top)

自动获取用户的 projectId 和 domainId 会分别调用统一身份认证服务的 [KeystoneListProjects](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=IAM&api=KeystoneListProjects)[KeystoneListAuthDomains](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=IAM&api=KeystoneListAuthDomains) 接口,默认访问的endpoint为 https://iam.myhuaweicloud.com,**欧洲站用户需要指定 endpoint 为 https://iam.eu-west-101.myhuaweicloud.com**
自动获取用户的 projectId 和 domainId 会分别调用统一身份认证服务的 [KeystoneListProjects](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=IAM&api=KeystoneListProjects)[KeystoneListAuthDomains](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=IAM&api=KeystoneListAuthDomains) 接口,默认访问的endpoint为 https://iam.myhuaweicloud.com, **欧洲站用户需要指定 endpoint 为 https://iam.eu-west-101.myhuaweicloud.com**

用户可以通过以下两种方式来修改endpoint

Expand Down Expand Up @@ -846,14 +846,18 @@ BasicCredentials credentials = new BasicCredentials().withAk(ak).withSk(sk).with
// 以ECS和IoTDA服务为例
// linux
export HUAWEICLOUD_SDK_REGION_ECS_CN_NORTH_99=https://ecs.cn-north-99.myhuaweicloud.com
export HUAWEICLOUD_SDK_REGION_IOTDA_AP_SOUTHEAST_10=https://iotda.ap-southwest-10.myhuaweicloud.com
export HUAWEICLOUD_SDK_REGION_ECS_CN_NORTH_9=https://ecs.cn-north-9.myhuaweicloud.com
export HUAWEICLOUD_SDK_REGION_IOTDA_AP_SOUTHEAST_1=https://iotda.ap-southwest-1.myhuaweicloud.com
// windows
set HUAWEICLOUD_SDK_REGION_ECS_CN_NORTH_99=https://ecs.cn-north-99.myhuaweicloud.com
set HUAWEICLOUD_SDK_REGION_IOTDA_AP_SOUTHEAST_10=https://iotda.ap-southwest-10.myhuaweicloud.com
set HUAWEICLOUD_SDK_REGION_ECS_CN_NORTH_9=https://ecs.cn-north-9.myhuaweicloud.com
set HUAWEICLOUD_SDK_REGION_IOTDA_AP_SOUTHEAST_1=https://iotda.ap-southwest-1.myhuaweicloud.com
```

**3.1.62**版本起,支持配置一个region对应多个endpoint,主要endpoint无法连接会自动切换到备用endpoint

格式为`HUAWEICLOUD_SDK_REGION_{SERIVCE_NAME}_{REGION_ID}={endpoint1},{endpoint2}`, 多个endpoint之间用英文逗号隔开, 比如`HUAWEICLOUD_SDK_REGION_ECS_CN_NORTH_9=https://ecs.cn-north-9.myhuaweicloud.com,https://ecs.cn-north-9.myhuaweicloud.cn`

###### 3.3.2.2 文件配置 [:top:](#用户手册-top)

通过yaml文件配置,默认会从用户主目录下读取region配置文件,linux为`~/.huaweicloud/regions.yaml`,windows为`C:\Users\USER_NAME\.huaweicloud\regions.yaml`,默认配置文件可以不存在,但是如果配置文件存在且内容格式不对会解析错误抛出异常。
Expand All @@ -865,13 +869,23 @@ set HUAWEICLOUD_SDK_REGION_IOTDA_AP_SOUTHEAST_10=https://iotda.ap-southwest-10.m
```yaml
# 服务名不区分大小写
ECS:
- id: 'cn-north-10'
endpoint: 'https://ecs.cn-north-10.myhuaweicloud.com'
- id: 'cn-north-11'
endpoint: 'https://ecs.cn-north-11.myhuaweicloud.com'
- id: 'cn-north-1'
endpoint: 'https://ecs.cn-north-1.myhuaweicloud.com'
- id: 'cn-north-9'
endpoint: 'https://ecs.cn-north-9.myhuaweicloud.com'
IoTDA:
- id: 'ap-southwest-9'
endpoint: 'https://iotda.ap-southwest-9.myhuaweicloud.com'
- id: 'ap-southwest-1'
endpoint: 'https://iotda.ap-southwest-1.myhuaweicloud.com'
```
从**3.1.62**版本起,支持配置一个region对应多个endpoint,主要endpoint无法连接会自动切换到备用endpoint,格式如下:
```yaml
ECS:
- id: 'cn-north-1'
endpoints:
- 'https://ecs.cn-north-1.myhuaweicloud.com'
- 'https://ecs.cn-north-1.myhuaweicloud.cn'
```
###### 3.3.2.3 Region提供链 [:top:](#用户手册-top)
Expand All @@ -882,8 +896,8 @@ IoTDA:
import com.huaweicloud.sdk.core.region.Region;
import com.huaweicloud.sdk.ecs.v2.region.EcsRegion;

Region region1 = EcsRegion.valueOf("cn-north-10");
Region region2 = EcsRegion.valueOf("cn-north-11");
Region region1 = EcsRegion.valueOf("cn-north-1");
Region region2 = EcsRegion.valueOf("cn-north-9");
```

### 4. 发送请求并查看响应 [:top:](#用户手册-top)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.61
3.1.62
Loading

0 comments on commit 4c7d3f8

Please sign in to comment.