stackset

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: 6 Imported by: 0

Documentation

Overview

Package stackset provides a client to make API requests to an AWS CloudFormation StackSet resource.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOrUpdateOption

type CreateOrUpdateOption func(interface{})

CreateOrUpdateOption allows to initialize or update a stack set with additional properties.

func WithAdministrationRoleARN

func WithAdministrationRoleARN(roleARN string) CreateOrUpdateOption

WithAdministrationRoleARN sets an administration role arn for a stack set.

func WithDescription

func WithDescription(description string) CreateOrUpdateOption

WithDescription sets a description for a stack set.

func WithExecutionRoleName

func WithExecutionRoleName(roleName string) CreateOrUpdateOption

WithExecutionRoleName sets an execution role name for a stack set.

func WithOperationID

func WithOperationID(operationID string) CreateOrUpdateOption

WithOperationID sets the operation ID of a stack set operation. This functional option can only be used while updating a stack set, otherwise it's a no-op.

func WithTags

func WithTags(tags map[string]string) CreateOrUpdateOption

WithTags sets tags to all the resources in a stack set.

type Description

type Description struct {
	ID       string
	Name     string
	Template string
}

Description represents a created stack set resource.

type ErrStackSetOutOfDate

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

ErrStackSetOutOfDate occurs when we try to read and then update a StackSet but between reading it and actually updating it, someone else either started or completed an update.

func (*ErrStackSetOutOfDate) Error

func (e *ErrStackSetOutOfDate) Error() string

type InstanceSummariesOption

type InstanceSummariesOption func(input *cloudformation.ListStackInstancesInput)

InstanceSummariesOption allows to filter instance summaries to retrieve for the stack set.

func FilterSummariesByAccountID

func FilterSummariesByAccountID(accountID string) InstanceSummariesOption

FilterSummariesByAccountID limits the accountID for the stack instance summaries to retrieve.

func FilterSummariesByRegion

func FilterSummariesByRegion(region string) InstanceSummariesOption

FilterSummariesByRegion limits the region for the stack instance summaries to retrieve.

type InstanceSummary

type InstanceSummary struct {
	StackID string
	Account string
	Region  string
}

InstanceSummary represents the identifiers for a stack instance.

type StackSet

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

StackSet represents an AWS CloudFormation client to interact with stack sets.

func New

func New(s *session.Session) *StackSet

New creates a new client to make requests against stack sets.

func (*StackSet) Create

func (ss *StackSet) Create(name, template string, opts ...CreateOrUpdateOption) error

Create creates a new stack set resource, if one already exists then do nothing.

func (*StackSet) CreateInstances

func (ss *StackSet) CreateInstances(name string, accounts, regions []string) error

CreateInstances creates new stack instances for a stack set within the regions of the specified AWS accounts.

func (*StackSet) CreateInstancesAndWait

func (ss *StackSet) CreateInstancesAndWait(name string, accounts, regions []string) error

CreateInstancesAndWait creates new stack instances in the regions of the specified AWS accounts, and waits until the operation completes.

func (*StackSet) Delete

func (ss *StackSet) Delete(name string) error

Delete removes all the stack instances from a stack set and then deletes the stack set.

func (*StackSet) Describe

func (ss *StackSet) Describe(name string) (Description, error)

Describe returns a description of a created stack set.

func (*StackSet) InstanceSummaries

func (ss *StackSet) InstanceSummaries(name string, opts ...InstanceSummariesOption) ([]InstanceSummary, error)

InstanceSummaries returns a list of unique identifiers for all the stack instances in a stack set.

func (*StackSet) Update

func (ss *StackSet) Update(name, template string, opts ...CreateOrUpdateOption) error

Update updates a stack set with a new template.

func (*StackSet) UpdateAndWait

func (ss *StackSet) UpdateAndWait(name, template string, opts ...CreateOrUpdateOption) error

UpdateAndWait updates a stack set with a new template, and waits until the operation completes.

Directories

Path Synopsis
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