Class: AWSCDK::Scheduler::CfnSchedule::PlacementConstraintProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
scheduler/cfn_schedule.rb

Overview

An object representing a constraint on task placement.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expression: nil, type: nil) ⇒ PlacementConstraintProperty

Returns a new instance of PlacementConstraintProperty.

Parameters:

  • expression (String, nil) (defaults to: nil)

    A cluster query language expression to apply to the constraint.

  • type (String, nil) (defaults to: nil)

    The type of constraint.



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

#expressionString? (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

#typeString? (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_propertiesObject



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_jsiiObject



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