awscdkpipesalpha

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

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

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 16 Imported by: 3

README

Amazon EventBridge Pipes 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 let you create source to target connections between several AWS services. While transporting messages from a source to a target the messages can be filtered, transformed and enriched.

diagram of pipes

For more details see the service documentation.

Pipe

EventBridge Pipes is a fully managed service that enables point-to-point integrations between event producers and consumers. Pipes can be used to connect several AWS services to each other, or to connect AWS services to external services.

A pipe has a source and a target. The source events can be filtered and enriched before reaching the target.

Example - pipe usage

The following code examples use an example implementation of a source and target.

To define a pipe you need to create a new Pipe construct. The Pipe construct needs a source and a target.

var sourceQueue Queue
var targetQueue Queue


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

This minimal example creates a pipe with a SQS queue as source and a SQS queue as target. Messages from the source are put into the body of the target message.

Source

A source is a AWS Service that is polled. The following sources are possible:

Currently, DynamoDB, Kinesis, and SQS are supported. If you are interested in support for additional sources, kindly let us know by opening a GitHub issue or raising a PR.

Example source
var sourceQueue Queue

pipeSource := awscdkpipessourcesalpha.NewSqsSource(sourceQueue)

Filter

A filter can be used to filter the events from the source before they are forwarded to the enrichment or, if no enrichment is present, target step. Multiple filter expressions are possible. If one of the filter expressions matches, the event is forwarded to the enrichment or target step.

Example - filter usage
var sourceQueue Queue
var targetQueue Queue


sourceFilter := pipes.NewFilter([]IFilterPattern{
	pipes.FilterPattern_FromObject(map[string]interface{}{
		"body": map[string][]*string{
			// only forward events with customerType B2B or B2C
			"customerType": []*string{
				jsii.String("B2B"),
				jsii.String("B2C"),
			},
		},
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue),
	Filter: sourceFilter,
})

This example shows a filter that only forwards events with the customerType B2B or B2C from the source messages. Messages that are not matching the filter are not forwarded to the enrichment or target step.

You can define multiple filter pattern which are combined with a logical OR.

Additional filter pattern and details can be found in the EventBridge pipes docs.

Input transformation

For enrichments and targets the input event can be transformed. The transformation is applied for each item of the batch. A transformation has access to the input event as well to some context information of the pipe itself like the name of the pipe. See docs for details.

Example - input transformation from object

The input transformation can be created from an object. The object can contain static values, dynamic values or pipe variables.

var sourceQueue Queue
var targetQueue Queue


targetInputTransformation := pipes.inputTransformation_FromObject(map[string]interface{}{
	"staticField": jsii.String("static value"),
	"dynamicField": pipes.DynamicInput_fromEventPath(jsii.String("$.body.payload")),
	"pipeVariable": pipes.DynamicInput_pipeName(),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	PipeName: jsii.String("MyPipe"),
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue, &SqsTargetParameters{
		InputTransformation: targetInputTransformation,
	}),
})

This example shows a transformation that adds a static field, a dynamic field and a pipe variable to the input event. The dynamic field is extracted from the input event. The pipe variable is extracted from the pipe context.

So when the following batch of input events is processed by the pipe

[
  {
    ...
    "body": "{\"payload\": \"Test message.\"}",
    ...
  }
]

it is converted into the following payload:

[
  {
    ...
    "staticField": "static value",
    "dynamicField": "Test message.",
    "pipeVariable": "MyPipe",
    ...
  }
]

If the transformation is applied to a target it might be converted to a string representation. For example, the resulting SQS message body looks like this:

[
  {
    ...
    "body": "{\"staticField\": \"static value\", \"dynamicField\": \"Test message.\", \"pipeVariable\": \"MyPipe\"}",
    ...
  }
]
Example - input transformation from event path

In cases where you want to forward only a part of the event to the target you can use the transformation event path.

This only works for targets because the enrichment needs to have a valid json as input.

var sourceQueue Queue
var targetQueue Queue


targetInputTransformation := pipes.inputTransformation_FromEventPath(jsii.String("$.body.payload"))

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue, &SqsTargetParameters{
		InputTransformation: targetInputTransformation,
	}),
})

This transformation extracts the body of the event.

So when the following batch of input events is processed by the pipe

 [
  {
    ...
    "body": "\"{\"payload\": \"Test message.\"}\"",
    ...
  }
]

it is converted into the following target payload:

[
  {
    ...
    "body": "Test message."
    ...
  }
]

The implicit payload parsing (e.g. SQS message body to JSON) only works if the input is the source payload. Implicit body parsing is not applied on enrichment results.

Example - input transformation from text

In cases where you want to forward a static text to the target or use your own formatted inputTemplate you can use the transformation from text.

var sourceQueue Queue
var targetQueue Queue


targetInputTransformation := pipes.inputTransformation_FromText(jsii.String("My static text"))

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue, &SqsTargetParameters{
		InputTransformation: targetInputTransformation,
	}),
})

This transformation forwards the static text to the target.

[
  {
    ...
    "body": "My static text"
    ...
  }
]

Enrichment

In the enrichment step the (un)filtered payloads from the source can be used to invoke one of the following services:

  • API destination

  • Amazon API Gateway

  • Lambda function

  • Step Functions state machine

    • only express workflow
Example enrichment implementation

Currently no implementation exist for any of the supported enrichments. The following example shows how an implementation can look like. The actual implementation is not part of this package and will be in a separate one.

type lambdaEnrichment struct {
	enrichmentArn *string
	inputTransformation inputTransformation
}

func newLambdaEnrichment(lambda Function, props map[string]interface{}) *lambdaEnrichment {
	if props == nil {
		props = map[string]interface{}{
		}
	}
	this := &lambdaEnrichment{}
	this.enrichmentArn = lambda.functionArn
	this.inputTransformation = props.inputTransformation
	return this
}

func (this *lambdaEnrichment) bind(pipe IPipe) EnrichmentParametersConfig {
	return &EnrichmentParametersConfig{
		EnrichmentParameters: &PipeEnrichmentParametersProperty{
			InputTemplate: this.inputTransformation.Bind(pipe).InputTemplate,
		},
	}
}

func (this *lambdaEnrichment) grantInvoke(pipeRole IRole) {
	this.*lambda.GrantInvoke(*pipeRole)
}

An enrichment implementation needs to provide the enrichmentArn, enrichmentParameters and grant the pipe role invoke access to the enrichment.

Example - enrichment usage
var sourceQueue Queue
var targetQueue Queue
var enrichmentLambda Function


enrichmentInputTransformation := pipes.inputTransformation_FromObject(map[string]interface{}{
	"staticField": jsii.String("static value"),
	"dynamicField": pipes.DynamicInput_fromEventPath(jsii.String("$.body.payload")),
	"pipeVariable": pipes.DynamicInput_pipeName(),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue),
	Enrichment: NewLambdaEnrichment(enrichmentLambda, map[string]*inputTransformation{
		"inputTransformation": enrichmentInputTransformation,
	}),
})

This example adds a lambda function as enrichment to the pipe. The lambda function is invoked with the batch of messages from the source after applying the transformation. The lambda function can return a result which is forwarded to the target.

So the following batch of input events is processed by the pipe

[
  {
    ...
    "body": "{\"payload\": \"Test message.\"}",
    ...
  }
]

it is converted into the following payload which is sent to the lambda function.

[
  {
    ...
    "staticField": "static value",
    "dynamicField": "Test message.",
    "pipeVariable": "MyPipe",
    ...
  }
]

The lambda function can return a result which is forwarded to the target. For example a lambda function that returns a concatenation of the static field, dynamic field and pipe variable

func Handler(event interface{}) promise {
	return jsii.String(*event.staticField + "-" + *event.dynamicField + "-" + *event.pipeVariable)
}

will produce the following target message in the target SQS queue.

[
  {
    ...
    "body": "static value-Test message.-MyPipe",
    ...
  }
]

Target

A Target is the end of the Pipe. After the payload from the source is pulled, filtered and enriched it is forwarded to the target. For now the following targets are supported:

  • API destination

  • API Gateway

  • Batch job queue

  • CloudWatch log group

  • ECS task

  • Event bus in the same account and Region

  • Firehose delivery stream

  • Inspector assessment template

  • Kinesis stream

  • Lambda function (SYNC or ASYNC)

  • Redshift cluster data API queries

  • SageMaker Pipeline

  • SNS topic

  • SQS queue

  • Step Functions state machine

    • Express workflows (ASYNC)
    • Standard workflows (SYNC or ASYNC)

The target event can be transformed before it is forwarded to the target using the same input transformation as in the enrichment step.

Example target
var targetQueue Queue

pipeTarget := awscdkpipestargetsalpha.NewSqsTarget(targetQueue)

Log destination

A pipe can produce log events that are forwarded to different log destinations. You can configure multiple destinations, but all the destination share the same log level and log data. For details check the official documentation.

The log level and data that is included in the log events is configured on the pipe class itself. The actual destination is defined independently, and there are three options:

  1. CloudwatchLogsLogDestination
  2. FirehoseLogDestination
  3. S3LogDestination
Example log destination usage
var sourceQueue Queue
var targetQueue Queue
var logGroup LogGroup


cwlLogDestination := pipes.NewCloudwatchLogsLogDestination(logGroup)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue),
	LogLevel: pipes.LogLevel_TRACE,
	LogIncludeExecutionData: []aLL{
		pipes.IncludeExecutionData_*aLL,
	},
	LogDestinations: []ILogDestination{
		cwlLogDestination,
	},
})

This example uses a CloudWatch Logs log group to store the log emitted during a pipe execution. The log level is set to TRACE so all steps of the pipe are logged. Additionally all execution data is logged as well.

Encrypt pipe data with KMS

You can specify that EventBridge use a customer managed key to encrypt pipe data stored at rest, rather than use an AWS owned key as is the default. Details can be found in the documentation.

To do this, you need to specify the key in the kmsKey property of the pipe.

var sourceQueue Queue
var targetQueue Queue
var kmsKey Key


pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue),
	KmsKey: KmsKey,
	// pipeName is required when using a KMS key
	PipeName: jsii.String("MyPipe"),
})

Documentation

Overview

The CDK Construct Library for Amazon EventBridge Pipes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCloudwatchLogsLogDestination_Override

func NewCloudwatchLogsLogDestination_Override(c CloudwatchLogsLogDestination, logGroup awslogs.ILogGroup)

Experimental.

func NewFilterPattern_Override

func NewFilterPattern_Override(f FilterPattern)

Experimental.

func NewFilter_Override

func NewFilter_Override(f Filter, filter *[]IFilterPattern)

Experimental.

func NewFirehoseLogDestination_Override

func NewFirehoseLogDestination_Override(f FirehoseLogDestination, deliveryStream awskinesisfirehose.IDeliveryStream)

Experimental.

func NewPipe_Override

func NewPipe_Override(p Pipe, scope constructs.Construct, id *string, props *PipeProps)

Experimental.

func NewS3LogDestination_Override

func NewS3LogDestination_Override(s S3LogDestination, parameters *S3LogDestinationProps)

Experimental.

func NewSourceWithDeadLetterTarget_Override

func NewSourceWithDeadLetterTarget_Override(s SourceWithDeadLetterTarget, sourceArn *string, deadLetterTarget interface{})

Experimental.

func NewTargetParameter_Override

func NewTargetParameter_Override(t TargetParameter)

Experimental.

func Pipe_IsConstruct

func Pipe_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func Pipe_IsOwnedResource

func Pipe_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func Pipe_IsResource

func Pipe_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Pipe_PROPERTY_INJECTION_ID

func Pipe_PROPERTY_INJECTION_ID() *string

func SourceWithDeadLetterTarget_IsSourceWithDeadLetterTarget

func SourceWithDeadLetterTarget_IsSourceWithDeadLetterTarget(source ISource) *bool

Determines if the source is an instance of SourceWithDeadLetterTarget. Experimental.

func TargetParameter_FromJsonPath

func TargetParameter_FromJsonPath(jsonPath *string) *string

Target parameter based on a jsonPath expression from the incoming event. Experimental.

Types

type CloudwatchLogsLogDestination

type CloudwatchLogsLogDestination interface {
	ILogDestination
	// Bind the log destination to the pipe.
	// Experimental.
	Bind(pipe IPipe) *LogDestinationConfig
	// Grant the pipe role to push to the log destination.
	// Experimental.
	GrantPush(grantee awsiam.IRole)
}

CloudWatch Logs log group for delivery of pipe logs.

Example:

var sourceQueue Queue
var targetQueue Queue
var logGroup LogGroup

cwlLogDestination := pipes.NewCloudwatchLogsLogDestination(logGroup)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue),
	LogLevel: pipes.LogLevel_TRACE,
	LogIncludeExecutionData: []aLL{
		pipes.IncludeExecutionData_*aLL,
	},
	LogDestinations: []ILogDestination{
		cwlLogDestination,
	},
})

Experimental.

func NewCloudwatchLogsLogDestination

func NewCloudwatchLogsLogDestination(logGroup awslogs.ILogGroup) CloudwatchLogsLogDestination

Experimental.

type DesiredState

type DesiredState string

The state the pipe should be in. Experimental.

const (
	// The pipe should be running.
	// Experimental.
	DesiredState_RUNNING DesiredState = "RUNNING"
	// The pipe should be stopped.
	// Experimental.
	DesiredState_STOPPED DesiredState = "STOPPED"
)

type DynamicInput

type DynamicInput interface {
	awscdk.IResolvable
	// The creation stack of this resolvable which will be appended to errors thrown during resolution.
	//
	// This may return an array with a single informational element indicating how
	// to get this property populated, if it was skipped for performance reasons.
	// Experimental.
	CreationStack() *[]*string
	// Human readable display hint about the event pattern.
	// Experimental.
	DisplayHint() *string
	// Produce the Token's value at resolution time.
	// Experimental.
	Resolve(context awscdk.IResolveContext) interface{}
	// Return a JSON representation of a dynamic input.
	// Experimental.
	ToJSON() *string
	// Return a string representation of a dynamic input.
	// Experimental.
	ToString() *string
}

Dynamic variables that can be used in the input transformation.

Example:

var sourceQueue Queue
var targetQueue Queue

targetInputTransformation := pipes.inputTransformation_FromObject(map[string]interface{}{
	"staticField": jsii.String("static value"),
	"dynamicField": pipes.DynamicInput_fromEventPath(jsii.String("$.body.payload")),
	"pipeVariable": pipes.DynamicInput_pipeName(),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	PipeName: jsii.String("MyPipe"),
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue, &SqsTargetParameters{
		InputTransformation: targetInputTransformation,
	}),
})

Experimental.

func DynamicInput_EnrichmentArn

func DynamicInput_EnrichmentArn() DynamicInput

func DynamicInput_Event

func DynamicInput_Event() DynamicInput

func DynamicInput_EventIngestionTime

func DynamicInput_EventIngestionTime() DynamicInput

func DynamicInput_EventJson

func DynamicInput_EventJson() DynamicInput

func DynamicInput_FromEventPath

func DynamicInput_FromEventPath(path *string) DynamicInput

Value from the event payload at jsonPath. Experimental.

func DynamicInput_PipeArn

func DynamicInput_PipeArn() DynamicInput

func DynamicInput_PipeName

func DynamicInput_PipeName() DynamicInput

func DynamicInput_SourceArn

func DynamicInput_SourceArn() DynamicInput

func DynamicInput_TargetArn

func DynamicInput_TargetArn() DynamicInput

type EnrichmentParametersConfig

type EnrichmentParametersConfig struct {
	// The parameters for the enrichment target.
	// Experimental.
	EnrichmentParameters *awspipes.CfnPipe_PipeEnrichmentParametersProperty `field:"required" json:"enrichmentParameters" yaml:"enrichmentParameters"`
}

The parameters required to set up enrichment on your pipe.

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"

enrichmentParametersConfig := &EnrichmentParametersConfig{
	EnrichmentParameters: &PipeEnrichmentParametersProperty{
		HttpParameters: &PipeEnrichmentHttpParametersProperty{
			HeaderParameters: map[string]*string{
				"headerParametersKey": jsii.String("headerParameters"),
			},
			PathParameterValues: []*string{
				jsii.String("pathParameterValues"),
			},
			QueryStringParameters: map[string]*string{
				"queryStringParametersKey": jsii.String("queryStringParameters"),
			},
		},
		InputTemplate: jsii.String("inputTemplate"),
	},
}

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

Experimental.

type Filter

type Filter interface {
	IFilter
	// Filters for the source.
	// Experimental.
	Filters() *[]IFilterPattern
	// Experimental.
	SetFilters(val *[]IFilterPattern)
}

The collection of event patterns used to filter events.

Example:

var sourceQueue Queue
var targetQueue Queue

sourceFilter := pipes.NewFilter([]IFilterPattern{
	pipes.FilterPattern_FromObject(map[string]interface{}{
		"body": map[string][]*string{
			// only forward events with customerType B2B or B2C
			"customerType": []*string{
				jsii.String("B2B"),
				jsii.String("B2C"),
			},
		},
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue),
	Filter: sourceFilter,
})

Experimental.

func NewFilter

func NewFilter(filter *[]IFilterPattern) Filter

Experimental.

type FilterPattern

type FilterPattern interface {
}

Generate a filter pattern from an input.

Example:

var sourceQueue Queue
var targetQueue Queue

sourceFilter := pipes.NewFilter([]IFilterPattern{
	pipes.FilterPattern_FromObject(map[string]interface{}{
		"body": map[string][]*string{
			// only forward events with customerType B2B or B2C
			"customerType": []*string{
				jsii.String("B2B"),
				jsii.String("B2C"),
			},
		},
	}),
})

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue),
	Filter: sourceFilter,
})

Experimental.

func NewFilterPattern

func NewFilterPattern() FilterPattern

Experimental.

type FirehoseLogDestination

type FirehoseLogDestination interface {
	ILogDestination
	// Bind the log destination to the pipe.
	// Experimental.
	Bind(pipe IPipe) *LogDestinationConfig
	// Grant the pipe role to push to the log destination.
	// Experimental.
	GrantPush(grantee awsiam.IRole)
}

Firehose stream for delivery of pipe logs.

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 "github.com/aws/aws-cdk-go/awscdk"

var deliveryStream DeliveryStream

firehoseLogDestination := pipes_alpha.NewFirehoseLogDestination(deliveryStream)

Experimental.

func NewFirehoseLogDestination

func NewFirehoseLogDestination(deliveryStream awskinesisfirehose.IDeliveryStream) FirehoseLogDestination

Experimental.

type IEnrichment

type IEnrichment interface {
	// Bind this enrichment to a pipe.
	// Experimental.
	Bind(pipe IPipe) *EnrichmentParametersConfig
	// Grant the pipes role to invoke the enrichment.
	// Experimental.
	GrantInvoke(grantee awsiam.IRole)
	// The ARN of the enrichment resource.
	//
	// Length Constraints: Minimum length of 0. Maximum length of 1600.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pipes-pipe.html#cfn-pipes-pipe-enrichment
	//
	// Experimental.
	EnrichmentArn() *string
}

Enrichment step to enhance the data from the source before sending it to the target. Experimental.

type IFilter

type IFilter interface {
	// Filters for the source.
	// Experimental.
	Filters() *[]IFilterPattern
	// Experimental.
	SetFilters(f *[]IFilterPattern)
}

The collection of event patterns used to filter events. Experimental.

type IFilterPattern

type IFilterPattern interface {
	// Stringified version of the filter pattern.
	// Experimental.
	Pattern() *string
	// Experimental.
	SetPattern(p *string)
}

Filter events using an event pattern. See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-filtering.html

Experimental.

func FilterPattern_FromObject

func FilterPattern_FromObject(patternObject *map[string]interface{}) IFilterPattern

Generates a filter pattern from a JSON object. Experimental.

type IInputTransformation

type IInputTransformation interface {
	// Bind the input transformation to the pipe and returns the inputTemplate string.
	// Experimental.
	Bind(pipe IPipe) *InputTransformationConfig
}

Transform or replace the input event payload. Experimental.

type ILogDestination

type ILogDestination interface {
	// Bind the log destination to the pipe.
	// Experimental.
	Bind(pipe IPipe) *LogDestinationConfig
	// Grant the pipe role to push to the log destination.
	// Experimental.
	GrantPush(grantee awsiam.IRole)
}

Log destination base class. Experimental.

type IPipe

type IPipe interface {
	awscdk.IResource
	// The ARN of the pipe.
	// Experimental.
	PipeArn() *string
	// The name of the pipe.
	// Experimental.
	PipeName() *string
	// The role used by the pipe.
	//
	// For imported pipes it assumes that the default role is used.
	// Experimental.
	PipeRole() awsiam.IRole
}

Interface representing a created or an imported `Pipe`. Experimental.

func Pipe_FromPipeName

func Pipe_FromPipeName(scope constructs.Construct, id *string, pipeName *string) IPipe

Creates a pipe from the name of a pipe. Experimental.

type ISource

type ISource interface {
	// Bind the source to a pipe.
	// Experimental.
	Bind(pipe IPipe) *SourceConfig
	// Grant the pipe role read access to the source.
	// Experimental.
	GrantRead(grantee awsiam.IRole)
	// The ARN of the source resource.
	// Experimental.
	SourceArn() *string
}

Source interface. Experimental.

type ITarget

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

Target configuration. Experimental.

type IncludeExecutionData

type IncludeExecutionData string

Log data configuration for a pipe.

Example:

var sourceQueue Queue
var targetQueue Queue
var logGroup LogGroup

cwlLogDestination := pipes.NewCloudwatchLogsLogDestination(logGroup)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue),
	LogLevel: pipes.LogLevel_TRACE,
	LogIncludeExecutionData: []aLL{
		pipes.IncludeExecutionData_*aLL,
	},
	LogDestinations: []ILogDestination{
		cwlLogDestination,
	},
})

Experimental.

const (
	// Specify ALL to include the execution data (specifically, the payload, awsRequest, and awsResponse fields) in the log messages for this pipe.
	// Experimental.
	IncludeExecutionData_ALL IncludeExecutionData = "ALL"
)

type InputTransformation

type InputTransformation interface {
	IInputTransformation
	// Bind the input transformation to the pipe and returns the inputTemplate string.
	// Experimental.
	Bind(pipe IPipe) *InputTransformationConfig
}

Transform or replace the input event payload.

Example:

var sourceQueue Queue
var targetTopic Topic

pipeTarget := targets.NewSnsTarget(targetTopic, &SnsTargetParameters{
	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.

func InputTransformation_FromEventPath

func InputTransformation_FromEventPath(jsonPathExpression *string) InputTransformation

Creates an InputTransformation from a jsonPath expression of the input event. Experimental.

func InputTransformation_FromObject

func InputTransformation_FromObject(inputTemplate *map[string]interface{}) InputTransformation

Creates an InputTransformation from a pipe variable. Experimental.

func InputTransformation_FromText

func InputTransformation_FromText(inputTemplate *string) InputTransformation

Creates an InputTransformation from a string. Experimental.

type InputTransformationConfig

type InputTransformationConfig struct {
	// The inputTemplate that is used to transform the input event payload.
	// Experimental.
	InputTemplate *string `field:"required" json:"inputTemplate" yaml:"inputTemplate"`
}

The inputTemplate that is used to transform the input event payload with unquoted variables.

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"

inputTransformationConfig := &InputTransformationConfig{
	InputTemplate: jsii.String("inputTemplate"),
}

Experimental.

type LogDestinationConfig

type LogDestinationConfig struct {
	// Get the log destination configuration parameters.
	// Experimental.
	Parameters *LogDestinationParameters `field:"required" json:"parameters" yaml:"parameters"`
}

Log destination configuration.

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"

logDestinationConfig := &LogDestinationConfig{
	Parameters: &LogDestinationParameters{
		CloudwatchLogsLogDestination: &CloudwatchLogsLogDestinationProperty{
			LogGroupArn: jsii.String("logGroupArn"),
		},
		FirehoseLogDestination: &FirehoseLogDestinationProperty{
			DeliveryStreamArn: jsii.String("deliveryStreamArn"),
		},
		S3LogDestination: &S3LogDestinationProperty{
			BucketName: jsii.String("bucketName"),
			BucketOwner: jsii.String("bucketOwner"),
			OutputFormat: jsii.String("outputFormat"),
			Prefix: jsii.String("prefix"),
		},
	},
}

Experimental.

type LogDestinationParameters

type LogDestinationParameters struct {
	// The logging configuration settings for the pipe.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipelogconfiguration.html#cfn-pipes-pipe-pipelogconfiguration-cloudwatchlogslogdestination
	//
	// Default: - none.
	//
	// Experimental.
	CloudwatchLogsLogDestination *awspipes.CfnPipe_CloudwatchLogsLogDestinationProperty `field:"optional" json:"cloudwatchLogsLogDestination" yaml:"cloudwatchLogsLogDestination"`
	// The Amazon Data Firehose logging configuration settings for the pipe.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipelogconfiguration.html#cfn-pipes-pipe-pipelogconfiguration-firehoselogdestination
	//
	// Default: - none.
	//
	// Experimental.
	FirehoseLogDestination *awspipes.CfnPipe_FirehoseLogDestinationProperty `field:"optional" json:"firehoseLogDestination" yaml:"firehoseLogDestination"`
	// The Amazon S3 logging configuration settings for the pipe.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipelogconfiguration.html#cfn-pipes-pipe-pipelogconfiguration-s3logdestination
	//
	// Default: - none.
	//
	// Experimental.
	S3LogDestination *awspipes.CfnPipe_S3LogDestinationProperty `field:"optional" json:"s3LogDestination" yaml:"s3LogDestination"`
}

Log destination configuration parameters.

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"

logDestinationParameters := &LogDestinationParameters{
	CloudwatchLogsLogDestination: &CloudwatchLogsLogDestinationProperty{
		LogGroupArn: jsii.String("logGroupArn"),
	},
	FirehoseLogDestination: &FirehoseLogDestinationProperty{
		DeliveryStreamArn: jsii.String("deliveryStreamArn"),
	},
	S3LogDestination: &S3LogDestinationProperty{
		BucketName: jsii.String("bucketName"),
		BucketOwner: jsii.String("bucketOwner"),
		OutputFormat: jsii.String("outputFormat"),
		Prefix: jsii.String("prefix"),
	},
}

Experimental.

type LogLevel

type LogLevel string

Log configuration for a pipe.

Example:

var sourceQueue Queue
var targetQueue Queue
var logGroup LogGroup

cwlLogDestination := pipes.NewCloudwatchLogsLogDestination(logGroup)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue),
	LogLevel: pipes.LogLevel_TRACE,
	LogIncludeExecutionData: []aLL{
		pipes.IncludeExecutionData_*aLL,
	},
	LogDestinations: []ILogDestination{
		cwlLogDestination,
	},
})

See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs.html#eb-pipes-logs-level

Experimental.

const (
	// No logging.
	// Experimental.
	LogLevel_OFF LogLevel = "OFF"
	// Log only errors.
	// Experimental.
	LogLevel_ERROR LogLevel = "ERROR"
	// Log errors, warnings, and info.
	// Experimental.
	LogLevel_INFO LogLevel = "INFO"
	// Log everything.
	// Experimental.
	LogLevel_TRACE LogLevel = "TRACE"
)

type Pipe

type Pipe interface {
	awscdk.Resource
	IPipe
	// The environment this resource belongs to.
	//
	// For resources that are created and managed in a Stack (those created by
	// creating new class instances like `new Role()`, `new Bucket()`, etc.), this
	// is always the same as the environment of the stack they belong to.
	//
	// For referenced resources (those obtained from referencing methods like
	// `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
	// different than the stack they were imported into.
	// Experimental.
	Env() *interfaces.ResourceEnvironment
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ARN of the pipe.
	// Experimental.
	PipeArn() *string
	// The name of the pipe.
	// Experimental.
	PipeName() *string
	// The role used by the pipe.
	//
	// For imported pipes it assumes that the default role is used.
	// Experimental.
	PipeRole() awsiam.IRole
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Applies one or more mixins to this construct.
	//
	// Mixins are applied in order. The list of constructs is captured at the
	// start of the call, so constructs added by a mixin will not be visited.
	// Use multiple `with()` calls if subsequent mixins should apply to added
	// constructs.
	// Experimental.
	With(mixins ...constructs.IMixin) constructs.IConstruct
}

Amazon EventBridge Pipes connects sources to targets.

Pipes are intended for point-to-point integrations between supported sources and targets, with support for advanced transformations and enrichment.

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,
})

See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html

Experimental.

func NewPipe

func NewPipe(scope constructs.Construct, id *string, props *PipeProps) Pipe

Experimental.

type PipeProps

type PipeProps struct {
	// The source of the pipe.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-source.html
	//
	// Experimental.
	Source ISource `field:"required" json:"source" yaml:"source"`
	// The target of the pipe.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html
	//
	// Experimental.
	Target ITarget `field:"required" json:"target" yaml:"target"`
	// A description of the pipe displayed in the AWS console.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pipes-pipe.html#cfn-pipes-pipe-description
	//
	// Default: - no description.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The desired state of the pipe.
	//
	// If the state is set to STOPPED, the pipe will not process events.
	// See: https://docs.aws.amazon.com/eventbridge/latest/pipes-reference/API_Pipe.html#eventbridge-Type-Pipe-DesiredState
	//
	// Default: - DesiredState.RUNNING
	//
	// Experimental.
	DesiredState DesiredState `field:"optional" json:"desiredState" yaml:"desiredState"`
	// Enrichment step to enhance the data from the source before sending it to the target.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/pipes-enrichment.html
	//
	// Default: - no enrichment.
	//
	// Experimental.
	Enrichment IEnrichment `field:"optional" json:"enrichment" yaml:"enrichment"`
	// The filter pattern for the pipe source.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-filtering.html
	//
	// Default: - no filter.
	//
	// Experimental.
	Filter IFilter `field:"optional" json:"filter" yaml:"filter"`
	// The AWS KMS customer managed key to encrypt pipe data.
	// Default: undefined - AWS managed key is used.
	//
	// Experimental.
	KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"`
	// Destinations for the logs.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs.html
	//
	// Default: - no logs.
	//
	// Experimental.
	LogDestinations *[]ILogDestination `field:"optional" json:"logDestinations" yaml:"logDestinations"`
	// Whether the execution data (specifically, the `payload` , `awsRequest` , and `awsResponse` fields) is included in the log messages for this pipe.
	//
	// This applies to all log destinations for the pipe.
	//
	// For more information, see [Including execution data in logs](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs.html#eb-pipes-logs-execution-data) and the [message schema](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs-schema.html) in the *Amazon EventBridge User Guide* .
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipelogconfiguration.html#cfn-pipes-pipe-pipelogconfiguration-includeexecutiondata
	//
	// Default: - none.
	//
	// Experimental.
	LogIncludeExecutionData *[]IncludeExecutionData `field:"optional" json:"logIncludeExecutionData" yaml:"logIncludeExecutionData"`
	// The level of logging detail to include.
	//
	// This applies to all log destinations for the pipe.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs.html
	//
	// Default: - LogLevel.ERROR
	//
	// Experimental.
	LogLevel LogLevel `field:"optional" json:"logLevel" yaml:"logLevel"`
	// Name of the pipe in the AWS console.
	// Default: - automatically generated name.
	//
	// Experimental.
	PipeName *string `field:"optional" json:"pipeName" yaml:"pipeName"`
	// The role used by the pipe which has permissions to read from the source and write to the target.
	//
	// If an enriched target is used, the role also have permissions to call the enriched target.
	// If no role is provided, a role will be created.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-permissions.html
	//
	// Default: - a new role will be created.
	//
	// Experimental.
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// The list of key-value pairs to associate with the pipe.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pipes-pipe.html#cfn-pipes-pipe-tags
	//
	// Default: - no tags.
	//
	// Experimental.
	Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"`
}

Properties for a pipe.

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 PipeVariable

type PipeVariable string

Reserved pipe variables. See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-input-transformation.html#input-transform-reserved

Experimental.

const (
	// The Amazon Resource Name (ARN) of the pipe.
	// Experimental.
	PipeVariable_ARN PipeVariable = "ARN"
	// The name of the pipe.
	// Experimental.
	PipeVariable_NAME PipeVariable = "NAME"
	// The ARN of the event source of the pipe.
	// Experimental.
	PipeVariable_SOURCE_ARN PipeVariable = "SOURCE_ARN"
	// The ARN of the enrichment of the pipe.
	// Experimental.
	PipeVariable_ENRICHMENT_ARN PipeVariable = "ENRICHMENT_ARN"
	// The ARN of the target of the pipe.
	// Experimental.
	PipeVariable_TARGET_ARN PipeVariable = "TARGET_ARN"
	// The time at which the event was received by the input transformer.
	//
	// This is an ISO 8601 timestamp. This time is different for the enrichment input transformer and the target input transformer, depending on when the enrichment completed processing the event.
	// Experimental.
	PipeVariable_EVENT_INGESTION_TIME PipeVariable = "EVENT_INGESTION_TIME"
	// The event as received by the input transformer.
	// Experimental.
	PipeVariable_EVENT PipeVariable = "EVENT"
	// The same as aws.pipes.event, but the variable only has a value if the original payload, either from the source or returned by the enrichment, is JSON. If the pipe has an encoded field, such as the Amazon SQS body field or the Kinesis data, those fields are decoded and turned into valid JSON. Because it isn't escaped, the variable can only be used as a value for a JSON field. For more information, see Implicit body data parsing.
	// Experimental.
	PipeVariable_EVENT_JSON PipeVariable = "EVENT_JSON"
)

type S3LogDestination

type S3LogDestination interface {
	ILogDestination
	// Bind the log destination to the pipe.
	// Experimental.
	Bind(pipe IPipe) *LogDestinationConfig
	// Grant the pipe role to push to the log destination.
	// Experimental.
	GrantPush(grantee awsiam.IRole)
}

S3 bucket for delivery of pipe logs.

Example:

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

var bucket Bucket

s3LogDestination := pipes_alpha.NewS3LogDestination(&S3LogDestinationProps{
	Bucket: bucket,

	// the properties below are optional
	BucketOwner: jsii.String("bucketOwner"),
	OutputFormat: pipes_alpha.S3OutputFormat_PLAIN,
	Prefix: jsii.String("prefix"),
})

Experimental.

func NewS3LogDestination

func NewS3LogDestination(parameters *S3LogDestinationProps) S3LogDestination

Experimental.

type S3LogDestinationProps

type S3LogDestinationProps struct {
	// The S3 bucket to deliver the log records for the pipe.
	//
	// The bucket can be in the same or a different AWS Account. If the bucket is in
	// a different account, specify `bucketOwner`. You must also allow access to the
	// Pipes role in the bucket policy of the cross-account bucket.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-s3logdestination.html#cfn-pipes-pipe-s3logdestination-bucketname
	//
	// Experimental.
	Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"`
	// The AWS Account that owns the Amazon S3 bucket to which EventBridge delivers the log records for the pipe.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-s3logdestination.html#cfn-pipes-pipe-s3logdestination-bucketowner
	//
	// Default: - account ID derived from `bucket`.
	//
	// Experimental.
	BucketOwner *string `field:"optional" json:"bucketOwner" yaml:"bucketOwner"`
	// The format for the log records.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-s3logdestination.html#cfn-pipes-pipe-s3logdestination-outputformat
	//
	// Default: `S3OutputFormat.JSON`
	//
	// Experimental.
	OutputFormat S3OutputFormat `field:"optional" json:"outputFormat" yaml:"outputFormat"`
	// The prefix text with which to begin Amazon S3 log object names.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-s3logdestination.html#cfn-pipes-pipe-s3logdestination-prefix
	//
	// Default: - no prefix.
	//
	// Experimental.
	Prefix *string `field:"optional" json:"prefix" yaml:"prefix"`
}

Properties for `S3LogDestination`.

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 "github.com/aws/aws-cdk-go/awscdk"

var bucket Bucket

s3LogDestinationProps := &S3LogDestinationProps{
	Bucket: bucket,

	// the properties below are optional
	BucketOwner: jsii.String("bucketOwner"),
	OutputFormat: pipes_alpha.S3OutputFormat_PLAIN,
	Prefix: jsii.String("prefix"),
}

Experimental.

type S3OutputFormat

type S3OutputFormat string

Log format for `S3LogDestination` logging configuration. See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-s3logdestination.html#cfn-pipes-pipe-s3logdestination-outputformat

Experimental.

const (
	// Plain text.
	// Experimental.
	S3OutputFormat_PLAIN S3OutputFormat = "PLAIN"
	// JSON.
	// Experimental.
	S3OutputFormat_JSON S3OutputFormat = "JSON"
	// W3C extended log file format.
	// See: https://www.w3.org/TR/WD-logfile
	//
	// Experimental.
	S3OutputFormat_W3C S3OutputFormat = "W3C"
)

type SourceConfig

type SourceConfig struct {
	// The parameters required to set up a source for your pipe.
	// Default: - none.
	//
	// Experimental.
	SourceParameters *SourceParameters `field:"optional" json:"sourceParameters" yaml:"sourceParameters"`
}

Source properties.

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"

sourceConfig := &SourceConfig{
	SourceParameters: &SourceParameters{
		ActiveMqBrokerParameters: &PipeSourceActiveMQBrokerParametersProperty{
			Credentials: &MQBrokerAccessCredentialsProperty{
				BasicAuth: jsii.String("basicAuth"),
			},
			QueueName: jsii.String("queueName"),

			// the properties below are optional
			BatchSize: jsii.Number(123),
			MaximumBatchingWindowInSeconds: jsii.Number(123),
		},
		DynamoDbStreamParameters: &PipeSourceDynamoDBStreamParametersProperty{
			StartingPosition: jsii.String("startingPosition"),

			// the properties below are optional
			BatchSize: jsii.Number(123),
			DeadLetterConfig: &DeadLetterConfigProperty{
				Arn: jsii.String("arn"),
			},
			MaximumBatchingWindowInSeconds: jsii.Number(123),
			MaximumRecordAgeInSeconds: jsii.Number(123),
			MaximumRetryAttempts: jsii.Number(123),
			OnPartialBatchItemFailure: jsii.String("onPartialBatchItemFailure"),
			ParallelizationFactor: jsii.Number(123),
		},
		KinesisStreamParameters: &PipeSourceKinesisStreamParametersProperty{
			StartingPosition: jsii.String("startingPosition"),

			// the properties below are optional
			BatchSize: jsii.Number(123),
			DeadLetterConfig: &DeadLetterConfigProperty{
				Arn: jsii.String("arn"),
			},
			MaximumBatchingWindowInSeconds: jsii.Number(123),
			MaximumRecordAgeInSeconds: jsii.Number(123),
			MaximumRetryAttempts: jsii.Number(123),
			OnPartialBatchItemFailure: jsii.String("onPartialBatchItemFailure"),
			ParallelizationFactor: jsii.Number(123),
			StartingPositionTimestamp: jsii.String("startingPositionTimestamp"),
		},
		ManagedStreamingKafkaParameters: &PipeSourceManagedStreamingKafkaParametersProperty{
			TopicName: jsii.String("topicName"),

			// the properties below are optional
			BatchSize: jsii.Number(123),
			ConsumerGroupId: jsii.String("consumerGroupId"),
			Credentials: &MSKAccessCredentialsProperty{
				ClientCertificateTlsAuth: jsii.String("clientCertificateTlsAuth"),
				SaslScram512Auth: jsii.String("saslScram512Auth"),
			},
			MaximumBatchingWindowInSeconds: jsii.Number(123),
			StartingPosition: jsii.String("startingPosition"),
		},
		RabbitMqBrokerParameters: &PipeSourceRabbitMQBrokerParametersProperty{
			Credentials: &MQBrokerAccessCredentialsProperty{
				BasicAuth: jsii.String("basicAuth"),
			},
			QueueName: jsii.String("queueName"),

			// the properties below are optional
			BatchSize: jsii.Number(123),
			MaximumBatchingWindowInSeconds: jsii.Number(123),
			VirtualHost: jsii.String("virtualHost"),
		},
		SelfManagedKafkaParameters: &PipeSourceSelfManagedKafkaParametersProperty{
			TopicName: jsii.String("topicName"),

			// the properties below are optional
			AdditionalBootstrapServers: []*string{
				jsii.String("additionalBootstrapServers"),
			},
			BatchSize: jsii.Number(123),
			ConsumerGroupId: jsii.String("consumerGroupId"),
			Credentials: &SelfManagedKafkaAccessConfigurationCredentialsProperty{
				BasicAuth: jsii.String("basicAuth"),
				ClientCertificateTlsAuth: jsii.String("clientCertificateTlsAuth"),
				SaslScram256Auth: jsii.String("saslScram256Auth"),
				SaslScram512Auth: jsii.String("saslScram512Auth"),
			},
			MaximumBatchingWindowInSeconds: jsii.Number(123),
			ServerRootCaCertificate: jsii.String("serverRootCaCertificate"),
			StartingPosition: jsii.String("startingPosition"),
			Vpc: &SelfManagedKafkaAccessConfigurationVpcProperty{
				SecurityGroup: []*string{
					jsii.String("securityGroup"),
				},
				Subnets: []*string{
					jsii.String("subnets"),
				},
			},
		},
		SqsQueueParameters: &PipeSourceSqsQueueParametersProperty{
			BatchSize: jsii.Number(123),
			MaximumBatchingWindowInSeconds: jsii.Number(123),
		},
	},
}

Experimental.

type SourceParameters

type SourceParameters struct {
	// ActiveMQBroker configuration parameters.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-mq.html
	//
	// Default: - none.
	//
	// Experimental.
	ActiveMqBrokerParameters *awspipes.CfnPipe_PipeSourceActiveMQBrokerParametersProperty `field:"optional" json:"activeMqBrokerParameters" yaml:"activeMqBrokerParameters"`
	// DynamoDB stream configuration parameters.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-dynamodb.html
	//
	// Default: - none.
	//
	// Experimental.
	DynamoDbStreamParameters *awspipes.CfnPipe_PipeSourceDynamoDBStreamParametersProperty `field:"optional" json:"dynamoDbStreamParameters" yaml:"dynamoDbStreamParameters"`
	// Kinesis stream configuration parameters.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-kinesis.html
	//
	// Default: - none.
	//
	// Experimental.
	KinesisStreamParameters *awspipes.CfnPipe_PipeSourceKinesisStreamParametersProperty `field:"optional" json:"kinesisStreamParameters" yaml:"kinesisStreamParameters"`
	// Managed streaming Kafka configuration parameters.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-msk.html
	//
	// Default: - none.
	//
	// Experimental.
	ManagedStreamingKafkaParameters *awspipes.CfnPipe_PipeSourceManagedStreamingKafkaParametersProperty `field:"optional" json:"managedStreamingKafkaParameters" yaml:"managedStreamingKafkaParameters"`
	// RabbitMQ broker configuration parameters.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-mq.html
	//
	// Default: - none.
	//
	// Experimental.
	RabbitMqBrokerParameters *awspipes.CfnPipe_PipeSourceRabbitMQBrokerParametersProperty `field:"optional" json:"rabbitMqBrokerParameters" yaml:"rabbitMqBrokerParameters"`
	// Self-managed Kafka configuration parameters.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-kafka.html
	//
	// Default: - none.
	//
	// Experimental.
	SelfManagedKafkaParameters *awspipes.CfnPipe_PipeSourceSelfManagedKafkaParametersProperty `field:"optional" json:"selfManagedKafkaParameters" yaml:"selfManagedKafkaParameters"`
	// SQS queue configuration parameters.
	// See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-sqs.html
	//
	// Default: - none.
	//
	// Experimental.
	SqsQueueParameters *awspipes.CfnPipe_PipeSourceSqsQueueParametersProperty `field:"optional" json:"sqsQueueParameters" yaml:"sqsQueueParameters"`
}

Source properties.

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/eventbridge/latest/userguide/eb-pipes-event-source.html

Experimental.

type SourceWithDeadLetterTarget

type SourceWithDeadLetterTarget interface {
	ISource
	// The dead-letter SQS queue or SNS topic.
	// Experimental.
	DeadLetterTarget() interface{}
	// The ARN of the source resource.
	// Experimental.
	SourceArn() *string
	// Bind the source to a pipe.
	// Experimental.
	Bind(pipe IPipe) *SourceConfig
	// Retrieves the ARN from the dead-letter SQS queue or SNS topic.
	// Experimental.
	GetDeadLetterTargetArn(deadLetterTarget interface{}) *string
	// Grants the pipe role permission to publish to the dead-letter target.
	//
	// [disable-awslint:no-grants].
	// Experimental.
	GrantPush(grantee awsiam.IRole, deadLetterTarget interface{})
	// Grant the pipe role read access to the source.
	// Experimental.
	GrantRead(grantee awsiam.IRole)
}

Sources that support a dead-letter target. Experimental.

type TargetConfig

type TargetConfig struct {
	// The parameters required to set up a target for your pipe.
	// Experimental.
	TargetParameters *awspipes.CfnPipe_PipeTargetParametersProperty `field:"required" json:"targetParameters" yaml:"targetParameters"`
}

Target config properties.

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"

targetConfig := &TargetConfig{
	TargetParameters: &PipeTargetParametersProperty{
		BatchJobParameters: &PipeTargetBatchJobParametersProperty{
			JobDefinition: jsii.String("jobDefinition"),
			JobName: jsii.String("jobName"),

			// the properties below are optional
			ArrayProperties: &BatchArrayPropertiesProperty{
				Size: jsii.Number(123),
			},
			ContainerOverrides: &BatchContainerOverridesProperty{
				Command: []*string{
					jsii.String("command"),
				},
				Environment: []interface{}{
					&BatchEnvironmentVariableProperty{
						Name: jsii.String("name"),
						Value: jsii.String("value"),
					},
				},
				InstanceType: jsii.String("instanceType"),
				ResourceRequirements: []interface{}{
					&BatchResourceRequirementProperty{
						Type: jsii.String("type"),
						Value: jsii.String("value"),
					},
				},
			},
			DependsOn: []interface{}{
				&BatchJobDependencyProperty{
					JobId: jsii.String("jobId"),
					Type: jsii.String("type"),
				},
			},
			Parameters: map[string]*string{
				"parametersKey": jsii.String("parameters"),
			},
			RetryStrategy: &BatchRetryStrategyProperty{
				Attempts: jsii.Number(123),
			},
		},
		CloudWatchLogsParameters: &PipeTargetCloudWatchLogsParametersProperty{
			LogStreamName: jsii.String("logStreamName"),
			Timestamp: jsii.String("timestamp"),
		},
		EcsTaskParameters: &PipeTargetEcsTaskParametersProperty{
			TaskDefinitionArn: jsii.String("taskDefinitionArn"),

			// the properties below are optional
			CapacityProviderStrategy: []interface{}{
				&CapacityProviderStrategyItemProperty{
					CapacityProvider: jsii.String("capacityProvider"),

					// the properties below are optional
					Base: jsii.Number(123),
					Weight: jsii.Number(123),
				},
			},
			EnableEcsManagedTags: jsii.Boolean(false),
			EnableExecuteCommand: jsii.Boolean(false),
			Group: jsii.String("group"),
			LaunchType: jsii.String("launchType"),
			NetworkConfiguration: &NetworkConfigurationProperty{
				AwsvpcConfiguration: &AwsVpcConfigurationProperty{
					Subnets: []*string{
						jsii.String("subnets"),
					},

					// the properties below are optional
					AssignPublicIp: jsii.String("assignPublicIp"),
					SecurityGroups: []*string{
						jsii.String("securityGroups"),
					},
				},
			},
			Overrides: &EcsTaskOverrideProperty{
				ContainerOverrides: []interface{}{
					&EcsContainerOverrideProperty{
						Command: []*string{
							jsii.String("command"),
						},
						Cpu: jsii.Number(123),
						Environment: []interface{}{
							&EcsEnvironmentVariableProperty{
								Name: jsii.String("name"),
								Value: jsii.String("value"),
							},
						},
						EnvironmentFiles: []interface{}{
							&EcsEnvironmentFileProperty{
								Type: jsii.String("type"),
								Value: jsii.String("value"),
							},
						},
						Memory: jsii.Number(123),
						MemoryReservation: jsii.Number(123),
						Name: jsii.String("name"),
						ResourceRequirements: []interface{}{
							&EcsResourceRequirementProperty{
								Type: jsii.String("type"),
								Value: jsii.String("value"),
							},
						},
					},
				},
				Cpu: jsii.String("cpu"),
				EphemeralStorage: &EcsEphemeralStorageProperty{
					SizeInGiB: jsii.Number(123),
				},
				ExecutionRoleArn: jsii.String("executionRoleArn"),
				InferenceAcceleratorOverrides: []interface{}{
					&EcsInferenceAcceleratorOverrideProperty{
						DeviceName: jsii.String("deviceName"),
						DeviceType: jsii.String("deviceType"),
					},
				},
				Memory: jsii.String("memory"),
				TaskRoleArn: jsii.String("taskRoleArn"),
			},
			PlacementConstraints: []interface{}{
				&PlacementConstraintProperty{
					Expression: jsii.String("expression"),
					Type: jsii.String("type"),
				},
			},
			PlacementStrategy: []interface{}{
				&PlacementStrategyProperty{
					Field: jsii.String("field"),
					Type: jsii.String("type"),
				},
			},
			PlatformVersion: jsii.String("platformVersion"),
			PropagateTags: jsii.String("propagateTags"),
			ReferenceId: jsii.String("referenceId"),
			Tags: []CfnTag{
				&CfnTag{
					Key: jsii.String("key"),
					Value: jsii.String("value"),
				},
			},
			TaskCount: jsii.Number(123),
		},
		EventBridgeEventBusParameters: &PipeTargetEventBridgeEventBusParametersProperty{
			DetailType: jsii.String("detailType"),
			EndpointId: jsii.String("endpointId"),
			Resources: []*string{
				jsii.String("resources"),
			},
			Source: jsii.String("source"),
			Time: jsii.String("time"),
		},
		HttpParameters: &PipeTargetHttpParametersProperty{
			HeaderParameters: map[string]*string{
				"headerParametersKey": jsii.String("headerParameters"),
			},
			PathParameterValues: []*string{
				jsii.String("pathParameterValues"),
			},
			QueryStringParameters: map[string]*string{
				"queryStringParametersKey": jsii.String("queryStringParameters"),
			},
		},
		InputTemplate: jsii.String("inputTemplate"),
		KinesisStreamParameters: &PipeTargetKinesisStreamParametersProperty{
			PartitionKey: jsii.String("partitionKey"),
		},
		LambdaFunctionParameters: &PipeTargetLambdaFunctionParametersProperty{
			InvocationType: jsii.String("invocationType"),
		},
		RedshiftDataParameters: &PipeTargetRedshiftDataParametersProperty{
			Database: jsii.String("database"),
			Sqls: []*string{
				jsii.String("sqls"),
			},

			// the properties below are optional
			DbUser: jsii.String("dbUser"),
			SecretManagerArn: jsii.String("secretManagerArn"),
			StatementName: jsii.String("statementName"),
			WithEvent: jsii.Boolean(false),
		},
		SageMakerPipelineParameters: &PipeTargetSageMakerPipelineParametersProperty{
			PipelineParameterList: []interface{}{
				&SageMakerPipelineParameterProperty{
					Name: jsii.String("name"),
					Value: jsii.String("value"),
				},
			},
		},
		SqsQueueParameters: &PipeTargetSqsQueueParametersProperty{
			MessageDeduplicationId: jsii.String("messageDeduplicationId"),
			MessageGroupId: jsii.String("messageGroupId"),
		},
		StepFunctionStateMachineParameters: &PipeTargetStateMachineParametersProperty{
			InvocationType: jsii.String("invocationType"),
		},
		TimestreamParameters: &PipeTargetTimestreamParametersProperty{
			DimensionMappings: []interface{}{
				&DimensionMappingProperty{
					DimensionName: jsii.String("dimensionName"),
					DimensionValue: jsii.String("dimensionValue"),
					DimensionValueType: jsii.String("dimensionValueType"),
				},
			},
			TimeValue: jsii.String("timeValue"),
			VersionValue: jsii.String("versionValue"),

			// the properties below are optional
			EpochTimeUnit: jsii.String("epochTimeUnit"),
			MultiMeasureMappings: []interface{}{
				&MultiMeasureMappingProperty{
					MultiMeasureAttributeMappings: []interface{}{
						&MultiMeasureAttributeMappingProperty{
							MeasureValue: jsii.String("measureValue"),
							MeasureValueType: jsii.String("measureValueType"),
							MultiMeasureAttributeName: jsii.String("multiMeasureAttributeName"),
						},
					},
					MultiMeasureName: jsii.String("multiMeasureName"),
				},
			},
			SingleMeasureMappings: []interface{}{
				&SingleMeasureMappingProperty{
					MeasureName: jsii.String("measureName"),
					MeasureValue: jsii.String("measureValue"),
					MeasureValueType: jsii.String("measureValueType"),
				},
			},
			TimeFieldType: jsii.String("timeFieldType"),
			TimestampFormat: jsii.String("timestampFormat"),
		},
	},
}

Experimental.

type TargetParameter

type TargetParameter interface {
}

Define dynamic target parameters.

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"

targetParameter := pipes_alpha.NewTargetParameter()

Experimental.

func NewTargetParameter

func NewTargetParameter() TargetParameter

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