Class AppsyncFunction

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.appsync.AppsyncFunction
All Implemented Interfaces:
IConstruct, IDependable, IResource, IAppsyncFunction, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:49.352Z") @Stability(Experimental) public class AppsyncFunction extends Resource implements IAppsyncFunction
(experimental) AppSync Functions are local functions that perform certain operations onto a backend data source.

Developers can compose operations (Functions) and execute them in sequence with Pipeline Resolvers.

Example:

 GraphqlApi api;
 AppsyncFunction appsyncFunction = AppsyncFunction.Builder.create(this, "function")
         .name("appsync_function")
         .api(api)
         .dataSource(api.addNoneDataSource("none"))
         .requestMappingTemplate(MappingTemplate.fromFile("request.vtl"))
         .responseMappingTemplate(MappingTemplate.fromFile("response.vtl"))
         .build();
 
  • Constructor Details

    • AppsyncFunction

      protected AppsyncFunction(software.amazon.jsii.JsiiObjectRef objRef)
    • AppsyncFunction

      protected AppsyncFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • AppsyncFunction

      @Stability(Experimental) public AppsyncFunction(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AppsyncFunctionProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromAppsyncFunctionAttributes

      @Stability(Experimental) @NotNull public static IAppsyncFunction fromAppsyncFunctionAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AppsyncFunctionAttributes attrs)
      (experimental) Import Appsync Function from arn.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • getDataSource

      @Stability(Experimental) @NotNull public BaseDataSource getDataSource()
      (experimental) the data source of this AppSync Function.
    • getFunctionArn

      @Stability(Experimental) @NotNull public String getFunctionArn()
      (experimental) the ARN of the AppSync function.
      Specified by:
      getFunctionArn in interface IAppsyncFunction
    • getFunctionId

      @Stability(Experimental) @NotNull public String getFunctionId()
      (experimental) the ID of the AppSync function.
      Specified by:
      getFunctionId in interface IAppsyncFunction
    • getFunctionName

      @Stability(Experimental) @NotNull public String getFunctionName()
      (experimental) the name of this AppSync Function.