@@ -41,6 +41,21 @@ type GlobalAccelerator interface {
4141 // ListListenersForAccelerator lists all listeners for an accelerator.
4242 ListListenersForAcceleratorWithContext (ctx context.Context , input * globalaccelerator.ListListenersInput ) (* globalaccelerator.ListListenersOutput , error )
4343
44+ // CreateEndpointGroup creates a new endpoint group.
45+ CreateEndpointGroupWithContext (ctx context.Context , input * globalaccelerator.CreateEndpointGroupInput ) (* globalaccelerator.CreateEndpointGroupOutput , error )
46+
47+ // DescribeEndpointGroup describes an endpoint group.
48+ DescribeEndpointGroupWithContext (ctx context.Context , input * globalaccelerator.DescribeEndpointGroupInput ) (* globalaccelerator.DescribeEndpointGroupOutput , error )
49+
50+ // UpdateEndpointGroup updates an endpoint group.
51+ UpdateEndpointGroupWithContext (ctx context.Context , input * globalaccelerator.UpdateEndpointGroupInput ) (* globalaccelerator.UpdateEndpointGroupOutput , error )
52+
53+ // DeleteEndpointGroup deletes an endpoint group.
54+ DeleteEndpointGroupWithContext (ctx context.Context , input * globalaccelerator.DeleteEndpointGroupInput ) (* globalaccelerator.DeleteEndpointGroupOutput , error )
55+
56+ // wrapper to ListEndpointGroups API, which aggregates paged results into list.
57+ ListEndpointGroupsAsList (ctx context.Context , input * globalaccelerator.ListEndpointGroupsInput ) ([]types.EndpointGroup , error )
58+
4459 // TagResource tags a resource.
4560 TagResourceWithContext (ctx context.Context , input * globalaccelerator.TagResourceInput ) (* globalaccelerator.TagResourceOutput , error )
4661
@@ -192,3 +207,52 @@ func (c *defaultGlobalAccelerator) ListListenersAsList(ctx context.Context, inpu
192207 }
193208 return result , nil
194209}
210+
211+ func (c * defaultGlobalAccelerator ) CreateEndpointGroupWithContext (ctx context.Context , input * globalaccelerator.CreateEndpointGroupInput ) (* globalaccelerator.CreateEndpointGroupOutput , error ) {
212+ client , err := c .awsClientsProvider .GetGlobalAcceleratorClient (ctx , "CreateEndpointGroup" )
213+ if err != nil {
214+ return nil , err
215+ }
216+ return client .CreateEndpointGroup (ctx , input )
217+ }
218+
219+ func (c * defaultGlobalAccelerator ) DescribeEndpointGroupWithContext (ctx context.Context , input * globalaccelerator.DescribeEndpointGroupInput ) (* globalaccelerator.DescribeEndpointGroupOutput , error ) {
220+ client , err := c .awsClientsProvider .GetGlobalAcceleratorClient (ctx , "DescribeEndpointGroup" )
221+ if err != nil {
222+ return nil , err
223+ }
224+ return client .DescribeEndpointGroup (ctx , input )
225+ }
226+
227+ func (c * defaultGlobalAccelerator ) UpdateEndpointGroupWithContext (ctx context.Context , input * globalaccelerator.UpdateEndpointGroupInput ) (* globalaccelerator.UpdateEndpointGroupOutput , error ) {
228+ client , err := c .awsClientsProvider .GetGlobalAcceleratorClient (ctx , "UpdateEndpointGroup" )
229+ if err != nil {
230+ return nil , err
231+ }
232+ return client .UpdateEndpointGroup (ctx , input )
233+ }
234+
235+ func (c * defaultGlobalAccelerator ) DeleteEndpointGroupWithContext (ctx context.Context , input * globalaccelerator.DeleteEndpointGroupInput ) (* globalaccelerator.DeleteEndpointGroupOutput , error ) {
236+ client , err := c .awsClientsProvider .GetGlobalAcceleratorClient (ctx , "DeleteEndpointGroup" )
237+ if err != nil {
238+ return nil , err
239+ }
240+ return client .DeleteEndpointGroup (ctx , input )
241+ }
242+
243+ func (c * defaultGlobalAccelerator ) ListEndpointGroupsAsList (ctx context.Context , input * globalaccelerator.ListEndpointGroupsInput ) ([]types.EndpointGroup , error ) {
244+ var result []types.EndpointGroup
245+ client , err := c .awsClientsProvider .GetGlobalAcceleratorClient (ctx , "ListEndpointGroups" )
246+ if err != nil {
247+ return nil , err
248+ }
249+ paginator := globalaccelerator .NewListEndpointGroupsPaginator (client , input )
250+ for paginator .HasMorePages () {
251+ output , err := paginator .NextPage (ctx )
252+ if err != nil {
253+ return nil , err
254+ }
255+ result = append (result , output .EndpointGroups ... )
256+ }
257+ return result , nil
258+ }
0 commit comments