Class: AWSCDK::ECS::CfnTaskDefinition::TaskDefinitionPlacementConstraintProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnTaskDefinition::TaskDefinitionPlacementConstraintProperty
- Defined in:
- ecs/cfn_task_definition.rb
Overview
The constraint on task placement in the task definition.
For more information, see Task placement constraints in the Amazon Elastic Container Service Developer Guide .
Task placement constraints aren't supported for tasks run on AWS Fargate .
Instance Attribute Summary collapse
-
#expression ⇒ String?
readonly
A cluster query language expression to apply to the constraint.
-
#type ⇒ String
readonly
The type of constraint.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, expression: nil) ⇒ TaskDefinitionPlacementConstraintProperty
constructor
A new instance of TaskDefinitionPlacementConstraintProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, expression: nil) ⇒ TaskDefinitionPlacementConstraintProperty
Returns a new instance of TaskDefinitionPlacementConstraintProperty.
3269 3270 3271 3272 3273 3274 |
# File 'ecs/cfn_task_definition.rb', line 3269 def initialize(type:, expression: nil) @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") @expression = expression Jsii::Type.check_type(@expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "expression") unless @expression.nil? end |
Instance Attribute Details
#expression ⇒ String? (readonly)
A cluster query language expression to apply to the constraint.
For more information, see Cluster query language in the Amazon Elastic Container Service Developer Guide .
3289 3290 3291 |
# File 'ecs/cfn_task_definition.rb', line 3289 def expression @expression end |
#type ⇒ String (readonly)
The type of constraint.
The MemberOf constraint restricts selection to be from a group of valid candidates.
3282 3283 3284 |
# File 'ecs/cfn_task_definition.rb', line 3282 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
3291 3292 3293 3294 3295 3296 |
# File 'ecs/cfn_task_definition.rb', line 3291 def self.jsii_properties { :type => "type", :expression => "expression", } end |
Instance Method Details
#to_jsii ⇒ Object
3298 3299 3300 3301 3302 3303 3304 3305 |
# File 'ecs/cfn_task_definition.rb', line 3298 def to_jsii result = {} result.merge!({ "type" => @type, "expression" => @expression, }) result.compact end |