Class AppsyncFunction.Builder

java.lang.Object
software.amazon.awscdk.services.appsync.AppsyncFunction.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<AppsyncFunction>
Enclosing class:
AppsyncFunction

@Stability(Stable) public static final class AppsyncFunction.Builder extends Object implements software.amazon.jsii.Builder<AppsyncFunction>
A fluent builder for AppsyncFunction.
  • Method Details

    • create

      @Stability(Stable) public static AppsyncFunction.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of AppsyncFunction.Builder.
    • name

      @Stability(Stable) public AppsyncFunction.Builder name(String name)
      the name of the AppSync Function.

      Parameters:
      name - the name of the AppSync Function. This parameter is required.
      Returns:
      this
    • code

      @Stability(Stable) public AppsyncFunction.Builder code(Code code)
      The function code.

      Default: - no code is used

      Parameters:
      code - The function code. This parameter is required.
      Returns:
      this
    • description

      @Stability(Stable) public AppsyncFunction.Builder description(String description)
      the description for this AppSync Function.

      Default: - no description

      Parameters:
      description - the description for this AppSync Function. This parameter is required.
      Returns:
      this
    • requestMappingTemplate

      @Stability(Stable) public AppsyncFunction.Builder requestMappingTemplate(MappingTemplate requestMappingTemplate)
      the request mapping template for the AppSync Function.

      Default: - no request mapping template

      Parameters:
      requestMappingTemplate - the request mapping template for the AppSync Function. This parameter is required.
      Returns:
      this
    • responseMappingTemplate

      @Stability(Stable) public AppsyncFunction.Builder responseMappingTemplate(MappingTemplate responseMappingTemplate)
      the response mapping template for the AppSync Function.

      Default: - no response mapping template

      Parameters:
      responseMappingTemplate - the response mapping template for the AppSync Function. This parameter is required.
      Returns:
      this
    • runtime

      @Stability(Stable) public AppsyncFunction.Builder runtime(FunctionRuntime runtime)
      The functions runtime.

      Default: - no function runtime, VTL mapping templates used

      Parameters:
      runtime - The functions runtime. This parameter is required.
      Returns:
      this
    • api

      @Stability(Stable) public AppsyncFunction.Builder api(IGraphqlApi api)
      the GraphQL Api linked to this AppSync Function.

      Parameters:
      api - the GraphQL Api linked to this AppSync Function. This parameter is required.
      Returns:
      this
    • dataSource

      @Stability(Stable) public AppsyncFunction.Builder dataSource(BaseDataSource dataSource)
      the data source linked to this AppSync Function.

      Parameters:
      dataSource - the data source linked to this AppSync Function. This parameter is required.
      Returns:
      this
    • build

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