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 API does not return regional endpoints #577

Open
fairclothjm opened this issue Nov 3, 2022 · 2 comments
Open

endpoint API does not return regional endpoints #577

fairclothjm opened this issue Nov 3, 2022 · 2 comments

Comments

@fairclothjm
Copy link

  • Product and API: sts
  • Platform: golang sdk
  • How to Reproduce

I need to query the API for all the available STS endpoints. However, it seems that the STS endpoints returned by the API do not match what is defined in the documentation.

See:

The STS endpoints_config.go regional_endpoints field is null. So making the following call:

	r := &endpoints.LocalRegionalResolver{}
	endpoint, supported, err := r.TryResolve(&endpoints.ResolveParam{
		Product: "sts",
                 RegionId: "us-east-1",
	})

endpoint will always be the gobal endpoint. But I would expect it to return sts.us-east-1.aliyuncs.com as defined in the documentation.

@rfyiamcool
Copy link

+1

@TsinghuaDream
Copy link

The latest version will be routed to sts.us-east-1.aliyuncs.com.
client, err := sts.NewClientWithAccessKey("us-east-1", ak, sk)

The reason is that we have set the splicing rules here.

var EndpointType = "regional"

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

3 participants