Class CfnResolverMixinProps.Builder
java.lang.Object
software.amazon.awscdk.mixins.preview.services.appsync.mixins.CfnResolverMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnResolverMixinProps>
- Enclosing interface:
CfnResolverMixinProps
@Stability(Stable)
public static final class CfnResolverMixinProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnResolverMixinProps>
A builder for
CfnResolverMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnResolverMixinProps.getApiId()build()Builds the configured instance.cachingConfig(IResolvable cachingConfig) Sets the value ofCfnResolverMixinProps.getCachingConfig()cachingConfig(CfnResolverPropsMixin.CachingConfigProperty cachingConfig) Sets the value ofCfnResolverMixinProps.getCachingConfig()Sets the value ofCfnResolverMixinProps.getCode()codeS3Location(String codeS3Location) Sets the value ofCfnResolverMixinProps.getCodeS3Location()dataSourceName(String dataSourceName) Sets the value ofCfnResolverMixinProps.getDataSourceName()Sets the value ofCfnResolverMixinProps.getFieldName()Sets the value ofCfnResolverMixinProps.getKind()maxBatchSize(Number maxBatchSize) Sets the value ofCfnResolverMixinProps.getMaxBatchSize()metricsConfig(String metricsConfig) Sets the value ofCfnResolverMixinProps.getMetricsConfig()pipelineConfig(IResolvable pipelineConfig) Sets the value ofCfnResolverMixinProps.getPipelineConfig()pipelineConfig(CfnResolverPropsMixin.PipelineConfigProperty pipelineConfig) Sets the value ofCfnResolverMixinProps.getPipelineConfig()requestMappingTemplate(String requestMappingTemplate) Sets the value ofCfnResolverMixinProps.getRequestMappingTemplate()requestMappingTemplateS3Location(String requestMappingTemplateS3Location) Sets the value ofCfnResolverMixinProps.getRequestMappingTemplateS3Location()responseMappingTemplate(String responseMappingTemplate) Sets the value ofCfnResolverMixinProps.getResponseMappingTemplate()responseMappingTemplateS3Location(String responseMappingTemplateS3Location) Sets the value ofCfnResolverMixinProps.getResponseMappingTemplateS3Location()runtime(IResolvable runtime) Sets the value ofCfnResolverMixinProps.getRuntime()Sets the value ofCfnResolverMixinProps.getRuntime()syncConfig(IResolvable syncConfig) Sets the value ofCfnResolverMixinProps.getSyncConfig()syncConfig(CfnResolverPropsMixin.SyncConfigProperty syncConfig) Sets the value ofCfnResolverMixinProps.getSyncConfig()Sets the value ofCfnResolverMixinProps.getTypeName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiId
Sets the value ofCfnResolverMixinProps.getApiId()- Parameters:
apiId- The AWS AppSync GraphQL API to which you want to attach this resolver.- Returns:
this
-
cachingConfig
Sets the value ofCfnResolverMixinProps.getCachingConfig()- Parameters:
cachingConfig- The caching configuration for the resolver.- Returns:
this
-
cachingConfig
@Stability(Stable) public CfnResolverMixinProps.Builder cachingConfig(CfnResolverPropsMixin.CachingConfigProperty cachingConfig) Sets the value ofCfnResolverMixinProps.getCachingConfig()- Parameters:
cachingConfig- The caching configuration for the resolver.- Returns:
this
-
code
Sets the value ofCfnResolverMixinProps.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 ofCfnResolverMixinProps.getCodeS3Location()- Parameters:
codeS3Location- The Amazon S3 endpoint.- Returns:
this
-
dataSourceName
Sets the value ofCfnResolverMixinProps.getDataSourceName()- Parameters:
dataSourceName- The resolver data source name.- Returns:
this
-
fieldName
Sets the value ofCfnResolverMixinProps.getFieldName()- Parameters:
fieldName- The GraphQL field on a type that invokes the resolver.- Returns:
this
-
kind
Sets the value ofCfnResolverMixinProps.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 ofCfnResolverMixinProps.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 ofCfnResolverMixinProps.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 ofCfnResolverMixinProps.getPipelineConfig()- Parameters:
pipelineConfig- Functions linked with the pipeline resolver.- Returns:
this
-
pipelineConfig
@Stability(Stable) public CfnResolverMixinProps.Builder pipelineConfig(CfnResolverPropsMixin.PipelineConfigProperty pipelineConfig) Sets the value ofCfnResolverMixinProps.getPipelineConfig()- Parameters:
pipelineConfig- Functions linked with the pipeline resolver.- Returns:
this
-
requestMappingTemplate
@Stability(Stable) public CfnResolverMixinProps.Builder requestMappingTemplate(String requestMappingTemplate) Sets the value ofCfnResolverMixinProps.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 CfnResolverMixinProps.Builder requestMappingTemplateS3Location(String requestMappingTemplateS3Location) Sets the value ofCfnResolverMixinProps.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 CfnResolverMixinProps.Builder responseMappingTemplate(String responseMappingTemplate) Sets the value ofCfnResolverMixinProps.getResponseMappingTemplate()- Parameters:
responseMappingTemplate- The response mapping template.- Returns:
this
-
responseMappingTemplateS3Location
@Stability(Stable) public CfnResolverMixinProps.Builder responseMappingTemplateS3Location(String responseMappingTemplateS3Location) Sets the value ofCfnResolverMixinProps.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 ofCfnResolverMixinProps.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 CfnResolverMixinProps.Builder runtime(CfnResolverPropsMixin.AppSyncRuntimeProperty runtime) Sets the value ofCfnResolverMixinProps.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 ofCfnResolverMixinProps.getSyncConfig()- Parameters:
syncConfig- TheSyncConfigfor a resolver attached to a versioned data source.- Returns:
this
-
syncConfig
@Stability(Stable) public CfnResolverMixinProps.Builder syncConfig(CfnResolverPropsMixin.SyncConfigProperty syncConfig) Sets the value ofCfnResolverMixinProps.getSyncConfig()- Parameters:
syncConfig- TheSyncConfigfor a resolver attached to a versioned data source.- Returns:
this
-
typeName
Sets the value ofCfnResolverMixinProps.getTypeName()- Parameters:
typeName- The GraphQL type that invokes this resolver.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnResolverMixinProps>- Returns:
- a new instance of
CfnResolverMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-