All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.ecs.LinuxParameters Maven / Gradle / Ivy

There is a newer version: 1.204.0
Show newest version
package software.amazon.awscdk.services.ecs;

/**
 * Linux-specific options that are applied to the container.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.15.0 (build 585166b)", date = "2021-01-06T15:18:00.632Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ecs.$Module.class, fqn = "@aws-cdk/aws-ecs.LinuxParameters")
public class LinuxParameters extends software.amazon.awscdk.core.Construct {

    protected LinuxParameters(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected LinuxParameters(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * Constructs a new instance of the LinuxParameters class.
     * 

* @param scope This parameter is required. * @param id This parameter is required. * @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public LinuxParameters(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ecs.LinuxParametersProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), props }); } /** * Constructs a new instance of the LinuxParameters class. *

* @param scope This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public LinuxParameters(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required") }); } /** * Adds one or more Linux capabilities to the Docker configuration of a container. *

* Only works with EC2 launch type. *

* @param cap This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void addCapabilities(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.Capability... cap) { software.amazon.jsii.Kernel.call(this, "addCapabilities", software.amazon.jsii.NativeType.VOID, java.util.Arrays.stream(cap).toArray(Object[]::new)); } /** * Adds one or more host devices to a container. *

* @param device This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void addDevices(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.Device... device) { software.amazon.jsii.Kernel.call(this, "addDevices", software.amazon.jsii.NativeType.VOID, java.util.Arrays.stream(device).toArray(Object[]::new)); } /** * Specifies the container path, mount options, and size (in MiB) of the tmpfs mount for a container. *

* Only works with EC2 launch type. *

* @param tmpfs This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void addTmpfs(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.Tmpfs... tmpfs) { software.amazon.jsii.Kernel.call(this, "addTmpfs", software.amazon.jsii.NativeType.VOID, java.util.Arrays.stream(tmpfs).toArray(Object[]::new)); } /** * Removes one or more Linux capabilities to the Docker configuration of a container. *

* Only works with EC2 launch type. *

* @param cap This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void dropCapabilities(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.Capability... cap) { software.amazon.jsii.Kernel.call(this, "dropCapabilities", software.amazon.jsii.NativeType.VOID, java.util.Arrays.stream(cap).toArray(Object[]::new)); } /** * Renders the Linux parameters to a CloudFormation object. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.CfnTaskDefinition.LinuxParametersProperty renderLinuxParameters() { return software.amazon.jsii.Kernel.call(this, "renderLinuxParameters", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.CfnTaskDefinition.LinuxParametersProperty.class)); } /** * A fluent builder for {@link software.amazon.awscdk.services.ecs.LinuxParameters}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private software.amazon.awscdk.services.ecs.LinuxParametersProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; } /** * Specifies whether to run an init process inside the container that forwards signals and reaps processes. *

* Default: false *

* @return {@code this} * @param initProcessEnabled Specifies whether to run an init process inside the container that forwards signals and reaps processes. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder initProcessEnabled(final java.lang.Boolean initProcessEnabled) { this.props().initProcessEnabled(initProcessEnabled); return this; } /** * The value for the size (in MiB) of the /dev/shm volume. *

* Default: No shared memory. *

* @return {@code this} * @param sharedMemorySize The value for the size (in MiB) of the /dev/shm volume. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder sharedMemorySize(final java.lang.Number sharedMemorySize) { this.props().sharedMemorySize(sharedMemorySize); return this; } /** * @returns a newly built instance of {@link software.amazon.awscdk.services.ecs.LinuxParameters}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public software.amazon.awscdk.services.ecs.LinuxParameters build() { return new software.amazon.awscdk.services.ecs.LinuxParameters( this.scope, this.id, this.props != null ? this.props.build() : null ); } private software.amazon.awscdk.services.ecs.LinuxParametersProps.Builder props() { if (this.props == null) { this.props = new software.amazon.awscdk.services.ecs.LinuxParametersProps.Builder(); } return this.props; } } }