interface GatewayTargetProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.GatewayTargetProps |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#GatewayTargetProps |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.GatewayTargetProps |
Python | aws_cdk.aws_bedrock_agentcore_alpha.GatewayTargetProps |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป GatewayTargetProps |
Properties for creating a Gateway Target resource.
Example
const gateway = new agentcore.Gateway(this, "MyGateway", {
gatewayName: "my-gateway",
});
const myLambdaFunction = new lambda.Function(this, "MyFunction", {
runtime: lambda.Runtime.NODEJS_22_X,
handler: "index.handler",
code: lambda.Code.fromInline(`
exports.handler = async (event) => ({ statusCode: 200 });
`),
});
const myToolSchema = agentcore.ToolSchema.fromInline([{
name: "my_tool",
description: "My custom tool",
inputSchema: {
type: agentcore.SchemaDefinitionType.OBJECT,
properties: {},
},
}]);
// Create a custom Lambda configuration
const customConfig = agentcore.LambdaTargetConfiguration.create(
myLambdaFunction,
myToolSchema
);
// Use the GatewayTarget constructor directly
const target = new agentcore.GatewayTarget(this, "AdvancedTarget", {
gateway: gateway,
gatewayTargetName: "advanced-target",
targetConfiguration: customConfig, // Manually created configuration
credentialProviderConfigurations: [
agentcore.GatewayCredentialProvider.fromIamRole()
]
});
Properties
| Name | Type | Description |
|---|---|---|
| gateway | IGateway | The gateway this target belongs to. |
| gateway | string | The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?){1,100}$. |
| target | ITarget | The target configuration (Lambda, OpenAPI, or Smithy) Use one of the configuration helper classes: - LambdaTargetConfiguration.create() - OpenApiTargetConfiguration.create() - SmithyTargetConfiguration.create(). |
| credential | ICredential[] | Credential providers for authentication. |
| description? | string | Optional description for the gateway target The description can have up to 200 characters. |
gateway
Type:
IGateway
The gateway this target belongs to.
gatewayTargetName
Type:
string
The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?){1,100}$.
targetConfiguration
Type:
ITarget
The target configuration (Lambda, OpenAPI, or Smithy) Use one of the configuration helper classes: - LambdaTargetConfiguration.create() - OpenApiTargetConfiguration.create() - SmithyTargetConfiguration.create().
credentialProviderConfigurations?
Type:
ICredential[]
(optional, default: [GatewayCredentialProvider.fromIamRole()])
Credential providers for authentication.
description?
Type:
string
(optional, default: No description)
Optional description for the gateway target The description can have up to 200 characters.

.NET
Go
Java
Python
TypeScript (