Class Resource.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.Resource.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Resource>
- Enclosing class:
Resource
@Stability(Stable)
public static final class Resource.Builder
extends Object
implements software.amazon.jsii.Builder<Resource>
A fluent builder for
Resource.-
Method Summary
Modifier and TypeMethodDescriptionbuild()static Resource.BuilderdefaultCorsPreflightOptions(CorsOptions defaultCorsPreflightOptions) Adds a CORS preflight OPTIONS method to this resource and all child resources.defaultIntegration(Integration defaultIntegration) An integration to use as a default for all methods created within this API unless an integration is specified.defaultMethodOptions(MethodOptions defaultMethodOptions) Method options to use as a default for all methods created within this API unless custom options are specified.The parent resource of this resource.A path name for the resource.
-
Method Details
-
create
@Stability(Stable) public static Resource.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- This parameter is required.id- This parameter is required.- Returns:
- a new instance of
Resource.Builder.
-
defaultCorsPreflightOptions
@Stability(Stable) public Resource.Builder defaultCorsPreflightOptions(CorsOptions defaultCorsPreflightOptions) Adds a CORS preflight OPTIONS method to this resource and all child resources.You can add CORS at the resource-level using
addCorsPreflight.Default: - CORS is disabled
- Parameters:
defaultCorsPreflightOptions- Adds a CORS preflight OPTIONS method to this resource and all child resources. This parameter is required.- Returns:
this
-
defaultIntegration
An integration to use as a default for all methods created within this API unless an integration is specified.Default: - Inherited from parent.
- Parameters:
defaultIntegration- An integration to use as a default for all methods created within this API unless an integration is specified. This parameter is required.- Returns:
this
-
defaultMethodOptions
Method options to use as a default for all methods created within this API unless custom options are specified.Default: - Inherited from parent.
- Parameters:
defaultMethodOptions- Method options to use as a default for all methods created within this API unless custom options are specified. This parameter is required.- Returns:
this
-
parent
The parent resource of this resource.You can either pass another
Resourceobject or aRestApiobject here.- Parameters:
parent- The parent resource of this resource. This parameter is required.- Returns:
this
-
pathPart
A path name for the resource.- Parameters:
pathPart- A path name for the resource. This parameter is required.- Returns:
this
-
build
-