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(Experimental)
public static final class HttpApiProps.Builder
extends Object
implements software.amazon.jsii.Builder<HttpApiProps>
A builder for
HttpApiProps
-
Constructor Summary
-
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()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiName
Sets the value ofHttpApiProps.getApiName()
- Parameters:
apiName
- Name for the HTTP API resource.- Returns:
this
-
corsPreflight
@Stability(Experimental) public HttpApiProps.Builder corsPreflight(CorsPreflightOptions 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(Experimental) 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.- Returns:
this
-
defaultAuthorizer
@Stability(Experimental) public HttpApiProps.Builder defaultAuthorizer(IHttpRouteAuthorizer defaultAuthorizer) Sets the value ofHttpApiProps.getDefaultAuthorizer()
- Parameters:
defaultAuthorizer
- Default Authorizer to applied to all routes in the gateway.- Returns:
this
-
defaultDomainMapping
@Stability(Experimental) 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(Experimental) 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(Experimental) 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
endpoint. Enable this if you would like clients to use your custom domain name.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<HttpApiProps>
- Returns:
- a new instance of
HttpApiProps
- Throws:
NullPointerException
- if any required attribute was not provided
-