Class FargateTaskDefinitionAttributes.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.FargateTaskDefinitionAttributes.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<FargateTaskDefinitionAttributes>
- Enclosing interface:
- FargateTaskDefinitionAttributes
@Stability(Stable)
public static final class FargateTaskDefinitionAttributes.Builder
extends Object
implements software.amazon.jsii.Builder<FargateTaskDefinitionAttributes>
A builder for
FargateTaskDefinitionAttributes-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.networkMode(NetworkMode networkMode) Sets the value ofCommonTaskDefinitionAttributes.getNetworkMode()taskDefinitionArn(String taskDefinitionArn) Sets the value ofCommonTaskDefinitionAttributes.getTaskDefinitionArn()Sets the value ofCommonTaskDefinitionAttributes.getTaskRole()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
taskDefinitionArn
@Stability(Stable) public FargateTaskDefinitionAttributes.Builder taskDefinitionArn(String taskDefinitionArn) Sets the value ofCommonTaskDefinitionAttributes.getTaskDefinitionArn()- Parameters:
taskDefinitionArn- The arn of the task definition. This parameter is required.- Returns:
this
-
networkMode
@Stability(Stable) public FargateTaskDefinitionAttributes.Builder networkMode(NetworkMode networkMode) Sets the value ofCommonTaskDefinitionAttributes.getNetworkMode()- Parameters:
networkMode- The networking mode to use for the containers in the task.- Returns:
this
-
taskRole
Sets the value ofCommonTaskDefinitionAttributes.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
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<FargateTaskDefinitionAttributes>- Returns:
- a new instance of
FargateTaskDefinitionAttributes - Throws:
NullPointerException- if any required attribute was not provided
-