Class ExternalTaskDefinitionProps.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.ExternalTaskDefinitionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ExternalTaskDefinitionProps>
- Enclosing interface:
ExternalTaskDefinitionProps
@Stability(Stable)
public static final class ExternalTaskDefinitionProps.Builder
extends Object
implements software.amazon.jsii.Builder<ExternalTaskDefinitionProps>
A builder for
ExternalTaskDefinitionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.enableFaultInjection
(Boolean enableFaultInjection) Sets the value ofCommonTaskDefinitionProps.getEnableFaultInjection()
executionRole
(IRole executionRole) Sets the value ofCommonTaskDefinitionProps.getExecutionRole()
Sets the value ofCommonTaskDefinitionProps.getFamily()
networkMode
(NetworkMode networkMode) Sets the value ofExternalTaskDefinitionProps.getNetworkMode()
proxyConfiguration
(ProxyConfiguration proxyConfiguration) Sets the value ofCommonTaskDefinitionProps.getProxyConfiguration()
Sets the value ofCommonTaskDefinitionProps.getTaskRole()
Sets the value ofCommonTaskDefinitionProps.getVolumes()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
networkMode
Sets the value ofExternalTaskDefinitionProps.getNetworkMode()
- Parameters:
networkMode
- The networking mode to use for the containers in the task. With ECS Anywhere, supported modes are bridge, host and none.- Returns:
this
-
enableFaultInjection
@Stability(Stable) public ExternalTaskDefinitionProps.Builder enableFaultInjection(Boolean enableFaultInjection) Sets the value ofCommonTaskDefinitionProps.getEnableFaultInjection()
- Parameters:
enableFaultInjection
- Enables fault injection and allows for fault injection requests to be accepted from the task's containers. Fault injection only works with tasks using theinvalid @link
NetworkMode.AWS_VPC
invalid @link
NetworkMode.HOST
- Returns:
this
-
executionRole
Sets the value ofCommonTaskDefinitionProps.getExecutionRole()
- Parameters:
executionRole
- The name of the IAM task execution role that grants the ECS agent permission to call AWS APIs on your behalf. The role will be used to retrieve container images from ECR and create CloudWatch log groups.- Returns:
this
-
family
Sets the value ofCommonTaskDefinitionProps.getFamily()
- Parameters:
family
- The name of a family that this task definition is registered to. A family groups multiple versions of a task definition.- Returns:
this
-
proxyConfiguration
@Stability(Stable) public ExternalTaskDefinitionProps.Builder proxyConfiguration(ProxyConfiguration proxyConfiguration) Sets the value ofCommonTaskDefinitionProps.getProxyConfiguration()
- Parameters:
proxyConfiguration
- The configuration details for the App Mesh proxy.- Returns:
this
-
taskRole
Sets the value ofCommonTaskDefinitionProps.getTaskRole()
- Parameters:
taskRole
- The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.- Returns:
this
-
volumes
@Stability(Stable) public ExternalTaskDefinitionProps.Builder volumes(List<? extends Volume> volumes) Sets the value ofCommonTaskDefinitionProps.getVolumes()
- Parameters:
volumes
- The list of volume definitions for the task. For more information, see Task Definition Parameter Volumes.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ExternalTaskDefinitionProps>
- Returns:
- a new instance of
ExternalTaskDefinitionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-