@Stability(value=Stable)
public static interface CfnContainer.ContainerProperty
extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lightsail.*;
ContainerProperty containerProperty = ContainerProperty.builder()
.command(List.of("command"))
.containerName("containerName")
.environment(List.of(EnvironmentVariableProperty.builder()
.value("value")
.variable("variable")
.build()))
.image("image")
.ports(List.of(PortInfoProperty.builder()
.port("port")
.protocol("protocol")
.build()))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnContainer.ContainerProperty.Builder
A builder for
CfnContainer.ContainerProperty |
static class |
CfnContainer.ContainerProperty.Jsii$Proxy
An implementation for
CfnContainer.ContainerProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnContainer.ContainerProperty.Builder |
builder() |
default List<String> |
getCommand()
The launch command for the container.
|
default String |
getContainerName()
The name of the container.
|
default Object |
getEnvironment()
The environment variables of the container.
|
default String |
getImage()
The name of the image used for the container.
|
default Object |
getPorts()
An object that describes the open firewall ports and protocols of the container.
|
@Stability(value=Stable) @Nullable default List<String> getCommand()
@Stability(value=Stable) @Nullable default String getContainerName()
@Stability(value=Stable) @Nullable default Object getEnvironment()
@Stability(value=Stable) @Nullable default String getImage()
Container images that are sourced from (registered and stored on) your container 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 version ( 3 ) 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 ). Your container service will automatically use the highest numbered version of the registered container image.
Container images that are sourced from a public registry like Docker Hub don’t start with a colon. For example, nginx:latest or nginx .
@Stability(value=Stable) @Nullable default Object getPorts()
@Stability(value=Stable) static CfnContainer.ContainerProperty.Builder builder()
Copyright © 2022. All rights reserved.