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

Enumerating over Regions not possible #557

Closed
3 tasks done
Necropaw opened this issue May 4, 2020 · 1 comment
Closed
3 tasks done

Enumerating over Regions not possible #557

Necropaw opened this issue May 4, 2020 · 1 comment
Labels
feature-request A feature should be added or improved.

Comments

@Necropaw
Copy link

Necropaw commented May 4, 2020

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
Since v0.21.0 it is not possible to enumerate over AWS regions due to #512

Version of AWS SDK for Go?
Since v0.21.0

Version of Go (go version)?
go version go1.14.2 linux/amd64

To Reproduce (observed behavior)
Try to compile example code from: github.com/aws/aws-sdk-go-v2/aws/endpoints/doc.go

// Enumerating Regions and Endpoint Metadata
//
// Casting the Resolver returned by DefaultResolver to a EnumPartitions interface
// will allow you to get access to the list of underlying Partitions with the
// Partitions method. This is helpful if you want to limit the SDK's endpoint
// resolving to a single partition, or enumerate regions, services, and endpoints
// in the partition.
//
//     resolver := endpoints.NewDefaultResolver()
//     partitions := resolver.Partitions()
//
//     for _, p := range partitions {
//         fmt.Println("Regions for", p.ID())
//         for id, _ := range p.Regions() {
//             fmt.Println("*", id)
//         }
//
//         fmt.Println("Services for", p.ID())
//         for id, _ := range p.Services() {
//             fmt.Println("*", id)
//         }
//     }

Expected behavior
It is possible to enumerate over regions.

Additional context
We are using this to change configurations in all AWS service regions. As the number of service regions is expanding, this helps us to keep up-to-date with service regions and use the newest version.

@Necropaw Necropaw added the bug This issue is a bug. label May 4, 2020
jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this issue Jun 17, 2020
Fixes aws#557 by removing out dated example documentation from the SDK's
endpoints package and README. The feature to enumerate regions and
services was removed in aws#512 pending further design and development of
service specific endpoint metadata.
@jasdel
Copy link
Contributor

jasdel commented Jun 17, 2020

Thanks for reaching out @Necropaw. This was a feature that was intentionally removed from the v2 SDK, and it looks like the example documentation was missed in that update. This was done as the design of how the V2 SDK sources endpoints metadata is currently in flux. We are investigating designs that will move the modeling of service endpoints out of a centralized unit and into the individual API client packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

2 participants