@Stability(value=Stable)
public static interface CfnTaskDefinition.ResourceRequirementProperty
extends software.amazon.jsii.JsiiSerializable
The only supported resource is a GPU. For more information, see Working with GPUs on Amazon ECS in the Amazon Elastic Container Service Developer Guide
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;
ResourceRequirementProperty resourceRequirementProperty = ResourceRequirementProperty.builder()
.type("type")
.value("value")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnTaskDefinition.ResourceRequirementProperty.Builder
A builder for
CfnTaskDefinition.ResourceRequirementProperty |
static class |
CfnTaskDefinition.ResourceRequirementProperty.Jsii$Proxy
An implementation for
CfnTaskDefinition.ResourceRequirementProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnTaskDefinition.ResourceRequirementProperty.Builder |
builder() |
String |
getType()
The type of resource to assign to a container.
|
String |
getValue()
The value for the specified resource type.
|
@Stability(value=Stable) @NotNull String getType()
The supported values are GPU or InferenceAccelerator .
@Stability(value=Stable) @NotNull String getValue()
If the GPU type is used, the value is the number of physical GPUs the Amazon ECS container agent will reserve for the container. The number of GPUs reserved for all containers in a task should not exceed the number of available GPUs on the container instance the task is launched on.
If the InferenceAccelerator type is used, the value should match the DeviceName for an InferenceAccelerator specified in a task definition.
@Stability(value=Stable) static CfnTaskDefinition.ResourceRequirementProperty.Builder builder()
Copyright © 2022. All rights reserved.