class ApiGatewayTarget
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Pipes.Targets.Alpha.ApiGatewayTarget |
![]() | github.com/aws/aws-cdk-go/awscdkpipestargetsalpha/v2#ApiGatewayTarget |
![]() | software.amazon.awscdk.services.pipes.targets.alpha.ApiGatewayTarget |
![]() | aws_cdk.aws_pipes_targets_alpha.ApiGatewayTarget |
![]() | @aws-cdk/aws-pipes-targets-alpha ยป ApiGatewayTarget |
Implements
ITarget
An EventBridge Pipes target that sends messages to an EventBridge API destination.
Example
declare const sourceQueue: sqs.Queue;
const fn = new lambda.Function( this, 'MyFunc', {
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_LATEST,
code: lambda.Code.fromInline( 'exports.handler = e => {}' ),
});
const restApi = new api.LambdaRestApi( this, 'MyRestAPI', { handler: fn } );
const apiTarget = new targets.ApiGatewayTarget(restApi);
const pipe = new pipes.Pipe(this, 'Pipe', {
source: new SqsSource(sourceQueue),
target: apiTarget,
});
Initializer
new ApiGatewayTarget(restApi: IRestApi, parameters?: ApiGatewayTargetParameters)
Parameters
- restApi
IRest
Api - parameters
Api
Gateway Target Parameters
Properties
Name | Type | Description |
---|---|---|
target | string | The ARN of the target resource. |
targetArn
Type:
string
The ARN of the target resource.
Methods
Name | Description |
---|---|
bind(pipe) | Bind this target to a pipe. |
grant | Grant the pipe role to push to the target. |
bind(pipe)
public bind(pipe: IPipe): TargetConfig
Parameters
- pipe
IPipe
Returns
Bind this target to a pipe.
grantPush(grantee)
public grantPush(grantee: IRole): void
Parameters
- grantee
IRole
Grant the pipe role to push to the target.