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.104.0 (build e79254c)",
date="2024-11-21T06:34:03.588Z")
@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
-
Constructor Summary
ModifierConstructorDescriptionFunctionRuntime
(FunctionRuntimeFamily family, String version) protected
FunctionRuntime
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
FunctionRuntime
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptiongetName()
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
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
Convert to Cfn runtime configuration property format. -
getName
The name of the runtime. -
getVersion
The runtime version.
-