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
+84
View File
@@ -0,0 +1,84 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package dlmiface provides an interface to enable mocking the Amazon Data Lifecycle Manager 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 dlmiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/dlm"
)
// DLMAPI provides an interface to enable mocking the
// dlm.DLM 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
// // Amazon Data Lifecycle Manager.
// func myFunc(svc dlmiface.DLMAPI) bool {
// // Make svc.CreateLifecyclePolicy request
// }
//
// func main() {
// sess := session.New()
// svc := dlm.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockDLMClient struct {
// dlmiface.DLMAPI
// }
// func (m *mockDLMClient) CreateLifecyclePolicy(input *dlm.CreateLifecyclePolicyInput) (*dlm.CreateLifecyclePolicyOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockDLMClient{}
//
// 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 DLMAPI interface {
CreateLifecyclePolicy(*dlm.CreateLifecyclePolicyInput) (*dlm.CreateLifecyclePolicyOutput, error)
CreateLifecyclePolicyWithContext(aws.Context, *dlm.CreateLifecyclePolicyInput, ...request.Option) (*dlm.CreateLifecyclePolicyOutput, error)
CreateLifecyclePolicyRequest(*dlm.CreateLifecyclePolicyInput) (*request.Request, *dlm.CreateLifecyclePolicyOutput)
DeleteLifecyclePolicy(*dlm.DeleteLifecyclePolicyInput) (*dlm.DeleteLifecyclePolicyOutput, error)
DeleteLifecyclePolicyWithContext(aws.Context, *dlm.DeleteLifecyclePolicyInput, ...request.Option) (*dlm.DeleteLifecyclePolicyOutput, error)
DeleteLifecyclePolicyRequest(*dlm.DeleteLifecyclePolicyInput) (*request.Request, *dlm.DeleteLifecyclePolicyOutput)
GetLifecyclePolicies(*dlm.GetLifecyclePoliciesInput) (*dlm.GetLifecyclePoliciesOutput, error)
GetLifecyclePoliciesWithContext(aws.Context, *dlm.GetLifecyclePoliciesInput, ...request.Option) (*dlm.GetLifecyclePoliciesOutput, error)
GetLifecyclePoliciesRequest(*dlm.GetLifecyclePoliciesInput) (*request.Request, *dlm.GetLifecyclePoliciesOutput)
GetLifecyclePolicy(*dlm.GetLifecyclePolicyInput) (*dlm.GetLifecyclePolicyOutput, error)
GetLifecyclePolicyWithContext(aws.Context, *dlm.GetLifecyclePolicyInput, ...request.Option) (*dlm.GetLifecyclePolicyOutput, error)
GetLifecyclePolicyRequest(*dlm.GetLifecyclePolicyInput) (*request.Request, *dlm.GetLifecyclePolicyOutput)
UpdateLifecyclePolicy(*dlm.UpdateLifecyclePolicyInput) (*dlm.UpdateLifecyclePolicyOutput, error)
UpdateLifecyclePolicyWithContext(aws.Context, *dlm.UpdateLifecyclePolicyInput, ...request.Option) (*dlm.UpdateLifecyclePolicyOutput, error)
UpdateLifecyclePolicyRequest(*dlm.UpdateLifecyclePolicyInput) (*request.Request, *dlm.UpdateLifecyclePolicyOutput)
}
var _ DLMAPI = (*dlm.DLM)(nil)
+35
View File
@@ -0,0 +1,35 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package dlm provides the client and types for making API
// requests to Amazon Data Lifecycle Manager.
//
// With Amazon Data Lifecycle Manager, you can manage the lifecycle of your
// AWS resources. You create lifecycle policies, which are used to automate
// operations on the specified resources.
//
// Amazon DLM supports Amazon EBS volumes and snapshots. For information about
// using Amazon DLM with Amazon EBS, see Automating the Amazon EBS Snapshot
// Lifecycle (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html)
// in the Amazon EC2 User Guide.
//
// See https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12 for more information on this service.
//
// See dlm package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/dlm/
//
// Using the Client
//
// To contact Amazon Data Lifecycle Manager 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 Amazon Data Lifecycle Manager client DLM for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/dlm/#New
package dlm
+30
View File
@@ -0,0 +1,30 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package dlm
const (
// ErrCodeInternalServerException for service response error code
// "InternalServerException".
//
// The service failed in an unexpected way.
ErrCodeInternalServerException = "InternalServerException"
// ErrCodeInvalidRequestException for service response error code
// "InvalidRequestException".
//
// Bad request. The request is missing required parameters or has invalid parameters.
ErrCodeInvalidRequestException = "InvalidRequestException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// The request failed because a limit was exceeded.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// A requested resource was not found.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
)
+98
View File
@@ -0,0 +1,98 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package dlm
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/restjson"
)
// DLM provides the API operation methods for making requests to
// Amazon Data Lifecycle Manager. See this package's package overview docs
// for details on the service.
//
// DLM methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type DLM 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 = "DLM" // Name of service.
EndpointsID = "dlm" // ID to lookup a service endpoint with.
ServiceID = "DLM" // ServiceID is a unique identifer of a specific service.
)
// New creates a new instance of the DLM 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 DLM client from just a session.
// svc := dlm.New(mySession)
//
// // Create a DLM client with additional configuration
// svc := dlm.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *DLM {
c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "dlm"
}
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) *DLM {
svc := &DLM{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2018-01-12",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a DLM operation and runs any
// custom request initialization.
func (c *DLM) 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
}