interface ResourceRequirementProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ECS.CfnTaskDefinition.ResourceRequirementProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#CfnTaskDefinition_ResourceRequirementProperty |
Java | software.amazon.awscdk.services.ecs.CfnTaskDefinition.ResourceRequirementProperty |
Python | aws_cdk.aws_ecs.CfnTaskDefinition.ResourceRequirementProperty |
TypeScript | aws-cdk-lib » aws_ecs » CfnTaskDefinition » ResourceRequirementProperty |
The type and amount of a resource to assign to a container.
The supported resource types are GPUs and Elastic Inference accelerators. For more information, see Working with GPUs on Amazon ECS or Working with Amazon Elastic Inference 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 { aws_ecs as ecs } from 'aws-cdk-lib';
const resourceRequirementProperty: ecs.CfnTaskDefinition.ResourceRequirementProperty = {
type: 'type',
value: 'value',
};
Properties
| Name | Type | Description |
|---|---|---|
| type | string | The type of resource to assign to a container. |
| value | string | The value for the specified resource type. |
type
Type:
string
The type of resource to assign to a container.
value
Type:
string
The value for the specified resource type.
When the type is GPU , the value is the number of physical GPUs 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.
When the type is InferenceAccelerator , the value matches the deviceName for an InferenceAccelerator specified in a task definition.

.NET
Go
Java
Python
TypeScript