Class: AWSCDK::Scheduler::CfnSchedule::PlacementConstraintProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Scheduler::CfnSchedule::PlacementConstraintProperty
- Defined in:
- scheduler/cfn_schedule.rb
Overview
An object representing a constraint on task placement.
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(expression: nil, type: nil) ⇒ PlacementConstraintProperty
constructor
A new instance of PlacementConstraintProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(expression: nil, type: nil) ⇒ PlacementConstraintProperty
Returns a new instance of PlacementConstraintProperty.
1148 1149 1150 1151 1152 1153 |
# File 'scheduler/cfn_schedule.rb', line 1148 def initialize(expression: nil, type: nil) @expression = expression Jsii::Type.check_type(@expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "expression") unless @expression.nil? @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") unless @type.nil? end |
Instance Attribute Details
#expression ⇒ String? (readonly)
A cluster query language expression to apply to the constraint.
You cannot specify an expression if the constraint type is distinct_instance . For more information, see Cluster query language in the Amazon ECS Developer Guide .
1161 1162 1163 |
# File 'scheduler/cfn_schedule.rb', line 1161 def expression @expression end |
#type ⇒ String? (readonly)
The type of constraint.
Use distinct_instance to ensure that each task in a particular group is running on a different container instance. Use member_of to restrict the selection to a group of valid candidates.
1168 1169 1170 |
# File 'scheduler/cfn_schedule.rb', line 1168 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
1170 1171 1172 1173 1174 1175 |
# File 'scheduler/cfn_schedule.rb', line 1170 def self.jsii_properties { :expression => "expression", :type => "type", } end |
Instance Method Details
#to_jsii ⇒ Object
1177 1178 1179 1180 1181 1182 1183 1184 |
# File 'scheduler/cfn_schedule.rb', line 1177 def to_jsii result = {} result.merge!({ "expression" => @expression, "type" => @type, }) result.compact end |