GatewayTargetApiGatewayProps
- class aws_cdk.aws_bedrockagentcore.GatewayTargetApiGatewayProps(*, description=None, gateway_target_name=None, api_gateway_tool_configuration, gateway, rest_api, credential_provider_configurations=None, metadata_configuration=None, stage=None)
Bases:
GatewayTargetCommonPropsProperties for creating an API Gateway-based Gateway Target.
- Parameters:
description (
Optional[str]) – Optional description for the gateway target The description can have up to 200 characters. Default: - No descriptiongateway_target_name (
Optional[str]) – The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?){1,100}$. Default: - auto generateapi_gateway_tool_configuration (
Union[ApiGatewayToolConfiguration,Dict[str,Any]]) – Tool configuration defining which operations to expose.gateway (
IGateway) – The gateway this target belongs to [disable-awslint:prefer-ref-interface].rest_api (
IRestApi) – The REST API to integrate with Must be in the same account and region as the gateway [disable-awslint:prefer-ref-interface].credential_provider_configurations (
Optional[Sequence[ICredentialProviderConfig]]) – Credential providers for authentication API Gateway targets support IAM and API key authentication. Default: - Empty array (service handles IAM automatically)metadata_configuration (
Union[MetadataConfiguration,Dict[str,Any],None]) – Metadata configuration for passing headers and query parameters Allows you to pass additional context through headers and query parameters. Default: - No metadata configurationstage (
Optional[str]) – The stage name of the REST API. Default: - Uses the deployment stage from the RestApi (restApi.deploymentStage.stageName)
- ExampleMetadata:
fixture=default infused
Example:
gateway = agentcore.Gateway(self, "MyGateway", gateway_name="my-gateway" ) api = apigateway.RestApi(self, "MyApi", rest_api_name="my-api" ) # Create a gateway target using the static factory method api_gateway_target = agentcore.GatewayTarget.for_api_gateway(self, "MyApiGatewayTarget", gateway_target_name="my-api-gateway-target", description="Target for API Gateway REST API integration", gateway=gateway, rest_api=api, api_gateway_tool_configuration=agentcore.ApiGatewayToolConfiguration( tool_filters=[agentcore.ApiGatewayToolFilter( filter_path="/pets/*", methods=[agentcore.ApiGatewayHttpMethod.GET, agentcore.ApiGatewayHttpMethod.POST] ) ] ), metadata_configuration=agentcore.MetadataConfiguration( allowed_request_headers=["X-User-Id"], allowed_query_parameters=["limit"] ) )
Attributes
- api_gateway_tool_configuration
Tool configuration defining which operations to expose.
- credential_provider_configurations
Credential providers for authentication API Gateway targets support IAM and API key authentication.
- Default:
Empty array (service handles IAM automatically)
- description
Optional description for the gateway target The description can have up to 200 characters.
- Default:
No description
- gateway
prefer-ref-interface].
- Type:
The gateway this target belongs to [disable-awslint
- gateway_target_name
^([0-9a-zA-Z][-]?){1,100}$.
- Default:
auto generate
- Type:
The name of the gateway target The name must be unique within the gateway Pattern
- metadata_configuration
Metadata configuration for passing headers and query parameters Allows you to pass additional context through headers and query parameters.
- Default:
No metadata configuration
- rest_api
prefer-ref-interface].
- Type:
The REST API to integrate with Must be in the same account and region as the gateway [disable-awslint
- stage
The stage name of the REST API.
- Default:
Uses the deployment stage from the RestApi (restApi.deploymentStage.stageName)