# AddApiGatewayTargetOptions

Options for adding an API Gateway target to a gateway.

- Source: [`aws-bedrockagentcore/lib/gateway/gateway.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-bedrockagentcore/lib/gateway/gateway.ts#L180)
- 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',
});

// Uses IAM authorization for outbound auth by default
const apiGatewayTarget = gateway.addApiGatewayTarget("MyApiGatewayTarget", {
  restApi: api,
  apiGatewayToolConfiguration: {
    toolFilters: [
      {
        filterPath: "/pets/*",
        methods: [agentcore.ApiGatewayHttpMethod.GET],
      },
    ],
  },
});
```

## 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.

  **Default:** No description

- `gatewayTargetName`: string — The name of the gateway target Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen).

  **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)
