Class CfnFunctionConfigurationProps.Builder
java.lang.Object
software.amazon.awscdk.services.appsync.CfnFunctionConfigurationProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnFunctionConfigurationProps>
- Enclosing interface:
CfnFunctionConfigurationProps
@Stability(Stable)
public static final class CfnFunctionConfigurationProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnFunctionConfigurationProps>
A builder for
CfnFunctionConfigurationProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnFunctionConfigurationProps.getApiId()build()Builds the configured instance.Sets the value ofCfnFunctionConfigurationProps.getCode()codeS3Location(String codeS3Location) Sets the value ofCfnFunctionConfigurationProps.getCodeS3Location()dataSourceName(String dataSourceName) Sets the value ofCfnFunctionConfigurationProps.getDataSourceName()description(String description) Sets the value ofCfnFunctionConfigurationProps.getDescription()functionVersion(String functionVersion) Sets the value ofCfnFunctionConfigurationProps.getFunctionVersion()maxBatchSize(Number maxBatchSize) Sets the value ofCfnFunctionConfigurationProps.getMaxBatchSize()Sets the value ofCfnFunctionConfigurationProps.getName()requestMappingTemplate(String requestMappingTemplate) Sets the value ofCfnFunctionConfigurationProps.getRequestMappingTemplate()requestMappingTemplateS3Location(String requestMappingTemplateS3Location) Sets the value ofCfnFunctionConfigurationProps.getRequestMappingTemplateS3Location()responseMappingTemplate(String responseMappingTemplate) Sets the value ofCfnFunctionConfigurationProps.getResponseMappingTemplate()responseMappingTemplateS3Location(String responseMappingTemplateS3Location) Sets the value ofCfnFunctionConfigurationProps.getResponseMappingTemplateS3Location()runtime(IResolvable runtime) Sets the value ofCfnFunctionConfigurationProps.getRuntime()Sets the value ofCfnFunctionConfigurationProps.getRuntime()syncConfig(IResolvable syncConfig) Sets the value ofCfnFunctionConfigurationProps.getSyncConfig()Sets the value ofCfnFunctionConfigurationProps.getSyncConfig()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiId
Sets the value ofCfnFunctionConfigurationProps.getApiId()- Parameters:
apiId- The AWS AppSync GraphQL API that you want to attach using this function. This parameter is required.- Returns:
this
-
dataSourceName
@Stability(Stable) public CfnFunctionConfigurationProps.Builder dataSourceName(String dataSourceName) Sets the value ofCfnFunctionConfigurationProps.getDataSourceName()- Parameters:
dataSourceName- The name of data source this function will attach. This parameter is required.- Returns:
this
-
name
Sets the value ofCfnFunctionConfigurationProps.getName()- Parameters:
name- The name of the function. This parameter is required.- Returns:
this
-
code
Sets the value ofCfnFunctionConfigurationProps.getCode()- Parameters:
code- Theresolvercode that contains the request and response functions. When code is used, theruntimeis required. The runtime value must beAPPSYNC_JS.- Returns:
this
-
codeS3Location
@Stability(Stable) public CfnFunctionConfigurationProps.Builder codeS3Location(String codeS3Location) Sets the value ofCfnFunctionConfigurationProps.getCodeS3Location()- Parameters:
codeS3Location- The Amazon S3 endpoint.- Returns:
this
-
description
Sets the value ofCfnFunctionConfigurationProps.getDescription()- Parameters:
description- TheFunctiondescription.- Returns:
this
-
functionVersion
@Stability(Stable) public CfnFunctionConfigurationProps.Builder functionVersion(String functionVersion) Sets the value ofCfnFunctionConfigurationProps.getFunctionVersion()- Parameters:
functionVersion- The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.- Returns:
this
-
maxBatchSize
Sets the value ofCfnFunctionConfigurationProps.getMaxBatchSize()- Parameters:
maxBatchSize- The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvokeoperation.- Returns:
this
-
requestMappingTemplate
@Stability(Stable) public CfnFunctionConfigurationProps.Builder requestMappingTemplate(String requestMappingTemplate) Sets the value ofCfnFunctionConfigurationProps.getRequestMappingTemplate()- Parameters:
requestMappingTemplate- TheFunctionrequest mapping template. Functions support only the 2018-05-29 version of the request mapping template.- Returns:
this
-
requestMappingTemplateS3Location
@Stability(Stable) public CfnFunctionConfigurationProps.Builder requestMappingTemplateS3Location(String requestMappingTemplateS3Location) Sets the value ofCfnFunctionConfigurationProps.getRequestMappingTemplateS3Location()- Parameters:
requestMappingTemplateS3Location- Describes a Sync configuration for a resolver. Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.- Returns:
this
-
responseMappingTemplate
@Stability(Stable) public CfnFunctionConfigurationProps.Builder responseMappingTemplate(String responseMappingTemplate) Sets the value ofCfnFunctionConfigurationProps.getResponseMappingTemplate()- Parameters:
responseMappingTemplate- TheFunctionresponse mapping template.- Returns:
this
-
responseMappingTemplateS3Location
@Stability(Stable) public CfnFunctionConfigurationProps.Builder responseMappingTemplateS3Location(String responseMappingTemplateS3Location) Sets the value ofCfnFunctionConfigurationProps.getResponseMappingTemplateS3Location()- Parameters:
responseMappingTemplateS3Location- The location of a response mapping template in an Amazon S3 bucket. Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.- Returns:
this
-
runtime
Sets the value ofCfnFunctionConfigurationProps.getRuntime()- Parameters:
runtime- Describes a runtime used by an AWS AppSync resolver or AWS AppSync function. Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.- Returns:
this
-
runtime
@Stability(Stable) public CfnFunctionConfigurationProps.Builder runtime(CfnFunctionConfiguration.AppSyncRuntimeProperty runtime) Sets the value ofCfnFunctionConfigurationProps.getRuntime()- Parameters:
runtime- Describes a runtime used by an AWS AppSync resolver or AWS AppSync function. Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.- Returns:
this
-
syncConfig
Sets the value ofCfnFunctionConfigurationProps.getSyncConfig()- Parameters:
syncConfig- Describes a Sync configuration for a resolver. Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.- Returns:
this
-
syncConfig
@Stability(Stable) public CfnFunctionConfigurationProps.Builder syncConfig(CfnFunctionConfiguration.SyncConfigProperty syncConfig) Sets the value ofCfnFunctionConfigurationProps.getSyncConfig()- Parameters:
syncConfig- Describes a Sync configuration for a resolver. Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnFunctionConfigurationProps>- Returns:
- a new instance of
CfnFunctionConfigurationProps - Throws:
NullPointerException- if any required attribute was not provided
-