Class ResourceOptions.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.ResourceOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ResourceOptions>
- Enclosing interface:
- ResourceOptions
@Stability(Stable)
public static final class ResourceOptions.Builder
extends Object
implements software.amazon.jsii.Builder<ResourceOptions>
A builder for
ResourceOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.defaultCorsPreflightOptions
(CorsOptions defaultCorsPreflightOptions) Sets the value ofResourceOptions.getDefaultCorsPreflightOptions()
defaultIntegration
(Integration defaultIntegration) Sets the value ofResourceOptions.getDefaultIntegration()
defaultMethodOptions
(MethodOptions defaultMethodOptions) Sets the value ofResourceOptions.getDefaultMethodOptions()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
defaultCorsPreflightOptions
@Stability(Stable) public ResourceOptions.Builder defaultCorsPreflightOptions(CorsOptions defaultCorsPreflightOptions) Sets the value ofResourceOptions.getDefaultCorsPreflightOptions()
- Parameters:
defaultCorsPreflightOptions
- Adds a CORS preflight OPTIONS method to this resource and all child resources. You can add CORS at the resource-level usingaddCorsPreflight
.- Returns:
this
-
defaultIntegration
@Stability(Stable) public ResourceOptions.Builder defaultIntegration(Integration defaultIntegration) Sets the value ofResourceOptions.getDefaultIntegration()
- Parameters:
defaultIntegration
- An integration to use as a default for all methods created within this API unless an integration is specified.- Returns:
this
-
defaultMethodOptions
@Stability(Stable) public ResourceOptions.Builder defaultMethodOptions(MethodOptions defaultMethodOptions) Sets the value ofResourceOptions.getDefaultMethodOptions()
- Parameters:
defaultMethodOptions
- Method options to use as a default for all methods created within this API unless custom options are specified.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ResourceOptions>
- Returns:
- a new instance of
ResourceOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-