/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.lightsail.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container * service. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Container implements Serializable, Cloneable, StructuredPojo { /** ** 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
.
*
* The launch command for the container. *
*/ private java.util.List* The environment variables of the container. *
*/ private java.util.Map* The open firewall ports of the container. *
*/ private java.util.Map* 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 void setImage(String image) {
this.image = 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
.
*
* 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() {
return this.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
.
*
* 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
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Container withImage(String image) {
setImage(image);
return this;
}
/**
*
* The launch command for the container. *
* * @return The launch command for the container. */ public java.util.List* The launch command for the container. *
* * @param command * The launch command for the container. */ public void setCommand(java.util.Collection* The launch command for the container. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setCommand(java.util.Collection)} or {@link #withCommand(java.util.Collection)} if you want to override * the existing values. *
* * @param command * The launch command for the container. * @return Returns a reference to this object so that method calls can be chained together. */ public Container withCommand(String... command) { if (this.command == null) { setCommand(new java.util.ArrayList* The launch command for the container. *
* * @param command * The launch command for the container. * @return Returns a reference to this object so that method calls can be chained together. */ public Container withCommand(java.util.Collection* The environment variables of the container. *
* * @return The environment variables of the container. */ public java.util.Map* The environment variables of the container. *
* * @param environment * The environment variables of the container. */ public void setEnvironment(java.util.Map* The environment variables of the container. *
* * @param environment * The environment variables of the container. * @return Returns a reference to this object so that method calls can be chained together. */ public Container withEnvironment(java.util.Map* The open firewall ports of the container. *
* * @return The open firewall ports of the container. */ public java.util.Map* The open firewall ports of the container. *
* * @param ports * The open firewall ports of the container. */ public void setPorts(java.util.Map* The open firewall ports of the container. *
* * @param ports * The open firewall ports of the container. * @return Returns a reference to this object so that method calls can be chained together. */ public Container withPorts(java.util.Map