cloudformationevt

package
v0.0.0-...-e888a5e Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2017 License: Apache-2.0 Imports: 1 Imported by: 1

README

AWS CloudFormation Events

Back to Home Go Doc AWS Doc

This package allows you write AWS Lambda functions as the back end of your API through the AWS Lambda proxy integration.

Quick Hands-On

For step by step instructions on how to author your AWS Lambda function code in Go, see eawsy/aws-lambda-go-shim.

go get -u -d github.com/eawsy/aws-lambda-go-event/...
package main

import (
	"log"

	"github.com/eawsy/aws-lambda-go-event/service/lambda/runtime/event/cloudformationevt"
	"github.com/eawsy/aws-lambda-go-core/service/lambda/runtime"
)

func Handle(evt *cloudformationevt.Event, ctx *runtime.Context) (interface{}, error) {
	log.Println(evt)
	return nil, nil
}

Documentation

Overview

Package cloudformationevt allows you to write AWS Lambda functions to execute custom commands whenever you create, update, or delete AWS CloudFormation stacks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	// A unique ID for the request.
	// Combining the StackID with the RequestID forms a value that can be
	// used to uniquely identify a request on a particular custom resource.
	RequestID string

	// The ARN that identifies the stack containing the custom resource.
	// Combining the StackID with the RequestID forms a value that can be
	// used to uniquely identify a request on a particular custom resource.
	StackID string

	// The request type is set by the AWS CloudFormation stack operation
	// (create-stack, update-stack, or delete-stack) that was initiated by
	// the template developer for the stack that contains the custom
	// resource. Must be one of: Create, Update, or Delete.
	// See http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-requesttypes.html
	RequestType string

	// The template developer-chosen resource type of the custom resource
	// in the AWS CloudFormation template. Custom resource type names can be
	// up to 60 characters long and can include alphanumeric and the
	// following characters: _@-.
	ResourceType string

	// The template developer-chosen name (logical ID) of the custom
	// resource in the AWS CloudFormation template.
	// This is provided to facilitate communication between the custom
	// resource provider and the template developer.
	LogicalResourceID string

	// A required custom resource provider-defined physical ID that is
	// unique for that provider.
	// Always sent with Update and Delete requests; never sent with Create.
	// See http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cfn-customresource.html#d0e41385
	PhysicalResourceID string

	// This field contains the contents of the Properties object sent by the
	// template developer. Its contents are defined by the custom resource
	// provider.
	ResourceProperties json.RawMessage

	// Used only for Update requests. Contains the resource properties that
	// were declared previous to the update request.
	OldResourceProperties json.RawMessage

	// The response URL identifies a pre-signed Amazon S3 bucket that
	// receives responses from the custom resource provider to
	// AWS CloudFormation.
	ResponseURL string

	// The service token (AWS Lambda function ARN) that is obtained from the
	// custom resource provider to access the service.
	ServiceToken string
}

Event represents an AWS CloudFormation event. See http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-requests.html

func (*Event) GoString

func (e *Event) GoString() string

GoString returns the string representation.

func (*Event) String

func (e *Event) String() string

String returns the string representation.

Jump to

Keyboard shortcuts

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