Interface CfnExpressGatewayService.ExpressGatewayContainerProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnExpressGatewayService.ExpressGatewayContainerProperty.Jsii$Proxy
- Enclosing class:
CfnExpressGatewayService
This container receives traffic from the Application Load Balancer and runs your application code.
The container configuration includes the container image, port mapping, logging settings, environment variables, and secrets. The container image is the only required parameter, with sensible defaults provided for other settings.
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.ecs.*;
ExpressGatewayContainerProperty expressGatewayContainerProperty = ExpressGatewayContainerProperty.builder()
.image("image")
// the properties below are optional
.awsLogsConfiguration(ExpressGatewayServiceAwsLogsConfigurationProperty.builder()
.logGroup("logGroup")
.logStreamPrefix("logStreamPrefix")
.build())
.command(List.of("command"))
.containerPort(123)
.environment(List.of(KeyValuePairProperty.builder()
.name("name")
.value("value")
.build()))
.repositoryCredentials(ExpressGatewayRepositoryCredentialsProperty.builder()
.credentialsParameter("credentialsParameter")
.build())
.secrets(List.of(SecretProperty.builder()
.name("name")
.valueFrom("valueFrom")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnExpressGatewayService.ExpressGatewayContainerPropertystatic final classAn implementation forCfnExpressGatewayService.ExpressGatewayContainerProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default ObjectThe log configuration for the container.The command that is passed to the container.default NumberThe port number on the container that receives traffic from the load balancer.default ObjectThe environment variables to pass to the container.getImage()The image used to start a container.default ObjectThe configuration for repository credentials for private registry authentication.default ObjectThe secrets to pass to the container.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getImage
The image used to start a container.This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with either
repository-url/image:tagorrepository-url/image@digest.For Express services, the image typically contains a web application that listens on the specified container port. The image can be stored in Amazon ECR, Docker Hub, or any other container registry accessible to your execution role.
- See Also:
-
getAwsLogsConfiguration
The log configuration for the container.Returns union: either
IResolvableorCfnExpressGatewayService.ExpressGatewayServiceAwsLogsConfigurationProperty- See Also:
-
getCommand
The command that is passed to the container.- See Also:
-
getContainerPort
The port number on the container that receives traffic from the load balancer.Default is 80.
Default: - 80
- See Also:
-
getEnvironment
The environment variables to pass to the container.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnExpressGatewayService.KeyValuePairProperty>- See Also:
-
getRepositoryCredentials
The configuration for repository credentials for private registry authentication.Returns union: either
IResolvableorCfnExpressGatewayService.ExpressGatewayRepositoryCredentialsProperty- See Also:
-
getSecrets
The secrets to pass to the container.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnExpressGatewayService.SecretProperty>- See Also:
-
builder
@Stability(Stable) static CfnExpressGatewayService.ExpressGatewayContainerProperty.Builder builder()
-