cloudformation

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package cloudformation provides a client to make API requests to AWS CloudFormation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudFormation

type CloudFormation struct {
	// contains filtered or unexported fields
}

CloudFormation represents a client to make requests to AWS CloudFormation.

func New

New creates a new CloudFormation client.

func (*CloudFormation) Create

func (c *CloudFormation) Create(stack *Stack) error

Create deploys a new CloudFormation stack using Change Sets. If the stack already exists in a failed state, deletes the stack and re-creates it.

func (*CloudFormation) CreateAndWait

func (c *CloudFormation) CreateAndWait(stack *Stack) error

CreateAndWait calls Create and then WaitForCreate.

func (*CloudFormation) Delete

func (c *CloudFormation) Delete(stackName string) error

Delete removes an existing CloudFormation stack. If the stack doesn't exist then do nothing.

func (*CloudFormation) DeleteAndWait

func (c *CloudFormation) DeleteAndWait(stackName string) error

DeleteAndWait calls Delete then blocks until the stack is deleted or until the max attempt window expires.

func (*CloudFormation) Describe

func (c *CloudFormation) Describe(name string) (*StackDescription, error)

Describe returns a description of an existing stack. If the stack does not exist, returns ErrStackNotFound.

func (*CloudFormation) Events

func (c *CloudFormation) Events(stackName string) ([]StackEvent, error)

Events returns the list of stack events in **chronological** order.

func (*CloudFormation) Update

func (c *CloudFormation) Update(stack *Stack) error

Update updates an existing CloudFormation with the new configuration. If there are no changes for the stack, deletes the empty change set and returns ErrChangeSetEmpty.

func (*CloudFormation) UpdateAndWait

func (c *CloudFormation) UpdateAndWait(stack *Stack) error

UpdateAndWait calls Update and then blocks until the stack is updated or until the max attempt window expires.

func (*CloudFormation) WaitForCreate

func (c *CloudFormation) WaitForCreate(stackName string) error

WaitForCreate blocks until the stack is created or until the max attempt window expires.

type ErrChangeSetEmpty

type ErrChangeSetEmpty struct {
	// contains filtered or unexported fields
}

ErrChangeSetEmpty occurs when the change set does not contain any new or updated resources.

func (*ErrChangeSetEmpty) Error

func (e *ErrChangeSetEmpty) Error() string

type ErrStackAlreadyExists

type ErrStackAlreadyExists struct {
	Name  string
	Stack *StackDescription
}

ErrStackAlreadyExists occurs when a CloudFormation stack already exists with a given name.

func (*ErrStackAlreadyExists) Error

func (e *ErrStackAlreadyExists) Error() string

type ErrStackNotFound

type ErrStackNotFound struct {
	// contains filtered or unexported fields
}

ErrStackNotFound occurs when a CloudFormation stack does not exist.

func (*ErrStackNotFound) Error

func (e *ErrStackNotFound) Error() string

type Stack

type Stack struct {
	Name string
	// contains filtered or unexported fields
}

Stack represents a AWS CloudFormation stack.

func NewStack

func NewStack(name, template string, opts ...StackOption) *Stack

NewStack creates a stack with the given name and template body.

type StackDescription

type StackDescription cloudformation.Stack

StackDescription represents an existing AWS CloudFormation stack.

func (*StackDescription) SDK

SDK returns the underlying struct from the AWS SDK.

type StackEvent

type StackEvent cloudformation.StackEvent

StackEvent represents a stack event for a resource.

type StackOption

type StackOption func(s *Stack)

StackOption allows you to initialize a Stack with additional properties.

func WithParameters

func WithParameters(params map[string]string) StackOption

WithParameters passes parameters to a stack.

func WithRoleARN

func WithRoleARN(roleARN string) StackOption

WithRoleARN specifies the role that CloudFormation will assume when creating the stack.

func WithTags

func WithTags(tags map[string]string) StackOption

WithTags applies the tags to a stack.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Package stackset provides a client to make API requests to an AWS CloudFormation StackSet resource.
Package stackset provides a client to make API requests to an AWS CloudFormation StackSet resource.
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL