Class FunctionRuntime
Utility class for specifying specific appsync runtime versions.
Inheritance
System.Object
FunctionRuntime
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class FunctionRuntime : DeputyBase
Syntax (vb)
Public Class FunctionRuntime
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
GraphqlApi api;
var myJsFunction = new AppsyncFunction(this, "function", new AppsyncFunctionProps {
Name = "my_js_function",
Api = api,
DataSource = api.AddNoneDataSource("none"),
Code = Code.FromAsset("directory/function_code.js"),
Runtime = FunctionRuntime.JS_1_0_0
});
new Resolver(this, "PipelineResolver", new ResolverProps {
Api = api,
TypeName = "typeName",
FieldName = "fieldName",
Code = Code.FromInline(@"
// The before step
export function request(...args) {
console.log(args);
return {}
}
// The after step
export function response(ctx) {
return ctx.prev.result
}
"),
Runtime = FunctionRuntime.JS_1_0_0,
PipelineConfig = new [] { myJsFunction }
});
Synopsis
Constructors
FunctionRuntime(FunctionRuntimeFamily, String) | |
FunctionRuntime(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
FunctionRuntime(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
JS_1_0_0 | APPSYNC_JS v1.0.0 runtime. |
Name | The name of the runtime. |
Version | The runtime version. |
Methods
ToProperties() | Convert to Cfn runtime configuration property format. |
Constructors
FunctionRuntime(FunctionRuntimeFamily, String)
public FunctionRuntime(FunctionRuntimeFamily family, string version)
Parameters
- family FunctionRuntimeFamily
- version System.String
FunctionRuntime(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected FunctionRuntime(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
FunctionRuntime(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected FunctionRuntime(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
JS_1_0_0
APPSYNC_JS v1.0.0 runtime.
public static FunctionRuntime JS_1_0_0 { get; }
Property Value
Name
The name of the runtime.
public virtual string Name { get; }
Property Value
System.String
Version
The runtime version.
public virtual string Version { get; }
Property Value
System.String
Methods
ToProperties()
Convert to Cfn runtime configuration property format.
public virtual IRuntimeConfig ToProperties()
Returns