Class CfnResolverProps.Builder
java.lang.Object
software.amazon.awscdk.services.appsync.CfnResolverProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnResolverProps>
- Enclosing interface:
CfnResolverProps
@Stability(Stable)
public static final class CfnResolverProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnResolverProps>
A builder for
CfnResolverProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnResolverProps.getApiId()build()Builds the configured instance.cachingConfig(IResolvable cachingConfig) Sets the value ofCfnResolverProps.getCachingConfig()cachingConfig(CfnResolver.CachingConfigProperty cachingConfig) Sets the value ofCfnResolverProps.getCachingConfig()Sets the value ofCfnResolverProps.getCode()codeS3Location(String codeS3Location) Sets the value ofCfnResolverProps.getCodeS3Location()dataSourceName(String dataSourceName) Sets the value ofCfnResolverProps.getDataSourceName()Sets the value ofCfnResolverProps.getFieldName()Sets the value ofCfnResolverProps.getKind()maxBatchSize(Number maxBatchSize) Sets the value ofCfnResolverProps.getMaxBatchSize()metricsConfig(String metricsConfig) Sets the value ofCfnResolverProps.getMetricsConfig()pipelineConfig(IResolvable pipelineConfig) Sets the value ofCfnResolverProps.getPipelineConfig()pipelineConfig(CfnResolver.PipelineConfigProperty pipelineConfig) Sets the value ofCfnResolverProps.getPipelineConfig()requestMappingTemplate(String requestMappingTemplate) Sets the value ofCfnResolverProps.getRequestMappingTemplate()requestMappingTemplateS3Location(String requestMappingTemplateS3Location) Sets the value ofCfnResolverProps.getRequestMappingTemplateS3Location()responseMappingTemplate(String responseMappingTemplate) Sets the value ofCfnResolverProps.getResponseMappingTemplate()responseMappingTemplateS3Location(String responseMappingTemplateS3Location) Sets the value ofCfnResolverProps.getResponseMappingTemplateS3Location()runtime(IResolvable runtime) Sets the value ofCfnResolverProps.getRuntime()Sets the value ofCfnResolverProps.getRuntime()syncConfig(IResolvable syncConfig) Sets the value ofCfnResolverProps.getSyncConfig()syncConfig(CfnResolver.SyncConfigProperty syncConfig) Sets the value ofCfnResolverProps.getSyncConfig()Sets the value ofCfnResolverProps.getTypeName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiId
Sets the value ofCfnResolverProps.getApiId()- Parameters:
apiId- The AWS AppSync GraphQL API to which you want to attach this resolver. This parameter is required.- Returns:
this
-
fieldName
Sets the value ofCfnResolverProps.getFieldName()- Parameters:
fieldName- The GraphQL field on a type that invokes the resolver. This parameter is required.- Returns:
this
-
typeName
Sets the value ofCfnResolverProps.getTypeName()- Parameters:
typeName- The GraphQL type that invokes this resolver. This parameter is required.- Returns:
this
-
cachingConfig
Sets the value ofCfnResolverProps.getCachingConfig()- Parameters:
cachingConfig- The caching configuration for the resolver.- Returns:
this
-
cachingConfig
@Stability(Stable) public CfnResolverProps.Builder cachingConfig(CfnResolver.CachingConfigProperty cachingConfig) Sets the value ofCfnResolverProps.getCachingConfig()- Parameters:
cachingConfig- The caching configuration for the resolver.- Returns:
this
-
code
Sets the value ofCfnResolverProps.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
Sets the value ofCfnResolverProps.getCodeS3Location()- Parameters:
codeS3Location- The Amazon S3 endpoint.- Returns:
this
-
dataSourceName
Sets the value ofCfnResolverProps.getDataSourceName()- Parameters:
dataSourceName- The resolver data source name.- Returns:
this
-
kind
Sets the value ofCfnResolverProps.getKind()- Parameters:
kind- The resolver type.- UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
- PIPELINE : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of
Functionobjects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
- Returns:
this
-
maxBatchSize
Sets the value ofCfnResolverProps.getMaxBatchSize()- Parameters:
maxBatchSize- The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvokeoperation.- Returns:
this
-
metricsConfig
Sets the value ofCfnResolverProps.getMetricsConfig()- Parameters:
metricsConfig- Enables or disables enhanced resolver metrics for specified resolvers. Note thatMetricsConfigwon't be used unless theresolverLevelMetricsBehaviorvalue is set toPER_RESOLVER_METRICS. If theresolverLevelMetricsBehavioris set toFULL_REQUEST_RESOLVER_METRICSinstead,MetricsConfigwill be ignored. However, you can still set its value.- Returns:
this
-
pipelineConfig
Sets the value ofCfnResolverProps.getPipelineConfig()- Parameters:
pipelineConfig- Functions linked with the pipeline resolver.- Returns:
this
-
pipelineConfig
@Stability(Stable) public CfnResolverProps.Builder pipelineConfig(CfnResolver.PipelineConfigProperty pipelineConfig) Sets the value ofCfnResolverProps.getPipelineConfig()- Parameters:
pipelineConfig- Functions linked with the pipeline resolver.- Returns:
this
-
requestMappingTemplate
@Stability(Stable) public CfnResolverProps.Builder requestMappingTemplate(String requestMappingTemplate) Sets the value ofCfnResolverProps.getRequestMappingTemplate()- Parameters:
requestMappingTemplate- The request mapping template. Request mapping templates are optional when using a Lambda data source. For all other data sources, a request mapping template is required.- Returns:
this
-
requestMappingTemplateS3Location
@Stability(Stable) public CfnResolverProps.Builder requestMappingTemplateS3Location(String requestMappingTemplateS3Location) Sets the value ofCfnResolverProps.getRequestMappingTemplateS3Location()- Parameters:
requestMappingTemplateS3Location- The location of a request 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
-
responseMappingTemplate
@Stability(Stable) public CfnResolverProps.Builder responseMappingTemplate(String responseMappingTemplate) Sets the value ofCfnResolverProps.getResponseMappingTemplate()- Parameters:
responseMappingTemplate- The response mapping template.- Returns:
this
-
responseMappingTemplateS3Location
@Stability(Stable) public CfnResolverProps.Builder responseMappingTemplateS3Location(String responseMappingTemplateS3Location) Sets the value ofCfnResolverProps.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 ofCfnResolverProps.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 CfnResolverProps.Builder runtime(CfnResolver.AppSyncRuntimeProperty runtime) Sets the value ofCfnResolverProps.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 ofCfnResolverProps.getSyncConfig()- Parameters:
syncConfig- TheSyncConfigfor a resolver attached to a versioned data source.- Returns:
this
-
syncConfig
@Stability(Stable) public CfnResolverProps.Builder syncConfig(CfnResolver.SyncConfigProperty syncConfig) Sets the value ofCfnResolverProps.getSyncConfig()- Parameters:
syncConfig- TheSyncConfigfor a resolver attached to a versioned data source.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnResolverProps>- Returns:
- a new instance of
CfnResolverProps - Throws:
NullPointerException- if any required attribute was not provided
-