software.amazon.awscdk.services.lambda.Runtime Maven / Gradle / Ivy
Show all versions of lambda Show documentation
package software.amazon.awscdk.services.lambda;
/**
* Lambda function runtime environment.
*
* If you need to use a runtime name that doesn't exist as a static member, you
* can instantiate a Runtime
object, e.g: new Runtime('nodejs99.99')
.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.3.2 (build 237c474)", date = "2020-04-21T17:16:10.420Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.lambda.$Module.class, fqn = "@aws-cdk/aws-lambda.Runtime")
public class Runtime extends software.amazon.jsii.JsiiObject {
protected Runtime(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected Runtime(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
ALL = java.util.Collections.unmodifiableList(software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "ALL", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.Runtime.class))));
DOTNET_CORE_1 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "DOTNET_CORE_1", software.amazon.awscdk.services.lambda.Runtime.class);
DOTNET_CORE_2 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "DOTNET_CORE_2", software.amazon.awscdk.services.lambda.Runtime.class);
DOTNET_CORE_2_1 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "DOTNET_CORE_2_1", software.amazon.awscdk.services.lambda.Runtime.class);
DOTNET_CORE_3_1 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "DOTNET_CORE_3_1", software.amazon.awscdk.services.lambda.Runtime.class);
GO_1_X = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "GO_1_X", software.amazon.awscdk.services.lambda.Runtime.class);
JAVA_11 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "JAVA_11", software.amazon.awscdk.services.lambda.Runtime.class);
JAVA_8 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "JAVA_8", software.amazon.awscdk.services.lambda.Runtime.class);
NODEJS = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "NODEJS", software.amazon.awscdk.services.lambda.Runtime.class);
NODEJS_10_X = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "NODEJS_10_X", software.amazon.awscdk.services.lambda.Runtime.class);
NODEJS_12_X = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "NODEJS_12_X", software.amazon.awscdk.services.lambda.Runtime.class);
NODEJS_4_3 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "NODEJS_4_3", software.amazon.awscdk.services.lambda.Runtime.class);
NODEJS_6_10 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "NODEJS_6_10", software.amazon.awscdk.services.lambda.Runtime.class);
NODEJS_8_10 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "NODEJS_8_10", software.amazon.awscdk.services.lambda.Runtime.class);
PROVIDED = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "PROVIDED", software.amazon.awscdk.services.lambda.Runtime.class);
PYTHON_2_7 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "PYTHON_2_7", software.amazon.awscdk.services.lambda.Runtime.class);
PYTHON_3_6 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "PYTHON_3_6", software.amazon.awscdk.services.lambda.Runtime.class);
PYTHON_3_7 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "PYTHON_3_7", software.amazon.awscdk.services.lambda.Runtime.class);
PYTHON_3_8 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "PYTHON_3_8", software.amazon.awscdk.services.lambda.Runtime.class);
RUBY_2_5 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "RUBY_2_5", software.amazon.awscdk.services.lambda.Runtime.class);
RUBY_2_7 = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.lambda.Runtime.class, "RUBY_2_7", software.amazon.awscdk.services.lambda.Runtime.class);
}
/**
* @param name This parameter is required.
* @param family
* @param props
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Runtime(final @org.jetbrains.annotations.NotNull java.lang.String name, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.RuntimeFamily family, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.LambdaRuntimeProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(name, "name is required"), family, props });
}
/**
* @param name This parameter is required.
* @param family
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Runtime(final @org.jetbrains.annotations.NotNull java.lang.String name, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.RuntimeFamily family) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(name, "name is required"), family });
}
/**
* @param name This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Runtime(final @org.jetbrains.annotations.NotNull java.lang.String name) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(name, "name is required") });
}
/**
* @param other This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.Boolean runtimeEquals(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.lambda.Runtime other) {
return this.jsiiCall("runtimeEquals", java.lang.Boolean.class, new Object[] { java.util.Objects.requireNonNull(other, "other is required") });
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String toString() {
return this.jsiiCall("toString", java.lang.String.class);
}
/**
* A list of all known `Runtime`'s.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static java.util.List ALL;
/**
* The .NET Core 1.0 runtime (dotnetcore1.0).
*
* @deprecated Use {@link DOTNET_CORE_2_1}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public final static software.amazon.awscdk.services.lambda.Runtime DOTNET_CORE_1;
/**
* The .NET Core 2.0 runtime (dotnetcore2.0).
*
* @deprecated Use {@link DOTNET_CORE_2_1}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public final static software.amazon.awscdk.services.lambda.Runtime DOTNET_CORE_2;
/**
* The .NET Core 2.1 runtime (dotnetcore2.1).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime DOTNET_CORE_2_1;
/**
* The .NET Core 3.1 runtime (dotnetcore3.1).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime DOTNET_CORE_3_1;
/**
* The Go 1.x runtime (go1.x).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime GO_1_X;
/**
* The Java 11 runtime (java11).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime JAVA_11;
/**
* The Java 8 runtime (java8).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime JAVA_8;
/**
* The NodeJS runtime (nodejs).
*
* @deprecated Use {@link NODEJS_10_X}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public final static software.amazon.awscdk.services.lambda.Runtime NODEJS;
/**
* The NodeJS 10.x runtime (nodejs10.x).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime NODEJS_10_X;
/**
* The NodeJS 12.x runtime (nodejs12.x).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime NODEJS_12_X;
/**
* The NodeJS 4.3 runtime (nodejs4.3).
*
* @deprecated Use {@link NODEJS_10_X}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public final static software.amazon.awscdk.services.lambda.Runtime NODEJS_4_3;
/**
* The NodeJS 6.10 runtime (nodejs6.10).
*
* @deprecated Use {@link NODEJS_10_X}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public final static software.amazon.awscdk.services.lambda.Runtime NODEJS_6_10;
/**
* The NodeJS 8.10 runtime (nodejs8.10).
*
* @deprecated Use {@link NODEJS_10_X}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public final static software.amazon.awscdk.services.lambda.Runtime NODEJS_8_10;
/**
* The custom provided runtime (provided).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime PROVIDED;
/**
* The Python 2.7 runtime (python2.7).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime PYTHON_2_7;
/**
* The Python 3.6 runtime (python3.6).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime PYTHON_3_6;
/**
* The Python 3.7 runtime (python3.7).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime PYTHON_3_7;
/**
* The Python 3.8 runtime (python3.8).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime PYTHON_3_8;
/**
* The Ruby 2.5 runtime (ruby2.5).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime RUBY_2_5;
/**
* The Ruby 2.7 runtime (ruby2.7).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static software.amazon.awscdk.services.lambda.Runtime RUBY_2_7;
/**
* The name of this runtime, as expected by the Lambda resource.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getName() {
return this.jsiiGet("name", java.lang.String.class);
}
/**
* Whether the ``ZipFile`` (aka inline code) property can be used with this runtime.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.Boolean getSupportsInlineCode() {
return this.jsiiGet("supportsInlineCode", java.lang.Boolean.class);
}
/**
* The runtime family.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.RuntimeFamily getFamily() {
return this.jsiiGet("family", software.amazon.awscdk.services.lambda.RuntimeFamily.class);
}
/**
* A fluent builder for {@link software.amazon.awscdk.services.lambda.Runtime}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder {
/**
* @return a new instance of {@link Builder}.
* @param name This parameter is required.
* @param family
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final java.lang.String name, final software.amazon.awscdk.services.lambda.RuntimeFamily family) {
return new Builder(name, family);
}
/**
* @return a new instance of {@link Builder}.
* @param name This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final java.lang.String name) {
return new Builder(name, null);
}
private final java.lang.String name;
private final software.amazon.awscdk.services.lambda.RuntimeFamily family;
private software.amazon.awscdk.services.lambda.LambdaRuntimeProps.Builder props;
private Builder(final java.lang.String name, final software.amazon.awscdk.services.lambda.RuntimeFamily family) {
this.name = name;
this.family = family;
}
/**
* Whether the ``ZipFile`` (aka inline code) property can be used with this runtime.
*
* Default: false
*
* @return {@code this}
* @param supportsInlineCode Whether the ``ZipFile`` (aka inline code) property can be used with this runtime. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder supportsInlineCode(final java.lang.Boolean supportsInlineCode) {
this.props().supportsInlineCode(supportsInlineCode);
return this;
}
/**
* @returns a newly built instance of {@link software.amazon.awscdk.services.lambda.Runtime}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public software.amazon.awscdk.services.lambda.Runtime build() {
return new software.amazon.awscdk.services.lambda.Runtime(
this.name,
this.family,
this.props != null ? this.props.build() : null
);
}
private software.amazon.awscdk.services.lambda.LambdaRuntimeProps.Builder props() {
if (this.props == null) {
this.props = new software.amazon.awscdk.services.lambda.LambdaRuntimeProps.Builder();
}
return this.props;
}
}
}