awscdkpipesenrichmentsalpha

package module
v2.171.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

README

Amazon EventBridge Pipes Enrichments Construct Library

---

The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


EventBridge Pipes Enrichments let you create enrichments for an EventBridge Pipe.

For more details see the service documentation:

Documentation

Pipe sources

Pipe enrichments are invoked prior to sending the events to a target of a EventBridge Pipe.

Lambda function

A Lambda function can be used to enrich events of a pipe.

var sourceQueue queue
var targetQueue queue

var enrichmentFunction function


enrichment := enrichments.NewLambdaEnrichment(enrichmentFunction)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: NewSomeSource(sourceQueue),
	Enrichment: Enrichment,
	Target: NewSomeTarget(targetQueue),
})
Step Functions state machine

Step Functions state machine can be used to enrich events of a pipe.

Note: EventBridge Pipes only supports Express workflows invoked synchronously.

Visit Amazon EventBridge Pipes event enrichment for more details.

var sourceQueue queue
var targetQueue queue

var enrichmentStateMachine stateMachine


enrichment := enrichments.NewStepFunctionsEnrichment(enrichmentStateMachine)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: NewSomeSource(sourceQueue),
	Enrichment: Enrichment,
	Target: NewSomeTarget(targetQueue),
})
API destination

API destination can be used to enrich events of a pipe.

var sourceQueue queue
var targetQueue queue

var apiDestination apiDestination


enrichment := enrichments.NewApiDestinationEnrichment(apiDestination)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: NewSomeSource(sourceQueue),
	Enrichment: Enrichment,
	Target: NewSomeTarget(targetQueue),
})
API Gateway (REST API)

API Gateway can be used to enrich events of a pipe. Pipes only supports API Gateway REST APIs. HTTP APIs are not supported.

var sourceQueue queue
var targetQueue queue

var restApi restApi


enrichment := enrichments.NewApiGatewayEnrichment(restApi)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: NewSomeSource(sourceQueue),
	Enrichment: Enrichment,
	Target: NewSomeTarget(targetQueue),
})

Documentation

Overview

The CDK Construct Library for Amazon EventBridge Pipes Enrichments

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApiDestinationEnrichment_Override

func NewApiDestinationEnrichment_Override(a ApiDestinationEnrichment, destination awsevents.IApiDestination, props *ApiDestinationEnrichmentProps)

Experimental.

func NewApiGatewayEnrichment_Override

func NewApiGatewayEnrichment_Override(a ApiGatewayEnrichment, restApi awsapigateway.IRestApi, props *ApiGatewayEnrichmentProps)

Experimental.

func NewLambdaEnrichment_Override

func NewLambdaEnrichment_Override(l LambdaEnrichment, lambda awslambda.IFunction, props *LambdaEnrichmentProps)

Experimental.

func NewStepFunctionsEnrichment_Override

func NewStepFunctionsEnrichment_Override(s StepFunctionsEnrichment, stateMachine awsstepfunctions.IStateMachine, props *StepFunctionsEnrichmentProps)

Experimental.

Types

type ApiDestinationEnrichment

type ApiDestinationEnrichment interface {
	awscdkpipesalpha.IEnrichment
	// The ARN of the enrichment resource.
	//
	// Length Constraints: Minimum length of 0. Maximum length of 1600.
	// Experimental.
	EnrichmentArn() *string
	// Bind this enrichment to a pipe.
	// Experimental.
	Bind(pipe awscdkpipesalpha.IPipe) *awscdkpipesalpha.EnrichmentParametersConfig
	// Grant the pipes role to invoke the enrichment.
	// Experimental.
	GrantInvoke(pipeRole awsiam.IRole)
}

An API Destination enrichment for a pipe.

Example:

var sourceQueue queue
var targetQueue queue

var apiDestination apiDestination

enrichment := enrichments.NewApiDestinationEnrichment(apiDestination)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: NewSomeSource(sourceQueue),
	Enrichment: Enrichment,
	Target: NewSomeTarget(targetQueue),
})

Experimental.

func NewApiDestinationEnrichment

func NewApiDestinationEnrichment(destination awsevents.IApiDestination, props *ApiDestinationEnrichmentProps) ApiDestinationEnrichment

Experimental.

type ApiDestinationEnrichmentProps

type ApiDestinationEnrichmentProps struct {
	// The headers that need to be sent as part of request invoking the EventBridge ApiDestination.
	// Default: - none.
	//
	// Experimental.
	HeaderParameters *map[string]*string `field:"optional" json:"headerParameters" yaml:"headerParameters"`
	// The input transformation for the enrichment.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-input-transformation.html
	//
	// Default: - None.
	//
	// Experimental.
	InputTransformation awscdkpipesalpha.InputTransformation `field:"optional" json:"inputTransformation" yaml:"inputTransformation"`
	// The path parameter values used to populate the EventBridge API destination path wildcards ("*").
	// Default: - none.
	//
	// Experimental.
	PathParameterValues *[]*string `field:"optional" json:"pathParameterValues" yaml:"pathParameterValues"`
	// The query string keys/values that need to be sent as part of request invoking the EventBridge API destination.
	// Default: - none.
	//
	// Experimental.
	QueryStringParameters *map[string]*string `field:"optional" json:"queryStringParameters" yaml:"queryStringParameters"`
}

Properties for a ApiDestinationEnrichment.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import pipes_alpha "github.com/aws/aws-cdk-go/awscdkpipesalpha"
import pipes_enrichments_alpha "github.com/aws/aws-cdk-go/awscdkpipesenrichmentsalpha"

var inputTransformation inputTransformation

apiDestinationEnrichmentProps := &ApiDestinationEnrichmentProps{
	HeaderParameters: map[string]*string{
		"headerParametersKey": jsii.String("headerParameters"),
	},
	InputTransformation: inputTransformation,
	PathParameterValues: []*string{
		jsii.String("pathParameterValues"),
	},
	QueryStringParameters: map[string]*string{
		"queryStringParametersKey": jsii.String("queryStringParameters"),
	},
}

Experimental.

type ApiGatewayEnrichment

type ApiGatewayEnrichment interface {
	awscdkpipesalpha.IEnrichment
	// The ARN of the enrichment resource.
	//
	// Length Constraints: Minimum length of 0. Maximum length of 1600.
	// Experimental.
	EnrichmentArn() *string
	// Bind this enrichment to a pipe.
	// Experimental.
	Bind(pipe awscdkpipesalpha.IPipe) *awscdkpipesalpha.EnrichmentParametersConfig
	// Grant the pipes role to invoke the enrichment.
	// Experimental.
	GrantInvoke(pipeRole awsiam.IRole)
}

An API Gateway enrichment for a pipe.

Example:

var sourceQueue queue
var targetQueue queue

var restApi restApi

enrichment := enrichments.NewApiGatewayEnrichment(restApi)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: NewSomeSource(sourceQueue),
	Enrichment: Enrichment,
	Target: NewSomeTarget(targetQueue),
})

Experimental.

func NewApiGatewayEnrichment

func NewApiGatewayEnrichment(restApi awsapigateway.IRestApi, props *ApiGatewayEnrichmentProps) ApiGatewayEnrichment

Experimental.

type ApiGatewayEnrichmentProps

type ApiGatewayEnrichmentProps struct {
	// The headers that need to be sent as part of request invoking the API Gateway REST API.
	// Default: - none.
	//
	// Experimental.
	HeaderParameters *map[string]*string `field:"optional" json:"headerParameters" yaml:"headerParameters"`
	// The input transformation for the enrichment.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-input-transformation.html
	//
	// Default: - None.
	//
	// Experimental.
	InputTransformation awscdkpipesalpha.InputTransformation `field:"optional" json:"inputTransformation" yaml:"inputTransformation"`
	// The method for API Gateway resource.
	// Default: '*' - ANY.
	//
	// Experimental.
	Method *string `field:"optional" json:"method" yaml:"method"`
	// The path for the API Gateway resource.
	// Default: '/'.
	//
	// Experimental.
	Path *string `field:"optional" json:"path" yaml:"path"`
	// The path parameter values used to populate the API Gateway REST API path wildcards ("*").
	// Default: - none.
	//
	// Experimental.
	PathParameterValues *[]*string `field:"optional" json:"pathParameterValues" yaml:"pathParameterValues"`
	// The query string keys/values that need to be sent as part of request invoking the EventBridge API destination.
	// Default: - none.
	//
	// Experimental.
	QueryStringParameters *map[string]*string `field:"optional" json:"queryStringParameters" yaml:"queryStringParameters"`
	// The deployment stage for the API Gateway resource.
	// Default: - the value of `deploymentStage.stageName` of target API Gateway resource.
	//
	// Experimental.
	Stage *string `field:"optional" json:"stage" yaml:"stage"`
}

Properties for a ApiGatewayEnrichment.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import pipes_alpha "github.com/aws/aws-cdk-go/awscdkpipesalpha"
import pipes_enrichments_alpha "github.com/aws/aws-cdk-go/awscdkpipesenrichmentsalpha"

var inputTransformation inputTransformation

apiGatewayEnrichmentProps := &ApiGatewayEnrichmentProps{
	HeaderParameters: map[string]*string{
		"headerParametersKey": jsii.String("headerParameters"),
	},
	InputTransformation: inputTransformation,
	Method: jsii.String("method"),
	Path: jsii.String("path"),
	PathParameterValues: []*string{
		jsii.String("pathParameterValues"),
	},
	QueryStringParameters: map[string]*string{
		"queryStringParametersKey": jsii.String("queryStringParameters"),
	},
	Stage: jsii.String("stage"),
}

Experimental.

type LambdaEnrichment

type LambdaEnrichment interface {
	awscdkpipesalpha.IEnrichment
	// The ARN of the enrichment resource.
	//
	// Length Constraints: Minimum length of 0. Maximum length of 1600.
	// Experimental.
	EnrichmentArn() *string
	// Bind this enrichment to a pipe.
	// Experimental.
	Bind(pipe awscdkpipesalpha.IPipe) *awscdkpipesalpha.EnrichmentParametersConfig
	// Grant the pipes role to invoke the enrichment.
	// Experimental.
	GrantInvoke(pipeRole awsiam.IRole)
}

A Lambda enrichment for a pipe.

Example:

var sourceQueue queue
var targetQueue queue

var enrichmentFunction function

enrichment := enrichments.NewLambdaEnrichment(enrichmentFunction)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: NewSomeSource(sourceQueue),
	Enrichment: Enrichment,
	Target: NewSomeTarget(targetQueue),
})

Experimental.

func NewLambdaEnrichment

func NewLambdaEnrichment(lambda awslambda.IFunction, props *LambdaEnrichmentProps) LambdaEnrichment

Experimental.

type LambdaEnrichmentProps

type LambdaEnrichmentProps struct {
	// The input transformation for the enrichment.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-input-transformation.html
	//
	// Default: - None.
	//
	// Experimental.
	InputTransformation awscdkpipesalpha.InputTransformation `field:"optional" json:"inputTransformation" yaml:"inputTransformation"`
}

Properties for a LambdaEnrichment.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import pipes_alpha "github.com/aws/aws-cdk-go/awscdkpipesalpha"
import pipes_enrichments_alpha "github.com/aws/aws-cdk-go/awscdkpipesenrichmentsalpha"

var inputTransformation inputTransformation

lambdaEnrichmentProps := &LambdaEnrichmentProps{
	InputTransformation: inputTransformation,
}

Experimental.

type StepFunctionsEnrichment

type StepFunctionsEnrichment interface {
	awscdkpipesalpha.IEnrichment
	// The ARN of the enrichment resource.
	//
	// Length Constraints: Minimum length of 0. Maximum length of 1600.
	// Experimental.
	EnrichmentArn() *string
	// Bind this enrichment to a pipe.
	// Experimental.
	Bind(pipe awscdkpipesalpha.IPipe) *awscdkpipesalpha.EnrichmentParametersConfig
	// Grant the pipes role to invoke the enrichment.
	// Experimental.
	GrantInvoke(pipeRole awsiam.IRole)
}

A StepFunctions enrichment for a pipe.

Example:

var sourceQueue queue
var targetQueue queue

var enrichmentStateMachine stateMachine

enrichment := enrichments.NewStepFunctionsEnrichment(enrichmentStateMachine)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: NewSomeSource(sourceQueue),
	Enrichment: Enrichment,
	Target: NewSomeTarget(targetQueue),
})

Experimental.

func NewStepFunctionsEnrichment

func NewStepFunctionsEnrichment(stateMachine awsstepfunctions.IStateMachine, props *StepFunctionsEnrichmentProps) StepFunctionsEnrichment

Experimental.

type StepFunctionsEnrichmentProps

type StepFunctionsEnrichmentProps struct {
	// The input transformation for the enrichment.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-input-transformation.html
	//
	// Default: - None.
	//
	// Experimental.
	InputTransformation awscdkpipesalpha.InputTransformation `field:"optional" json:"inputTransformation" yaml:"inputTransformation"`
}

Properties for a StepFunctionsEnrichment.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import pipes_alpha "github.com/aws/aws-cdk-go/awscdkpipesalpha"
import pipes_enrichments_alpha "github.com/aws/aws-cdk-go/awscdkpipesenrichmentsalpha"

var inputTransformation inputTransformation

stepFunctionsEnrichmentProps := &StepFunctionsEnrichmentProps{
	InputTransformation: inputTransformation,
}

Experimental.

Directories

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

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