Switch to using the dep tool and update all the dependencies

This commit is contained in:
Nick Craig-Wood 2017-05-11 15:39:54 +01:00
parent 5135ff73cb
commit 98c2d2c41b
5321 changed files with 4483201 additions and 5922 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,90 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package elasticache provides the client and types for making API
// requests to Amazon ElastiCache.
//
// Amazon ElastiCache is a web service that makes it easier to set up, operate,
// and scale a distributed cache in the cloud.
//
// With ElastiCache, customers get all of the benefits of a high-performance,
// in-memory cache with less of the administrative burden involved in launching
// and managing a distributed cache. The service makes setup, scaling, and cluster
// failure handling much simpler than in a self-managed cache deployment.
//
// In addition, through integration with Amazon CloudWatch, customers get enhanced
// visibility into the key performance statistics associated with their cache
// and can receive alarms if a part of their cache runs hot.
//
// See https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02 for more information on this service.
//
// See elasticache package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/elasticache/
//
// Using the Client
//
// To use the client for Amazon ElastiCache you will first need
// to create a new instance of it.
//
// When creating a client for an AWS service you'll first need to have a Session
// already created. The Session provides configuration that can be shared
// between multiple service clients. Additional configuration can be applied to
// the Session and service's client when they are constructed. The aws package's
// Config type contains several fields such as Region for the AWS Region the
// client should make API requests too. The optional Config value can be provided
// as the variadic argument for Sessions and client creation.
//
// Once the service's client is created you can use it to make API requests the
// AWS service. These clients are safe to use concurrently.
//
// // Create a session to share configuration, and load external configuration.
// sess := session.Must(session.NewSession())
//
// // Create the service's client with the session.
// svc := elasticache.New(sess)
//
// See the SDK's documentation for more information on how to use service clients.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
// See aws package's Config type for more information on configuration options.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the Amazon ElastiCache client ElastiCache for more
// information on creating the service's client.
// https://docs.aws.amazon.com/sdk-for-go/api/service/elasticache/#New
//
// Once the client is created you can make an API request to the service.
// Each API method takes a input parameter, and returns the service response
// and an error.
//
// The API method will document which error codes the service can be returned
// by the operation if the service models the API operation's errors. These
// errors will also be available as const strings prefixed with "ErrCode".
//
// result, err := svc.AddTagsToResource(params)
// if err != nil {
// // Cast err to awserr.Error to handle specific error codes.
// aerr, ok := err.(awserr.Error)
// if ok && aerr.Code() == <error code to check for> {
// // Specific error code handling
// }
// return err
// }
//
// fmt.Println("AddTagsToResource result:")
// fmt.Println(result)
//
// Using the Client with Context
//
// The service's client also provides methods to make API requests with a Context
// value. This allows you to control the timeout, and cancellation of pending
// requests. These methods also take request Option as variadic parameter to apply
// additional configuration to the API request.
//
// ctx := context.Background()
//
// result, err := svc.AddTagsToResourceWithContext(ctx, params)
//
// See the request package documentation for more information on using Context pattern
// with the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
package elasticache

View file

@ -0,0 +1,268 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package elasticacheiface provides an interface to enable mocking the Amazon ElastiCache 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 elasticacheiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/elasticache"
)
// ElastiCacheAPI provides an interface to enable mocking the
// elasticache.ElastiCache 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 the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // Amazon ElastiCache.
// func myFunc(svc elasticacheiface.ElastiCacheAPI) bool {
// // Make svc.AddTagsToResource request
// }
//
// func main() {
// sess := session.New()
// svc := elasticache.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockElastiCacheClient struct {
// elasticacheiface.ElastiCacheAPI
// }
// func (m *mockElastiCacheClient) AddTagsToResource(input *elasticache.AddTagsToResourceInput) (*elasticache.TagListMessage, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockElastiCacheClient{}
//
// 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 ElastiCacheAPI interface {
AddTagsToResource(*elasticache.AddTagsToResourceInput) (*elasticache.TagListMessage, error)
AddTagsToResourceWithContext(aws.Context, *elasticache.AddTagsToResourceInput, ...request.Option) (*elasticache.TagListMessage, error)
AddTagsToResourceRequest(*elasticache.AddTagsToResourceInput) (*request.Request, *elasticache.TagListMessage)
AuthorizeCacheSecurityGroupIngress(*elasticache.AuthorizeCacheSecurityGroupIngressInput) (*elasticache.AuthorizeCacheSecurityGroupIngressOutput, error)
AuthorizeCacheSecurityGroupIngressWithContext(aws.Context, *elasticache.AuthorizeCacheSecurityGroupIngressInput, ...request.Option) (*elasticache.AuthorizeCacheSecurityGroupIngressOutput, error)
AuthorizeCacheSecurityGroupIngressRequest(*elasticache.AuthorizeCacheSecurityGroupIngressInput) (*request.Request, *elasticache.AuthorizeCacheSecurityGroupIngressOutput)
CopySnapshot(*elasticache.CopySnapshotInput) (*elasticache.CopySnapshotOutput, error)
CopySnapshotWithContext(aws.Context, *elasticache.CopySnapshotInput, ...request.Option) (*elasticache.CopySnapshotOutput, error)
CopySnapshotRequest(*elasticache.CopySnapshotInput) (*request.Request, *elasticache.CopySnapshotOutput)
CreateCacheCluster(*elasticache.CreateCacheClusterInput) (*elasticache.CreateCacheClusterOutput, error)
CreateCacheClusterWithContext(aws.Context, *elasticache.CreateCacheClusterInput, ...request.Option) (*elasticache.CreateCacheClusterOutput, error)
CreateCacheClusterRequest(*elasticache.CreateCacheClusterInput) (*request.Request, *elasticache.CreateCacheClusterOutput)
CreateCacheParameterGroup(*elasticache.CreateCacheParameterGroupInput) (*elasticache.CreateCacheParameterGroupOutput, error)
CreateCacheParameterGroupWithContext(aws.Context, *elasticache.CreateCacheParameterGroupInput, ...request.Option) (*elasticache.CreateCacheParameterGroupOutput, error)
CreateCacheParameterGroupRequest(*elasticache.CreateCacheParameterGroupInput) (*request.Request, *elasticache.CreateCacheParameterGroupOutput)
CreateCacheSecurityGroup(*elasticache.CreateCacheSecurityGroupInput) (*elasticache.CreateCacheSecurityGroupOutput, error)
CreateCacheSecurityGroupWithContext(aws.Context, *elasticache.CreateCacheSecurityGroupInput, ...request.Option) (*elasticache.CreateCacheSecurityGroupOutput, error)
CreateCacheSecurityGroupRequest(*elasticache.CreateCacheSecurityGroupInput) (*request.Request, *elasticache.CreateCacheSecurityGroupOutput)
CreateCacheSubnetGroup(*elasticache.CreateCacheSubnetGroupInput) (*elasticache.CreateCacheSubnetGroupOutput, error)
CreateCacheSubnetGroupWithContext(aws.Context, *elasticache.CreateCacheSubnetGroupInput, ...request.Option) (*elasticache.CreateCacheSubnetGroupOutput, error)
CreateCacheSubnetGroupRequest(*elasticache.CreateCacheSubnetGroupInput) (*request.Request, *elasticache.CreateCacheSubnetGroupOutput)
CreateReplicationGroup(*elasticache.CreateReplicationGroupInput) (*elasticache.CreateReplicationGroupOutput, error)
CreateReplicationGroupWithContext(aws.Context, *elasticache.CreateReplicationGroupInput, ...request.Option) (*elasticache.CreateReplicationGroupOutput, error)
CreateReplicationGroupRequest(*elasticache.CreateReplicationGroupInput) (*request.Request, *elasticache.CreateReplicationGroupOutput)
CreateSnapshot(*elasticache.CreateSnapshotInput) (*elasticache.CreateSnapshotOutput, error)
CreateSnapshotWithContext(aws.Context, *elasticache.CreateSnapshotInput, ...request.Option) (*elasticache.CreateSnapshotOutput, error)
CreateSnapshotRequest(*elasticache.CreateSnapshotInput) (*request.Request, *elasticache.CreateSnapshotOutput)
DeleteCacheCluster(*elasticache.DeleteCacheClusterInput) (*elasticache.DeleteCacheClusterOutput, error)
DeleteCacheClusterWithContext(aws.Context, *elasticache.DeleteCacheClusterInput, ...request.Option) (*elasticache.DeleteCacheClusterOutput, error)
DeleteCacheClusterRequest(*elasticache.DeleteCacheClusterInput) (*request.Request, *elasticache.DeleteCacheClusterOutput)
DeleteCacheParameterGroup(*elasticache.DeleteCacheParameterGroupInput) (*elasticache.DeleteCacheParameterGroupOutput, error)
DeleteCacheParameterGroupWithContext(aws.Context, *elasticache.DeleteCacheParameterGroupInput, ...request.Option) (*elasticache.DeleteCacheParameterGroupOutput, error)
DeleteCacheParameterGroupRequest(*elasticache.DeleteCacheParameterGroupInput) (*request.Request, *elasticache.DeleteCacheParameterGroupOutput)
DeleteCacheSecurityGroup(*elasticache.DeleteCacheSecurityGroupInput) (*elasticache.DeleteCacheSecurityGroupOutput, error)
DeleteCacheSecurityGroupWithContext(aws.Context, *elasticache.DeleteCacheSecurityGroupInput, ...request.Option) (*elasticache.DeleteCacheSecurityGroupOutput, error)
DeleteCacheSecurityGroupRequest(*elasticache.DeleteCacheSecurityGroupInput) (*request.Request, *elasticache.DeleteCacheSecurityGroupOutput)
DeleteCacheSubnetGroup(*elasticache.DeleteCacheSubnetGroupInput) (*elasticache.DeleteCacheSubnetGroupOutput, error)
DeleteCacheSubnetGroupWithContext(aws.Context, *elasticache.DeleteCacheSubnetGroupInput, ...request.Option) (*elasticache.DeleteCacheSubnetGroupOutput, error)
DeleteCacheSubnetGroupRequest(*elasticache.DeleteCacheSubnetGroupInput) (*request.Request, *elasticache.DeleteCacheSubnetGroupOutput)
DeleteReplicationGroup(*elasticache.DeleteReplicationGroupInput) (*elasticache.DeleteReplicationGroupOutput, error)
DeleteReplicationGroupWithContext(aws.Context, *elasticache.DeleteReplicationGroupInput, ...request.Option) (*elasticache.DeleteReplicationGroupOutput, error)
DeleteReplicationGroupRequest(*elasticache.DeleteReplicationGroupInput) (*request.Request, *elasticache.DeleteReplicationGroupOutput)
DeleteSnapshot(*elasticache.DeleteSnapshotInput) (*elasticache.DeleteSnapshotOutput, error)
DeleteSnapshotWithContext(aws.Context, *elasticache.DeleteSnapshotInput, ...request.Option) (*elasticache.DeleteSnapshotOutput, error)
DeleteSnapshotRequest(*elasticache.DeleteSnapshotInput) (*request.Request, *elasticache.DeleteSnapshotOutput)
DescribeCacheClusters(*elasticache.DescribeCacheClustersInput) (*elasticache.DescribeCacheClustersOutput, error)
DescribeCacheClustersWithContext(aws.Context, *elasticache.DescribeCacheClustersInput, ...request.Option) (*elasticache.DescribeCacheClustersOutput, error)
DescribeCacheClustersRequest(*elasticache.DescribeCacheClustersInput) (*request.Request, *elasticache.DescribeCacheClustersOutput)
DescribeCacheClustersPages(*elasticache.DescribeCacheClustersInput, func(*elasticache.DescribeCacheClustersOutput, bool) bool) error
DescribeCacheClustersPagesWithContext(aws.Context, *elasticache.DescribeCacheClustersInput, func(*elasticache.DescribeCacheClustersOutput, bool) bool, ...request.Option) error
DescribeCacheEngineVersions(*elasticache.DescribeCacheEngineVersionsInput) (*elasticache.DescribeCacheEngineVersionsOutput, error)
DescribeCacheEngineVersionsWithContext(aws.Context, *elasticache.DescribeCacheEngineVersionsInput, ...request.Option) (*elasticache.DescribeCacheEngineVersionsOutput, error)
DescribeCacheEngineVersionsRequest(*elasticache.DescribeCacheEngineVersionsInput) (*request.Request, *elasticache.DescribeCacheEngineVersionsOutput)
DescribeCacheEngineVersionsPages(*elasticache.DescribeCacheEngineVersionsInput, func(*elasticache.DescribeCacheEngineVersionsOutput, bool) bool) error
DescribeCacheEngineVersionsPagesWithContext(aws.Context, *elasticache.DescribeCacheEngineVersionsInput, func(*elasticache.DescribeCacheEngineVersionsOutput, bool) bool, ...request.Option) error
DescribeCacheParameterGroups(*elasticache.DescribeCacheParameterGroupsInput) (*elasticache.DescribeCacheParameterGroupsOutput, error)
DescribeCacheParameterGroupsWithContext(aws.Context, *elasticache.DescribeCacheParameterGroupsInput, ...request.Option) (*elasticache.DescribeCacheParameterGroupsOutput, error)
DescribeCacheParameterGroupsRequest(*elasticache.DescribeCacheParameterGroupsInput) (*request.Request, *elasticache.DescribeCacheParameterGroupsOutput)
DescribeCacheParameterGroupsPages(*elasticache.DescribeCacheParameterGroupsInput, func(*elasticache.DescribeCacheParameterGroupsOutput, bool) bool) error
DescribeCacheParameterGroupsPagesWithContext(aws.Context, *elasticache.DescribeCacheParameterGroupsInput, func(*elasticache.DescribeCacheParameterGroupsOutput, bool) bool, ...request.Option) error
DescribeCacheParameters(*elasticache.DescribeCacheParametersInput) (*elasticache.DescribeCacheParametersOutput, error)
DescribeCacheParametersWithContext(aws.Context, *elasticache.DescribeCacheParametersInput, ...request.Option) (*elasticache.DescribeCacheParametersOutput, error)
DescribeCacheParametersRequest(*elasticache.DescribeCacheParametersInput) (*request.Request, *elasticache.DescribeCacheParametersOutput)
DescribeCacheParametersPages(*elasticache.DescribeCacheParametersInput, func(*elasticache.DescribeCacheParametersOutput, bool) bool) error
DescribeCacheParametersPagesWithContext(aws.Context, *elasticache.DescribeCacheParametersInput, func(*elasticache.DescribeCacheParametersOutput, bool) bool, ...request.Option) error
DescribeCacheSecurityGroups(*elasticache.DescribeCacheSecurityGroupsInput) (*elasticache.DescribeCacheSecurityGroupsOutput, error)
DescribeCacheSecurityGroupsWithContext(aws.Context, *elasticache.DescribeCacheSecurityGroupsInput, ...request.Option) (*elasticache.DescribeCacheSecurityGroupsOutput, error)
DescribeCacheSecurityGroupsRequest(*elasticache.DescribeCacheSecurityGroupsInput) (*request.Request, *elasticache.DescribeCacheSecurityGroupsOutput)
DescribeCacheSecurityGroupsPages(*elasticache.DescribeCacheSecurityGroupsInput, func(*elasticache.DescribeCacheSecurityGroupsOutput, bool) bool) error
DescribeCacheSecurityGroupsPagesWithContext(aws.Context, *elasticache.DescribeCacheSecurityGroupsInput, func(*elasticache.DescribeCacheSecurityGroupsOutput, bool) bool, ...request.Option) error
DescribeCacheSubnetGroups(*elasticache.DescribeCacheSubnetGroupsInput) (*elasticache.DescribeCacheSubnetGroupsOutput, error)
DescribeCacheSubnetGroupsWithContext(aws.Context, *elasticache.DescribeCacheSubnetGroupsInput, ...request.Option) (*elasticache.DescribeCacheSubnetGroupsOutput, error)
DescribeCacheSubnetGroupsRequest(*elasticache.DescribeCacheSubnetGroupsInput) (*request.Request, *elasticache.DescribeCacheSubnetGroupsOutput)
DescribeCacheSubnetGroupsPages(*elasticache.DescribeCacheSubnetGroupsInput, func(*elasticache.DescribeCacheSubnetGroupsOutput, bool) bool) error
DescribeCacheSubnetGroupsPagesWithContext(aws.Context, *elasticache.DescribeCacheSubnetGroupsInput, func(*elasticache.DescribeCacheSubnetGroupsOutput, bool) bool, ...request.Option) error
DescribeEngineDefaultParameters(*elasticache.DescribeEngineDefaultParametersInput) (*elasticache.DescribeEngineDefaultParametersOutput, error)
DescribeEngineDefaultParametersWithContext(aws.Context, *elasticache.DescribeEngineDefaultParametersInput, ...request.Option) (*elasticache.DescribeEngineDefaultParametersOutput, error)
DescribeEngineDefaultParametersRequest(*elasticache.DescribeEngineDefaultParametersInput) (*request.Request, *elasticache.DescribeEngineDefaultParametersOutput)
DescribeEngineDefaultParametersPages(*elasticache.DescribeEngineDefaultParametersInput, func(*elasticache.DescribeEngineDefaultParametersOutput, bool) bool) error
DescribeEngineDefaultParametersPagesWithContext(aws.Context, *elasticache.DescribeEngineDefaultParametersInput, func(*elasticache.DescribeEngineDefaultParametersOutput, bool) bool, ...request.Option) error
DescribeEvents(*elasticache.DescribeEventsInput) (*elasticache.DescribeEventsOutput, error)
DescribeEventsWithContext(aws.Context, *elasticache.DescribeEventsInput, ...request.Option) (*elasticache.DescribeEventsOutput, error)
DescribeEventsRequest(*elasticache.DescribeEventsInput) (*request.Request, *elasticache.DescribeEventsOutput)
DescribeEventsPages(*elasticache.DescribeEventsInput, func(*elasticache.DescribeEventsOutput, bool) bool) error
DescribeEventsPagesWithContext(aws.Context, *elasticache.DescribeEventsInput, func(*elasticache.DescribeEventsOutput, bool) bool, ...request.Option) error
DescribeReplicationGroups(*elasticache.DescribeReplicationGroupsInput) (*elasticache.DescribeReplicationGroupsOutput, error)
DescribeReplicationGroupsWithContext(aws.Context, *elasticache.DescribeReplicationGroupsInput, ...request.Option) (*elasticache.DescribeReplicationGroupsOutput, error)
DescribeReplicationGroupsRequest(*elasticache.DescribeReplicationGroupsInput) (*request.Request, *elasticache.DescribeReplicationGroupsOutput)
DescribeReplicationGroupsPages(*elasticache.DescribeReplicationGroupsInput, func(*elasticache.DescribeReplicationGroupsOutput, bool) bool) error
DescribeReplicationGroupsPagesWithContext(aws.Context, *elasticache.DescribeReplicationGroupsInput, func(*elasticache.DescribeReplicationGroupsOutput, bool) bool, ...request.Option) error
DescribeReservedCacheNodes(*elasticache.DescribeReservedCacheNodesInput) (*elasticache.DescribeReservedCacheNodesOutput, error)
DescribeReservedCacheNodesWithContext(aws.Context, *elasticache.DescribeReservedCacheNodesInput, ...request.Option) (*elasticache.DescribeReservedCacheNodesOutput, error)
DescribeReservedCacheNodesRequest(*elasticache.DescribeReservedCacheNodesInput) (*request.Request, *elasticache.DescribeReservedCacheNodesOutput)
DescribeReservedCacheNodesPages(*elasticache.DescribeReservedCacheNodesInput, func(*elasticache.DescribeReservedCacheNodesOutput, bool) bool) error
DescribeReservedCacheNodesPagesWithContext(aws.Context, *elasticache.DescribeReservedCacheNodesInput, func(*elasticache.DescribeReservedCacheNodesOutput, bool) bool, ...request.Option) error
DescribeReservedCacheNodesOfferings(*elasticache.DescribeReservedCacheNodesOfferingsInput) (*elasticache.DescribeReservedCacheNodesOfferingsOutput, error)
DescribeReservedCacheNodesOfferingsWithContext(aws.Context, *elasticache.DescribeReservedCacheNodesOfferingsInput, ...request.Option) (*elasticache.DescribeReservedCacheNodesOfferingsOutput, error)
DescribeReservedCacheNodesOfferingsRequest(*elasticache.DescribeReservedCacheNodesOfferingsInput) (*request.Request, *elasticache.DescribeReservedCacheNodesOfferingsOutput)
DescribeReservedCacheNodesOfferingsPages(*elasticache.DescribeReservedCacheNodesOfferingsInput, func(*elasticache.DescribeReservedCacheNodesOfferingsOutput, bool) bool) error
DescribeReservedCacheNodesOfferingsPagesWithContext(aws.Context, *elasticache.DescribeReservedCacheNodesOfferingsInput, func(*elasticache.DescribeReservedCacheNodesOfferingsOutput, bool) bool, ...request.Option) error
DescribeSnapshots(*elasticache.DescribeSnapshotsInput) (*elasticache.DescribeSnapshotsOutput, error)
DescribeSnapshotsWithContext(aws.Context, *elasticache.DescribeSnapshotsInput, ...request.Option) (*elasticache.DescribeSnapshotsOutput, error)
DescribeSnapshotsRequest(*elasticache.DescribeSnapshotsInput) (*request.Request, *elasticache.DescribeSnapshotsOutput)
DescribeSnapshotsPages(*elasticache.DescribeSnapshotsInput, func(*elasticache.DescribeSnapshotsOutput, bool) bool) error
DescribeSnapshotsPagesWithContext(aws.Context, *elasticache.DescribeSnapshotsInput, func(*elasticache.DescribeSnapshotsOutput, bool) bool, ...request.Option) error
ListAllowedNodeTypeModifications(*elasticache.ListAllowedNodeTypeModificationsInput) (*elasticache.ListAllowedNodeTypeModificationsOutput, error)
ListAllowedNodeTypeModificationsWithContext(aws.Context, *elasticache.ListAllowedNodeTypeModificationsInput, ...request.Option) (*elasticache.ListAllowedNodeTypeModificationsOutput, error)
ListAllowedNodeTypeModificationsRequest(*elasticache.ListAllowedNodeTypeModificationsInput) (*request.Request, *elasticache.ListAllowedNodeTypeModificationsOutput)
ListTagsForResource(*elasticache.ListTagsForResourceInput) (*elasticache.TagListMessage, error)
ListTagsForResourceWithContext(aws.Context, *elasticache.ListTagsForResourceInput, ...request.Option) (*elasticache.TagListMessage, error)
ListTagsForResourceRequest(*elasticache.ListTagsForResourceInput) (*request.Request, *elasticache.TagListMessage)
ModifyCacheCluster(*elasticache.ModifyCacheClusterInput) (*elasticache.ModifyCacheClusterOutput, error)
ModifyCacheClusterWithContext(aws.Context, *elasticache.ModifyCacheClusterInput, ...request.Option) (*elasticache.ModifyCacheClusterOutput, error)
ModifyCacheClusterRequest(*elasticache.ModifyCacheClusterInput) (*request.Request, *elasticache.ModifyCacheClusterOutput)
ModifyCacheParameterGroup(*elasticache.ModifyCacheParameterGroupInput) (*elasticache.CacheParameterGroupNameMessage, error)
ModifyCacheParameterGroupWithContext(aws.Context, *elasticache.ModifyCacheParameterGroupInput, ...request.Option) (*elasticache.CacheParameterGroupNameMessage, error)
ModifyCacheParameterGroupRequest(*elasticache.ModifyCacheParameterGroupInput) (*request.Request, *elasticache.CacheParameterGroupNameMessage)
ModifyCacheSubnetGroup(*elasticache.ModifyCacheSubnetGroupInput) (*elasticache.ModifyCacheSubnetGroupOutput, error)
ModifyCacheSubnetGroupWithContext(aws.Context, *elasticache.ModifyCacheSubnetGroupInput, ...request.Option) (*elasticache.ModifyCacheSubnetGroupOutput, error)
ModifyCacheSubnetGroupRequest(*elasticache.ModifyCacheSubnetGroupInput) (*request.Request, *elasticache.ModifyCacheSubnetGroupOutput)
ModifyReplicationGroup(*elasticache.ModifyReplicationGroupInput) (*elasticache.ModifyReplicationGroupOutput, error)
ModifyReplicationGroupWithContext(aws.Context, *elasticache.ModifyReplicationGroupInput, ...request.Option) (*elasticache.ModifyReplicationGroupOutput, error)
ModifyReplicationGroupRequest(*elasticache.ModifyReplicationGroupInput) (*request.Request, *elasticache.ModifyReplicationGroupOutput)
PurchaseReservedCacheNodesOffering(*elasticache.PurchaseReservedCacheNodesOfferingInput) (*elasticache.PurchaseReservedCacheNodesOfferingOutput, error)
PurchaseReservedCacheNodesOfferingWithContext(aws.Context, *elasticache.PurchaseReservedCacheNodesOfferingInput, ...request.Option) (*elasticache.PurchaseReservedCacheNodesOfferingOutput, error)
PurchaseReservedCacheNodesOfferingRequest(*elasticache.PurchaseReservedCacheNodesOfferingInput) (*request.Request, *elasticache.PurchaseReservedCacheNodesOfferingOutput)
RebootCacheCluster(*elasticache.RebootCacheClusterInput) (*elasticache.RebootCacheClusterOutput, error)
RebootCacheClusterWithContext(aws.Context, *elasticache.RebootCacheClusterInput, ...request.Option) (*elasticache.RebootCacheClusterOutput, error)
RebootCacheClusterRequest(*elasticache.RebootCacheClusterInput) (*request.Request, *elasticache.RebootCacheClusterOutput)
RemoveTagsFromResource(*elasticache.RemoveTagsFromResourceInput) (*elasticache.TagListMessage, error)
RemoveTagsFromResourceWithContext(aws.Context, *elasticache.RemoveTagsFromResourceInput, ...request.Option) (*elasticache.TagListMessage, error)
RemoveTagsFromResourceRequest(*elasticache.RemoveTagsFromResourceInput) (*request.Request, *elasticache.TagListMessage)
ResetCacheParameterGroup(*elasticache.ResetCacheParameterGroupInput) (*elasticache.CacheParameterGroupNameMessage, error)
ResetCacheParameterGroupWithContext(aws.Context, *elasticache.ResetCacheParameterGroupInput, ...request.Option) (*elasticache.CacheParameterGroupNameMessage, error)
ResetCacheParameterGroupRequest(*elasticache.ResetCacheParameterGroupInput) (*request.Request, *elasticache.CacheParameterGroupNameMessage)
RevokeCacheSecurityGroupIngress(*elasticache.RevokeCacheSecurityGroupIngressInput) (*elasticache.RevokeCacheSecurityGroupIngressOutput, error)
RevokeCacheSecurityGroupIngressWithContext(aws.Context, *elasticache.RevokeCacheSecurityGroupIngressInput, ...request.Option) (*elasticache.RevokeCacheSecurityGroupIngressOutput, error)
RevokeCacheSecurityGroupIngressRequest(*elasticache.RevokeCacheSecurityGroupIngressInput) (*request.Request, *elasticache.RevokeCacheSecurityGroupIngressOutput)
TestFailover(*elasticache.TestFailoverInput) (*elasticache.TestFailoverOutput, error)
TestFailoverWithContext(aws.Context, *elasticache.TestFailoverInput, ...request.Option) (*elasticache.TestFailoverOutput, error)
TestFailoverRequest(*elasticache.TestFailoverInput) (*request.Request, *elasticache.TestFailoverOutput)
WaitUntilCacheClusterAvailable(*elasticache.DescribeCacheClustersInput) error
WaitUntilCacheClusterAvailableWithContext(aws.Context, *elasticache.DescribeCacheClustersInput, ...request.WaiterOption) error
WaitUntilCacheClusterDeleted(*elasticache.DescribeCacheClustersInput) error
WaitUntilCacheClusterDeletedWithContext(aws.Context, *elasticache.DescribeCacheClustersInput, ...request.WaiterOption) error
WaitUntilReplicationGroupAvailable(*elasticache.DescribeReplicationGroupsInput) error
WaitUntilReplicationGroupAvailableWithContext(aws.Context, *elasticache.DescribeReplicationGroupsInput, ...request.WaiterOption) error
WaitUntilReplicationGroupDeleted(*elasticache.DescribeReplicationGroupsInput) error
WaitUntilReplicationGroupDeletedWithContext(aws.Context, *elasticache.DescribeReplicationGroupsInput, ...request.WaiterOption) error
}
var _ ElastiCacheAPI = (*elasticache.ElastiCache)(nil)

View file

@ -0,0 +1,311 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package elasticache
const (
// ErrCodeAPICallRateForCustomerExceededFault for service response error code
// "APICallRateForCustomerExceeded".
//
// The customer has exceeded the allowed rate of API calls.
ErrCodeAPICallRateForCustomerExceededFault = "APICallRateForCustomerExceeded"
// ErrCodeAuthorizationAlreadyExistsFault for service response error code
// "AuthorizationAlreadyExists".
//
// The specified Amazon EC2 security group is already authorized for the specified
// cache security group.
ErrCodeAuthorizationAlreadyExistsFault = "AuthorizationAlreadyExists"
// ErrCodeAuthorizationNotFoundFault for service response error code
// "AuthorizationNotFound".
//
// The specified Amazon EC2 security group is not authorized for the specified
// cache security group.
ErrCodeAuthorizationNotFoundFault = "AuthorizationNotFound"
// ErrCodeCacheClusterAlreadyExistsFault for service response error code
// "CacheClusterAlreadyExists".
//
// You already have a cache cluster with the given identifier.
ErrCodeCacheClusterAlreadyExistsFault = "CacheClusterAlreadyExists"
// ErrCodeCacheClusterNotFoundFault for service response error code
// "CacheClusterNotFound".
//
// The requested cache cluster ID does not refer to an existing cache cluster.
ErrCodeCacheClusterNotFoundFault = "CacheClusterNotFound"
// ErrCodeCacheParameterGroupAlreadyExistsFault for service response error code
// "CacheParameterGroupAlreadyExists".
//
// A cache parameter group with the requested name already exists.
ErrCodeCacheParameterGroupAlreadyExistsFault = "CacheParameterGroupAlreadyExists"
// ErrCodeCacheParameterGroupNotFoundFault for service response error code
// "CacheParameterGroupNotFound".
//
// The requested cache parameter group name does not refer to an existing cache
// parameter group.
ErrCodeCacheParameterGroupNotFoundFault = "CacheParameterGroupNotFound"
// ErrCodeCacheParameterGroupQuotaExceededFault for service response error code
// "CacheParameterGroupQuotaExceeded".
//
// The request cannot be processed because it would exceed the maximum number
// of cache security groups.
ErrCodeCacheParameterGroupQuotaExceededFault = "CacheParameterGroupQuotaExceeded"
// ErrCodeCacheSecurityGroupAlreadyExistsFault for service response error code
// "CacheSecurityGroupAlreadyExists".
//
// A cache security group with the specified name already exists.
ErrCodeCacheSecurityGroupAlreadyExistsFault = "CacheSecurityGroupAlreadyExists"
// ErrCodeCacheSecurityGroupNotFoundFault for service response error code
// "CacheSecurityGroupNotFound".
//
// The requested cache security group name does not refer to an existing cache
// security group.
ErrCodeCacheSecurityGroupNotFoundFault = "CacheSecurityGroupNotFound"
// ErrCodeCacheSecurityGroupQuotaExceededFault for service response error code
// "QuotaExceeded.CacheSecurityGroup".
//
// The request cannot be processed because it would exceed the allowed number
// of cache security groups.
ErrCodeCacheSecurityGroupQuotaExceededFault = "QuotaExceeded.CacheSecurityGroup"
// ErrCodeCacheSubnetGroupAlreadyExistsFault for service response error code
// "CacheSubnetGroupAlreadyExists".
//
// The requested cache subnet group name is already in use by an existing cache
// subnet group.
ErrCodeCacheSubnetGroupAlreadyExistsFault = "CacheSubnetGroupAlreadyExists"
// ErrCodeCacheSubnetGroupInUse for service response error code
// "CacheSubnetGroupInUse".
//
// The requested cache subnet group is currently in use.
ErrCodeCacheSubnetGroupInUse = "CacheSubnetGroupInUse"
// ErrCodeCacheSubnetGroupNotFoundFault for service response error code
// "CacheSubnetGroupNotFoundFault".
//
// The requested cache subnet group name does not refer to an existing cache
// subnet group.
ErrCodeCacheSubnetGroupNotFoundFault = "CacheSubnetGroupNotFoundFault"
// ErrCodeCacheSubnetGroupQuotaExceededFault for service response error code
// "CacheSubnetGroupQuotaExceeded".
//
// The request cannot be processed because it would exceed the allowed number
// of cache subnet groups.
ErrCodeCacheSubnetGroupQuotaExceededFault = "CacheSubnetGroupQuotaExceeded"
// ErrCodeCacheSubnetQuotaExceededFault for service response error code
// "CacheSubnetQuotaExceededFault".
//
// The request cannot be processed because it would exceed the allowed number
// of subnets in a cache subnet group.
ErrCodeCacheSubnetQuotaExceededFault = "CacheSubnetQuotaExceededFault"
// ErrCodeClusterQuotaForCustomerExceededFault for service response error code
// "ClusterQuotaForCustomerExceeded".
//
// The request cannot be processed because it would exceed the allowed number
// of cache clusters per customer.
ErrCodeClusterQuotaForCustomerExceededFault = "ClusterQuotaForCustomerExceeded"
// ErrCodeInsufficientCacheClusterCapacityFault for service response error code
// "InsufficientCacheClusterCapacity".
//
// The requested cache node type is not available in the specified Availability
// Zone.
ErrCodeInsufficientCacheClusterCapacityFault = "InsufficientCacheClusterCapacity"
// ErrCodeInvalidARNFault for service response error code
// "InvalidARN".
//
// The requested Amazon Resource Name (ARN) does not refer to an existing resource.
ErrCodeInvalidARNFault = "InvalidARN"
// ErrCodeInvalidCacheClusterStateFault for service response error code
// "InvalidCacheClusterState".
//
// The requested cache cluster is not in the available state.
ErrCodeInvalidCacheClusterStateFault = "InvalidCacheClusterState"
// ErrCodeInvalidCacheParameterGroupStateFault for service response error code
// "InvalidCacheParameterGroupState".
//
// The current state of the cache parameter group does not allow the requested
// operation to occur.
ErrCodeInvalidCacheParameterGroupStateFault = "InvalidCacheParameterGroupState"
// ErrCodeInvalidCacheSecurityGroupStateFault for service response error code
// "InvalidCacheSecurityGroupState".
//
// The current state of the cache security group does not allow deletion.
ErrCodeInvalidCacheSecurityGroupStateFault = "InvalidCacheSecurityGroupState"
// ErrCodeInvalidParameterCombinationException for service response error code
// "InvalidParameterCombination".
//
// Two or more incompatible parameters were specified.
ErrCodeInvalidParameterCombinationException = "InvalidParameterCombination"
// ErrCodeInvalidParameterValueException for service response error code
// "InvalidParameterValue".
//
// The value for a parameter is invalid.
ErrCodeInvalidParameterValueException = "InvalidParameterValue"
// ErrCodeInvalidReplicationGroupStateFault for service response error code
// "InvalidReplicationGroupState".
//
// The requested replication group is not in the available state.
ErrCodeInvalidReplicationGroupStateFault = "InvalidReplicationGroupState"
// ErrCodeInvalidSnapshotStateFault for service response error code
// "InvalidSnapshotState".
//
// The current state of the snapshot does not allow the requested operation
// to occur.
ErrCodeInvalidSnapshotStateFault = "InvalidSnapshotState"
// ErrCodeInvalidSubnet for service response error code
// "InvalidSubnet".
//
// An invalid subnet identifier was specified.
ErrCodeInvalidSubnet = "InvalidSubnet"
// ErrCodeInvalidVPCNetworkStateFault for service response error code
// "InvalidVPCNetworkStateFault".
//
// The VPC network is in an invalid state.
ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault"
// ErrCodeNodeGroupNotFoundFault for service response error code
// "NodeGroupNotFoundFault".
//
// The node group specified by the NodeGroupId parameter could not be found.
// Please verify that the node group exists and that you spelled the NodeGroupId
// value correctly.
ErrCodeNodeGroupNotFoundFault = "NodeGroupNotFoundFault"
// ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault for service response error code
// "NodeGroupsPerReplicationGroupQuotaExceeded".
//
// The request cannot be processed because it would exceed the maximum of 15
// node groups (shards) in a single replication group.
ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault = "NodeGroupsPerReplicationGroupQuotaExceeded"
// ErrCodeNodeQuotaForClusterExceededFault for service response error code
// "NodeQuotaForClusterExceeded".
//
// The request cannot be processed because it would exceed the allowed number
// of cache nodes in a single cache cluster.
ErrCodeNodeQuotaForClusterExceededFault = "NodeQuotaForClusterExceeded"
// ErrCodeNodeQuotaForCustomerExceededFault for service response error code
// "NodeQuotaForCustomerExceeded".
//
// The request cannot be processed because it would exceed the allowed number
// of cache nodes per customer.
ErrCodeNodeQuotaForCustomerExceededFault = "NodeQuotaForCustomerExceeded"
// ErrCodeReplicationGroupAlreadyExistsFault for service response error code
// "ReplicationGroupAlreadyExists".
//
// The specified replication group already exists.
ErrCodeReplicationGroupAlreadyExistsFault = "ReplicationGroupAlreadyExists"
// ErrCodeReplicationGroupNotFoundFault for service response error code
// "ReplicationGroupNotFoundFault".
//
// The specified replication group does not exist.
ErrCodeReplicationGroupNotFoundFault = "ReplicationGroupNotFoundFault"
// ErrCodeReservedCacheNodeAlreadyExistsFault for service response error code
// "ReservedCacheNodeAlreadyExists".
//
// You already have a reservation with the given identifier.
ErrCodeReservedCacheNodeAlreadyExistsFault = "ReservedCacheNodeAlreadyExists"
// ErrCodeReservedCacheNodeNotFoundFault for service response error code
// "ReservedCacheNodeNotFound".
//
// The requested reserved cache node was not found.
ErrCodeReservedCacheNodeNotFoundFault = "ReservedCacheNodeNotFound"
// ErrCodeReservedCacheNodeQuotaExceededFault for service response error code
// "ReservedCacheNodeQuotaExceeded".
//
// The request cannot be processed because it would exceed the user's cache
// node quota.
ErrCodeReservedCacheNodeQuotaExceededFault = "ReservedCacheNodeQuotaExceeded"
// ErrCodeReservedCacheNodesOfferingNotFoundFault for service response error code
// "ReservedCacheNodesOfferingNotFound".
//
// The requested cache node offering does not exist.
ErrCodeReservedCacheNodesOfferingNotFoundFault = "ReservedCacheNodesOfferingNotFound"
// ErrCodeSnapshotAlreadyExistsFault for service response error code
// "SnapshotAlreadyExistsFault".
//
// You already have a snapshot with the given name.
ErrCodeSnapshotAlreadyExistsFault = "SnapshotAlreadyExistsFault"
// ErrCodeSnapshotFeatureNotSupportedFault for service response error code
// "SnapshotFeatureNotSupportedFault".
//
// You attempted one of the following operations:
//
// * Creating a snapshot of a Redis cache cluster running on a cache.t1.micro
// cache node.
//
// * Creating a snapshot of a cache cluster that is running Memcached rather
// than Redis.
//
// Neither of these are supported by ElastiCache.
ErrCodeSnapshotFeatureNotSupportedFault = "SnapshotFeatureNotSupportedFault"
// ErrCodeSnapshotNotFoundFault for service response error code
// "SnapshotNotFoundFault".
//
// The requested snapshot name does not refer to an existing snapshot.
ErrCodeSnapshotNotFoundFault = "SnapshotNotFoundFault"
// ErrCodeSnapshotQuotaExceededFault for service response error code
// "SnapshotQuotaExceededFault".
//
// The request cannot be processed because it would exceed the maximum number
// of snapshots.
ErrCodeSnapshotQuotaExceededFault = "SnapshotQuotaExceededFault"
// ErrCodeSubnetInUse for service response error code
// "SubnetInUse".
//
// The requested subnet is being used by another cache subnet group.
ErrCodeSubnetInUse = "SubnetInUse"
// ErrCodeTagNotFoundFault for service response error code
// "TagNotFound".
//
// The requested tag was not found on this resource.
ErrCodeTagNotFoundFault = "TagNotFound"
// ErrCodeTagQuotaPerResourceExceeded for service response error code
// "TagQuotaPerResourceExceeded".
//
// The request cannot be processed because it would cause the resource to have
// more than the allowed number of tags. The maximum number of tags permitted
// on a resource is 50.
ErrCodeTagQuotaPerResourceExceeded = "TagQuotaPerResourceExceeded"
// ErrCodeTestFailoverNotAvailableFault for service response error code
// "TestFailoverNotAvailableFault".
ErrCodeTestFailoverNotAvailableFault = "TestFailoverNotAvailableFault"
)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,93 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package elasticache
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/query"
)
// ElastiCache provides the API operation methods for making requests to
// Amazon ElastiCache. See this package's package overview docs
// for details on the service.
//
// ElastiCache methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type ElastiCache 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 = "elasticache" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
)
// New creates a new instance of the ElastiCache 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 ElastiCache client from just a session.
// svc := elasticache.New(mySession)
//
// // Create a ElastiCache client with additional configuration
// svc := elasticache.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ElastiCache {
c := p.ClientConfig(EndpointsID, cfgs...)
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) *ElastiCache {
svc := &ElastiCache{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2015-02-02",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(query.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a ElastiCache operation and runs any
// custom request initialization.
func (c *ElastiCache) 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
}

View file

@ -0,0 +1,264 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package elasticache
import (
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
)
// WaitUntilCacheClusterAvailable uses the Amazon ElastiCache API operation
// DescribeCacheClusters to wait for a condition to be met before returning.
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *ElastiCache) WaitUntilCacheClusterAvailable(input *DescribeCacheClustersInput) error {
return c.WaitUntilCacheClusterAvailableWithContext(aws.BackgroundContext(), input)
}
// WaitUntilCacheClusterAvailableWithContext is an extended version of WaitUntilCacheClusterAvailable.
// With the support for passing in a context and options to configure the
// Waiter and the underlying request options.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ElastiCache) WaitUntilCacheClusterAvailableWithContext(ctx aws.Context, input *DescribeCacheClustersInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilCacheClusterAvailable",
MaxAttempts: 40,
Delay: request.ConstantWaiterDelay(15 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathAllWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus",
Expected: "available",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus",
Expected: "deleted",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus",
Expected: "deleting",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus",
Expected: "incompatible-network",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus",
Expected: "restore-failed",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeCacheClustersInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeCacheClustersRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilCacheClusterDeleted uses the Amazon ElastiCache API operation
// DescribeCacheClusters to wait for a condition to be met before returning.
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *ElastiCache) WaitUntilCacheClusterDeleted(input *DescribeCacheClustersInput) error {
return c.WaitUntilCacheClusterDeletedWithContext(aws.BackgroundContext(), input)
}
// WaitUntilCacheClusterDeletedWithContext is an extended version of WaitUntilCacheClusterDeleted.
// With the support for passing in a context and options to configure the
// Waiter and the underlying request options.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ElastiCache) WaitUntilCacheClusterDeletedWithContext(ctx aws.Context, input *DescribeCacheClustersInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilCacheClusterDeleted",
MaxAttempts: 40,
Delay: request.ConstantWaiterDelay(15 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathAllWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus",
Expected: "deleted",
},
{
State: request.SuccessWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "CacheClusterNotFound",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus",
Expected: "available",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus",
Expected: "creating",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus",
Expected: "incompatible-network",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus",
Expected: "modifying",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus",
Expected: "restore-failed",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "CacheClusters[].CacheClusterStatus",
Expected: "snapshotting",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeCacheClustersInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeCacheClustersRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilReplicationGroupAvailable uses the Amazon ElastiCache API operation
// DescribeReplicationGroups to wait for a condition to be met before returning.
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *ElastiCache) WaitUntilReplicationGroupAvailable(input *DescribeReplicationGroupsInput) error {
return c.WaitUntilReplicationGroupAvailableWithContext(aws.BackgroundContext(), input)
}
// WaitUntilReplicationGroupAvailableWithContext is an extended version of WaitUntilReplicationGroupAvailable.
// With the support for passing in a context and options to configure the
// Waiter and the underlying request options.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ElastiCache) WaitUntilReplicationGroupAvailableWithContext(ctx aws.Context, input *DescribeReplicationGroupsInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilReplicationGroupAvailable",
MaxAttempts: 40,
Delay: request.ConstantWaiterDelay(15 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathAllWaiterMatch, Argument: "ReplicationGroups[].Status",
Expected: "available",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationGroups[].Status",
Expected: "deleted",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeReplicationGroupsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeReplicationGroupsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}
// WaitUntilReplicationGroupDeleted uses the Amazon ElastiCache API operation
// DescribeReplicationGroups to wait for a condition to be met before returning.
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *ElastiCache) WaitUntilReplicationGroupDeleted(input *DescribeReplicationGroupsInput) error {
return c.WaitUntilReplicationGroupDeletedWithContext(aws.BackgroundContext(), input)
}
// WaitUntilReplicationGroupDeletedWithContext is an extended version of WaitUntilReplicationGroupDeleted.
// With the support for passing in a context and options to configure the
// Waiter and the underlying request options.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ElastiCache) WaitUntilReplicationGroupDeletedWithContext(ctx aws.Context, input *DescribeReplicationGroupsInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilReplicationGroupDeleted",
MaxAttempts: 40,
Delay: request.ConstantWaiterDelay(15 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathAllWaiterMatch, Argument: "ReplicationGroups[].Status",
Expected: "deleted",
},
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationGroups[].Status",
Expected: "available",
},
{
State: request.SuccessWaiterState,
Matcher: request.ErrorWaiterMatch,
Expected: "ReplicationGroupNotFoundFault",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *DescribeReplicationGroupsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeReplicationGroupsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}