@Stability(value=Stable) public static final class NetworkLoadBalancedTaskImageProps.Builder extends Object implements software.amazon.jsii.Builder<NetworkLoadBalancedTaskImageProps>
NetworkLoadBalancedTaskImageProps
Constructor and Description |
---|
Builder() |
@Stability(value=Stable) public NetworkLoadBalancedTaskImageProps.Builder image(ContainerImage image)
NetworkLoadBalancedTaskImageProps.getImage()
image
- The image used to start a container. This parameter is required.
Image or taskDefinition must be specified, but not both.this
@Stability(value=Stable) public NetworkLoadBalancedTaskImageProps.Builder containerName(String containerName)
NetworkLoadBalancedTaskImageProps.getContainerName()
containerName
- The container name value to be specified in the task definition.this
@Stability(value=Stable) public NetworkLoadBalancedTaskImageProps.Builder containerPorts(List<? extends Number> containerPorts)
NetworkLoadBalancedTaskImageProps.getContainerPorts()
containerPorts
- A list of port numbers on the container that is bound to the user-specified or automatically assigned host port.
If you are using containers in a task with the awsvpc or host network mode, exposed ports should be specified using containerPort.
If you are using containers in a task with the bridge network mode and you specify a container port and not a host port,
your container automatically receives a host port in the ephemeral port range.
Port mappings that are automatically assigned in this way do not count toward the 100 reserved ports limit of a container instance.
For more information, see hostPort.
this
@Stability(value=Stable) public NetworkLoadBalancedTaskImageProps.Builder dockerLabels(Map<String,String> dockerLabels)
NetworkLoadBalancedTaskImageProps.getDockerLabels()
dockerLabels
- A key/value map of labels to add to the container.this
@Stability(value=Stable) public NetworkLoadBalancedTaskImageProps.Builder enableLogging(Boolean enableLogging)
NetworkLoadBalancedTaskImageProps.getEnableLogging()
enableLogging
- Flag to indicate whether to enable logging.this
@Stability(value=Stable) public NetworkLoadBalancedTaskImageProps.Builder environment(Map<String,String> environment)
NetworkLoadBalancedTaskImageProps.getEnvironment()
environment
- The environment variables to pass to the container.this
@Stability(value=Stable) public NetworkLoadBalancedTaskImageProps.Builder executionRole(IRole executionRole)
NetworkLoadBalancedTaskImageProps.getExecutionRole()
executionRole
- The name of the task execution IAM role that grants the Amazon ECS container agent permission to call AWS APIs on your behalf.this
@Stability(value=Stable) public NetworkLoadBalancedTaskImageProps.Builder family(String family)
NetworkLoadBalancedTaskImageProps.getFamily()
family
- The name of a family that this task definition is registered to.
A family groups multiple versions of a task definition.this
@Stability(value=Stable) public NetworkLoadBalancedTaskImageProps.Builder logDriver(LogDriver logDriver)
NetworkLoadBalancedTaskImageProps.getLogDriver()
logDriver
- The log driver to use.this
@Stability(value=Stable) public NetworkLoadBalancedTaskImageProps.Builder secrets(Map<String,? extends Secret> secrets)
NetworkLoadBalancedTaskImageProps.getSecrets()
secrets
- The secrets to expose to the container as an environment variable.this
@Stability(value=Stable) public NetworkLoadBalancedTaskImageProps.Builder taskRole(IRole taskRole)
NetworkLoadBalancedTaskImageProps.getTaskRole()
taskRole
- The name of the task IAM role that grants containers in the task permission to call AWS APIs on your behalf.this
@Stability(value=Stable) public NetworkLoadBalancedTaskImageProps build()
build
in interface software.amazon.jsii.Builder<NetworkLoadBalancedTaskImageProps>
NetworkLoadBalancedTaskImageProps
NullPointerException
- if any required attribute was not providedCopyright © 2022. All rights reserved.