> **Experimental**
>
> `@aws-cdk/aws-pipes-targets-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# ApiGatewayTarget

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

Extends: ApiGatewayTarget
Implements: ITarget

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/api-gateway.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-pipes-targets-alpha/lib/api-gateway.ts#L67)

## Example

```ts
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

```ts
new ApiGatewayTarget(restApi: IRestApi, parameters?: ApiGatewayTargetParameters)
```

## Properties

- `targetArn`: string (required) — The ARN of the target resource.

## Methods

- `bind(pipe: IPipe): TargetConfig` — Bind this target to a pipe.

- `grantPush(grantee: IRole): void` — Grant the pipe role to push to the target.
