Interface CfnContainer.ContainerProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnContainer.ContainerProperty.Jsii$Proxy
- Enclosing class:
CfnContainer
Container is a property of the ContainerServiceDeployment property. It describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.
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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnContainer.ContainerPropertystatic final classAn implementation forCfnContainer.ContainerProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()The launch command for the container.default StringThe name of the container.default ObjectThe environment variables of the container.default StringgetImage()The name of the image used for the container.default ObjectgetPorts()An object that describes the open firewall ports and protocols of the container.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCommand
The launch command for the container.- See Also:
-
getContainerName
The name of the container.- See Also:
-
getEnvironment
The environment variables of the container.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnContainer.EnvironmentVariableProperty>- See Also:
-
getImage
The name of the image used for the container.Container images that are sourced from (registered and stored on) your container service start with a colon (
:). For example, if your container service name iscontainer-service-1, the container image label ismystaticsite, 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, specifylatestinstead 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:latestornginx.- See Also:
-
getPorts
An object that describes the open firewall ports and protocols of the container.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnContainer.PortInfoProperty>- See Also:
-
builder
-