ContainerServiceDeploymentProperty Struct
ContainerServiceDeployment is a property of the AWS::Lightsail::Container resource. It describes a container deployment configuration of a container service.
A deployment specifies the settings, such as the ports and launch command, of containers that are deployed to your container service.
| Source | |
|---|---|
| Type last changed |
Example
ts
// 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 containerServiceDeploymentProperty: lightsail.CfnContainer.ContainerServiceDeploymentProperty = {
containers: [{
command: ['command'],
containerName: 'containerName',
environment: [{
value: 'value',
variable: 'variable',
}],
image: 'image',
ports: [{
port: 'port',
protocol: 'protocol',
}],
}],
publicEndpoint: {
containerName: 'containerName',
containerPort: 123,
healthCheckConfig: {
healthyThreshold: 123,
intervalSeconds: 123,
path: 'path',
successCodes: 'successCodes',
timeoutSeconds: 123,
unhealthyThreshold: 123,
},
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lightsail as lightsail
container_service_deployment_property = lightsail.CfnContainer.ContainerServiceDeploymentProperty(
containers=[lightsail.CfnContainer.ContainerProperty(
command=["command"],
container_name="containerName",
environment=[lightsail.CfnContainer.EnvironmentVariableProperty(
value="value",
variable="variable"
)],
image="image",
ports=[lightsail.CfnContainer.PortInfoProperty(
port="port",
protocol="protocol"
)]
)],
public_endpoint=lightsail.CfnContainer.PublicEndpointProperty(
container_name="containerName",
container_port=123,
health_check_config=lightsail.CfnContainer.HealthCheckConfigProperty(
healthy_threshold=123,
interval_seconds=123,
path="path",
success_codes="successCodes",
timeout_seconds=123,
unhealthy_threshold=123
)
)
)
java
// 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.*;
ContainerServiceDeploymentProperty containerServiceDeploymentProperty = ContainerServiceDeploymentProperty.builder()
.containers(List.of(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()))
.publicEndpoint(PublicEndpointProperty.builder()
.containerName("containerName")
.containerPort(123)
.healthCheckConfig(HealthCheckConfigProperty.builder()
.healthyThreshold(123)
.intervalSeconds(123)
.path("path")
.successCodes("successCodes")
.timeoutSeconds(123)
.unhealthyThreshold(123)
.build())
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lightsail;
var containerServiceDeploymentProperty = new ContainerServiceDeploymentProperty {
Containers = new [] { new ContainerProperty {
Command = new [] { "command" },
ContainerName = "containerName",
Environment = new [] { new EnvironmentVariableProperty {
Value = "value",
Variable = "variable"
} },
Image = "image",
Ports = new [] { new PortInfoProperty {
Port = "port",
Protocol = "protocol"
} }
} },
PublicEndpoint = new PublicEndpointProperty {
ContainerName = "containerName",
ContainerPort = 123,
HealthCheckConfig = new HealthCheckConfigProperty {
HealthyThreshold = 123,
IntervalSeconds = 123,
Path = "path",
SuccessCodes = "successCodes",
TimeoutSeconds = 123,
UnhealthyThreshold = 123
}
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
containerServiceDeploymentProperty := &ContainerServiceDeploymentProperty{
Containers: []interface{}{
&ContainerProperty{
Command: []*string{
jsii.String("command"),
},
ContainerName: jsii.String("containerName"),
Environment: []interface{}{
&EnvironmentVariableProperty{
Value: jsii.String("value"),
Variable: jsii.String("variable"),
},
},
Image: jsii.String("image"),
Ports: []interface{}{
&PortInfoProperty{
Port: jsii.String("port"),
Protocol: jsii.String("protocol"),
},
},
},
},
PublicEndpoint: &PublicEndpointProperty{
ContainerName: jsii.String("containerName"),
ContainerPort: jsii.Number(123),
HealthCheckConfig: &HealthCheckConfigProperty{
HealthyThreshold: jsii.Number(123),
IntervalSeconds: jsii.Number(123),
Path: jsii.String("path"),
SuccessCodes: jsii.String("successCodes"),
TimeoutSeconds: jsii.Number(123),
UnhealthyThreshold: jsii.Number(123),
},
},
}
Properties
containersoptionalIResolvable | IResolvable | CfnContainer.ContainerProperty[]containersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ContainerProperty]]]containersoptionalIResolvableContainersoptionalIResolvableContainersoptionalinterface{} #An object that describes the configuration for the containers of the deployment.
publicEndpointoptionalIResolvable | CfnContainer.public_endpointoptionaltyping.Union[IResolvable, PublicEndpointProperty]publicEndpointoptionalIResolvablePublicEndpointoptionalIResolvablePublicEndpointoptionalinterface{} #An object that describes the endpoint of the deployment.