Interface MetadataConfiguration
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
MetadataConfiguration.Jsii$Proxy
@Generated(value="jsii-pacmak/1.130.0 (build 048a5ee)",
date="2026-05-21T17:27:31.620Z")
@Stability(Stable)
public interface MetadataConfiguration
extends software.amazon.jsii.JsiiSerializable
Configuration for passing metadata (headers and query parameters) to the API Gateway target.
Example:
Gateway gateway = Gateway.Builder.create(this, "MyGateway")
.gatewayName("my-gateway")
.build();
RestApi api = RestApi.Builder.create(this, "MyApi")
.restApiName("my-api")
.build();
// Create a gateway target using the static factory method
GatewayTarget apiGatewayTarget = GatewayTarget.forApiGateway(this, "MyApiGatewayTarget", GatewayTargetApiGatewayProps.builder()
.gatewayTargetName("my-api-gateway-target")
.description("Target for API Gateway REST API integration")
.gateway(gateway)
.restApi(api)
.apiGatewayToolConfiguration(ApiGatewayToolConfiguration.builder()
.toolFilters(List.of(ApiGatewayToolFilter.builder()
.filterPath("/pets/*")
.methods(List.of(ApiGatewayHttpMethod.GET, ApiGatewayHttpMethod.POST))
.build()))
.build())
.metadataConfiguration(MetadataConfiguration.builder()
.allowedRequestHeaders(List.of("X-User-Id"))
.allowedQueryParameters(List.of("limit"))
.build())
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forMetadataConfigurationstatic final classAn implementation forMetadataConfiguration -
Method Summary
Modifier and TypeMethodDescriptionbuilder()List of query parameter names to pass through to the target.List of request header names to pass through to the target.List of response header names to pass through from the target.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAllowedQueryParameters
List of query parameter names to pass through to the target.Constraints:
- Array must contain 1-10 items
- Each parameter name must be 1-40 characters
- Cannot be an empty array
Default: - No query parameters are passed through
-
getAllowedRequestHeaders
List of request header names to pass through to the target.Constraints:
- Array must contain 1-10 items
- Each header name must be 1-100 characters
- Cannot be an empty array
Default: - No request headers are passed through
-
getAllowedResponseHeaders
List of response header names to pass through from the target.Constraints:
- Array must contain 1-10 items
- Each header name must be 1-100 characters
- Cannot be an empty array
Default: - No response headers are passed through
-
builder
- Returns:
- a
MetadataConfiguration.BuilderofMetadataConfiguration
-