FunctionRuntime
- class aws_cdk.aws_appsync.FunctionRuntime(family, version)
Bases:
object
Utility class for specifying specific appsync runtime versions.
- ExampleMetadata:
infused
Example:
# api: appsync.GraphqlApi my_js_function = appsync.AppsyncFunction(self, "function", name="my_js_function", api=api, data_source=api.add_none_data_source("none"), code=appsync.Code.from_asset("directory/function_code.js"), runtime=appsync.FunctionRuntime.JS_1_0_0 ) appsync.Resolver(self, "PipelineResolver", api=api, type_name="typeName", field_name="fieldName", code=appsync.Code.from_inline(""" // The before step export function request(...args) { console.log(args); return {} } // The after step export function response(ctx) { return ctx.prev.result } """), runtime=appsync.FunctionRuntime.JS_1_0_0, pipeline_config=[my_js_function] )
- Parameters:
family (
FunctionRuntimeFamily
) –version (
str
) –
Methods
- to_properties()
Convert to Cfn runtime configuration property format.
- Return type:
Attributes
- JS_1_0_0 = <aws_cdk.aws_appsync.FunctionRuntime object>
- name
The name of the runtime.
- version
The runtime version.