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 Details

    • create

      @Stability(Stable) public static CfnResolver.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnResolver.Builder.
    • apiId

      @Stability(Stable) public CfnResolver.Builder apiId(String 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

      @Stability(Stable) public CfnResolver.Builder fieldName(String 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

      @Stability(Stable) public CfnResolver.Builder typeName(String typeName)
      The GraphQL type that invokes this resolver.

      Parameters:
      typeName - The GraphQL type that invokes this resolver. This parameter is required.
      Returns:
      this
    • cachingConfig

      @Stability(Stable) public CfnResolver.Builder cachingConfig(IResolvable 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

      @Stability(Stable) public CfnResolver.Builder code(String code)
      The resolver code that contains the request and response functions.

      When code is used, the runtime is required. The runtime value must be APPSYNC_JS .

      Parameters:
      code - The resolver code that contains the request and response functions. This parameter is required.
      Returns:
      this
    • codeS3Location

      @Stability(Stable) public CfnResolver.Builder codeS3Location(String codeS3Location)
      The Amazon S3 endpoint.

      Parameters:
      codeS3Location - The Amazon S3 endpoint. This parameter is required.
      Returns:
      this
    • dataSourceName

      @Stability(Stable) public CfnResolver.Builder dataSourceName(String dataSourceName)
      The resolver data source name.

      Parameters:
      dataSourceName - The resolver data source name. This parameter is required.
      Returns:
      this
    • kind

      @Stability(Stable) public CfnResolver.Builder kind(String 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

      @Stability(Stable) public CfnResolver.Builder maxBatchSize(Number maxBatchSize)
      The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.

      Parameters:
      maxBatchSize - The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation. This parameter is required.
      Returns:
      this
    • pipelineConfig

      @Stability(Stable) public CfnResolver.Builder pipelineConfig(IResolvable 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

      @Stability(Stable) public CfnResolver.Builder requestMappingTemplate(String 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

      @Stability(Stable) public CfnResolver.Builder runtime(IResolvable 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

      @Stability(Stable) public CfnResolver.Builder runtime(CfnResolver.AppSyncRuntimeProperty 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

      @Stability(Stable) public CfnResolver.Builder syncConfig(IResolvable syncConfig)
      The SyncConfig for a resolver attached to a versioned data source.

      Parameters:
      syncConfig - The SyncConfig for a resolver attached to a versioned data source. This parameter is required.
      Returns:
      this
    • syncConfig

      @Stability(Stable) public CfnResolver.Builder syncConfig(CfnResolver.SyncConfigProperty syncConfig)
      The SyncConfig for a resolver attached to a versioned data source.

      Parameters:
      syncConfig - The SyncConfig for a resolver attached to a versioned data source. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnResolver build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnResolver>
      Returns:
      a newly built instance of CfnResolver.