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

API Gateway REST API target properties.

Used as props by: [ApiGatewayTarget](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-pipes-targets-alpha.ApiGatewayTarget.html)

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

## Example

TypeScript:

```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, {
  inputTransformation: pipes.InputTransformation.fromObject({ body: "👀" }),
});

const pipe = new pipes.Pipe(this, 'Pipe', {
    source: new SqsSource(sourceQueue),
    target: apiTarget,
});
```

Python:

```python
# source_queue: sqs.Queue

fn = lambda_.Function(self, "MyFunc",
    handler="index.handler",
    runtime=lambda_.Runtime.NODEJS_LATEST,
    code=lambda_.Code.from_inline("exports.handler = e => {}")
)

rest_api = api.LambdaRestApi(self, "MyRestAPI", handler=fn)
api_target = targets.ApiGatewayTarget(rest_api,
    input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
)

pipe = pipes.Pipe(self, "Pipe",
    source=SqsSource(source_queue),
    target=api_target
)
```

Java:

```java
Queue sourceQueue;

Function fn = Function.Builder.create(this, "MyFunc")
        .handler("index.handler")
        .runtime(Runtime.NODEJS_LATEST)
        .code(Code.fromInline("exports.handler = e => {}"))
        .build();

LambdaRestApi restApi = LambdaRestApi.Builder.create(this, "MyRestAPI").handler(fn).build();
ApiGatewayTarget apiTarget = ApiGatewayTarget.Builder.create(restApi)
        .inputTransformation(InputTransformation.fromObject(Map.of("body", "👀")))
        .build();

Pipe pipe = Pipe.Builder.create(this, "Pipe")
        .source(new SqsSource(sourceQueue))
        .target(apiTarget)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.Pipes.Targets.Alpha
Queue sourceQueue;

var fn = new Function(this, "MyFunc", new FunctionProps {
    Handler = "index.handler",
    Runtime = Runtime.NODEJS_LATEST,
    Code = Code.FromInline("exports.handler = e => {}")
});

var restApi = new LambdaRestApi(this, "MyRestAPI", new LambdaRestApiProps { Handler = fn });
var apiTarget = new ApiGatewayTarget(restApi, new ApiGatewayTargetParameters {
    InputTransformation = InputTransformation.FromObject(new Dictionary<string, object> { { "body", "👀" } })
});

var pipe = new Pipe(this, "Pipe", new PipeProps {
    Source = new SqsSource(sourceQueue),
    Target = apiTarget
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkpipestargetsalpha/v2
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,
})
```

## Properties

- `headerParameters`: { [key: string]: string } = none — The headers to send as part of the request invoking the API Gateway REST API.

- `inputTransformation`: [IInputTransformation](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-pipes-alpha.IInputTransformation.html) = none — The input transformation to apply to the message before sending it to the target.

- `method`: string — The method for API Gateway resource.

  **Default:** '*' - ANY

- `path`: string = '/' — The path for the API Gateway resource.

- `pathParameterValues`: string[] = none — The path parameter values used to populate the API Gateway REST API path wildcards ("*").

- `queryStringParameters`: { [key: string]: string } = none — The query string keys/values that need to be sent as part of request invoking the API Gateway REST API.

- `stage`: string — The deployment stage for the API Gateway resource.

  **Default:** the value of `deploymentStage.stageName` of target API Gateway resource.
