Class CfnTaskDefinitionPropsMixin.ResourceRequirementProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.ecs.CfnTaskDefinitionPropsMixin.ResourceRequirementProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnTaskDefinitionPropsMixin.ResourceRequirementProperty>
- Enclosing interface:
CfnTaskDefinitionPropsMixin.ResourceRequirementProperty
@Stability(Stable)
public static final class CfnTaskDefinitionPropsMixin.ResourceRequirementProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnTaskDefinitionPropsMixin.ResourceRequirementProperty>
A builder for
CfnTaskDefinitionPropsMixin.ResourceRequirementProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnTaskDefinitionPropsMixin.ResourceRequirementProperty.getType()Sets the value ofCfnTaskDefinitionPropsMixin.ResourceRequirementProperty.getValue()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
type
@Stability(Stable) public CfnTaskDefinitionPropsMixin.ResourceRequirementProperty.Builder type(String type) Sets the value ofCfnTaskDefinitionPropsMixin.ResourceRequirementProperty.getType()- Parameters:
type- The type of resource to assign to a container.- Returns:
this
-
value
@Stability(Stable) public CfnTaskDefinitionPropsMixin.ResourceRequirementProperty.Builder value(String value) Sets the value ofCfnTaskDefinitionPropsMixin.ResourceRequirementProperty.getValue()- Parameters:
value- The value for the specified resource type. 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<CfnTaskDefinitionPropsMixin.ResourceRequirementProperty>- Returns:
- a new instance of
CfnTaskDefinitionPropsMixin.ResourceRequirementProperty - Throws:
NullPointerException- if any required attribute was not provided
-