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
-
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. The supported values areGPU
orInferenceAccelerator
.- Returns:
this
-
value
Sets the value ofCfnTaskDefinition.ResourceRequirementProperty.getValue()
- Parameters:
value
- The value for the specified resource type. This parameter is required. If theGPU
type is used, the value is the number of physicalGPUs
the 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.If the
InferenceAccelerator
type is used, thevalue
matches thedeviceName
for an InferenceAccelerator specified in a task definition.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnTaskDefinition.ResourceRequirementProperty>
- Returns:
- a new instance of
CfnTaskDefinition.ResourceRequirementProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-