mirror of https://github.com/kubernetes/kops.git
make gomod
This commit is contained in:
parent
d6c72e0da0
commit
64f9ca95bb
File diff suppressed because it is too large
Load Diff
|
@ -1,48 +0,0 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudformation provides the client and types for making API
|
||||
// requests to AWS CloudFormation.
|
||||
//
|
||||
// CloudFormation allows you to create and manage Amazon Web Services infrastructure
|
||||
// deployments predictably and repeatedly. You can use CloudFormation to leverage
|
||||
// Amazon Web Services products, such as Amazon Elastic Compute Cloud, Amazon
|
||||
// Elastic Block Store, Amazon Simple Notification Service, Elastic Load Balancing,
|
||||
// and Auto Scaling to build highly reliable, highly scalable, cost-effective
|
||||
// applications without creating or configuring the underlying Amazon Web Services
|
||||
// infrastructure.
|
||||
//
|
||||
// With CloudFormation, you declare all your resources and dependencies in a
|
||||
// template file. The template defines a collection of resources as a single
|
||||
// unit called a stack. CloudFormation creates and deletes all member resources
|
||||
// of the stack together and manages all dependencies between the resources
|
||||
// for you.
|
||||
//
|
||||
// For more information about CloudFormation, see the CloudFormation product
|
||||
// page (http://aws.amazon.com/cloudformation/).
|
||||
//
|
||||
// CloudFormation makes use of other Amazon Web Services products. If you need
|
||||
// additional technical information about a specific Amazon Web Services product,
|
||||
// you can find the product's technical documentation at docs.aws.amazon.com
|
||||
// (https://docs.aws.amazon.com/).
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15 for more information on this service.
|
||||
//
|
||||
// See cloudformation package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudformation/
|
||||
//
|
||||
// # Using the Client
|
||||
//
|
||||
// To contact AWS CloudFormation 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 CloudFormation client CloudFormation for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudformation/#New
|
||||
package cloudformation
|
|
@ -1,153 +0,0 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudformation
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeAlreadyExistsException for service response error code
|
||||
// "AlreadyExistsException".
|
||||
//
|
||||
// The resource with the name requested already exists.
|
||||
ErrCodeAlreadyExistsException = "AlreadyExistsException"
|
||||
|
||||
// ErrCodeCFNRegistryException for service response error code
|
||||
// "CFNRegistryException".
|
||||
//
|
||||
// An error occurred during a CloudFormation registry operation.
|
||||
ErrCodeCFNRegistryException = "CFNRegistryException"
|
||||
|
||||
// ErrCodeChangeSetNotFoundException for service response error code
|
||||
// "ChangeSetNotFound".
|
||||
//
|
||||
// The specified change set name or ID doesn't exit. To view valid change sets
|
||||
// for a stack, use the ListChangeSets operation.
|
||||
ErrCodeChangeSetNotFoundException = "ChangeSetNotFound"
|
||||
|
||||
// ErrCodeCreatedButModifiedException for service response error code
|
||||
// "CreatedButModifiedException".
|
||||
//
|
||||
// The specified resource exists, but has been changed.
|
||||
ErrCodeCreatedButModifiedException = "CreatedButModifiedException"
|
||||
|
||||
// ErrCodeInsufficientCapabilitiesException for service response error code
|
||||
// "InsufficientCapabilitiesException".
|
||||
//
|
||||
// The template contains resources with capabilities that weren't specified
|
||||
// in the Capabilities parameter.
|
||||
ErrCodeInsufficientCapabilitiesException = "InsufficientCapabilitiesException"
|
||||
|
||||
// ErrCodeInvalidChangeSetStatusException for service response error code
|
||||
// "InvalidChangeSetStatus".
|
||||
//
|
||||
// The specified change set can't be used to update the stack. For example,
|
||||
// the change set status might be CREATE_IN_PROGRESS, or the stack status might
|
||||
// be UPDATE_IN_PROGRESS.
|
||||
ErrCodeInvalidChangeSetStatusException = "InvalidChangeSetStatus"
|
||||
|
||||
// ErrCodeInvalidOperationException for service response error code
|
||||
// "InvalidOperationException".
|
||||
//
|
||||
// The specified operation isn't valid.
|
||||
ErrCodeInvalidOperationException = "InvalidOperationException"
|
||||
|
||||
// ErrCodeInvalidStateTransitionException for service response error code
|
||||
// "InvalidStateTransition".
|
||||
//
|
||||
// Error reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
|
||||
// CloudFormation doesn't return this error to users.
|
||||
ErrCodeInvalidStateTransitionException = "InvalidStateTransition"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// The quota for the resource has already been reached.
|
||||
//
|
||||
// For information about resource and stack limitations, see CloudFormation
|
||||
// quotas (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html)
|
||||
// in the CloudFormation User Guide.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeNameAlreadyExistsException for service response error code
|
||||
// "NameAlreadyExistsException".
|
||||
//
|
||||
// The specified name is already in use.
|
||||
ErrCodeNameAlreadyExistsException = "NameAlreadyExistsException"
|
||||
|
||||
// ErrCodeOperationIdAlreadyExistsException for service response error code
|
||||
// "OperationIdAlreadyExistsException".
|
||||
//
|
||||
// The specified operation ID already exists.
|
||||
ErrCodeOperationIdAlreadyExistsException = "OperationIdAlreadyExistsException"
|
||||
|
||||
// ErrCodeOperationInProgressException for service response error code
|
||||
// "OperationInProgressException".
|
||||
//
|
||||
// Another operation is currently in progress for this stack set. Only one operation
|
||||
// can be performed for a stack set at a given time.
|
||||
ErrCodeOperationInProgressException = "OperationInProgressException"
|
||||
|
||||
// ErrCodeOperationNotFoundException for service response error code
|
||||
// "OperationNotFoundException".
|
||||
//
|
||||
// The specified ID refers to an operation that doesn't exist.
|
||||
ErrCodeOperationNotFoundException = "OperationNotFoundException"
|
||||
|
||||
// ErrCodeOperationStatusCheckFailedException for service response error code
|
||||
// "ConditionalCheckFailed".
|
||||
//
|
||||
// Error reserved for use by the CloudFormation CLI (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html).
|
||||
// CloudFormation doesn't return this error to users.
|
||||
ErrCodeOperationStatusCheckFailedException = "ConditionalCheckFailed"
|
||||
|
||||
// ErrCodeStackInstanceNotFoundException for service response error code
|
||||
// "StackInstanceNotFoundException".
|
||||
//
|
||||
// The specified stack instance doesn't exist.
|
||||
ErrCodeStackInstanceNotFoundException = "StackInstanceNotFoundException"
|
||||
|
||||
// ErrCodeStackNotFoundException for service response error code
|
||||
// "StackNotFoundException".
|
||||
//
|
||||
// The specified stack ARN doesn't exist or stack doesn't exist corresponding
|
||||
// to the ARN in input.
|
||||
ErrCodeStackNotFoundException = "StackNotFoundException"
|
||||
|
||||
// ErrCodeStackSetNotEmptyException for service response error code
|
||||
// "StackSetNotEmptyException".
|
||||
//
|
||||
// You can't yet delete this stack set, because it still contains one or more
|
||||
// stack instances. Delete all stack instances from the stack set before deleting
|
||||
// the stack set.
|
||||
ErrCodeStackSetNotEmptyException = "StackSetNotEmptyException"
|
||||
|
||||
// ErrCodeStackSetNotFoundException for service response error code
|
||||
// "StackSetNotFoundException".
|
||||
//
|
||||
// The specified stack set doesn't exist.
|
||||
ErrCodeStackSetNotFoundException = "StackSetNotFoundException"
|
||||
|
||||
// ErrCodeStaleRequestException for service response error code
|
||||
// "StaleRequestException".
|
||||
//
|
||||
// Another operation has been performed on this stack set since the specified
|
||||
// operation was performed.
|
||||
ErrCodeStaleRequestException = "StaleRequestException"
|
||||
|
||||
// ErrCodeTokenAlreadyExistsException for service response error code
|
||||
// "TokenAlreadyExistsException".
|
||||
//
|
||||
// A client request token already exists.
|
||||
ErrCodeTokenAlreadyExistsException = "TokenAlreadyExistsException"
|
||||
|
||||
// ErrCodeTypeConfigurationNotFoundException for service response error code
|
||||
// "TypeConfigurationNotFoundException".
|
||||
//
|
||||
// The specified extension configuration can't be found.
|
||||
ErrCodeTypeConfigurationNotFoundException = "TypeConfigurationNotFoundException"
|
||||
|
||||
// ErrCodeTypeNotFoundException for service response error code
|
||||
// "TypeNotFoundException".
|
||||
//
|
||||
// The specified extension doesn't exist in the CloudFormation registry.
|
||||
ErrCodeTypeNotFoundException = "TypeNotFoundException"
|
||||
)
|
|
@ -1,104 +0,0 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudformation
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// CloudFormation provides the API operation methods for making requests to
|
||||
// AWS CloudFormation. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// CloudFormation methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type CloudFormation 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 = "cloudformation" // Name of service.
|
||||
EndpointsID = ServiceName // ID to lookup a service endpoint with.
|
||||
ServiceID = "CloudFormation" // ServiceID is a unique identifier of a specific service.
|
||||
)
|
||||
|
||||
// New creates a new instance of the CloudFormation 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:
|
||||
//
|
||||
// mySession := session.Must(session.NewSession())
|
||||
//
|
||||
// // Create a CloudFormation client from just a session.
|
||||
// svc := cloudformation.New(mySession)
|
||||
//
|
||||
// // Create a CloudFormation client with additional configuration
|
||||
// svc := cloudformation.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudFormation {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
if c.SigningNameDerived || len(c.SigningName) == 0 {
|
||||
c.SigningName = EndpointsID
|
||||
// No Fallback
|
||||
}
|
||||
return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *CloudFormation {
|
||||
svc := &CloudFormation{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
PartitionID: partitionID,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2010-05-15",
|
||||
ResolvedRegion: resolvedRegion,
|
||||
},
|
||||
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 CloudFormation operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *CloudFormation) 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
|
||||
}
|
|
@ -1,533 +0,0 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudformation
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
)
|
||||
|
||||
// WaitUntilChangeSetCreateComplete uses the AWS CloudFormation API operation
|
||||
// DescribeChangeSet to wait for a condition to be met before returning.
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *CloudFormation) WaitUntilChangeSetCreateComplete(input *DescribeChangeSetInput) error {
|
||||
return c.WaitUntilChangeSetCreateCompleteWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilChangeSetCreateCompleteWithContext is an extended version of WaitUntilChangeSetCreateComplete.
|
||||
// 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 *CloudFormation) WaitUntilChangeSetCreateCompleteWithContext(ctx aws.Context, input *DescribeChangeSetInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilChangeSetCreateComplete",
|
||||
MaxAttempts: 120,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "Status",
|
||||
Expected: "CREATE_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "Status",
|
||||
Expected: "FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "ValidationError",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeChangeSetInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeChangeSetRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilStackCreateComplete uses the AWS CloudFormation API operation
|
||||
// DescribeStacks to wait for a condition to be met before returning.
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *CloudFormation) WaitUntilStackCreateComplete(input *DescribeStacksInput) error {
|
||||
return c.WaitUntilStackCreateCompleteWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilStackCreateCompleteWithContext is an extended version of WaitUntilStackCreateComplete.
|
||||
// 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 *CloudFormation) WaitUntilStackCreateCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilStackCreateComplete",
|
||||
MaxAttempts: 120,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "CREATE_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "CREATE_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "DELETE_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "DELETE_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "ROLLBACK_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "ROLLBACK_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "ValidationError",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeStacksInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeStacksRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilStackDeleteComplete uses the AWS CloudFormation API operation
|
||||
// DescribeStacks to wait for a condition to be met before returning.
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *CloudFormation) WaitUntilStackDeleteComplete(input *DescribeStacksInput) error {
|
||||
return c.WaitUntilStackDeleteCompleteWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilStackDeleteCompleteWithContext is an extended version of WaitUntilStackDeleteComplete.
|
||||
// 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 *CloudFormation) WaitUntilStackDeleteCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilStackDeleteComplete",
|
||||
MaxAttempts: 120,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "DELETE_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "ValidationError",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "DELETE_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "CREATE_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "ROLLBACK_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_ROLLBACK_IN_PROGRESS",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_ROLLBACK_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_ROLLBACK_COMPLETE",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeStacksInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeStacksRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilStackExists uses the AWS CloudFormation API operation
|
||||
// DescribeStacks to wait for a condition to be met before returning.
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *CloudFormation) WaitUntilStackExists(input *DescribeStacksInput) error {
|
||||
return c.WaitUntilStackExistsWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilStackExistsWithContext is an extended version of WaitUntilStackExists.
|
||||
// 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 *CloudFormation) WaitUntilStackExistsWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilStackExists",
|
||||
MaxAttempts: 20,
|
||||
Delay: request.ConstantWaiterDelay(5 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.StatusWaiterMatch,
|
||||
Expected: 200,
|
||||
},
|
||||
{
|
||||
State: request.RetryWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "ValidationError",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeStacksInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeStacksRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilStackImportComplete uses the AWS CloudFormation API operation
|
||||
// DescribeStacks to wait for a condition to be met before returning.
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *CloudFormation) WaitUntilStackImportComplete(input *DescribeStacksInput) error {
|
||||
return c.WaitUntilStackImportCompleteWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilStackImportCompleteWithContext is an extended version of WaitUntilStackImportComplete.
|
||||
// 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 *CloudFormation) WaitUntilStackImportCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilStackImportComplete",
|
||||
MaxAttempts: 120,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "IMPORT_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "ROLLBACK_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "ROLLBACK_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "IMPORT_ROLLBACK_IN_PROGRESS",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "IMPORT_ROLLBACK_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "IMPORT_ROLLBACK_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "ValidationError",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeStacksInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeStacksRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilStackRollbackComplete uses the AWS CloudFormation API operation
|
||||
// DescribeStacks to wait for a condition to be met before returning.
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *CloudFormation) WaitUntilStackRollbackComplete(input *DescribeStacksInput) error {
|
||||
return c.WaitUntilStackRollbackCompleteWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilStackRollbackCompleteWithContext is an extended version of WaitUntilStackRollbackComplete.
|
||||
// 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 *CloudFormation) WaitUntilStackRollbackCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilStackRollbackComplete",
|
||||
MaxAttempts: 120,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_ROLLBACK_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_ROLLBACK_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "DELETE_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "ValidationError",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeStacksInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeStacksRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilStackUpdateComplete uses the AWS CloudFormation API operation
|
||||
// DescribeStacks to wait for a condition to be met before returning.
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *CloudFormation) WaitUntilStackUpdateComplete(input *DescribeStacksInput) error {
|
||||
return c.WaitUntilStackUpdateCompleteWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilStackUpdateCompleteWithContext is an extended version of WaitUntilStackUpdateComplete.
|
||||
// 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 *CloudFormation) WaitUntilStackUpdateCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilStackUpdateComplete",
|
||||
MaxAttempts: 120,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_ROLLBACK_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_ROLLBACK_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "ValidationError",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeStacksInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeStacksRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilTypeRegistrationComplete uses the AWS CloudFormation API operation
|
||||
// DescribeTypeRegistration to wait for a condition to be met before returning.
|
||||
// If the condition is not met within the max attempt window, an error will
|
||||
// be returned.
|
||||
func (c *CloudFormation) WaitUntilTypeRegistrationComplete(input *DescribeTypeRegistrationInput) error {
|
||||
return c.WaitUntilTypeRegistrationCompleteWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilTypeRegistrationCompleteWithContext is an extended version of WaitUntilTypeRegistrationComplete.
|
||||
// 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 *CloudFormation) WaitUntilTypeRegistrationCompleteWithContext(ctx aws.Context, input *DescribeTypeRegistrationInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilTypeRegistrationComplete",
|
||||
MaxAttempts: 120,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "ProgressStatus",
|
||||
Expected: "COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "ProgressStatus",
|
||||
Expected: "FAILED",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeTypeRegistrationInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeTypeRegistrationRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
|
@ -155,7 +155,6 @@ github.com/aws/aws-sdk-go/private/protocol/restxml
|
|||
github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil
|
||||
github.com/aws/aws-sdk-go/service/autoscaling
|
||||
github.com/aws/aws-sdk-go/service/autoscaling/autoscalingiface
|
||||
github.com/aws/aws-sdk-go/service/cloudformation
|
||||
github.com/aws/aws-sdk-go/service/ec2
|
||||
github.com/aws/aws-sdk-go/service/ec2/ec2iface
|
||||
github.com/aws/aws-sdk-go/service/elb
|
||||
|
|
Loading…
Reference in New Issue