Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加支持内网endpoint预配置或使用参数自动拼接endpoint #342

Open
luyi0521 opened this issue Apr 19, 2021 · 1 comment
Open

Comments

@luyi0521
Copy link

在金融云内网,指定region-id后,因go-sdk中没有内置金融云相关endpoint
每个请求需要独立指定endpoint
建议支持读取配置文件,获取预配置的产品对应endpoint

举个栗子:

ecs: 
  vpc: 
    cn-shanghai-finance-1: 
      endpoint: ecs-vpc.cn-shanghai-finance-1.aliyuncs.com
    cn-shenzhen-finance-1: 
      endpoint: ecs-vpc.cn-shenzhen-finance-1.aliyuncs.com
slb: 
  vpc: 
    cn-shanghai-finance-1: 
      endpoint: slb-vpc.cn-shanghai-finance-1.aliyuncs.com
    cn-shenzhen-finance-1: 
      endpoint: slb-vpc.cn-shenzhen-finance-1.aliyuncs.com

或者
参考go-sdk中的拼接endpoint 的样式,通过添加参数自动拼接endpoint
-.<region_id>.aliyuncs.com
这个可以覆盖大多数的产品
我在用go-sdk 访问内网sts服务的时候碰到没有内置endpoint
做的调整是在初始化请求客户端之后设定Network为vpc
client.Network = "vpc"
就可以访问正确的endpoint了("sts-vpc.cn-shanghai-finance-1.aliyuncs.com")

@JacksonTian
Copy link
Contributor

某些产品是支持拼接的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants