cloudformation

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cloudformation provides structs for working with AWS CloudFormation custom resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(h Handler)

Handle CloudFormation Custom Resource events with a handler.

func HandleFunc

func HandleFunc(h HandlerFunc)

HandleFunc handles CloudFormation Custom Resource events with a callback function.

Types

type Handler

type Handler interface {
	HandleCloudFormation(*Request, *apex.Context) (interface{}, error)
}

Handler handles CloudFormation Custom Resource events.

type HandlerFunc

type HandlerFunc func(*Request, *apex.Context) (interface{}, error)

HandlerFunc unmarshals CloudFormation Requests before passing control.

func (HandlerFunc) Handle

func (h HandlerFunc) Handle(rawReq json.RawMessage, ctx *apex.Context) (interface{}, error)

Handle implements apex.Handler.

type Request

type Request struct {
	RequestType        string                 `json:"RequestType"`
	ResponseURL        string                 `json:"ResponseURL"`
	StackID            string                 `json:"StackId"`
	RequestID          string                 `json:"RequestId"`
	ResourceType       string                 `json:"ResourceType"`
	LogicalResourceID  string                 `json:"LogicalResourceId"`
	ResourceProperties map[string]interface{} `json:"ResourceProperties"`
}

Request is a request to a CloudFormation Custom Resource

type Response

type Response struct {
	Status             string `json:"Status"`
	Reason             string `json:"Reason"`
	PhysicalResourceID string `json:"PhysicalResourceId"`
	StackID            string `json:"StackId"`
	RequestID          string `json:"RequestId"`
	LogicalResourceID  string `json:"LogicalResourceId"`
	Data               interface{}
}

Response is the response sent to the ResponseURL of the CloudFormation service

Jump to

Keyboard shortcuts

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