Class CfnResolver.Builder
java.lang.Object
software.amazon.awscdk.services.appsync.CfnResolver.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnResolver>
- Enclosing class:
- CfnResolver
@Stability(Stable)
public static final class CfnResolver.Builder
extends Object
implements software.amazon.jsii.Builder<CfnResolver>
A fluent builder for
CfnResolver
.-
Method Summary
Modifier and TypeMethodDescriptionThe AWS AppSync GraphQL API to which you want to attach this resolver.build()
cachingConfig
(IResolvable cachingConfig) The caching configuration for the resolver.cachingConfig
(CfnResolver.CachingConfigProperty cachingConfig) The caching configuration for the resolver.Theresolver
code that contains the request and response functions.codeS3Location
(String codeS3Location) The Amazon S3 endpoint.static CfnResolver.Builder
dataSourceName
(String dataSourceName) The resolver data source name.The GraphQL field on a type that invokes the resolver.The resolver type.maxBatchSize
(Number maxBatchSize) The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvoke
operation.pipelineConfig
(IResolvable pipelineConfig) Functions linked with the pipeline resolver.pipelineConfig
(CfnResolver.PipelineConfigProperty pipelineConfig) Functions linked with the pipeline resolver.requestMappingTemplate
(String requestMappingTemplate) The request mapping template.requestMappingTemplateS3Location
(String requestMappingTemplateS3Location) The location of a request mapping template in an Amazon S3 bucket.responseMappingTemplate
(String responseMappingTemplate) The response mapping template.responseMappingTemplateS3Location
(String responseMappingTemplateS3Location) The location of a response mapping template in an Amazon S3 bucket.runtime
(IResolvable runtime) Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.syncConfig
(IResolvable syncConfig) TheSyncConfig
for a resolver attached to a versioned data source.syncConfig
(CfnResolver.SyncConfigProperty syncConfig) TheSyncConfig
for a resolver attached to a versioned data source.The GraphQL type that invokes this resolver.
-
Method Details
-
create
- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnResolver.Builder
.
-
apiId
The AWS AppSync GraphQL API to which you want to attach this resolver.- Parameters:
apiId
- The AWS AppSync GraphQL API to which you want to attach this resolver. This parameter is required.- Returns:
this
-
fieldName
The GraphQL field on a type that invokes the resolver.- Parameters:
fieldName
- The GraphQL field on a type that invokes the resolver. This parameter is required.- Returns:
this
-
typeName
The GraphQL type that invokes this resolver.- Parameters:
typeName
- The GraphQL type that invokes this resolver. This parameter is required.- Returns:
this
-
cachingConfig
The caching configuration for the resolver.- Parameters:
cachingConfig
- The caching configuration for the resolver. This parameter is required.- Returns:
this
-
cachingConfig
@Stability(Stable) public CfnResolver.Builder cachingConfig(CfnResolver.CachingConfigProperty cachingConfig) The caching configuration for the resolver.- Parameters:
cachingConfig
- The caching configuration for the resolver. This parameter is required.- Returns:
this
-
code
Theresolver
code that contains the request and response functions.When code is used, the
runtime
is required. The runtime value must beAPPSYNC_JS
.- Parameters:
code
- Theresolver
code that contains the request and response functions. This parameter is required.- Returns:
this
-
codeS3Location
The Amazon S3 endpoint.- Parameters:
codeS3Location
- The Amazon S3 endpoint. This parameter is required.- Returns:
this
-
dataSourceName
The resolver data source name.- Parameters:
dataSourceName
- The resolver data source name. This parameter is required.- Returns:
this
-
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
Function
objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
- Parameters:
kind
- The resolver type. This parameter is required.- Returns:
this
-
maxBatchSize
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvoke
operation.- Parameters:
maxBatchSize
- The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvoke
operation. This parameter is required.- Returns:
this
-
pipelineConfig
Functions linked with the pipeline resolver.- Parameters:
pipelineConfig
- Functions linked with the pipeline resolver. This parameter is required.- Returns:
this
-
pipelineConfig
@Stability(Stable) public CfnResolver.Builder pipelineConfig(CfnResolver.PipelineConfigProperty pipelineConfig) Functions linked with the pipeline resolver.- Parameters:
pipelineConfig
- Functions linked with the pipeline resolver. This parameter is required.- Returns:
this
-
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.
- Parameters:
requestMappingTemplate
- The request mapping template. This parameter is required.- Returns:
this
-
requestMappingTemplateS3Location
@Stability(Stable) public CfnResolver.Builder requestMappingTemplateS3Location(String 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.
- Parameters:
requestMappingTemplateS3Location
- The location of a request mapping template in an Amazon S3 bucket. This parameter is required.- Returns:
this
-
responseMappingTemplate
@Stability(Stable) public CfnResolver.Builder responseMappingTemplate(String responseMappingTemplate) The response mapping template.- Parameters:
responseMappingTemplate
- The response mapping template. This parameter is required.- Returns:
this
-
responseMappingTemplateS3Location
@Stability(Stable) public CfnResolver.Builder responseMappingTemplateS3Location(String 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.
- Parameters:
responseMappingTemplateS3Location
- The location of a response mapping template in an Amazon S3 bucket. This parameter is required.- Returns:
this
-
runtime
Describes a runtime used by an AWS AppSync pipeline 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.
- Parameters:
runtime
- Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function. This parameter is required.- Returns:
this
-
runtime
Describes a runtime used by an AWS AppSync pipeline 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.
- Parameters:
runtime
- Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function. This parameter is required.- Returns:
this
-
syncConfig
TheSyncConfig
for a resolver attached to a versioned data source.- Parameters:
syncConfig
- TheSyncConfig
for a resolver attached to a versioned data source. This parameter is required.- Returns:
this
-
syncConfig
TheSyncConfig
for a resolver attached to a versioned data source.- Parameters:
syncConfig
- TheSyncConfig
for a resolver attached to a versioned data source. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnResolver>
- Returns:
- a newly built instance of
CfnResolver
.
-