@Generated(value="jsii-pacmak/1.46.0 (build cd08c55)", date="2021-11-25T20:11:07.160Z") @Stability(value=Experimental) public class NodejsFunction extends Function
Example:
NodejsFunction.Builder.create(this, "my-handler")
.bundling(BundlingOptions.builder()
.minify(true) // minify code, defaults to false
.sourceMap(true) // include source map, defaults to false
.sourceMapMode(SourceMapMode.INLINE) // defaults to SourceMapMode.DEFAULT
.sourcesContent(false) // do not include original source into source map, defaults to true
.target("es2020") // target environment for the generated JavaScript code
.loader(Map.of( // Use the 'dataurl' loader for '.png' files
".png", "dataurl"))
.define(Map.of( // Replace strings during build time
"process.env.API_KEY", JSON.stringify("xxx-xxxx-xxx"),
"process.env.PRODUCTION", JSON.stringify(true),
"process.env.NUMBER", JSON.stringify(123)))
.logLevel(LogLevel.SILENT) // defaults to LogLevel.WARNING
.keepNames(true) // defaults to false
.tsconfig("custom-tsconfig.json") // use custom-tsconfig.json instead of default,
.metafile(true) // include meta file, defaults to false
.banner("/* comments */") // requires esbuild >= 0.9.0, defaults to none
.footer("/* comments */") // requires esbuild >= 0.9.0, defaults to none
.charset(Charset.UTF8)
.build())
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
NodejsFunction.Builder
(experimental) A fluent builder for
NodejsFunction. |
software.amazon.jsii.JsiiObject.InitializationModeIFunction.Jsii$DefaultIClientVpnConnectionHandler.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
NodejsFunction(software.constructs.Construct scope,
String id) |
|
NodejsFunction(software.constructs.Construct scope,
String id,
NodejsFunctionProps props) |
protected |
NodejsFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
NodejsFunction(software.amazon.jsii.JsiiObjectRef objRef) |
addEnvironment, addEnvironment, addLayers, classifyVersionProperty, fromFunctionArn, fromFunctionAttributes, getArchitecture, getCanCreatePermissions, getCurrentVersion, getDeadLetterQueue, getFunctionArn, getFunctionName, getGrantPrincipal, getLogGroup, getPermissionsNode, getRole, getRuntime, metricAll, metricAll, metricAllConcurrentExecutions, metricAllConcurrentExecutions, metricAllDuration, metricAllDuration, metricAllErrors, metricAllErrors, metricAllInvocations, metricAllInvocations, metricAllThrottles, metricAllThrottles, metricAllUnreservedConcurrentExecutions, metricAllUnreservedConcurrentExecutionsaddEventSource, addEventSourceMapping, addPermission, addToRolePolicy, configureAsyncInvoke, getConnections, getIsBoundToVpc, getLatestVersion, grantInvoke, metric, metric, metricDuration, metricDuration, metricErrors, metricErrors, metricInvocations, metricInvocations, metricThrottles, metricThrottlesapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected NodejsFunction(software.amazon.jsii.JsiiObjectRef objRef)
protected NodejsFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public NodejsFunction(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
NodejsFunctionProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Experimental)
public NodejsFunction(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.Copyright © 2021. All rights reserved.