Class AppsyncFunctionProps.Builder
java.lang.Object
software.amazon.awscdk.services.appsync.AppsyncFunctionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AppsyncFunctionProps>
- Enclosing interface:
AppsyncFunctionProps
@Stability(Stable)
public static final class AppsyncFunctionProps.Builder
extends Object
implements software.amazon.jsii.Builder<AppsyncFunctionProps>
A builder for
AppsyncFunctionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapi
(IGraphqlApi api) Sets the value ofAppsyncFunctionProps.getApi()
build()
Builds the configured instance.Sets the value ofBaseAppsyncFunctionProps.getCode()
dataSource
(BaseDataSource dataSource) Sets the value ofAppsyncFunctionProps.getDataSource()
description
(String description) Sets the value ofBaseAppsyncFunctionProps.getDescription()
maxBatchSize
(Number maxBatchSize) Sets the value ofBaseAppsyncFunctionProps.getMaxBatchSize()
Sets the value ofBaseAppsyncFunctionProps.getName()
requestMappingTemplate
(MappingTemplate requestMappingTemplate) Sets the value ofBaseAppsyncFunctionProps.getRequestMappingTemplate()
responseMappingTemplate
(MappingTemplate responseMappingTemplate) Sets the value ofBaseAppsyncFunctionProps.getResponseMappingTemplate()
runtime
(FunctionRuntime runtime) Sets the value ofBaseAppsyncFunctionProps.getRuntime()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
api
Sets the value ofAppsyncFunctionProps.getApi()
- Parameters:
api
- the GraphQL Api linked to this AppSync Function. This parameter is required.- Returns:
this
-
dataSource
Sets the value ofAppsyncFunctionProps.getDataSource()
- Parameters:
dataSource
- the data source linked to this AppSync Function. This parameter is required.- Returns:
this
-
name
Sets the value ofBaseAppsyncFunctionProps.getName()
- Parameters:
name
- the name of the AppSync Function. This parameter is required.- Returns:
this
-
code
Sets the value ofBaseAppsyncFunctionProps.getCode()
- Parameters:
code
- The function code.- Returns:
this
-
description
Sets the value ofBaseAppsyncFunctionProps.getDescription()
- Parameters:
description
- the description for this AppSync Function.- Returns:
this
-
maxBatchSize
Sets the value ofBaseAppsyncFunctionProps.getMaxBatchSize()
- Parameters:
maxBatchSize
- The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation. Can only be set when using LambdaDataSource.- Returns:
this
-
requestMappingTemplate
@Stability(Stable) public AppsyncFunctionProps.Builder requestMappingTemplate(MappingTemplate requestMappingTemplate) Sets the value ofBaseAppsyncFunctionProps.getRequestMappingTemplate()
- Parameters:
requestMappingTemplate
- the request mapping template for the AppSync Function.- Returns:
this
-
responseMappingTemplate
@Stability(Stable) public AppsyncFunctionProps.Builder responseMappingTemplate(MappingTemplate responseMappingTemplate) Sets the value ofBaseAppsyncFunctionProps.getResponseMappingTemplate()
- Parameters:
responseMappingTemplate
- the response mapping template for the AppSync Function.- Returns:
this
-
runtime
Sets the value ofBaseAppsyncFunctionProps.getRuntime()
- Parameters:
runtime
- The functions runtime.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AppsyncFunctionProps>
- Returns:
- a new instance of
AppsyncFunctionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-