Class HttpApiProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigatewayv2.HttpApiProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<HttpApiProps>
- Enclosing interface:
HttpApiProps
@Stability(Stable)
public static final class HttpApiProps.Builder
extends Object
implements software.amazon.jsii.Builder<HttpApiProps>
A builder for
HttpApiProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofHttpApiProps.getApiName()build()Builds the configured instance.corsPreflight(CorsPreflightOptions corsPreflight) Sets the value ofHttpApiProps.getCorsPreflight()createDefaultStage(Boolean createDefaultStage) Sets the value ofHttpApiProps.getCreateDefaultStage()defaultAuthorizationScopes(List<String> defaultAuthorizationScopes) Sets the value ofHttpApiProps.getDefaultAuthorizationScopes()defaultAuthorizer(IHttpRouteAuthorizer defaultAuthorizer) Sets the value ofHttpApiProps.getDefaultAuthorizer()defaultDomainMapping(DomainMappingOptions defaultDomainMapping) Sets the value ofHttpApiProps.getDefaultDomainMapping()defaultIntegration(HttpRouteIntegration defaultIntegration) Sets the value ofHttpApiProps.getDefaultIntegration()description(String description) Sets the value ofHttpApiProps.getDescription()disableExecuteApiEndpoint(Boolean disableExecuteApiEndpoint) Sets the value ofHttpApiProps.getDisableExecuteApiEndpoint()ipAddressType(IpAddressType ipAddressType) Sets the value ofHttpApiProps.getIpAddressType()routeSelectionExpression(Boolean routeSelectionExpression) Sets the value ofHttpApiProps.getRouteSelectionExpression()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiName
Sets the value ofHttpApiProps.getApiName()- Parameters:
apiName- Name for the HTTP API resource.- Returns:
this
-
corsPreflight
Sets the value ofHttpApiProps.getCorsPreflight()- Parameters:
corsPreflight- Specifies a CORS configuration for an API.- Returns:
this
-
createDefaultStage
Sets the value ofHttpApiProps.getCreateDefaultStage()- Parameters:
createDefaultStage- Whether a default stage and deployment should be automatically created.- Returns:
this
-
defaultAuthorizationScopes
@Stability(Stable) public HttpApiProps.Builder defaultAuthorizationScopes(List<String> defaultAuthorizationScopes) Sets the value ofHttpApiProps.getDefaultAuthorizationScopes()- Parameters:
defaultAuthorizationScopes- Default OIDC scopes attached to all routes in the gateway, unless explicitly configured on the route. The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation.- Returns:
this
-
defaultAuthorizer
@Stability(Stable) public HttpApiProps.Builder defaultAuthorizer(IHttpRouteAuthorizer defaultAuthorizer) Sets the value ofHttpApiProps.getDefaultAuthorizer()- Parameters:
defaultAuthorizer- Default Authorizer applied to all routes in the gateway.- Returns:
this
-
defaultDomainMapping
@Stability(Stable) public HttpApiProps.Builder defaultDomainMapping(DomainMappingOptions defaultDomainMapping) Sets the value ofHttpApiProps.getDefaultDomainMapping()- Parameters:
defaultDomainMapping- Configure a custom domain with the API mapping resource to the HTTP API.- Returns:
this
-
defaultIntegration
@Stability(Stable) public HttpApiProps.Builder defaultIntegration(HttpRouteIntegration defaultIntegration) Sets the value ofHttpApiProps.getDefaultIntegration()- Parameters:
defaultIntegration- An integration that will be configured on the catch-all route ($default).- Returns:
this
-
description
Sets the value ofHttpApiProps.getDescription()- Parameters:
description- The description of the API.- Returns:
this
-
disableExecuteApiEndpoint
@Stability(Stable) public HttpApiProps.Builder disableExecuteApiEndpoint(Boolean disableExecuteApiEndpoint) Sets the value ofHttpApiProps.getDisableExecuteApiEndpoint()- Parameters:
disableExecuteApiEndpoint- Specifies whether clients can invoke your API using the default endpoint. By default, clients can invoke your API with the defaulthttps://{api_id}.execute-api.{region}.amazonaws.com.rproxy.govskope.caendpoint. Set this to true if you would like clients to use your custom domain name.- Returns:
this
-
ipAddressType
Sets the value ofHttpApiProps.getIpAddressType()- Parameters:
ipAddressType- The IP address types that can invoke the API.- Returns:
this
-
routeSelectionExpression
@Stability(Stable) public HttpApiProps.Builder routeSelectionExpression(Boolean routeSelectionExpression) Sets the value ofHttpApiProps.getRouteSelectionExpression()- Parameters:
routeSelectionExpression- Whether to set the default route selection expression for the API. When enabled, "${request.method} ${request.path}" is set as the default route selection expression.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<HttpApiProps>- Returns:
- a new instance of
HttpApiProps - Throws:
NullPointerException- if any required attribute was not provided
-