Class FunctionRuntime

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.appsync.FunctionRuntime
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:33:57.705Z") @Stability(Stable) public class FunctionRuntime extends software.amazon.jsii.JsiiObject
Utility class for specifying specific appsync runtime versions.

Example:

 GraphqlApi api;
 AppsyncFunction myJsFunction = AppsyncFunction.Builder.create(this, "function")
         .name("my_js_function")
         .api(api)
         .dataSource(api.addNoneDataSource("none"))
         .code(Code.fromAsset("directory/function_code.js"))
         .runtime(FunctionRuntime.JS_1_0_0)
         .build();
 Resolver.Builder.create(this, "PipelineResolver")
         .api(api)
         .typeName("typeName")
         .fieldName("fieldName")
         .code(Code.fromInline("\n    // The before step\n    export function request(...args) {\n      console.log(args);\n      return {}\n    }\n\n    // The after step\n    export function response(ctx) {\n      return ctx.prev.result\n    }\n  "))
         .runtime(FunctionRuntime.JS_1_0_0)
         .pipelineConfig(List.of(myJsFunction))
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final FunctionRuntime
    APPSYNC_JS v1.0.0 runtime.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    FunctionRuntime(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    FunctionRuntime(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The name of the runtime.
    The runtime version.
    Convert to Cfn runtime configuration property format.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

    • JS_1_0_0

      @Stability(Stable) public static final FunctionRuntime JS_1_0_0
      APPSYNC_JS v1.0.0 runtime.
  • Constructor Details

    • FunctionRuntime

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

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

      @Stability(Stable) public FunctionRuntime(@NotNull FunctionRuntimeFamily family, @NotNull String version)
      Parameters:
      family - This parameter is required.
      version - This parameter is required.
  • Method Details

    • toProperties

      @Stability(Stable) @NotNull public RuntimeConfig toProperties()
      Convert to Cfn runtime configuration property format.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the runtime.
    • getVersion

      @Stability(Stable) @NotNull public String getVersion()
      The runtime version.