Documentation ¶
Index ¶
- Constants
- Variables
- func NewCustomResourceLambdaHandler(resourceType string, logger *logrus.Logger) interface{}
- func SendCloudFormationResponse(lambdaCtx *awsLambdaCtx.LambdaContext, event *CloudFormationLambdaEvent, ...) error
- type CloudFormationLambdaEvent
- type CloudWatchEventSourceResourceRequest
- type CloudWatchLogsLambdaEventSourceFilter
- type CloudWatchLogsLambdaEventSourceResource
- type CustomResourceCommand
- type HelloWorldResource
- type HelloWorldResourceRequest
- type S3LambdaEventSourceResource
- type S3LambdaEventSourceResourceRequest
- type SESLambdaEventSourceResource
- type SESLambdaEventSourceResourceAction
- type SESLambdaEventSourceResourceRequest
- type SESLambdaEventSourceResourceRule
- type SNSLambdaEventSourceResource
- type SNSLambdaEventSourceResourceRequest
- type ZipToS3BucketResource
- type ZipToS3BucketResourceRequest
Constants ¶
const ( // CreateOperation is a request to create a resource // @enum CloudFormationOperation CreateOperation = "Create" // DeleteOperation is a request to delete a resource // @enum CloudFormationOperation DeleteOperation = "Delete" // UpdateOperation is a request to update a resource // @enum CloudFormationOperation UpdateOperation = "Update" )
const ( // CustomResourceTypePrefix is the known custom resource // type prefix CustomResourceTypePrefix = "Custom::goAWS" )
const DefaultManifestName = "MANIFEST.json"
DefaultManifestName is the name of the file that will be created at the root of the S3 bucket with user-supplied metadata
Variables ¶
var ( // HelloWorld is the typename for HelloWorldResource HelloWorld = cloudFormationResourceType("HelloWorldResource") // S3LambdaEventSource is the typename for S3LambdaEventSourceResource S3LambdaEventSource = cloudFormationResourceType("S3EventSource") // SNSLambdaEventSource is the typename for SNSLambdaEventSourceResource SNSLambdaEventSource = cloudFormationResourceType("SNSEventSource") // SESLambdaEventSource is the typename for SESLambdaEventSourceResource SESLambdaEventSource = cloudFormationResourceType("SESEventSource") // CloudWatchLogsLambdaEventSource is the typename for SESLambdaEventSourceResource CloudWatchLogsLambdaEventSource = cloudFormationResourceType("CloudWatchLogsEventSource") // ZipToS3Bucket is the typename for ZipToS3Bucket ZipToS3Bucket = cloudFormationResourceType("ZipToS3Bucket") )
Functions ¶
func NewCustomResourceLambdaHandler ¶
NewCustomResourceLambdaHandler returns a handler for the given type
func SendCloudFormationResponse ¶
func SendCloudFormationResponse(lambdaCtx *awsLambdaCtx.LambdaContext, event *CloudFormationLambdaEvent, results map[string]interface{}, responseErr error, logger *logrus.Logger) error
SendCloudFormationResponse sends the given response to the CloudFormation URL that was submitted together with this event
Types ¶
type CloudFormationLambdaEvent ¶
type CloudFormationLambdaEvent struct { RequestType string RequestID string `json:"RequestId"` ResponseURL string ResourceType string StackID string `json:"StackId"` LogicalResourceID string `json:"LogicalResourceId"` ResourceProperties json.RawMessage OldResourceProperties json.RawMessage }
CloudFormationLambdaEvent is the event to a resource
type CloudWatchEventSourceResourceRequest ¶
type CloudWatchEventSourceResourceRequest struct { LambdaTargetArn *gocf.StringExpr Filters []*CloudWatchLogsLambdaEventSourceFilter RoleARN *gocf.StringExpr `json:",omitempty"` }
CloudWatchEventSourceResourceRequest is what the UserProperties should be set to in the CustomResource invocation
type CloudWatchLogsLambdaEventSourceFilter ¶
type CloudWatchLogsLambdaEventSourceFilter struct { Name *gocf.StringExpr Pattern *gocf.StringExpr LogGroupName *gocf.StringExpr }
CloudWatchLogsLambdaEventSourceFilter represents a filter for a cloudwatchlogs stream
type CloudWatchLogsLambdaEventSourceResource ¶
type CloudWatchLogsLambdaEventSourceResource struct { gocf.CloudFormationCustomResource CloudWatchEventSourceResourceRequest }
CloudWatchLogsLambdaEventSourceResource is a simple POC showing how to create custom resources
type CustomResourceCommand ¶
type CustomResourceCommand interface {
// contains filtered or unexported methods
}
CustomResourceCommand defines operations that a CustomResource must implement.
type HelloWorldResource ¶
type HelloWorldResource struct { gocf.CloudFormationCustomResource HelloWorldResourceRequest }
HelloWorldResource is a simple POC showing how to create custom resources
type HelloWorldResourceRequest ¶
type HelloWorldResourceRequest struct {
Message *gocf.StringExpr
}
HelloWorldResourceRequest is what the UserProperties should be set to in the CustomResource invocation
type S3LambdaEventSourceResource ¶
type S3LambdaEventSourceResource struct { gocf.CloudFormationCustomResource S3LambdaEventSourceResourceRequest }
S3LambdaEventSourceResource manages registering a Lambda function with S3 event
type S3LambdaEventSourceResourceRequest ¶
type S3LambdaEventSourceResourceRequest struct { BucketArn *gocf.StringExpr Events []string LambdaTargetArn *gocf.StringExpr Filter *s3.NotificationConfigurationFilter `json:"Filter,omitempty"` }
S3LambdaEventSourceResourceRequest is what the UserProperties should be set to in the CustomResource invocation
type SESLambdaEventSourceResource ¶
type SESLambdaEventSourceResource struct { gocf.CloudFormationCustomResource SESLambdaEventSourceResourceRequest }
SESLambdaEventSourceResource handles configuring SES configuration
type SESLambdaEventSourceResourceAction ¶
type SESLambdaEventSourceResourceAction struct { ActionType *gocf.StringExpr ActionProperties map[string]interface{} }
SESLambdaEventSourceResourceAction represents an SES rule action TODO - specialized types for Actions
type SESLambdaEventSourceResourceRequest ¶
type SESLambdaEventSourceResourceRequest struct { RuleSetName *gocf.StringExpr Rules []*SESLambdaEventSourceResourceRule }
SESLambdaEventSourceResourceRequest defines the request properties to configure SES
type SESLambdaEventSourceResourceRule ¶
type SESLambdaEventSourceResourceRule struct { Name *gocf.StringExpr Actions []*SESLambdaEventSourceResourceAction ScanEnabled *gocf.BoolExpr `json:",omitempty"` Enabled *gocf.BoolExpr `json:",omitempty"` Recipients []*gocf.StringExpr TLSPolicy *gocf.StringExpr `json:",omitempty"` }
SESLambdaEventSourceResourceRule stores settings necessary to configure an SES inbound rule
type SNSLambdaEventSourceResource ¶
type SNSLambdaEventSourceResource struct { gocf.CloudFormationCustomResource SNSLambdaEventSourceResourceRequest }
SNSLambdaEventSourceResource is a simple POC showing how to create custom resources
type SNSLambdaEventSourceResourceRequest ¶
type SNSLambdaEventSourceResourceRequest struct { LambdaTargetArn *gocf.StringExpr SNSTopicArn *gocf.StringExpr }
SNSLambdaEventSourceResourceRequest defines the request properties to configure SNS
type ZipToS3BucketResource ¶
type ZipToS3BucketResource struct { gocf.CloudFormationCustomResource ZipToS3BucketResourceRequest }
ZipToS3BucketResource manages populating an S3 bucket with the contents of a ZIP file...
type ZipToS3BucketResourceRequest ¶
type ZipToS3BucketResourceRequest struct { SrcBucket *gocf.StringExpr SrcKeyName *gocf.StringExpr DestBucket *gocf.StringExpr ManifestName string Manifest map[string]interface{} }
ZipToS3BucketResourceRequest is the data request made to a ZipToS3BucketResource lambda handler