public static final class ApplicationLoadBalancedTaskImageOptions.Builder
extends java.lang.Object
ApplicationLoadBalancedTaskImageOptions
Constructor and Description |
---|
Builder() |
public ApplicationLoadBalancedTaskImageOptions.Builder image(ContainerImage image)
ApplicationLoadBalancedTaskImageOptions.getImage()
image
- The image used to start a container. This parameter is required.
Image or taskDefinition must be specified, not both.this
public ApplicationLoadBalancedTaskImageOptions.Builder containerName(java.lang.String containerName)
ApplicationLoadBalancedTaskImageOptions.getContainerName()
containerName
- The container name value to be specified in the task definition.this
public ApplicationLoadBalancedTaskImageOptions.Builder containerPort(java.lang.Number containerPort)
ApplicationLoadBalancedTaskImageOptions.getContainerPort()
containerPort
- The port number 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 ApplicationLoadBalancedTaskImageOptions.Builder dockerLabels(java.util.Map<java.lang.String,java.lang.String> dockerLabels)
ApplicationLoadBalancedTaskImageOptions.getDockerLabels()
dockerLabels
- A key/value map of labels to add to the container.this
public ApplicationLoadBalancedTaskImageOptions.Builder enableLogging(java.lang.Boolean enableLogging)
ApplicationLoadBalancedTaskImageOptions.getEnableLogging()
enableLogging
- Flag to indicate whether to enable logging.this
public ApplicationLoadBalancedTaskImageOptions.Builder environment(java.util.Map<java.lang.String,java.lang.String> environment)
ApplicationLoadBalancedTaskImageOptions.getEnvironment()
environment
- The environment variables to pass to the container.this
public ApplicationLoadBalancedTaskImageOptions.Builder executionRole(IRole executionRole)
ApplicationLoadBalancedTaskImageOptions.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 ApplicationLoadBalancedTaskImageOptions.Builder family(java.lang.String family)
ApplicationLoadBalancedTaskImageOptions.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 ApplicationLoadBalancedTaskImageOptions.Builder logDriver(LogDriver logDriver)
ApplicationLoadBalancedTaskImageOptions.getLogDriver()
logDriver
- The log driver to use.this
public ApplicationLoadBalancedTaskImageOptions.Builder secrets(java.util.Map<java.lang.String,? extends Secret> secrets)
ApplicationLoadBalancedTaskImageOptions.getSecrets()
secrets
- The secret to expose to the container as an environment variable.this
public ApplicationLoadBalancedTaskImageOptions.Builder taskRole(IRole taskRole)
ApplicationLoadBalancedTaskImageOptions.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 ApplicationLoadBalancedTaskImageOptions build()
ApplicationLoadBalancedTaskImageOptions
java.lang.NullPointerException
- if any required attribute was not provided