Documentation
¶
Overview ¶
Package cloudformation provides the API operation methods for making requests to AWS CloudFormation.
Index ¶
- Constants
- type CFNAPI
- type CFNClient
- func (c *CFNClient) WaitUntilStackCreateComplete(ctx context.Context, input *cfn.DescribeStacksInput, maxWait time.Duration) error
- func (c *CFNClient) WaitUntilStackDeleteComplete(ctx context.Context, input *cfn.DescribeStacksInput, maxWait time.Duration) error
- func (c *CFNClient) WaitUntilStackUpdateComplete(ctx context.Context, input *cfn.DescribeStacksInput, maxWait time.Duration) error
- type Service
- func (s *Service) DeleteStack(ctx context.Context, stackName string, retainResources []string) error
- func (s *Service) ReconcileBootstrapNoUpdate(ctx context.Context, stackName string, t go_cfn.Template, ...) error
- func (s *Service) ReconcileBootstrapStack(ctx context.Context, stackName string, t go_cfn.Template, ...) error
- func (s *Service) ShowStackResources(ctx context.Context, stackName string) error
Constants ¶
const ( // MaxWaitCreateUpdateDelete is the default maximum amount of time to wait for a cfn stack to complete. MaxWaitCreateUpdateDelete = 30 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CFNAPI ¶ added in v2.9.0
type CFNAPI interface {
CreateStack(ctx context.Context, params *cfn.CreateStackInput, optFns ...func(*cfn.Options)) (*cfn.CreateStackOutput, error)
DeleteStack(ctx context.Context, params *cfn.DeleteStackInput, optFns ...func(*cfn.Options)) (*cfn.DeleteStackOutput, error)
DescribeStacks(ctx context.Context, params *cfn.DescribeStacksInput, optFns ...func(*cfn.Options)) (*cfn.DescribeStacksOutput, error)
DescribeStackResources(ctx context.Context, params *cfn.DescribeStackResourcesInput, optFns ...func(*cfn.Options)) (*cfn.DescribeStackResourcesOutput, error)
UpdateStack(ctx context.Context, params *cfn.UpdateStackInput, optFns ...func(*cfn.Options)) (*cfn.UpdateStackOutput, error)
// Waiters for CFN stacks
WaitUntilStackCreateComplete(ctx context.Context, input *cfn.DescribeStacksInput, maxWait time.Duration) error
WaitUntilStackUpdateComplete(ctx context.Context, input *cfn.DescribeStacksInput, maxWait time.Duration) error
WaitUntilStackDeleteComplete(ctx context.Context, input *cfn.DescribeStacksInput, maxWait time.Duration) error
}
CFNAPI defines the CFN API interface.
type CFNClient ¶ added in v2.9.0
CFNClient is a wrapper over cfn.Client for implementing custom methods of CFNAPI.
func (*CFNClient) WaitUntilStackCreateComplete ¶ added in v2.9.0
func (c *CFNClient) WaitUntilStackCreateComplete(ctx context.Context, input *cfn.DescribeStacksInput, maxWait time.Duration) error
WaitUntilStackCreateComplete is blocking function to wait until CFN Stack is successfully created.
func (*CFNClient) WaitUntilStackDeleteComplete ¶ added in v2.9.0
func (c *CFNClient) WaitUntilStackDeleteComplete(ctx context.Context, input *cfn.DescribeStacksInput, maxWait time.Duration) error
WaitUntilStackDeleteComplete is blocking function to wait until CFN Stack is successfully deleted.
func (*CFNClient) WaitUntilStackUpdateComplete ¶ added in v2.9.0
func (c *CFNClient) WaitUntilStackUpdateComplete(ctx context.Context, input *cfn.DescribeStacksInput, maxWait time.Duration) error
WaitUntilStackUpdateComplete is blocking function to wait until CFN Stack is successfully updated.
type Service ¶
type Service struct {
CFN CFNAPI
}
Service holds a collection of interfaces. The interfaces are broken down like this to group functions together. One alternative is to have a large list of functions from the ec2 client.
func NewService ¶
NewService returns a new service given the CloudFormation api client.
func (*Service) DeleteStack ¶
func (s *Service) DeleteStack(ctx context.Context, stackName string, retainResources []string) error
DeleteStack deletes a cloudformation stack.
func (*Service) ReconcileBootstrapNoUpdate ¶ added in v2.1.0
func (s *Service) ReconcileBootstrapNoUpdate(ctx context.Context, stackName string, t go_cfn.Template, tags map[string]string) error
ReconcileBootstrapNoUpdate creates or updates bootstrap CloudFormation without updating the stack.