GatewayTargetProps
- class aws_cdk.aws_bedrock_agentcore_alpha.GatewayTargetProps(*, gateway_target_name, description=None, gateway, target_configuration, credential_provider_configurations=None)
Bases:
GatewayTargetCommonProps(experimental) Properties for creating a Gateway Target resource.
- Parameters:
gateway_target_name (
str) – (experimental) The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?){1,100}$.description (
Optional[str]) – (experimental) Optional description for the gateway target The description can have up to 200 characters. Default: - No descriptiongateway (
IGateway) – (experimental) The gateway this target belongs to.target_configuration (
ITargetConfiguration) – (experimental) The target configuration (Lambda, OpenAPI, or Smithy) Use one of the configuration helper classes: - LambdaTargetConfiguration.create() - OpenApiTargetConfiguration.create() - SmithyTargetConfiguration.create().credential_provider_configurations (
Optional[Sequence[ICredentialProviderConfig]]) – (experimental) Credential providers for authentication. Default: - [GatewayCredentialProvider.fromIamRole()]
- Stability:
experimental
- ExampleMetadata:
infused
Example:
gateway = agentcore.Gateway(self, "MyGateway", gateway_name="my-gateway" ) my_lambda_function = lambda_.Function(self, "MyFunction", runtime=lambda_.Runtime.NODEJS_22_X, handler="index.handler", code=lambda_.Code.from_inline(""" exports.handler = async (event) => ({ statusCode: 200 }); """) ) my_tool_schema = agentcore.ToolSchema.from_inline([ name="my_tool", description="My custom tool", input_schema=agentcore.SchemaDefinition( type=agentcore.SchemaDefinitionType.OBJECT, properties={} ) ]) # Create a custom Lambda configuration custom_config = agentcore.LambdaTargetConfiguration.create(my_lambda_function, my_tool_schema) # Use the GatewayTarget constructor directly target = agentcore.GatewayTarget(self, "AdvancedTarget", gateway=gateway, gateway_target_name="advanced-target", target_configuration=custom_config, # Manually created configuration credential_provider_configurations=[ agentcore.GatewayCredentialProvider.from_iam_role() ] )
Attributes
- credential_provider_configurations
(experimental) Credential providers for authentication.
- Default:
[GatewayCredentialProvider.fromIamRole()]
- Stability:
experimental
- description
(experimental) Optional description for the gateway target The description can have up to 200 characters.
- Default:
No description
- Stability:
experimental
- gateway
(experimental) The gateway this target belongs to.
- Stability:
experimental
- gateway_target_name
^([0-9a-zA-Z][-]?){1,100}$.
- Stability:
experimental
- Type:
(experimental) The name of the gateway target The name must be unique within the gateway Pattern