awscdkpipestargetsalpha

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

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

README

Amazon EventBridge Pipes Targets 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 Targets let you create a target for an EventBridge Pipe.

For more details see the service documentation.

Targets

Pipe targets are the end point of an EventBridge Pipe. The following targets are supported:

Amazon EventBridge API Destination

An EventBridge API destination can be used as a target for a pipe. The API destination will receive the (enriched/filtered) source payload.

var sourceQueue queue
var dest apiDestination


apiTarget := targets.NewApiDestinationTarget(dest)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: apiTarget,
})

The input to the target API destination can be transformed:

var sourceQueue queue
var dest apiDestination


apiTarget := targets.NewApiDestinationTarget(dest, &ApiDestinationTargetParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"body": jsii.String("👀"),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: apiTarget,
})
Amazon API Gateway Rest API

A REST API can be used as a target for a pipe. The REST API will receive the (enriched/filtered) source payload.

var sourceQueue queue


fn := lambda.NewFunction(this, jsii.String("MyFunc"), &FunctionProps{
	Handler: jsii.String("index.handler"),
	Runtime: lambda.Runtime_NODEJS_LATEST(),
	Code: lambda.Code_FromInline(jsii.String("exports.handler = e => {}")),
})

restApi := api.NewLambdaRestApi(this, jsii.String("MyRestAPI"), &LambdaRestApiProps{
	Handler: fn,
})
apiTarget := targets.NewApiGatewayTarget(restApi)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: apiTarget,
})

The input to the target REST API can be transformed:

var sourceQueue queue


fn := lambda.NewFunction(this, jsii.String("MyFunc"), &FunctionProps{
	Handler: jsii.String("index.handler"),
	Runtime: lambda.Runtime_NODEJS_LATEST(),
	Code: lambda.Code_FromInline(jsii.String("exports.handler = e => {}")),
})

restApi := api.NewLambdaRestApi(this, jsii.String("MyRestAPI"), &LambdaRestApiProps{
	Handler: fn,
})
apiTarget := targets.NewApiGatewayTarget(restApi, &ApiGatewayTargetParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"body": jsii.String("👀"),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: apiTarget,
})
Amazon CloudWatch Logs Log Group

A CloudWatch Logs log group can be used as a target for a pipe. The log group will receive the (enriched/filtered) source payload.

var sourceQueue queue
var targetLogGroup logGroup


logGroupTarget := targets.NewCloudWatchLogsTarget(targetLogGroup)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: logGroupTarget,
})

The input to the target log group can be transformed:

var sourceQueue queue
var targetLogGroup logGroup


logGroupTarget := targets.NewCloudWatchLogsTarget(targetLogGroup, &CloudWatchLogsTargetParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"body": jsii.String("👀"),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: logGroupTarget,
})
Amazon EventBridge Event Bus

An EventBridge event bus can be used as a target for a pipe. The event bus will receive the (enriched/filtered) source payload.

var sourceQueue queue
var targetEventBus eventBus


eventBusTarget := targets.NewEventBridgeTarget(targetEventBus)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: eventBusTarget,
})

The input to the target event bus can be transformed:

var sourceQueue queue
var targetEventBus eventBus


eventBusTarget := targets.NewEventBridgeTarget(targetEventBus, &EventBridgeTargetParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"body": jsii.String("👀"),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: eventBusTarget,
})
Amazon Kinesis Data Stream

A Kinesis data stream can be used as a target for a pipe. The data stream will receive the (enriched/filtered) source payload.

var sourceQueue queue
var targetStream stream


streamTarget := targets.NewKinesisTarget(targetStream, &KinesisTargetParameters{
	PartitionKey: jsii.String("pk"),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: streamTarget,
})

The input to the target data stream can be transformed:

var sourceQueue queue
var targetStream stream


streamTarget := targets.NewKinesisTarget(targetStream, &KinesisTargetParameters{
	PartitionKey: jsii.String("pk"),
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"body": jsii.String("👀"),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: streamTarget,
})
AWS Lambda Function

A Lambda function can be used as a target for a pipe. The Lambda function will be invoked with the (enriched/filtered) source payload.

var sourceQueue queue
var targetFunction iFunction


pipeTarget := targets.NewLambdaFunction(targetFunction, &LambdaFunctionParameters{
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

The target Lambda function is invoked synchronously by default. You can also choose to invoke the Lambda Function asynchronously by setting invocationType property to FIRE_AND_FORGET.

var sourceQueue queue
var targetFunction iFunction


pipeTarget := targets.NewLambdaFunction(targetFunction, &LambdaFunctionParameters{
	InvocationType: targets.LambdaFunctionInvocationType_FIRE_AND_FORGET,
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

The input to the target Lambda Function can be transformed:

var sourceQueue queue
var targetFunction iFunction


pipeTarget := targets.NewLambdaFunction(targetFunction, &LambdaFunctionParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"body": jsii.String("👀"),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})
Amazon SageMaker Pipeline

A SageMaker pipeline can be used as a target for a pipe. The pipeline will receive the (enriched/filtered) source payload.

var sourceQueue queue
var targetPipeline iPipeline


pipelineTarget := targets.NewSageMakerTarget(targetPipeline)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipelineTarget,
})

The input to the target pipeline can be transformed:

var sourceQueue queue
var targetPipeline iPipeline


pipelineTarget := targets.NewSageMakerTarget(targetPipeline, &SageMakerTargetParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"body": jsii.String("👀"),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipelineTarget,
})
AWS Step Functions State Machine

A Step Functions state machine can be used as a target for a pipe. The state machine will be invoked with the (enriched/filtered) source payload.

var sourceQueue queue
var targetStateMachine iStateMachine


pipeTarget := targets.NewSfnStateMachine(targetStateMachine, &SfnStateMachineParameters{
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

You can specify the invocation type when the target state machine is invoked:

var sourceQueue queue
var targetStateMachine iStateMachine


pipeTarget := targets.NewSfnStateMachine(targetStateMachine, &SfnStateMachineParameters{
	InvocationType: targets.StateMachineInvocationType_FIRE_AND_FORGET,
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

The input to the target state machine can be transformed:

var sourceQueue queue
var targetStateMachine iStateMachine


pipeTarget := targets.NewSfnStateMachine(targetStateMachine, &SfnStateMachineParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"body": jsii.String("<$.body>"),
	}),
	InvocationType: targets.StateMachineInvocationType_FIRE_AND_FORGET,
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})
Amazon SQS Queue

An SQS queue can be used as a target for a pipe. The queue will receive the (enriched/filtered) source payload.

var sourceQueue queue
var targetQueue queue


pipeTarget := targets.NewSqsTarget(targetQueue)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

The target input can be transformed:

var sourceQueue queue
var targetQueue queue


pipeTarget := targets.NewSqsTarget(targetQueue, &SqsTargetParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"SomeKey": pipes.DynamicInput_fromEventPath(jsii.String("$.body")),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

Documentation

Overview

The CDK Construct Library for Amazon EventBridge Pipes Targets

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApiDestinationTarget_Override

func NewApiDestinationTarget_Override(a ApiDestinationTarget, destination awsevents.IApiDestination, parameters *ApiDestinationTargetParameters)

Experimental.

func NewApiGatewayTarget_Override

func NewApiGatewayTarget_Override(a ApiGatewayTarget, restApi awsapigateway.IRestApi, parameters *ApiGatewayTargetParameters)

Experimental.

func NewCloudWatchLogsTarget_Override

func NewCloudWatchLogsTarget_Override(c CloudWatchLogsTarget, logGroup awslogs.ILogGroup, parameters *CloudWatchLogsTargetParameters)

Experimental.

func NewEventBridgeTarget_Override

func NewEventBridgeTarget_Override(e EventBridgeTarget, eventBus awsevents.IEventBus, parameters *EventBridgeTargetParameters)

Experimental.

func NewKinesisTarget_Override

func NewKinesisTarget_Override(k KinesisTarget, stream awskinesis.IStream, parameters *KinesisTargetParameters)

Experimental.

func NewLambdaFunction_Override

func NewLambdaFunction_Override(l LambdaFunction, lambdaFunction awslambda.IFunction, parameters *LambdaFunctionParameters)

Experimental.

func NewSageMakerTarget_Override

func NewSageMakerTarget_Override(s SageMakerTarget, pipeline awssagemaker.IPipeline, parameters *SageMakerTargetParameters)

Experimental.

func NewSfnStateMachine_Override

func NewSfnStateMachine_Override(s SfnStateMachine, stateMachine awsstepfunctions.IStateMachine, parameters *SfnStateMachineParameters)

Experimental.

func NewSqsTarget_Override

func NewSqsTarget_Override(s SqsTarget, queue awssqs.IQueue, parameters *SqsTargetParameters)

Experimental.

Types

type ApiDestinationTarget

type ApiDestinationTarget interface {
	awscdkpipesalpha.ITarget
	// The ARN of the target resource.
	// Experimental.
	TargetArn() *string
	// Bind this target to a pipe.
	// Experimental.
	Bind(pipe awscdkpipesalpha.IPipe) *awscdkpipesalpha.TargetConfig
	// Grant the pipe role to push to the target.
	// Experimental.
	GrantPush(grantee awsiam.IRole)
}

An EventBridge Pipes target that sends messages to an EventBridge API destination.

Example:

var sourceQueue queue
var dest apiDestination

apiTarget := targets.NewApiDestinationTarget(dest)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: apiTarget,
})

Experimental.

func NewApiDestinationTarget

func NewApiDestinationTarget(destination awsevents.IApiDestination, parameters *ApiDestinationTargetParameters) ApiDestinationTarget

Experimental.

type ApiDestinationTargetParameters

type ApiDestinationTargetParameters struct {
	// The headers to send as part of the request invoking the EventBridge API destination.
	//
	// The headers are merged with the headers from the API destination.
	// If there are conflicts, the headers from the API destination take precedence.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargethttpparameters.html#cfn-pipes-pipe-pipetargethttpparameters-headerparameters
	//
	// Default: - none.
	//
	// Experimental.
	HeaderParameters *map[string]*string `field:"optional" json:"headerParameters" yaml:"headerParameters"`
	// The input transformation to apply to the message before sending it to the target.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetparameters.html#cfn-pipes-pipe-pipetargetparameters-inputtemplate
	//
	// Default: - none.
	//
	// Experimental.
	InputTransformation awscdkpipesalpha.IInputTransformation `field:"optional" json:"inputTransformation" yaml:"inputTransformation"`
	// The path parameter values used to populate the EventBridge API destination path wildcards ("*").
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargethttpparameters.html#cfn-pipes-pipe-pipetargethttpparameters-pathparametervalues
	//
	// 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.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargethttpparameters.html#cfn-pipes-pipe-pipetargethttpparameters-querystringparameters
	//
	// Default: - none.
	//
	// Experimental.
	QueryStringParameters *map[string]*string `field:"optional" json:"queryStringParameters" yaml:"queryStringParameters"`
}

EventBridge API destination target properties.

Example:

var sourceQueue queue
var dest apiDestination

apiTarget := targets.NewApiDestinationTarget(dest, &ApiDestinationTargetParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"body": jsii.String("👀"),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: apiTarget,
})

Experimental.

type ApiGatewayTarget

type ApiGatewayTarget interface {
	awscdkpipesalpha.ITarget
	// The ARN of the target resource.
	// Experimental.
	TargetArn() *string
	// Bind this target to a pipe.
	// Experimental.
	Bind(pipe awscdkpipesalpha.IPipe) *awscdkpipesalpha.TargetConfig
	// Grant the pipe role to push to the target.
	// Experimental.
	GrantPush(grantee awsiam.IRole)
}

An EventBridge Pipes target that sends messages to an EventBridge API destination.

Example:

var sourceQueue queue

fn := lambda.NewFunction(this, jsii.String("MyFunc"), &FunctionProps{
	Handler: jsii.String("index.handler"),
	Runtime: lambda.Runtime_NODEJS_LATEST(),
	Code: lambda.Code_FromInline(jsii.String("exports.handler = e => {}")),
})

restApi := api.NewLambdaRestApi(this, jsii.String("MyRestAPI"), &LambdaRestApiProps{
	Handler: fn,
})
apiTarget := targets.NewApiGatewayTarget(restApi)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: apiTarget,
})

Experimental.

func NewApiGatewayTarget

func NewApiGatewayTarget(restApi awsapigateway.IRestApi, parameters *ApiGatewayTargetParameters) ApiGatewayTarget

Experimental.

type ApiGatewayTargetParameters

type ApiGatewayTargetParameters struct {
	// The headers to send as part of the request invoking the API Gateway REST API.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargethttpparameters.html#cfn-pipes-pipe-pipetargethttpparameters-headerparameters
	//
	// Default: - none.
	//
	// Experimental.
	HeaderParameters *map[string]*string `field:"optional" json:"headerParameters" yaml:"headerParameters"`
	// The input transformation to apply to the message before sending it to the target.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetparameters.html#cfn-pipes-pipe-pipetargetparameters-inputtemplate
	//
	// Default: - none.
	//
	// Experimental.
	InputTransformation awscdkpipesalpha.IInputTransformation `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 ("*").
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargethttpparameters.html#cfn-pipes-pipe-pipetargethttpparameters-pathparametervalues
	//
	// 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 API Gateway REST API.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargethttpparameters.html#cfn-pipes-pipe-pipetargethttpparameters-querystringparameters
	//
	// 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"`
}

API Gateway REST API target properties.

Example:

var sourceQueue queue

fn := lambda.NewFunction(this, jsii.String("MyFunc"), &FunctionProps{
	Handler: jsii.String("index.handler"),
	Runtime: lambda.Runtime_NODEJS_LATEST(),
	Code: lambda.Code_FromInline(jsii.String("exports.handler = e => {}")),
})

restApi := api.NewLambdaRestApi(this, jsii.String("MyRestAPI"), &LambdaRestApiProps{
	Handler: fn,
})
apiTarget := targets.NewApiGatewayTarget(restApi, &ApiGatewayTargetParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"body": jsii.String("👀"),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: apiTarget,
})

Experimental.

type CloudWatchLogsTarget

type CloudWatchLogsTarget interface {
	awscdkpipesalpha.ITarget
	// The ARN of the target resource.
	// Experimental.
	TargetArn() *string
	// Bind this target to a pipe.
	// Experimental.
	Bind(pipe awscdkpipesalpha.IPipe) *awscdkpipesalpha.TargetConfig
	// Grant the pipe role to push to the target.
	// Experimental.
	GrantPush(grantee awsiam.IRole)
}

An EventBridge Pipes target that sends messages to a CloudWatch Logs log group.

Example:

var sourceQueue queue
var targetLogGroup logGroup

logGroupTarget := targets.NewCloudWatchLogsTarget(targetLogGroup)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: logGroupTarget,
})

Experimental.

func NewCloudWatchLogsTarget

func NewCloudWatchLogsTarget(logGroup awslogs.ILogGroup, parameters *CloudWatchLogsTargetParameters) CloudWatchLogsTarget

Experimental.

type CloudWatchLogsTargetParameters

type CloudWatchLogsTargetParameters struct {
	// The input transformation to apply to the message before sending it to the target.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetparameters.html#cfn-pipes-pipe-pipetargetparameters-inputtemplate
	//
	// Default: - none.
	//
	// Experimental.
	InputTransformation awscdkpipesalpha.IInputTransformation `field:"optional" json:"inputTransformation" yaml:"inputTransformation"`
	// The name of the log stream.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetcloudwatchlogsparameters.html#cfn-pipes-pipe-pipetargetcloudwatchlogsparameters-logstreamname
	//
	// Default: - none.
	//
	// Experimental.
	LogStreamName *string `field:"optional" json:"logStreamName" yaml:"logStreamName"`
	// The JSON path expression that references the timestamp in the payload.
	//
	// This is the time that the event occurred, as a JSON path expression in the payload.
	//
	// Example:
	//   "$.data.timestamp"
	//
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetcloudwatchlogsparameters.html#cfn-pipes-pipe-pipetargetcloudwatchlogsparameters-timestamp
	//
	// Default: - current time.
	//
	// Experimental.
	Timestamp *string `field:"optional" json:"timestamp" yaml:"timestamp"`
}

CloudWatch Logs target properties.

Example:

var sourceQueue queue
var targetLogGroup logGroup

logGroupTarget := targets.NewCloudWatchLogsTarget(targetLogGroup, &CloudWatchLogsTargetParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"body": jsii.String("👀"),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: logGroupTarget,
})

Experimental.

type EventBridgeTarget

type EventBridgeTarget interface {
	awscdkpipesalpha.ITarget
	// The ARN of the target resource.
	// Experimental.
	TargetArn() *string
	// Bind this target to a pipe.
	// Experimental.
	Bind(pipe awscdkpipesalpha.IPipe) *awscdkpipesalpha.TargetConfig
	// Grant the pipe role to push to the target.
	// Experimental.
	GrantPush(grantee awsiam.IRole)
}

An EventBridge Pipes target that sends messages to an EventBridge event bus.

Example:

var sourceQueue queue
var targetEventBus eventBus

eventBusTarget := targets.NewEventBridgeTarget(targetEventBus)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: eventBusTarget,
})

Experimental.

func NewEventBridgeTarget

func NewEventBridgeTarget(eventBus awsevents.IEventBus, parameters *EventBridgeTargetParameters) EventBridgeTarget

Experimental.

type EventBridgeTargetParameters

type EventBridgeTargetParameters struct {
	// A free-form string used to decide what fields to expect in the event detail.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargeteventbridgeeventbusparameters.html#cfn-pipes-pipe-pipetargeteventbridgeeventbusparameters-detailtype
	//
	// Default: - none.
	//
	// Experimental.
	DetailType *string `field:"optional" json:"detailType" yaml:"detailType"`
	// The URL subdomain of the endpoint.
	//
	// Example:
	//   // if the URL for the endpoint is https://abcde.veo.endpoints.event.amazonaws.com
	//   "abcde.veo"
	//
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargeteventbridgeeventbusparameters.html#cfn-pipes-pipe-pipetargeteventbridgeeventbusparameters-endpointid
	//
	// Default: - none.
	//
	// Experimental.
	EndpointId *string `field:"optional" json:"endpointId" yaml:"endpointId"`
	// The input transformation to apply to the message before sending it to the target.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetparameters.html#cfn-pipes-pipe-pipetargetparameters-inputtemplate
	//
	// Default: - none.
	//
	// Experimental.
	InputTransformation awscdkpipesalpha.IInputTransformation `field:"optional" json:"inputTransformation" yaml:"inputTransformation"`
	// AWS resources, identified by Amazon Resource Name (ARN), which the event primarily concerns.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargeteventbridgeeventbusparameters.html#cfn-pipes-pipe-pipetargeteventbridgeeventbusparameters-resources
	//
	// Default: - none.
	//
	// Experimental.
	Resources *[]*string `field:"optional" json:"resources" yaml:"resources"`
	// The source of the event.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargeteventbridgeeventbusparameters.html#cfn-pipes-pipe-pipetargeteventbridgeeventbusparameters-source
	//
	// Default: - none.
	//
	// Experimental.
	Source *string `field:"optional" json:"source" yaml:"source"`
	// The time stamp of the event, per RFC3339.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargeteventbridgeeventbusparameters.html#cfn-pipes-pipe-pipetargeteventbridgeeventbusparameters-time
	//
	// Default: - the time stamp of the PutEvents call.
	//
	// Experimental.
	Time *string `field:"optional" json:"time" yaml:"time"`
}

EventBridge target properties.

Example:

var sourceQueue queue
var targetEventBus eventBus

eventBusTarget := targets.NewEventBridgeTarget(targetEventBus, &EventBridgeTargetParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"body": jsii.String("👀"),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: eventBusTarget,
})

Experimental.

type KinesisTarget

type KinesisTarget interface {
	awscdkpipesalpha.ITarget
	// The ARN of the target resource.
	// Experimental.
	TargetArn() *string
	// Bind this target to a pipe.
	// Experimental.
	Bind(pipe awscdkpipesalpha.IPipe) *awscdkpipesalpha.TargetConfig
	// Grant the pipe role to push to the target.
	// Experimental.
	GrantPush(grantee awsiam.IRole)
}

An EventBridge Pipes target that sends messages to a Kinesis stream.

Example:

var sourceQueue queue
var targetStream stream

streamTarget := targets.NewKinesisTarget(targetStream, &KinesisTargetParameters{
	PartitionKey: jsii.String("pk"),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: streamTarget,
})

Experimental.

func NewKinesisTarget

func NewKinesisTarget(stream awskinesis.IStream, parameters *KinesisTargetParameters) KinesisTarget

Experimental.

type KinesisTargetParameters

type KinesisTargetParameters struct {
	// Determines which shard in the stream the data record is assigned to.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetkinesisstreamparameters.html#cfn-pipes-pipe-pipetargetkinesisstreamparameters-partitionkey
	//
	// Experimental.
	PartitionKey *string `field:"required" json:"partitionKey" yaml:"partitionKey"`
	// The input transformation to apply to the message before sending it to the target.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetparameters.html#cfn-pipes-pipe-pipetargetparameters-inputtemplate
	//
	// Default: - none.
	//
	// Experimental.
	InputTransformation awscdkpipesalpha.IInputTransformation `field:"optional" json:"inputTransformation" yaml:"inputTransformation"`
}

Kinesis target properties.

Example:

var sourceQueue queue
var targetStream stream

streamTarget := targets.NewKinesisTarget(targetStream, &KinesisTargetParameters{
	PartitionKey: jsii.String("pk"),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: streamTarget,
})

Experimental.

type LambdaFunction

type LambdaFunction interface {
	awscdkpipesalpha.ITarget
	// The ARN of the target resource.
	// Experimental.
	TargetArn() *string
	// Bind this target to a pipe.
	// Experimental.
	Bind(pipe awscdkpipesalpha.IPipe) *awscdkpipesalpha.TargetConfig
	// Grant the pipe role to push to the target.
	// Experimental.
	GrantPush(grantee awsiam.IRole)
}

An EventBridge Pipes target that sends messages to an AWS Lambda Function.

Example:

var sourceQueue queue
var targetFunction iFunction

pipeTarget := targets.NewLambdaFunction(targetFunction, &LambdaFunctionParameters{
	InvocationType: targets.LambdaFunctionInvocationType_FIRE_AND_FORGET,
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

Experimental.

func NewLambdaFunction

func NewLambdaFunction(lambdaFunction awslambda.IFunction, parameters *LambdaFunctionParameters) LambdaFunction

Experimental.

type LambdaFunctionInvocationType

type LambdaFunctionInvocationType string

InvocationType for invoking the Lambda Function.

Example:

var sourceQueue queue
var targetFunction iFunction

pipeTarget := targets.NewLambdaFunction(targetFunction, &LambdaFunctionParameters{
	InvocationType: targets.LambdaFunctionInvocationType_FIRE_AND_FORGET,
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetlambdafunctionparameters.html

Experimental.

const (
	// Invoke Lambda Function asynchronously (`Invoke`).
	//
	// `InvocationType` is set to `Event` on `Invoke`, see https://docs.aws.amazon.com/lambda/latest/api/API_Invoke.html for more details.
	// Experimental.
	LambdaFunctionInvocationType_FIRE_AND_FORGET LambdaFunctionInvocationType = "FIRE_AND_FORGET"
	// Invoke Lambda Function synchronously (`Invoke`) and wait for the response.
	//
	// `InvocationType` is set to `RequestResponse` on `Invoke`, see https://docs.aws.amazon.com/lambda/latest/api/API_Invoke.html for more details.
	// Experimental.
	LambdaFunctionInvocationType_REQUEST_RESPONSE LambdaFunctionInvocationType = "REQUEST_RESPONSE"
)

type LambdaFunctionParameters

type LambdaFunctionParameters struct {
	// The input transformation to apply to the message before sending it to the target.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetparameters.html#cfn-pipes-pipe-pipetargetparameters-inputtemplate
	//
	// Default: - none.
	//
	// Experimental.
	InputTransformation awscdkpipesalpha.IInputTransformation `field:"optional" json:"inputTransformation" yaml:"inputTransformation"`
	// Specify whether to invoke the Lambda Function synchronously (`REQUEST_RESPONSE`) or asynchronously (`FIRE_AND_FORGET`).
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetlambdafunctionparameters.html
	//
	// Default: LambdaFunctionInvocationType.REQUEST_RESPONSE
	//
	// Experimental.
	InvocationType LambdaFunctionInvocationType `field:"optional" json:"invocationType" yaml:"invocationType"`
}

Parameters for the LambdaFunction target.

Example:

var sourceQueue queue
var targetFunction iFunction

pipeTarget := targets.NewLambdaFunction(targetFunction, &LambdaFunctionParameters{
	InvocationType: targets.LambdaFunctionInvocationType_FIRE_AND_FORGET,
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

Experimental.

type SageMakerTarget

type SageMakerTarget interface {
	awscdkpipesalpha.ITarget
	// The ARN of the target resource.
	// Experimental.
	TargetArn() *string
	// Bind this target to a pipe.
	// Experimental.
	Bind(pipe awscdkpipesalpha.IPipe) *awscdkpipesalpha.TargetConfig
	// Grant the pipe role to push to the target.
	// Experimental.
	GrantPush(grantee awsiam.IRole)
}

An EventBridge Pipes target that sends messages to a SageMaker pipeline.

Example:

var sourceQueue queue
var targetPipeline iPipeline

pipelineTarget := targets.NewSageMakerTarget(targetPipeline)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipelineTarget,
})

Experimental.

func NewSageMakerTarget

func NewSageMakerTarget(pipeline awssagemaker.IPipeline, parameters *SageMakerTargetParameters) SageMakerTarget

Experimental.

type SageMakerTargetParameters

type SageMakerTargetParameters struct {
	// The input transformation to apply to the message before sending it to the target.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetparameters.html#cfn-pipes-pipe-pipetargetparameters-inputtemplate
	//
	// Default: - none.
	//
	// Experimental.
	InputTransformation awscdkpipesalpha.IInputTransformation `field:"optional" json:"inputTransformation" yaml:"inputTransformation"`
	// List of parameter names and values for SageMaker Model Building Pipeline execution.
	//
	// The Name/Value pairs are passed to start execution of the pipeline.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetsagemakerpipelineparameters.html#cfn-pipes-pipe-pipetargetsagemakerpipelineparameters-pipelineparameterlist
	//
	// Default: - none.
	//
	// Experimental.
	PipelineParameters *map[string]*string `field:"optional" json:"pipelineParameters" yaml:"pipelineParameters"`
}

SageMaker target properties.

Example:

var sourceQueue queue
var targetPipeline iPipeline

pipelineTarget := targets.NewSageMakerTarget(targetPipeline, &SageMakerTargetParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"body": jsii.String("👀"),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipelineTarget,
})

Experimental.

type SfnStateMachine

type SfnStateMachine interface {
	awscdkpipesalpha.ITarget
	// The ARN of the target resource.
	// Experimental.
	TargetArn() *string
	// Bind this target to a pipe.
	// Experimental.
	Bind(pipe awscdkpipesalpha.IPipe) *awscdkpipesalpha.TargetConfig
	// Grant the pipe role to push to the target.
	// Experimental.
	GrantPush(grantee awsiam.IRole)
}

An EventBridge Pipes target that sends messages to an AWS Step Functions State Machine.

Example:

var sourceQueue queue
var targetStateMachine iStateMachine

pipeTarget := targets.NewSfnStateMachine(targetStateMachine, &SfnStateMachineParameters{
	InvocationType: targets.StateMachineInvocationType_FIRE_AND_FORGET,
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

Experimental.

func NewSfnStateMachine

func NewSfnStateMachine(stateMachine awsstepfunctions.IStateMachine, parameters *SfnStateMachineParameters) SfnStateMachine

Experimental.

type SfnStateMachineParameters

type SfnStateMachineParameters struct {
	// The input transformation to apply to the message before sending it to the target.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetparameters.html#cfn-pipes-pipe-pipetargetparameters-inputtemplate
	//
	// Default: - none.
	//
	// Experimental.
	InputTransformation awscdkpipesalpha.IInputTransformation `field:"optional" json:"inputTransformation" yaml:"inputTransformation"`
	// Specify whether to invoke the State Machine synchronously (`REQUEST_RESPONSE`) or asynchronously (`FIRE_AND_FORGET`).
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetsqsqueueparameters.html#cfn-pipes-pipe-pipetargetsqsqueueparameters-messagededuplicationid
	//
	// Default: StateMachineInvocationType.FIRE_AND_FORGET
	//
	// Experimental.
	InvocationType StateMachineInvocationType `field:"optional" json:"invocationType" yaml:"invocationType"`
}

Parameters for the SfnStateMachine target.

Example:

var sourceQueue queue
var targetStateMachine iStateMachine

pipeTarget := targets.NewSfnStateMachine(targetStateMachine, &SfnStateMachineParameters{
	InvocationType: targets.StateMachineInvocationType_FIRE_AND_FORGET,
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

Experimental.

type SqsTarget

type SqsTarget interface {
	awscdkpipesalpha.ITarget
	// The ARN of the target resource.
	// Experimental.
	TargetArn() *string
	// Bind this target to a pipe.
	// Experimental.
	Bind(pipe awscdkpipesalpha.IPipe) *awscdkpipesalpha.TargetConfig
	// Grant the pipe role to push to the target.
	// Experimental.
	GrantPush(grantee awsiam.IRole)
}

A EventBridge Pipes target that sends messages to an SQS queue.

Example:

var sourceQueue queue
var targetQueue queue

pipeSource := sources.NewSqsSource(sourceQueue, &SqsSourceParameters{
	BatchSize: jsii.Number(10),
	MaximumBatchingWindow: cdk.Duration_Seconds(jsii.Number(10)),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: pipeSource,
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue),
})

Experimental.

func NewSqsTarget

func NewSqsTarget(queue awssqs.IQueue, parameters *SqsTargetParameters) SqsTarget

Experimental.

type SqsTargetParameters

type SqsTargetParameters struct {
	// The input transformation to apply to the message before sending it to the target.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetparameters.html#cfn-pipes-pipe-pipetargetparameters-inputtemplate
	//
	// Default: - none.
	//
	// Experimental.
	InputTransformation awscdkpipesalpha.IInputTransformation `field:"optional" json:"inputTransformation" yaml:"inputTransformation"`
	// This parameter applies only to FIFO (first-in-first-out) queues.
	//
	// The token used for deduplication of sent messages.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetsqsqueueparameters.html#cfn-pipes-pipe-pipetargetsqsqueueparameters-messagededuplicationid
	//
	// Default: - none.
	//
	// Experimental.
	MessageDeduplicationId *string `field:"optional" json:"messageDeduplicationId" yaml:"messageDeduplicationId"`
	// The FIFO message group ID to use as the target.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetsqsqueueparameters.html#cfn-pipes-pipe-pipetargetsqsqueueparameters-messagegroupid
	//
	// Default: - none.
	//
	// Experimental.
	MessageGroupId *string `field:"optional" json:"messageGroupId" yaml:"messageGroupId"`
}

SQS target properties.

Example:

var sourceQueue queue
var targetQueue queue

pipeTarget := targets.NewSqsTarget(targetQueue, &SqsTargetParameters{
	InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
		"SomeKey": pipes.DynamicInput_fromEventPath(jsii.String("$.body")),
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

Experimental.

type StateMachineInvocationType

type StateMachineInvocationType string

InvocationType for invoking the State Machine.

Example:

var sourceQueue queue
var targetStateMachine iStateMachine

pipeTarget := targets.NewSfnStateMachine(targetStateMachine, &SfnStateMachineParameters{
	InvocationType: targets.StateMachineInvocationType_FIRE_AND_FORGET,
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: pipeTarget,
})

See: https://docs.aws.amazon.com/eventbridge/latest/pipes-reference/API_PipeTargetStateMachineParameters.html

Experimental.

const (
	// Invoke StepFunction asynchronously (`StartExecution`).
	//
	// See https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html for more details.
	// Experimental.
	StateMachineInvocationType_FIRE_AND_FORGET StateMachineInvocationType = "FIRE_AND_FORGET"
	// Invoke StepFunction synchronously (`StartSyncExecution`) and wait for the execution to complete.
	//
	// See https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartSyncExecution.html for more details.
	// Experimental.
	StateMachineInvocationType_REQUEST_RESPONSE StateMachineInvocationType = "REQUEST_RESPONSE"
)

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