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

com.pulumi.azurenative.containerinstance.inputs.ContainerArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.containerinstance.inputs;

import com.pulumi.azurenative.containerinstance.inputs.ConfigMapArgs;
import com.pulumi.azurenative.containerinstance.inputs.ContainerPortArgs;
import com.pulumi.azurenative.containerinstance.inputs.ContainerProbeArgs;
import com.pulumi.azurenative.containerinstance.inputs.EnvironmentVariableArgs;
import com.pulumi.azurenative.containerinstance.inputs.ResourceRequirementsArgs;
import com.pulumi.azurenative.containerinstance.inputs.SecurityContextDefinitionArgs;
import com.pulumi.azurenative.containerinstance.inputs.VolumeMountArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * A container instance.
 * 
 */
public final class ContainerArgs extends com.pulumi.resources.ResourceArgs {

    public static final ContainerArgs Empty = new ContainerArgs();

    /**
     * The commands to execute within the container instance in exec form.
     * 
     */
    @Import(name="command")
    private @Nullable Output> command;

    /**
     * @return The commands to execute within the container instance in exec form.
     * 
     */
    public Optional>> command() {
        return Optional.ofNullable(this.command);
    }

    /**
     * The config map.
     * 
     */
    @Import(name="configMap")
    private @Nullable Output configMap;

    /**
     * @return The config map.
     * 
     */
    public Optional> configMap() {
        return Optional.ofNullable(this.configMap);
    }

    /**
     * The environment variables to set in the container instance.
     * 
     */
    @Import(name="environmentVariables")
    private @Nullable Output> environmentVariables;

    /**
     * @return The environment variables to set in the container instance.
     * 
     */
    public Optional>> environmentVariables() {
        return Optional.ofNullable(this.environmentVariables);
    }

    /**
     * The name of the image used to create the container instance.
     * 
     */
    @Import(name="image")
    private @Nullable Output image;

    /**
     * @return The name of the image used to create the container instance.
     * 
     */
    public Optional> image() {
        return Optional.ofNullable(this.image);
    }

    /**
     * The liveness probe.
     * 
     */
    @Import(name="livenessProbe")
    private @Nullable Output livenessProbe;

    /**
     * @return The liveness probe.
     * 
     */
    public Optional> livenessProbe() {
        return Optional.ofNullable(this.livenessProbe);
    }

    /**
     * The user-provided name of the container instance.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return The user-provided name of the container instance.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * The exposed ports on the container instance.
     * 
     */
    @Import(name="ports")
    private @Nullable Output> ports;

    /**
     * @return The exposed ports on the container instance.
     * 
     */
    public Optional>> ports() {
        return Optional.ofNullable(this.ports);
    }

    /**
     * The readiness probe.
     * 
     */
    @Import(name="readinessProbe")
    private @Nullable Output readinessProbe;

    /**
     * @return The readiness probe.
     * 
     */
    public Optional> readinessProbe() {
        return Optional.ofNullable(this.readinessProbe);
    }

    /**
     * The resource requirements of the container instance.
     * 
     */
    @Import(name="resources")
    private @Nullable Output resources;

    /**
     * @return The resource requirements of the container instance.
     * 
     */
    public Optional> resources() {
        return Optional.ofNullable(this.resources);
    }

    /**
     * The container security properties.
     * 
     */
    @Import(name="securityContext")
    private @Nullable Output securityContext;

    /**
     * @return The container security properties.
     * 
     */
    public Optional> securityContext() {
        return Optional.ofNullable(this.securityContext);
    }

    /**
     * The volume mounts available to the container instance.
     * 
     */
    @Import(name="volumeMounts")
    private @Nullable Output> volumeMounts;

    /**
     * @return The volume mounts available to the container instance.
     * 
     */
    public Optional>> volumeMounts() {
        return Optional.ofNullable(this.volumeMounts);
    }

    private ContainerArgs() {}

    private ContainerArgs(ContainerArgs $) {
        this.command = $.command;
        this.configMap = $.configMap;
        this.environmentVariables = $.environmentVariables;
        this.image = $.image;
        this.livenessProbe = $.livenessProbe;
        this.name = $.name;
        this.ports = $.ports;
        this.readinessProbe = $.readinessProbe;
        this.resources = $.resources;
        this.securityContext = $.securityContext;
        this.volumeMounts = $.volumeMounts;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(ContainerArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private ContainerArgs $;

        public Builder() {
            $ = new ContainerArgs();
        }

        public Builder(ContainerArgs defaults) {
            $ = new ContainerArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param command The commands to execute within the container instance in exec form.
         * 
         * @return builder
         * 
         */
        public Builder command(@Nullable Output> command) {
            $.command = command;
            return this;
        }

        /**
         * @param command The commands to execute within the container instance in exec form.
         * 
         * @return builder
         * 
         */
        public Builder command(List command) {
            return command(Output.of(command));
        }

        /**
         * @param command The commands to execute within the container instance in exec form.
         * 
         * @return builder
         * 
         */
        public Builder command(String... command) {
            return command(List.of(command));
        }

        /**
         * @param configMap The config map.
         * 
         * @return builder
         * 
         */
        public Builder configMap(@Nullable Output configMap) {
            $.configMap = configMap;
            return this;
        }

        /**
         * @param configMap The config map.
         * 
         * @return builder
         * 
         */
        public Builder configMap(ConfigMapArgs configMap) {
            return configMap(Output.of(configMap));
        }

        /**
         * @param environmentVariables The environment variables to set in the container instance.
         * 
         * @return builder
         * 
         */
        public Builder environmentVariables(@Nullable Output> environmentVariables) {
            $.environmentVariables = environmentVariables;
            return this;
        }

        /**
         * @param environmentVariables The environment variables to set in the container instance.
         * 
         * @return builder
         * 
         */
        public Builder environmentVariables(List environmentVariables) {
            return environmentVariables(Output.of(environmentVariables));
        }

        /**
         * @param environmentVariables The environment variables to set in the container instance.
         * 
         * @return builder
         * 
         */
        public Builder environmentVariables(EnvironmentVariableArgs... environmentVariables) {
            return environmentVariables(List.of(environmentVariables));
        }

        /**
         * @param image The name of the image used to create the container instance.
         * 
         * @return builder
         * 
         */
        public Builder image(@Nullable Output image) {
            $.image = image;
            return this;
        }

        /**
         * @param image The name of the image used to create the container instance.
         * 
         * @return builder
         * 
         */
        public Builder image(String image) {
            return image(Output.of(image));
        }

        /**
         * @param livenessProbe The liveness probe.
         * 
         * @return builder
         * 
         */
        public Builder livenessProbe(@Nullable Output livenessProbe) {
            $.livenessProbe = livenessProbe;
            return this;
        }

        /**
         * @param livenessProbe The liveness probe.
         * 
         * @return builder
         * 
         */
        public Builder livenessProbe(ContainerProbeArgs livenessProbe) {
            return livenessProbe(Output.of(livenessProbe));
        }

        /**
         * @param name The user-provided name of the container instance.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The user-provided name of the container instance.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param ports The exposed ports on the container instance.
         * 
         * @return builder
         * 
         */
        public Builder ports(@Nullable Output> ports) {
            $.ports = ports;
            return this;
        }

        /**
         * @param ports The exposed ports on the container instance.
         * 
         * @return builder
         * 
         */
        public Builder ports(List ports) {
            return ports(Output.of(ports));
        }

        /**
         * @param ports The exposed ports on the container instance.
         * 
         * @return builder
         * 
         */
        public Builder ports(ContainerPortArgs... ports) {
            return ports(List.of(ports));
        }

        /**
         * @param readinessProbe The readiness probe.
         * 
         * @return builder
         * 
         */
        public Builder readinessProbe(@Nullable Output readinessProbe) {
            $.readinessProbe = readinessProbe;
            return this;
        }

        /**
         * @param readinessProbe The readiness probe.
         * 
         * @return builder
         * 
         */
        public Builder readinessProbe(ContainerProbeArgs readinessProbe) {
            return readinessProbe(Output.of(readinessProbe));
        }

        /**
         * @param resources The resource requirements of the container instance.
         * 
         * @return builder
         * 
         */
        public Builder resources(@Nullable Output resources) {
            $.resources = resources;
            return this;
        }

        /**
         * @param resources The resource requirements of the container instance.
         * 
         * @return builder
         * 
         */
        public Builder resources(ResourceRequirementsArgs resources) {
            return resources(Output.of(resources));
        }

        /**
         * @param securityContext The container security properties.
         * 
         * @return builder
         * 
         */
        public Builder securityContext(@Nullable Output securityContext) {
            $.securityContext = securityContext;
            return this;
        }

        /**
         * @param securityContext The container security properties.
         * 
         * @return builder
         * 
         */
        public Builder securityContext(SecurityContextDefinitionArgs securityContext) {
            return securityContext(Output.of(securityContext));
        }

        /**
         * @param volumeMounts The volume mounts available to the container instance.
         * 
         * @return builder
         * 
         */
        public Builder volumeMounts(@Nullable Output> volumeMounts) {
            $.volumeMounts = volumeMounts;
            return this;
        }

        /**
         * @param volumeMounts The volume mounts available to the container instance.
         * 
         * @return builder
         * 
         */
        public Builder volumeMounts(List volumeMounts) {
            return volumeMounts(Output.of(volumeMounts));
        }

        /**
         * @param volumeMounts The volume mounts available to the container instance.
         * 
         * @return builder
         * 
         */
        public Builder volumeMounts(VolumeMountArgs... volumeMounts) {
            return volumeMounts(List.of(volumeMounts));
        }

        public ContainerArgs build() {
            if ($.name == null) {
                throw new MissingRequiredPropertyException("ContainerArgs", "name");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy