# GatewayTargetApiGatewayProps

Properties for creating an API Gateway-based Gateway Target.

Extends: GatewayTargetApiGatewayProps
Extends: GatewayTargetCommonProps

- Source: [`aws-bedrockagentcore/lib/gateway/targets/target.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-bedrockagentcore/lib/gateway/targets/target.ts#L181)
- Type last changed: v2.255.0 · 19 May 2026

## Example

```ts
const gateway = new agentcore.Gateway(this, "MyGateway", {
  gatewayName: "my-gateway",
});

const api = new apigateway.RestApi(this, 'MyApi', {
  restApiName: 'my-api',
});

// Create a gateway target using the static factory method
const apiGatewayTarget = agentcore.GatewayTarget.forApiGateway(this, "MyApiGatewayTarget", {
  gatewayTargetName: "my-api-gateway-target",
  description: "Target for API Gateway REST API integration",
  gateway: gateway,
  restApi: api,
  apiGatewayToolConfiguration: {
    toolFilters: [
      {
        filterPath: "/pets/*",
        methods: [agentcore.ApiGatewayHttpMethod.GET, agentcore.ApiGatewayHttpMethod.POST],
      },
    ],
  },
  metadataConfiguration: {
    allowedRequestHeaders: ["X-User-Id"],
    allowedQueryParameters: ["limit"],
  },
});
```

## Properties

- `apiGatewayToolConfiguration`: [ApiGatewayToolConfiguration](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.ApiGatewayToolConfiguration.html) (required) — Tool configuration defining which operations to expose.

- `credentialProviderConfigurations`: [ICredentialProviderConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.ICredentialProviderConfig.html)[] — Credential providers for authentication API Gateway targets support IAM and API key authentication.

  **Default:** Empty array (service handles IAM automatically)

- `description`: string — Optional description for the gateway target The description can have up to 200 characters.

  **Default:** No description

- `gateway`: [IGateway](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.IGateway.html) (required) — The gateway this target belongs to [disable-awslint:prefer-ref-interface].

- `gatewayTargetName`: string — The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?){1,100}$.

  **Default:** auto generate

- `metadataConfiguration`: [MetadataConfiguration](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.MetadataConfiguration.html) — Metadata configuration for passing headers and query parameters Allows you to pass additional context through headers and query parameters.

  **Default:** No metadata configuration

- `restApi`: [IRestApi](/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IRestApi.html) (required) — The REST API to integrate with Must be in the same account and region as the gateway [disable-awslint:prefer-ref-interface].

- `stage`: string — The stage name of the REST API.

  **Default:** Uses the deployment stage from the RestApi (restApi.deploymentStage.stageName)
