Modifier and Type | Method and Description |
---|---|
Resource |
build() |
static Resource.Builder |
create(software.constructs.Construct scope,
java.lang.String id) |
Resource.Builder |
defaultCorsPreflightOptions(CorsOptions defaultCorsPreflightOptions)
Adds a CORS preflight OPTIONS method to this resource and all child resources.
|
Resource.Builder |
defaultIntegration(Integration defaultIntegration)
An integration to use as a default for all methods created within this API unless an integration is specified.
|
Resource.Builder |
defaultMethodOptions(MethodOptions defaultMethodOptions)
Method options to use as a default for all methods created within this API unless custom options are specified.
|
Resource.Builder |
parent(IResource parent)
The parent resource of this resource.
|
Resource.Builder |
pathPart(java.lang.String pathPart)
A path name for the resource.
|
public static Resource.Builder create(software.constructs.Construct scope, java.lang.String id)
scope
- This parameter is required.id
- This parameter is required.Resource.Builder
.public Resource.Builder defaultCorsPreflightOptions(CorsOptions defaultCorsPreflightOptions)
You can add CORS at the resource-level using addCorsPreflight
.
Default: - CORS is disabled
defaultCorsPreflightOptions
- Adds a CORS preflight OPTIONS method to this resource and all child resources. This parameter is required.this
public Resource.Builder defaultIntegration(Integration defaultIntegration)
Default: - Inherited from parent.
defaultIntegration
- An integration to use as a default for all methods created within this API unless an integration is specified. This parameter is required.this
public Resource.Builder defaultMethodOptions(MethodOptions defaultMethodOptions)
Default: - Inherited from parent.
defaultMethodOptions
- Method options to use as a default for all methods created within this API unless custom options are specified. This parameter is required.this
public Resource.Builder parent(IResource parent)
You can either pass another
Resource
object or a RestApi
object here.
parent
- The parent resource of this resource. This parameter is required.this
public Resource.Builder pathPart(java.lang.String pathPart)
pathPart
- A path name for the resource. This parameter is required.this
public Resource build()