Skip to content

Commit

Permalink
Merge pull request #16121 from ewbankkit/f-aws_globalaccelerator_endp…
Browse files Browse the repository at this point in the history
…oint_group-port_override

r/aws_globalaccelerator_endpoint_group: Support port overrides
  • Loading branch information
breathingdust authored Nov 18, 2020
2 parents c6334a6 + c707c54 commit 34f86e5
Show file tree
Hide file tree
Showing 4 changed files with 606 additions and 200 deletions.
20 changes: 20 additions & 0 deletions aws/internal/service/globalaccelerator/finder/finder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package finder

import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/globalaccelerator"
)

// EndpointGroupByARN returns the endpoint group corresponding to the specified ARN.
func EndpointGroupByARN(conn *globalaccelerator.GlobalAccelerator, arn string) (*globalaccelerator.EndpointGroup, error) {
input := &globalaccelerator.DescribeEndpointGroupInput{
EndpointGroupArn: aws.String(arn),
}

output, err := conn.DescribeEndpointGroup(input)
if err != nil {
return nil, err
}

return output.EndpointGroup, nil
}
Loading

0 comments on commit 34f86e5

Please sign in to comment.