public static final class NetworkLoadBalancedTaskImageProps.Builder
extends java.lang.Object
NetworkLoadBalancedTaskImageProps
Constructor and Description |
---|
Builder() |
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
public NetworkLoadBalancedTaskImageProps.Builder containerName(java.lang.String containerName)
NetworkLoadBalancedTaskImageProps.getContainerName()
containerName
- The container name value to be specified in the task definition.this
public NetworkLoadBalancedTaskImageProps.Builder containerPorts(java.util.List<? extends java.lang.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
public NetworkLoadBalancedTaskImageProps.Builder dockerLabels(java.util.Map<java.lang.String,java.lang.String> dockerLabels)
NetworkLoadBalancedTaskImageProps.getDockerLabels()
dockerLabels
- A key/value map of labels to add to the container.this
public NetworkLoadBalancedTaskImageProps.Builder enableLogging(java.lang.Boolean enableLogging)
NetworkLoadBalancedTaskImageProps.getEnableLogging()
enableLogging
- Flag to indicate whether to enable logging.this
public NetworkLoadBalancedTaskImageProps.Builder environment(java.util.Map<java.lang.String,java.lang.String> environment)
NetworkLoadBalancedTaskImageProps.getEnvironment()
environment
- The environment variables to pass to the container.this
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
public NetworkLoadBalancedTaskImageProps.Builder family(java.lang.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
public NetworkLoadBalancedTaskImageProps.Builder logDriver(LogDriver logDriver)
NetworkLoadBalancedTaskImageProps.getLogDriver()
logDriver
- The log driver to use.this
public NetworkLoadBalancedTaskImageProps.Builder secrets(java.util.Map<java.lang.String,? extends Secret> secrets)
NetworkLoadBalancedTaskImageProps.getSecrets()
secrets
- The secrets to expose to the container as an environment variable.this
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
public NetworkLoadBalancedTaskImageProps build()
NetworkLoadBalancedTaskImageProps
java.lang.NullPointerException
- if any required attribute was not provided