Class: AWSCDK::ECS::CfnTaskDefinition::ResourceRequirementProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnTaskDefinition::ResourceRequirementProperty
- Defined in:
- ecs/cfn_task_definition.rb
Overview
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
Instance Attribute Summary collapse
-
#type ⇒ String
readonly
The type of resource to assign to a container.
-
#value ⇒ String
readonly
The value for the specified resource type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, value:) ⇒ ResourceRequirementProperty
constructor
A new instance of ResourceRequirementProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, value:) ⇒ ResourceRequirementProperty
Returns a new instance of ResourceRequirementProperty.
2920 2921 2922 2923 2924 2925 |
# File 'ecs/cfn_task_definition.rb', line 2920 def initialize(type:, value:) @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") end |
Instance Attribute Details
#type ⇒ String (readonly)
The type of resource to assign to a container.
2931 2932 2933 |
# File 'ecs/cfn_task_definition.rb', line 2931 def type @type end |
#value ⇒ String (readonly)
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 device_name for an InferenceAccelerator specified in a task definition.
2940 2941 2942 |
# File 'ecs/cfn_task_definition.rb', line 2940 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
2942 2943 2944 2945 2946 2947 |
# File 'ecs/cfn_task_definition.rb', line 2942 def self.jsii_properties { :type => "type", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
2949 2950 2951 2952 2953 2954 2955 2956 |
# File 'ecs/cfn_task_definition.rb', line 2949 def to_jsii result = {} result.merge!({ "type" => @type, "value" => @value, }) result.compact end |