interface AddApiGatewayTargetOptions
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.AddApiGatewayTargetOptions |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#AddApiGatewayTargetOptions |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.AddApiGatewayTargetOptions |
Python | aws_cdk.aws_bedrock_agentcore_alpha.AddApiGatewayTargetOptions |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป AddApiGatewayTargetOptions |
Options for adding an API Gateway target to a gateway.
Example
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
| Name | Type | Description |
|---|---|---|
| api | Api | Tool configuration defining which operations to expose. |
| rest | IRest | The REST API to integrate with Must be in the same account and region as the gateway [disable-awslint:prefer-ref-interface]. |
| credential | ICredential[] | Credential providers for authentication API Gateway targets support IAM and API key authentication. |
| description? | string | Optional description for the gateway target. |
| gateway | string | The name of the gateway target Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen). |
| metadata | Metadata | Metadata configuration for passing headers and query parameters Allows you to pass additional context through headers and query parameters. |
| stage? | string | The stage name of the REST API. |
apiGatewayToolConfiguration
Type:
Api
Tool configuration defining which operations to expose.
restApi
Type:
IRest
The REST API to integrate with Must be in the same account and region as the gateway [disable-awslint:prefer-ref-interface].
credentialProviderConfigurations?
Type:
ICredential[]
(optional, default: Empty array (service handles IAM automatically))
Credential providers for authentication API Gateway targets support IAM and API key authentication.
description?
Type:
string
(optional, default: No description)
Optional description for the gateway target.
gatewayTargetName?
Type:
string
(optional, default: auto generate)
The name of the gateway target Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen).
metadataConfiguration?
Type:
Metadata
(optional, default: No metadata configuration)
Metadata configuration for passing headers and query parameters Allows you to pass additional context through headers and query parameters.
stage?
Type:
string
(optional, default: Uses the deployment stage from the RestApi (restApi.deploymentStage.stageName))
The stage name of the REST API.

.NET
Go
Java
Python
TypeScript (