From a235167d51899f19db580e68336b29bbaf68ce90 Mon Sep 17 00:00:00 2001 From: nanhe Date: Mon, 28 Oct 2024 14:52:49 +0800 Subject: [PATCH] docs: update README --- README-CN.md | 10 ++++++++-- README.md | 11 +++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README-CN.md b/README-CN.md index b31efba..06a91c5 100644 --- a/README-CN.md +++ b/README-CN.md @@ -162,7 +162,9 @@ func main() { // 设置更小的权限策略,非必填。示例值:{"Statement": [{"Action": ["*"],"Effect": "Allow","Resource": ["*"]}],"Version":"1"} SetPolicy("Policy"). // 设置session过期时间,非必填。 - SetSessionExpiration(3600) + SetRoleSessionExpiration(3600). + // 非必填,默认为sts.aliyuncs.com,建议使用Region化的STS域名,选择地理位置更接近的Region可以保证网络连通性,Region对应的域名请参考:https://api.aliyun.com/product/Sts + SetSTSEndpoint("sts.cn-hangzhou.aliyuncs.com") provider, err := credentials.NewCredential(config) if err != nil { @@ -208,7 +210,11 @@ func main(){ // 设置更小的权限策略,非必填。示例值:{"Statement": [{"Action": ["*"],"Effect": "Allow","Resource": ["*"]}],"Version":"1"} SetPolicy("Policy"). // 设置session过期时间,非必填。 - SetRoleSessionExpiration(3600) + SetRoleSessionExpiration(3600). + // 非必填,角色外部 ID,该参数为外部提供的用于表示角色的参数信息,主要功能是防止混淆代理人问题。更多信息请参考:https://help.aliyun.com/zh/ram/use-cases/use-externalid-to-prevent-the-confused-deputy-problem + SetExternalId("ExternalId"). + // 非必填,默认为sts.aliyuncs.com,建议使用Region化的STS域名,选择地理位置更接近的Region可以保证网络连通性,Region对应的域名请参考:https://api.aliyun.com/product/Sts + SetSTSEndpoint("sts.cn-hangzhou.aliyuncs.com") provider, err := credentials.NewCredential(config) if err != nil { diff --git a/README.md b/README.md index 45458ea..3394006 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,10 @@ func main() { // Optional. Specify limited permissions for the RAM role. Example: {"Statement": [{"Action": ["*"],"Effect": "Allow","Resource": ["*"]}],"Version":"1"}. SetPolicy("Policy"). // Optional. Specify the validity period of the session. - SetSessionExpiration(3600) + SetRoleSessionExpiration(3600). + // Optional. The default value is sts.aliyuncs.com. It is recommended to use a regionalized STS domain name. Selecting a region that is geographically closer can ensure network connectivity. For the domain name corresponding to the region, please refer to: https://api.alibabacloud.com/product/Sts + SetSTSEndpoint("sts.cn-hangzhou.aliyuncs.com") + provider, err := credentials.NewCredential(config) if err != nil { return @@ -213,7 +216,11 @@ func main(){ // Optional. Specify limited permissions for the RAM role. Example: {"Statement": [{"Action": ["*"],"Effect": "Allow","Resource": ["*"]}],"Version":"1"}. SetPolicy("Policy"). // Optional. Specify the expiration of the session - SetRoleSessionExpiration(3600) + SetRoleSessionExpiration(3600). + // Optional, role external ID, this parameter is the parameter information provided externally to represent the role, and its main function is to prevent the confused deputy problem. For more information, please refer to: https://www.alibabacloud.com/help/en/ram/use-cases/use-externalid-to-prevent-the-confused-deputy-problem + SetExternalId("ExternalId"). + // Optional. The default value is sts.aliyuncs.com. It is recommended to use a regionalized STS domain name. Selecting a region that is geographically closer can ensure network connectivity. For the domain name corresponding to the region, please refer to: https://api.alibabacloud.com/product/Sts + SetSTSEndpoint("sts.cn-hangzhou.aliyuncs.com") provider, err := credentials.NewCredential(config) if err != nil {