Update Go AWS SDK to the latest version

This commit is contained in:
Andrey Smirnov
2019-07-13 00:03:55 +03:00
committed by Andrey Smirnov
parent d08be990ef
commit 94a72b23ff
2183 changed files with 885887 additions and 228114 deletions
File diff suppressed because it is too large Load Diff
+105
View File
@@ -0,0 +1,105 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package globalaccelerator provides the client and types for making API
// requests to AWS Global Accelerator.
//
// This is the AWS Global Accelerator API Reference. This guide is for developers
// who need detailed information about AWS Global Accelerator API actions, data
// types, and errors. For more information about Global Accelerator features,
// see the AWS Global Accelerator Developer Guide (https://docs.aws.amazon.com/global-accelerator/latest/dg/Welcome.html).
//
// AWS Global Accelerator is a network layer service in which you create accelerators
// to improve availability and performance for internet applications used by
// a global audience.
//
// Global Accelerator provides you with static IP addresses that you associate
// with your accelerator. These IP addresses are anycast from the AWS edge network
// and distribute incoming application traffic across multiple endpoint resources
// in multiple AWS Regions, which increases the availability of your applications.
// Endpoints can be Elastic IP addresses, Network Load Balancers, and Application
// Load Balancers that are located in one AWS Region or multiple Regions.
//
// Global Accelerator uses the AWS global network to route traffic to the optimal
// regional endpoint based on health, client location, and policies that you
// configure. The service reacts instantly to changes in health or configuration
// to ensure that internet traffic from clients is directed to only healthy
// endpoints.
//
// Global Accelerator includes components that work together to help you improve
// performance and availability for your applications:
//
// Static IP address
//
// AWS Global Accelerator provides you with a set of static IP addresses which
// are anycast from the AWS edge network and serve as the single fixed entry
// points for your clients. If you already have Elastic Load Balancing or Elastic
// IP address resources set up for your applications, you can easily add those
// to Global Accelerator to allow the resources to be accessed by a Global Accelerator
// static IP address.
//
// Accelerator
//
// An accelerator directs traffic to optimal endpoints over the AWS global network
// to improve availability and performance for your internet applications that
// have a global audience. Each accelerator includes one or more listeners.
//
// Network zone
//
// A network zone services the static IP addresses for your accelerator from
// a unique IP subnet. Similar to an AWS Availability Zone, a network zone is
// an isolated unit with its own set of physical infrastructure. When you configure
// an accelerator, Global Accelerator allocates two IPv4 addresses for it. If
// one IP address from a network zone becomes unavailable due to IP address
// blocking by certain client networks, or network disruptions, then client
// applications can retry on the healthy static IP address from the other isolated
// network zone.
//
// Listener
//
// A listener processes inbound connections from clients to Global Accelerator,
// based on the protocol and port that you configure. Each listener has one
// or more endpoint groups associated with it, and traffic is forwarded to endpoints
// in one of the groups. You associate endpoint groups with listeners by specifying
// the Regions that you want to distribute traffic to. Traffic is distributed
// to optimal endpoints within the endpoint groups associated with a listener.
//
// Endpoint group
//
// Each endpoint group is associated with a specific AWS Region. Endpoint groups
// include one or more endpoints in the Region. You can increase or reduce the
// percentage of traffic that would be otherwise directed to an endpoint group
// by adjusting a setting called a traffic dial. The traffic dial lets you easily
// do performance testing or blue/green deployment testing for new releases
// across different AWS Regions, for example.
//
// Endpoint
//
// An endpoint is an Elastic IP address, Network Load Balancer, or Application
// Load Balancer. Traffic is routed to endpoints based on several factors, including
// the geo-proximity to the user, the health of the endpoint, and the configuration
// options that you choose, such as endpoint weights. For each endpoint, you
// can configure weights, which are numbers that you can use to specify the
// proportion of traffic to route to each one. This can be useful, for example,
// to do performance testing within a Region.
//
// See https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08 for more information on this service.
//
// See globalaccelerator package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/globalaccelerator/
//
// Using the Client
//
// To contact AWS Global Accelerator with the SDK use the New function to create
// a new service client. With that client you can make API requests to the service.
// These clients are safe to use concurrently.
//
// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the AWS Global Accelerator client GlobalAccelerator for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/globalaccelerator/#New
package globalaccelerator
+84
View File
@@ -0,0 +1,84 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package globalaccelerator
const (
// ErrCodeAcceleratorNotDisabledException for service response error code
// "AcceleratorNotDisabledException".
//
// The accelerator that you specified could not be disabled.
ErrCodeAcceleratorNotDisabledException = "AcceleratorNotDisabledException"
// ErrCodeAcceleratorNotFoundException for service response error code
// "AcceleratorNotFoundException".
//
// The accelerator that you specified doesn't exist.
ErrCodeAcceleratorNotFoundException = "AcceleratorNotFoundException"
// ErrCodeAssociatedEndpointGroupFoundException for service response error code
// "AssociatedEndpointGroupFoundException".
//
// The listener that you specified has an endpoint group associated with it.
// You must remove all dependent resources from a listener before you can delete
// it.
ErrCodeAssociatedEndpointGroupFoundException = "AssociatedEndpointGroupFoundException"
// ErrCodeAssociatedListenerFoundException for service response error code
// "AssociatedListenerFoundException".
//
// The accelerator that you specified has a listener associated with it. You
// must remove all dependent resources from an accelerator before you can delete
// it.
ErrCodeAssociatedListenerFoundException = "AssociatedListenerFoundException"
// ErrCodeEndpointGroupAlreadyExistsException for service response error code
// "EndpointGroupAlreadyExistsException".
//
// The endpoint group that you specified already exists.
ErrCodeEndpointGroupAlreadyExistsException = "EndpointGroupAlreadyExistsException"
// ErrCodeEndpointGroupNotFoundException for service response error code
// "EndpointGroupNotFoundException".
//
// The endpoint group that you specified doesn't exist.
ErrCodeEndpointGroupNotFoundException = "EndpointGroupNotFoundException"
// ErrCodeInternalServiceErrorException for service response error code
// "InternalServiceErrorException".
//
// There was an internal error for AWS Global Accelerator.
ErrCodeInternalServiceErrorException = "InternalServiceErrorException"
// ErrCodeInvalidArgumentException for service response error code
// "InvalidArgumentException".
//
// An argument that you specified is invalid.
ErrCodeInvalidArgumentException = "InvalidArgumentException"
// ErrCodeInvalidNextTokenException for service response error code
// "InvalidNextTokenException".
//
// There isn't another item to return.
ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
// ErrCodeInvalidPortRangeException for service response error code
// "InvalidPortRangeException".
//
// The port numbers that you specified are not valid numbers or are not unique
// for this accelerator.
ErrCodeInvalidPortRangeException = "InvalidPortRangeException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// Processing your request would cause you to exceed an AWS Global Accelerator
// limit.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeListenerNotFoundException for service response error code
// "ListenerNotFoundException".
//
// The listener that you specified doesn't exist.
ErrCodeListenerNotFoundException = "ListenerNotFoundException"
)
@@ -0,0 +1,132 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package globalacceleratoriface provides an interface to enable mocking the AWS Global Accelerator service client
// for testing your code.
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters.
package globalacceleratoriface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/globalaccelerator"
)
// GlobalAcceleratorAPI provides an interface to enable mocking the
// globalaccelerator.GlobalAccelerator service client's API operation,
// paginators, and waiters. This make unit testing your code that calls out
// to the SDK's service client's calls easier.
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // AWS Global Accelerator.
// func myFunc(svc globalacceleratoriface.GlobalAcceleratorAPI) bool {
// // Make svc.CreateAccelerator request
// }
//
// func main() {
// sess := session.New()
// svc := globalaccelerator.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockGlobalAcceleratorClient struct {
// globalacceleratoriface.GlobalAcceleratorAPI
// }
// func (m *mockGlobalAcceleratorClient) CreateAccelerator(input *globalaccelerator.CreateAcceleratorInput) (*globalaccelerator.CreateAcceleratorOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockGlobalAcceleratorClient{}
//
// myfunc(mockSvc)
//
// // Verify myFunc's functionality
// }
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type GlobalAcceleratorAPI interface {
CreateAccelerator(*globalaccelerator.CreateAcceleratorInput) (*globalaccelerator.CreateAcceleratorOutput, error)
CreateAcceleratorWithContext(aws.Context, *globalaccelerator.CreateAcceleratorInput, ...request.Option) (*globalaccelerator.CreateAcceleratorOutput, error)
CreateAcceleratorRequest(*globalaccelerator.CreateAcceleratorInput) (*request.Request, *globalaccelerator.CreateAcceleratorOutput)
CreateEndpointGroup(*globalaccelerator.CreateEndpointGroupInput) (*globalaccelerator.CreateEndpointGroupOutput, error)
CreateEndpointGroupWithContext(aws.Context, *globalaccelerator.CreateEndpointGroupInput, ...request.Option) (*globalaccelerator.CreateEndpointGroupOutput, error)
CreateEndpointGroupRequest(*globalaccelerator.CreateEndpointGroupInput) (*request.Request, *globalaccelerator.CreateEndpointGroupOutput)
CreateListener(*globalaccelerator.CreateListenerInput) (*globalaccelerator.CreateListenerOutput, error)
CreateListenerWithContext(aws.Context, *globalaccelerator.CreateListenerInput, ...request.Option) (*globalaccelerator.CreateListenerOutput, error)
CreateListenerRequest(*globalaccelerator.CreateListenerInput) (*request.Request, *globalaccelerator.CreateListenerOutput)
DeleteAccelerator(*globalaccelerator.DeleteAcceleratorInput) (*globalaccelerator.DeleteAcceleratorOutput, error)
DeleteAcceleratorWithContext(aws.Context, *globalaccelerator.DeleteAcceleratorInput, ...request.Option) (*globalaccelerator.DeleteAcceleratorOutput, error)
DeleteAcceleratorRequest(*globalaccelerator.DeleteAcceleratorInput) (*request.Request, *globalaccelerator.DeleteAcceleratorOutput)
DeleteEndpointGroup(*globalaccelerator.DeleteEndpointGroupInput) (*globalaccelerator.DeleteEndpointGroupOutput, error)
DeleteEndpointGroupWithContext(aws.Context, *globalaccelerator.DeleteEndpointGroupInput, ...request.Option) (*globalaccelerator.DeleteEndpointGroupOutput, error)
DeleteEndpointGroupRequest(*globalaccelerator.DeleteEndpointGroupInput) (*request.Request, *globalaccelerator.DeleteEndpointGroupOutput)
DeleteListener(*globalaccelerator.DeleteListenerInput) (*globalaccelerator.DeleteListenerOutput, error)
DeleteListenerWithContext(aws.Context, *globalaccelerator.DeleteListenerInput, ...request.Option) (*globalaccelerator.DeleteListenerOutput, error)
DeleteListenerRequest(*globalaccelerator.DeleteListenerInput) (*request.Request, *globalaccelerator.DeleteListenerOutput)
DescribeAccelerator(*globalaccelerator.DescribeAcceleratorInput) (*globalaccelerator.DescribeAcceleratorOutput, error)
DescribeAcceleratorWithContext(aws.Context, *globalaccelerator.DescribeAcceleratorInput, ...request.Option) (*globalaccelerator.DescribeAcceleratorOutput, error)
DescribeAcceleratorRequest(*globalaccelerator.DescribeAcceleratorInput) (*request.Request, *globalaccelerator.DescribeAcceleratorOutput)
DescribeAcceleratorAttributes(*globalaccelerator.DescribeAcceleratorAttributesInput) (*globalaccelerator.DescribeAcceleratorAttributesOutput, error)
DescribeAcceleratorAttributesWithContext(aws.Context, *globalaccelerator.DescribeAcceleratorAttributesInput, ...request.Option) (*globalaccelerator.DescribeAcceleratorAttributesOutput, error)
DescribeAcceleratorAttributesRequest(*globalaccelerator.DescribeAcceleratorAttributesInput) (*request.Request, *globalaccelerator.DescribeAcceleratorAttributesOutput)
DescribeEndpointGroup(*globalaccelerator.DescribeEndpointGroupInput) (*globalaccelerator.DescribeEndpointGroupOutput, error)
DescribeEndpointGroupWithContext(aws.Context, *globalaccelerator.DescribeEndpointGroupInput, ...request.Option) (*globalaccelerator.DescribeEndpointGroupOutput, error)
DescribeEndpointGroupRequest(*globalaccelerator.DescribeEndpointGroupInput) (*request.Request, *globalaccelerator.DescribeEndpointGroupOutput)
DescribeListener(*globalaccelerator.DescribeListenerInput) (*globalaccelerator.DescribeListenerOutput, error)
DescribeListenerWithContext(aws.Context, *globalaccelerator.DescribeListenerInput, ...request.Option) (*globalaccelerator.DescribeListenerOutput, error)
DescribeListenerRequest(*globalaccelerator.DescribeListenerInput) (*request.Request, *globalaccelerator.DescribeListenerOutput)
ListAccelerators(*globalaccelerator.ListAcceleratorsInput) (*globalaccelerator.ListAcceleratorsOutput, error)
ListAcceleratorsWithContext(aws.Context, *globalaccelerator.ListAcceleratorsInput, ...request.Option) (*globalaccelerator.ListAcceleratorsOutput, error)
ListAcceleratorsRequest(*globalaccelerator.ListAcceleratorsInput) (*request.Request, *globalaccelerator.ListAcceleratorsOutput)
ListEndpointGroups(*globalaccelerator.ListEndpointGroupsInput) (*globalaccelerator.ListEndpointGroupsOutput, error)
ListEndpointGroupsWithContext(aws.Context, *globalaccelerator.ListEndpointGroupsInput, ...request.Option) (*globalaccelerator.ListEndpointGroupsOutput, error)
ListEndpointGroupsRequest(*globalaccelerator.ListEndpointGroupsInput) (*request.Request, *globalaccelerator.ListEndpointGroupsOutput)
ListListeners(*globalaccelerator.ListListenersInput) (*globalaccelerator.ListListenersOutput, error)
ListListenersWithContext(aws.Context, *globalaccelerator.ListListenersInput, ...request.Option) (*globalaccelerator.ListListenersOutput, error)
ListListenersRequest(*globalaccelerator.ListListenersInput) (*request.Request, *globalaccelerator.ListListenersOutput)
UpdateAccelerator(*globalaccelerator.UpdateAcceleratorInput) (*globalaccelerator.UpdateAcceleratorOutput, error)
UpdateAcceleratorWithContext(aws.Context, *globalaccelerator.UpdateAcceleratorInput, ...request.Option) (*globalaccelerator.UpdateAcceleratorOutput, error)
UpdateAcceleratorRequest(*globalaccelerator.UpdateAcceleratorInput) (*request.Request, *globalaccelerator.UpdateAcceleratorOutput)
UpdateAcceleratorAttributes(*globalaccelerator.UpdateAcceleratorAttributesInput) (*globalaccelerator.UpdateAcceleratorAttributesOutput, error)
UpdateAcceleratorAttributesWithContext(aws.Context, *globalaccelerator.UpdateAcceleratorAttributesInput, ...request.Option) (*globalaccelerator.UpdateAcceleratorAttributesOutput, error)
UpdateAcceleratorAttributesRequest(*globalaccelerator.UpdateAcceleratorAttributesInput) (*request.Request, *globalaccelerator.UpdateAcceleratorAttributesOutput)
UpdateEndpointGroup(*globalaccelerator.UpdateEndpointGroupInput) (*globalaccelerator.UpdateEndpointGroupOutput, error)
UpdateEndpointGroupWithContext(aws.Context, *globalaccelerator.UpdateEndpointGroupInput, ...request.Option) (*globalaccelerator.UpdateEndpointGroupOutput, error)
UpdateEndpointGroupRequest(*globalaccelerator.UpdateEndpointGroupInput) (*request.Request, *globalaccelerator.UpdateEndpointGroupOutput)
UpdateListener(*globalaccelerator.UpdateListenerInput) (*globalaccelerator.UpdateListenerOutput, error)
UpdateListenerWithContext(aws.Context, *globalaccelerator.UpdateListenerInput, ...request.Option) (*globalaccelerator.UpdateListenerOutput, error)
UpdateListenerRequest(*globalaccelerator.UpdateListenerInput) (*request.Request, *globalaccelerator.UpdateListenerOutput)
}
var _ GlobalAcceleratorAPI = (*globalaccelerator.GlobalAccelerator)(nil)
+100
View File
@@ -0,0 +1,100 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package globalaccelerator
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
// GlobalAccelerator provides the API operation methods for making requests to
// AWS Global Accelerator. See this package's package overview docs
// for details on the service.
//
// GlobalAccelerator methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type GlobalAccelerator struct {
*client.Client
}
// Used for custom client initialization logic
var initClient func(*client.Client)
// Used for custom request initialization logic
var initRequest func(*request.Request)
// Service information constants
const (
ServiceName = "Global Accelerator" // Name of service.
EndpointsID = "globalaccelerator" // ID to lookup a service endpoint with.
ServiceID = "Global Accelerator" // ServiceID is a unique identifer of a specific service.
)
// New creates a new instance of the GlobalAccelerator client with a session.
// If additional configuration is needed for the client instance use the optional
// aws.Config parameter to add your extra config.
//
// Example:
// // Create a GlobalAccelerator client from just a session.
// svc := globalaccelerator.New(mySession)
//
// // Create a GlobalAccelerator client with additional configuration
// svc := globalaccelerator.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *GlobalAccelerator {
c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "globalaccelerator"
}
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *GlobalAccelerator {
svc := &GlobalAccelerator{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2018-08-08",
JSONVersion: "1.1",
TargetPrefix: "GlobalAccelerator_V20180706",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a GlobalAccelerator operation and runs any
// custom request initialization.
func (c *GlobalAccelerator) newRequest(op *request.Operation, params, data interface{}) *request.Request {
req := c.NewRequest(op, params, data)
// Run custom request initialization if present
if initRequest != nil {
initRequest(req)
}
return req
}