aws-cdk-lib.aws_lightsail.CfnContainer.ContainerProperty

interface ContainerProperty

LanguageType name
.NETAmazon.CDK.AWS.Lightsail.CfnContainer.ContainerProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslightsail#CfnContainer_ContainerProperty
Javasoftware.amazon.awscdk.services.lightsail.CfnContainer.ContainerProperty
Pythonaws_cdk.aws_lightsail.CfnContainer.ContainerProperty
TypeScript aws-cdk-lib » aws_lightsail » CfnContainer » ContainerProperty

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 { aws_lightsail as lightsail } from 'aws-cdk-lib';
const containerProperty: lightsail.CfnContainer.ContainerProperty = {
  command: ['command'],
  containerName: 'containerName',
  environment: [{
    value: 'value',
    variable: 'variable',
  }],
  image: 'image',
  ports: [{
    port: 'port',
    protocol: 'protocol',
  }],
};

Properties

NameTypeDescription
command?string[]The launch command for the container.
containerName?stringThe name of the container.
environment?IResolvable | IResolvable | EnvironmentVariableProperty[]The environment variables of the container.
image?stringThe name of the image used for the container.
ports?IResolvable | IResolvable | PortInfoProperty[]An object that describes the open firewall ports and protocols of the container.

command?

Type: string[] (optional)

The launch command for the container.


containerName?

Type: string (optional)

The name of the container.


environment?

Type: IResolvable | IResolvable | EnvironmentVariableProperty[] (optional)

The environment variables of the container.


image?

Type: string (optional)

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 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 .


ports?

Type: IResolvable | IResolvable | PortInfoProperty[] (optional)

An object that describes the open firewall ports and protocols of the container.