Class CfnTaskDefinition.ResourceRequirementProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.CfnTaskDefinition.ResourceRequirementProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnTaskDefinition.ResourceRequirementProperty>
- Enclosing interface:
CfnTaskDefinition.ResourceRequirementProperty
@Stability(Stable)
public static final class CfnTaskDefinition.ResourceRequirementProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnTaskDefinition.ResourceRequirementProperty>
A builder for
CfnTaskDefinition.ResourceRequirementProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnTaskDefinition.ResourceRequirementProperty.getType()Sets the value ofCfnTaskDefinition.ResourceRequirementProperty.getValue()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
type
Sets the value ofCfnTaskDefinition.ResourceRequirementProperty.getType()- Parameters:
type- The type of resource to assign to a container. This parameter is required.- Returns:
this
-
value
Sets the value ofCfnTaskDefinition.ResourceRequirementProperty.getValue()- Parameters:
value- The value for the specified resource type. This parameter is required. When the type isGPU, the value is the number of physicalGPUsthe Amazon ECS container agent reserves for the container. The number of GPUs that's reserved for all containers in a task can't exceed the number of available GPUs on the container instance that the task is launched on.When the type is
InferenceAccelerator, thevaluematches thedeviceNamefor an InferenceAccelerator specified in a task definition.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnTaskDefinition.ResourceRequirementProperty>- Returns:
- a new instance of
CfnTaskDefinition.ResourceRequirementProperty - Throws:
NullPointerException- if any required attribute was not provided
-