@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Container extends Object implements Serializable, Cloneable, StructuredPojo
Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.
Constructor and Description |
---|
Container() |
Modifier and Type | Method and Description |
---|---|
Container |
addEnvironmentEntry(String key,
String value)
Add a single Environment entry
|
Container |
addPortsEntry(String key,
String value)
Add a single Ports entry
|
Container |
clearEnvironmentEntries()
Removes all the entries added into Environment.
|
Container |
clearPortsEntries()
Removes all the entries added into Ports.
|
Container |
clone() |
boolean |
equals(Object obj) |
List<String> |
getCommand()
The launch command for the container.
|
Map<String,String> |
getEnvironment()
The environment variables of the container.
|
String |
getImage()
The name of the image used for the container.
|
Map<String,String> |
getPorts()
The open firewall ports of the container.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setCommand(Collection<String> command)
The launch command for the container.
|
void |
setEnvironment(Map<String,String> environment)
The environment variables of the container.
|
void |
setImage(String image)
The name of the image used for the container.
|
void |
setPorts(Map<String,String> ports)
The open firewall ports of the container.
|
String |
toString()
Returns a string representation of this object.
|
Container |
withCommand(Collection<String> command)
The launch command for the container.
|
Container |
withCommand(String... command)
The launch command for the container.
|
Container |
withEnvironment(Map<String,String> environment)
The environment variables of the container.
|
Container |
withImage(String image)
The name of the image used for the container.
|
Container |
withPorts(Map<String,String> ports)
The open firewall ports of the container.
|
public void setImage(String image)
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, if your container service name is
container-service-1
, the container image label is mystaticsite
, and you want to use the
third (3
) version of the registered container image, then you should specify
:container-service-1.mystaticsite.3
. To use the latest version of a container image, specify
latest
instead of a version number (for example,
:container-service-1.mystaticsite.latest
). Lightsail will automatically use the highest numbered
version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example,
nginx:latest
or nginx
.
image
- 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, if your container service name is
container-service-1
, the container image label is mystaticsite
, and you want to
use the third (3
) version of the registered container image, then you should specify
:container-service-1.mystaticsite.3
. To use the latest version of a container image, specify
latest
instead of a version number (for example,
:container-service-1.mystaticsite.latest
). Lightsail will automatically use the highest
numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example,
nginx:latest
or nginx
.
public String getImage()
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, if your container service name is
container-service-1
, the container image label is mystaticsite
, and you want to use the
third (3
) version of the registered container image, then you should specify
:container-service-1.mystaticsite.3
. To use the latest version of a container image, specify
latest
instead of a version number (for example,
:container-service-1.mystaticsite.latest
). Lightsail will automatically use the highest numbered
version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example,
nginx:latest
or nginx
.
Container images sourced from your Lightsail container service, that are registered and stored on your
service, start with a colon (:
). For example, if your container service name is
container-service-1
, the container image label is mystaticsite
, and you want to
use the third (3
) version of the registered container image, then you should specify
:container-service-1.mystaticsite.3
. To use the latest version of a container image, specify
latest
instead of a version number (for example,
:container-service-1.mystaticsite.latest
). Lightsail will automatically use the highest
numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example,
nginx:latest
or nginx
.
public Container withImage(String image)
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, if your container service name is
container-service-1
, the container image label is mystaticsite
, and you want to use the
third (3
) version of the registered container image, then you should specify
:container-service-1.mystaticsite.3
. To use the latest version of a container image, specify
latest
instead of a version number (for example,
:container-service-1.mystaticsite.latest
). Lightsail will automatically use the highest numbered
version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example,
nginx:latest
or nginx
.
image
- 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, if your container service name is
container-service-1
, the container image label is mystaticsite
, and you want to
use the third (3
) version of the registered container image, then you should specify
:container-service-1.mystaticsite.3
. To use the latest version of a container image, specify
latest
instead of a version number (for example,
:container-service-1.mystaticsite.latest
). Lightsail will automatically use the highest
numbered version of the registered container image.
Container images sourced from a public registry like Docker Hub don't start with a colon. For example,
nginx:latest
or nginx
.
public List<String> getCommand()
The launch command for the container.
public void setCommand(Collection<String> command)
The launch command for the container.
command
- The launch command for the container.public Container withCommand(String... command)
The launch command for the container.
NOTE: This method appends the values to the existing list (if any). Use
setCommand(java.util.Collection)
or withCommand(java.util.Collection)
if you want to override
the existing values.
command
- The launch command for the container.public Container withCommand(Collection<String> command)
The launch command for the container.
command
- The launch command for the container.public Map<String,String> getEnvironment()
The environment variables of the container.
public void setEnvironment(Map<String,String> environment)
The environment variables of the container.
environment
- The environment variables of the container.public Container withEnvironment(Map<String,String> environment)
The environment variables of the container.
environment
- The environment variables of the container.public Container addEnvironmentEntry(String key, String value)
public Container clearEnvironmentEntries()
public Map<String,String> getPorts()
The open firewall ports of the container.
public void setPorts(Map<String,String> ports)
The open firewall ports of the container.
ports
- The open firewall ports of the container.public Container withPorts(Map<String,String> ports)
The open firewall ports of the container.
ports
- The open firewall ports of the container.public Container clearPortsEntries()
public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.