cloudformation

package
v0.0.0-...-021b8db Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2017 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudFormation

type CloudFormation struct {
	*aws.Auth
	aws.Region
}

The CloudFormation type encapsulates operations within a specific EC2 region.

func New

func New(auth *aws.Auth, region aws.Region) *CloudFormation

New creates a new CloudFormation Client.

func (*CloudFormation) CancelUpdateStack

func (c *CloudFormation) CancelUpdateStack(stackName string) (resp *SimpleResp, err error)

CancelUpdateStack cancels an update on the specified stack. If the call completes successfully, the stack will roll back the update and revert to the previous stack configuration.

See http://goo.gl/ZE6fOa for more details

func (*CloudFormation) CreateStack

func (c *CloudFormation) CreateStack(options *CreateStackParams) (
	resp *CreateStackResponse, err error)

CreateStack creates a stack as specified in the template. After the call completes successfully, the stack creation starts.

Required params: StackName

See http://goo.gl/yDZYuV for more details

func (*CloudFormation) DeleteStack

func (c *CloudFormation) DeleteStack(stackName string) (resp *SimpleResp, err error)

DeleteStack deletes a specified stack. Once the call completes successfully, stack deletion starts.

See http://goo.gl/CVMpxC for more details

func (*CloudFormation) DescribeStackEvents

func (c *CloudFormation) DescribeStackEvents(stackName string, nextToken string) (
	resp *DescribeStackEventsResponse, err error)

DescribeStackEvents returns all stack related events for a specified stack.

See http://goo.gl/zqj4Bz for more details

func (*CloudFormation) DescribeStackResource

func (c *CloudFormation) DescribeStackResource(stackName string, logicalResourceId string) (
	resp *DescribeStackResourceResponse, err error)

DescribeStackResource returns a description of the specified resource in the specified stack. For deleted stacks, DescribeStackResource returns resource information for up to 90 days after the stack has been deleted.

Required params: stackName, logicalResourceId

See http://goo.gl/6pfPFs for more details

func (*CloudFormation) DescribeStackResources

func (c *CloudFormation) DescribeStackResources(stackName, physicalResourceId, logicalResourceId string) (
	resp *DescribeStackResourcesResponse, err error)

DescribeStackResources returns AWS resource descriptions for running and deleted stacks. If stackName is specified, all the associated resources that are part of the stack are returned. If physicalResourceId is specified, the associated resources of the stack that the resource belongs to are returned.

Only the first 100 resources will be returned. If your stack has more resources than this, you should use ListStackResources instead.

See http://goo.gl/YnY5rs for more details

func (*CloudFormation) DescribeStacks

func (c *CloudFormation) DescribeStacks(stackName string, nextToken string) (
	resp *DescribeStacksResponse, err error)

DescribeStacks returns the description for the specified stack; If no stack name was specified, then it returns the description for all the stacks created.

See http://goo.gl/UOLsXD for more information

func (*CloudFormation) EstimateTemplateCost

func (c *CloudFormation) EstimateTemplateCost(parameters []Parameter, templateBody, templateUrl string) (
	resp *EstimateTemplateCostResponse, err error)

EstimateTemplateCost returns the estimated monthly cost of a template. The return value is an AWS Simple Monthly Calculator URL with a query string that describes the resources required to run the template.

See http://goo.gl/PD9hle for more information

func (*CloudFormation) GetStackPolicy

func (c *CloudFormation) GetStackPolicy(stackName string) (
	resp *GetStackPolicyResponse, err error)

GetStackPolicy returns the stack policy for a specified stack. If a stack doesn't have a policy, a null value is returned.

See http://goo.gl/iZFSgy for more information

func (*CloudFormation) GetTemplate

func (c *CloudFormation) GetTemplate(stackName string) (
	resp *GetTemplateResponse, err error)

GetTemplate returns the template body for a specified stack. You can get the template for running or deleted stacks

Required Params: StackName - The name or the unique identifier associated with the stack, which are not always interchangeable: Running stacks: You can specify either the stack's name or its unique stack ID. Deleted stacks: You must specify the unique stack ID.

See http://goo.gl/GU59CB for more information

func (*CloudFormation) ListStackResources

func (c *CloudFormation) ListStackResources(stackName, nextToken string) (
	resp *ListStackResourcesResponse, err error)

ListStackResources returns descriptions of all resources of the specified stack. For deleted stacks, ListStackResources returns resource information for up to 90 days after the stack has been deleted.

Required Params: stackName - the name or the unique identifier associated with the stack, which are not always interchangeable: Running stacks: You can specify either the stack's name or its unique stack ID. Deleted stacks: You must specify the unique stack ID.

See http://goo.gl/JUCgLf for more details

func (*CloudFormation) ListStacks

func (c *CloudFormation) ListStacks(stackStatusFilters []string, nextToken string) (
	resp *ListStacksResponse, err error)

ListStacks Returns the summary information for stacks whose status matches the specified StackStatusFilter. Summary information for stacks that have been deleted is kept for 90 days after the stack is deleted. If no StackStatusFilter is specified, summary information for all stacks is returned (including existing stacks and stacks that have been deleted).

See http://goo.gl/UWi6nm for more details

func (*CloudFormation) SetStackPolicy

func (c *CloudFormation) SetStackPolicy(stackName, stackPolicyBody, stackPolicyUrl string) (
	resp *SimpleResp, err error)

SetStackPolicy sets a stack policy for a specified stack.

Required Params: stackName

See http://goo.gl/iY9ohu for more information

func (*CloudFormation) UpdateStack

func (c *CloudFormation) UpdateStack(options *UpdateStackParams) (
	resp *UpdateStackResponse, err error)

UpdateStack updates a stack as specified in the template. After the call completes successfully, the stack update starts. You can check the status of the stack via the DescribeStacks action.

Required Params: options.StackName

See http://goo.gl/LvkhZq for more information

func (*CloudFormation) ValidateTemplate

func (c *CloudFormation) ValidateTemplate(templateBody, templateUrl string) (
	resp *ValidateTemplateResponse, err error)

ValidateTemplate validates a specified template.

See http://goo.gl/OBhNzk for more information

type CreateStackParams

type CreateStackParams struct {
	Capabilities     []string
	DisableRollback  bool
	NotificationARNs []string
	OnFailure        string
	Parameters       []Parameter
	StackName        string
	StackPolicyBody  string
	StackPolicyURL   string
	Tags             []Tag
	TemplateBody     string
	TemplateURL      string
	TimeoutInMinutes int
}

CreateStackParams wraps CreateStack request options

See http://goo.gl/yDZYuV for more information

type CreateStackResponse

type CreateStackResponse struct {
	StackId   string `xml:"CreateStackResult>StackId"`
	RequestId string `xml:"ResponseMetadata>RequestId"`
}

CreateStackResponse wraps a CreateStack call response

See http://goo.gl/yDZYuV for more details

type DescribeStackEventsResponse

type DescribeStackEventsResponse struct {
	NextToken   string       `xml:"DescribeStackEventsResult>NextToken"`
	StackEvents []StackEvent `xml:"DescribeStackEventsResult>StackEvents>member"`
	RequestId   string       `xml:"ResponseMetadata>RequestId"`
}

DescribeStackEventsResponse wraps a response returned by DescribeStackEvents request

See http://goo.gl/zqj4Bz for more details

type DescribeStackResourceResponse

type DescribeStackResourceResponse struct {
	StackResourceDetail StackResourceDetail `xml:"DescribeStackResourceResult>StackResourceDetail"`
	RequestId           string              `xml:"ResponseMetadata>RequestId"`
}

DescribeStackResourceResponse wraps a response returned by DescribeStackResource request

See http://goo.gl/6pfPFs for more details

type DescribeStackResourcesResponse

type DescribeStackResourcesResponse struct {
	StackResources []StackResource `xml:"DescribeStackResourcesResult>StackResources>member"`
	RequestId      string          `xml:"ResponseMetadata>RequestId"`
}

DescribeStackResourcesResponse wraps a response returned by DescribeStackResources request

See http://goo.gl/YnY5rs for more details

type DescribeStacksResponse

type DescribeStacksResponse struct {
	NextToken string  `xml:"DescribeStacksResult>NextToken"`
	Stacks    []Stack `xml:"DescribeStacksResult>Stacks>member"`
	RequestId string  `xml:"ResponseMetadata>RequestId"`
}

DescribeStacksResponse wraps a response returned by DescribeStacks request

See http://goo.gl/UOLsXD for more information

type Error

type Error struct {
	// HTTP status code (200, 403, ...)
	StatusCode int
	// Error type
	Type string `xml:"Type"`
	// CloudFormation error code
	Code string `xml:"Code"`
	// The human-oriented error message
	Message   string `xml:"Message"`
	RequestId string `xml:"RequestID"`
}

Error encapsulates an error returned by the AWS CloudFormation API.

See http://goo.gl/zDZbuQ for more details.

func (*Error) Error

func (err *Error) Error() string

type EstimateTemplateCostResponse

type EstimateTemplateCostResponse struct {
	Url       string `xml:"EstimateTemplateCostResult>Url"`
	RequestId string `xml:"ResponseMetadata>RequestId"`
}

EstimateTemplateCostResponse wraps a response returned by EstimateTemplateCost request

See http://goo.gl/PD9hle for more information

type GetStackPolicyResponse

type GetStackPolicyResponse struct {
	StackPolicyBody string `xml:"GetStackPolicyResult>StackPolicyBody"`
	RequestId       string `xml:"ResponseMetadata>RequestId"`
}

GetStackPolicyResponse wraps a response returned by GetStackPolicy request

See http://goo.gl/iZFSgy for more information

type GetTemplateResponse

type GetTemplateResponse struct {
	TemplateBody string `xml:"GetTemplateResult>TemplateBody"`
	RequestId    string `xml:"ResponseMetadata>RequestId"`
}

GetTemplateResponse wraps a response returned by GetTemplate request

See http://goo.gl/GU59CB for more information

type ListStackResourcesResponse

type ListStackResourcesResponse struct {
	NextToken              string                 `xml:"ListStackResourcesResult>NextToken"`
	StackResourceSummaries []StackResourceSummary `xml:"ListStackResourcesResult>StackResourceSummaries>member"`
	RequestId              string                 `xml:"ResponseMetadata>RequestId"`
}

ListStackResourcesResponse wraps a response returned by ListStackResources request

See http://goo.gl/JUCgLf for more details

type ListStacksResponse

type ListStacksResponse struct {
	NextToken      string         `xml:"ListStacksResult>NextToken"`
	StackSummaries []StackSummary `xml:"ListStacksResult>StackSummaries>member"`
	RequestId      string         `xml:"ResponseMetadata>RequestId"`
}

ListStacksResponse wraps a response returned by ListStacks request

See http://goo.gl/UWi6nm for more details

type Output

type Output struct {
	Description string `xml:"Description"`
	OutputKey   string `xml:"OutputKey"`
	OutputValue string `xml:"OutputValue"`
}

Output encapsulates the Output AWS data type

See http://goo.gl/UOn7q6 for more information

type Parameter

type Parameter struct {
	ParameterKey     string `xml:"ParameterKey"`
	ParameterValue   string `xml:"ParameterValue"`
	UsePreviousValue bool   `xml:"UsePreviousValue"`
}

Parameter encapsulates the cloudstack paramter data type

See http://goo.gl/2rg9eG for more details

type SimpleResp

type SimpleResp struct {
	XMLName   xml.Name
	RequestId string `xml:"ResponseMetadata>RequestId"`
}

SimpleResp is the basic response from most actions.

type Stack

type Stack struct {
	Capabilities      []string    `xml:"Capabilities>member"`
	CreationTime      time.Time   `xml:"CreationTime"`
	Description       string      `xml:"Description"`
	DisableRollback   bool        `xml:"DisableRollback"`
	LastUpdatedTime   time.Time   `xml:"LastUpdatedTime"`
	NotificationARNs  []string    `xml:"NotificationARNs>member"`
	Outputs           []Output    `xml:"Outputs>member"`
	Parameters        []Parameter `xml:"Parameters>member"`
	StackId           string      `xml:"StackId"`
	StackName         string      `xml:"StackName"`
	StackStatus       string      `xml:"StackStatus"`
	StackStatusReason string      `xml:"StackStatusReason"`
	Tags              []Tag       `xml:"Tags>member"`
	TimeoutInMinutes  int         `xml:"TimeoutInMinutes"`
}

Stack encapsulates the Stack AWS data type

See http://goo.gl/yDZYuV for more information

type StackEvent

type StackEvent struct {
	EventId              string    `xml:"EventId"`
	LogicalResourceId    string    `xml:"LogicalResourceId"`
	PhysicalResourceId   string    `xml:"PhysicalResourceId"`
	ResourceProperties   string    `xml:"ResourceProperties"`
	ResourceStatus       string    `xml:"ResourceStatus"`
	ResourceStatusReason string    `xml:"ResourceStatusReason"`
	ResourceType         string    `xml:"ResourceType"`
	StackId              string    `xml:"StackId"`
	StackName            string    `xml:"StackName"`
	Timestamp            time.Time `xml:"Timestamp"`
}

StackEvent encapsulates the StackEvent data type

See http://goo.gl/EHwiMf for more details

type StackResource

type StackResource struct {
	Description          string    `xml:"Description"`
	LogicalResourceId    string    `xml:"LogicalResourceId"`
	PhysicalResourceId   string    `xml:"PhysicalResourceId"`
	ResourceStatus       string    `xml:"ResourceStatus"`
	ResourceStatusReason string    `xml:"ResourceStatusReason"`
	ResourceType         string    `xml:"ResourceType"`
	StackId              string    `xml:"StackId"`
	StackName            string    `xml:"StackName"`
	Timestamp            time.Time `xml:"Timestamp"`
}

StackResource encapsulates the StackResource data type

See http://goo.gl/j4eli5 for more details

type StackResourceDetail

type StackResourceDetail struct {
	Description          string    `xml:"Description"`
	LastUpdatedTimestamp time.Time `xml:"LastUpdatedTimestamp"`
	LogicalResourceId    string    `xml:"LogicalResourceId"`
	Metadata             string    `xml:"Metadata"`
	PhysicalResourceId   string    `xml:"PhysicalResourceId"`
	ResourceStatus       string    `xml:"ResourceStatus"`
	ResourceStatusReason string    `xml:"ResourceStatusReason"`
	ResourceType         string    `xml:"ResourceType"`
	StackId              string    `xml:"StackId"`
	StackName            string    `xml:"StackName"`
}

StackResourceDetail encapsulates the StackResourceDetail data type

See http://goo.gl/flce6I for more details

type StackResourceSummary

type StackResourceSummary struct {
	LastUpdatedTimestamp time.Time `xml:"LastUpdatedTimestamp"`
	LogicalResourceId    string    `xml:"LogicalResourceId"`
	PhysicalResourceId   string    `xml:"PhysicalResourceId"`
	ResourceStatus       string    `xml:"ResourceStatus"`
	ResourceStatusReason string    `xml:"ResourceStatusReason"`
	ResourceType         string    `xml:"ResourceType"`
}

StackResourceSummary encapsulates the StackResourceSummary data type

See http://goo.gl/Af0vcm for more details

type StackSummary

type StackSummary struct {
	CreationTime        time.Time `xml:"CreationTime"`
	DeletionTime        time.Time `xml:"DeletionTime"`
	LastUpdatedTime     time.Time `xml:"LastUpdatedTime"`
	StackId             string    `xml:"StackId"`
	StackName           string    `xml:"StackName"`
	StackStatus         string    `xml:"StackStatus"`
	StackStatusReason   string    `xml:"StackStatusReason"`
	TemplateDescription string    `xml:"TemplateDescription"`
}

StackSummary encapsulates the StackSummary data type

See http://goo.gl/35j3wf for more details

type Tag

type Tag struct {
	Key   string `xml:"Key"`
	Value string `xml:"Value"`
}

type TemplateParameter

type TemplateParameter struct {
	DefaultValue string `xml:"DefaultValue"`
	Description  string `xml:Description"`
	NoEcho       bool   `xml:NoEcho"`
	ParameterKey string `xml:ParameterKey"`
}

TemplateParameter encapsulates the AWS TemplateParameter data type

See http://goo.gl/OBhNzk for more information

type UpdateStackParams

type UpdateStackParams struct {
	Capabilities                []string
	NotificationARNs            []string
	Parameters                  []Parameter
	StackName                   string
	StackPolicyBody             string
	StackPolicyDuringUpdateBody string
	StackPolicyDuringUpdateURL  string
	StackPolicyURL              string
	TemplateBody                string
	TemplateURL                 string
	UsePreviousTemplate         bool
}

UpdateStackParams wraps UpdateStack request options

See http://goo.gl/LvkhZq for more information

type UpdateStackResponse

type UpdateStackResponse struct {
	StackId   string `xml:"UpdateStackResult>StackId"`
	RequestId string `xml:"ResponseMetadata>RequestId"`
}

UpdateStackResponse wraps the UpdateStack call response

See http://goo.gl/LvkhZq for more information

type ValidateTemplateResponse

type ValidateTemplateResponse struct {
	Capabilities       []string            `xml:"ValidateTemplateResult>Capabilities>member"`
	CapabilitiesReason string              `xml:"ValidateTemplateResult>CapabilitiesReason"`
	Description        string              `xml:"ValidateTemplateResult>Description"`
	Parameters         []TemplateParameter `xml:"ValidateTemplateResult>Parameters>member"`
	RequestId          string              `xml:"ResponseMetadata>RequestId"`
}

ValidateTemplateResponse wraps the ValidateTemplate call response

See http://goo.gl/OBhNzk for more information

Jump to

Keyboard shortcuts

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