Skip to content
v2.274.0

Experimental

@aws-cdk/aws-pipes-targets-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

ApiDestinationTarget Class ​

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

Example ​

ts
declare const sourceQueue: sqs.Queue;
declare const dest: events.ApiDestination;

const apiTarget = new targets.ApiDestinationTarget(dest);

const pipe = new pipes.Pipe(this, 'Pipe', {
    source: new SqsSource(sourceQueue),
    target: apiTarget,
});
python
# source_queue: sqs.Queue
# dest: events.ApiDestination


api_target = targets.ApiDestinationTarget(dest)

pipe = pipes.Pipe(self, "Pipe",
    source=SqsSource(source_queue),
    target=api_target
)
java
Queue sourceQueue;
ApiDestination dest;


ApiDestinationTarget apiTarget = new ApiDestinationTarget(dest);

Pipe pipe = Pipe.Builder.create(this, "Pipe")
        .source(new SqsSource(sourceQueue))
        .target(apiTarget)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Pipes.Targets.Alpha
Queue sourceQueue;
ApiDestination dest;


var apiTarget = new ApiDestinationTarget(dest);

var pipe = new Pipe(this, "Pipe", new PipeProps {
    Source = new SqsSource(sourceQueue),
    Target = apiTarget
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkpipestargetsalpha/v2
var sourceQueue Queue
var dest ApiDestination


apiTarget := targets.NewApiDestinationTarget(dest)

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

Initializer ​

ts
new ApiDestinationTarget(destination: IApiDestination, parameters?: ApiDestinationTargetParameters)
python
ApiDestinationTarget(destination: IApiDestination, parameters: typing.Optional[ApiDestinationTargetParameters] = None)
java
new ApiDestinationTarget(IApiDestination destination, ApiDestinationTargetParameters parameters)
csharp
new ApiDestinationTarget(IApiDestination destination, ApiDestinationTargetParameters? parameters = null)
go
NewApiDestinationTarget(Destination IApiDestination, Parameters ApiDestinationTargetParameters)

Properties ​

targetArnstringtarget_arnstrtargetArnStringTargetArnstringTargetArn*stringrequired#
The ARN of the target resource.

Methods ​

bind(pipe: IPipe): TargetConfigdef bind(self, pipe: IPipe) -> TargetConfigpublic TargetConfig bind(IPipe pipe)public TargetConfig Bind(IPipe pipe)func Bind(Pipe IPipe) TargetConfig#
Bind this target to a pipe.
grantPush(grantee: IRole): voiddef grant_push(self, grantee: IRole) -> Nonepublic void grantPush(IRole grantee)public void GrantPush(IRole grantee)func GrantPush(Grantee IRole)#
Grant the pipe role to push to the target.