Documentation
¶
Index ¶
- Constants
- func CreateStack(ctx context.Context, svc *cf.CloudFormation, opts *RequestOptions, ...) (*cf.CreateStackOutput, error)
- func DeleteStack(ctx context.Context, svc *cf.CloudFormation, opts *RequestOptions) (*cf.DeleteStackOutput, error)
- func StackOutputToJSON(so []StackOutput) (string, error)
- func UpdateStack(ctx context.Context, svc *cf.CloudFormation, opts *RequestOptions) (*cf.UpdateStackOutput, error)
- type RequestOptions
- type StackOutput
- type StackOutputList
Constants ¶
const ( // replace latest by the version when releasing the plugin //DefaultTemplateURL = "https://s3.amazonaws.com/io-amp-binaries/templates/latest/aws-swarm-asg.yml" DefaultTemplateURL = "https://s3.amazonaws.com/io-amp-binaries/templates/v0.14.0/aws-swarm-asg.yml" )
Variables ¶
This section is empty.
Functions ¶
func CreateStack ¶
func CreateStack(ctx context.Context, svc *cf.CloudFormation, opts *RequestOptions, timeout int64) (*cf.CreateStackOutput, error)
CreateStack starts the AWS stack creation operation The operation will return immediately unless opts.Sync is true
func DeleteStack ¶
func DeleteStack(ctx context.Context, svc *cf.CloudFormation, opts *RequestOptions) (*cf.DeleteStackOutput, error)
DeleteStack starts the delete operation The operation will return immediately unless opts.Sync is true
func StackOutputToJSON ¶
func StackOutputToJSON(so []StackOutput) (string, error)
StackOutputToJSON is a helper function that converts a slice of StackOutput to a JSON string representation of StackOutputList
func UpdateStack ¶
func UpdateStack(ctx context.Context, svc *cf.CloudFormation, opts *RequestOptions) (*cf.UpdateStackOutput, error)
UpdateStack starts the update operation The operation will return immediately unless opts.Sync is true
Types ¶
type RequestOptions ¶
type RequestOptions struct {
// OnFailure determines what happens if stack creations fails.
// Valid values are: "DO_NOTHING", "ROLLBACK", "DELETE"
// Default: "ROLLBACK"
OnFailure string
// Params are for parameters supported by the CloudFormation template that will be used
Params []string
// Page is for aws requests that return paged information (pages start at 1)
Page int
// Region is the AWS region, ex: us-west-2
Region string
// StackName is the user-supplied name for identifying the stack
StackName string
// Sync, if true, causes the create operation to block until finished
Sync bool
// TemplateURL is the URL for the AWS CloudFormation to use
TemplateURL string
}
RequestOptions stores raw request input options before transformation into a AWS SDK specific structs used by the cloudformation api.
type StackOutput ¶
type StackOutput struct {
// Description is the user defined description associated with the output
Description string `json:"description"`
// OutputKey is the key associated with the output
OutputKey string `json:"key"`
// OutputValue is the value associated with the output
OutputValue string `json:"value"`
}
StackOutput contains the converted output from the create stack operation
func InfoStack ¶
func InfoStack(ctx context.Context, svc *cf.CloudFormation, opts *RequestOptions) ([]StackOutput, error)
InfoStack returns the output information that was produced when the stack was created or updated
type StackOutputList ¶
type StackOutputList struct {
// Output is a slice of StackOutput
Output []StackOutput `json:"output""`
}
StackOutputList is used as a container for output by the StackOutputToJSON helper function