com.pulumi.aws.lightsail.outputs.ContainerServiceDeploymentVersionContainer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** 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.aws.lightsail.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import javax.annotation.Nullable;
@CustomType
public final class ContainerServiceDeploymentVersionContainer {
/**
* @return The launch command for the container. A list of string.
*
*/
private @Nullable List commands;
/**
* @return The name for the container.
*
*/
private String containerName;
/**
* @return A key-value map of the environment variables of the container.
*
*/
private @Nullable Map environment;
/**
* @return The name of the image used for the container. Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (`:`). For example, `:container-service-1.mystaticwebsite.1`. Container images sourced from a public registry like Docker Hub don't start with a colon. For example, `nginx:latest` or `nginx`.
*
*/
private String image;
/**
* @return A key-value map of the open firewall ports of the container. Valid values: `HTTP`, `HTTPS`, `TCP`, `UDP`.
*
*/
private @Nullable Map ports;
private ContainerServiceDeploymentVersionContainer() {}
/**
* @return The launch command for the container. A list of string.
*
*/
public List commands() {
return this.commands == null ? List.of() : this.commands;
}
/**
* @return The name for the container.
*
*/
public String containerName() {
return this.containerName;
}
/**
* @return A key-value map of the environment variables of the container.
*
*/
public Map environment() {
return this.environment == null ? Map.of() : this.environment;
}
/**
* @return The name of the image used for the container. Container images sourced from your Lightsail container service, that are registered and stored on your service, start with a colon (`:`). For example, `:container-service-1.mystaticwebsite.1`. Container images sourced from a public registry like Docker Hub don't start with a colon. For example, `nginx:latest` or `nginx`.
*
*/
public String image() {
return this.image;
}
/**
* @return A key-value map of the open firewall ports of the container. Valid values: `HTTP`, `HTTPS`, `TCP`, `UDP`.
*
*/
public Map ports() {
return this.ports == null ? Map.of() : this.ports;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ContainerServiceDeploymentVersionContainer defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable List commands;
private String containerName;
private @Nullable Map environment;
private String image;
private @Nullable Map ports;
public Builder() {}
public Builder(ContainerServiceDeploymentVersionContainer defaults) {
Objects.requireNonNull(defaults);
this.commands = defaults.commands;
this.containerName = defaults.containerName;
this.environment = defaults.environment;
this.image = defaults.image;
this.ports = defaults.ports;
}
@CustomType.Setter
public Builder commands(@Nullable List commands) {
this.commands = commands;
return this;
}
public Builder commands(String... commands) {
return commands(List.of(commands));
}
@CustomType.Setter
public Builder containerName(String containerName) {
if (containerName == null) {
throw new MissingRequiredPropertyException("ContainerServiceDeploymentVersionContainer", "containerName");
}
this.containerName = containerName;
return this;
}
@CustomType.Setter
public Builder environment(@Nullable Map environment) {
this.environment = environment;
return this;
}
@CustomType.Setter
public Builder image(String image) {
if (image == null) {
throw new MissingRequiredPropertyException("ContainerServiceDeploymentVersionContainer", "image");
}
this.image = image;
return this;
}
@CustomType.Setter
public Builder ports(@Nullable Map ports) {
this.ports = ports;
return this;
}
public ContainerServiceDeploymentVersionContainer build() {
final var _resultValue = new ContainerServiceDeploymentVersionContainer();
_resultValue.commands = commands;
_resultValue.containerName = containerName;
_resultValue.environment = environment;
_resultValue.image = image;
_resultValue.ports = ports;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy