Class: AWSCDK::Pipes::CfnPipe::PlacementConstraintProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pipes::CfnPipe::PlacementConstraintProperty
- Defined in:
- pipes/cfn_pipe.rb
Overview
An object representing a constraint on task placement.
To learn more, see Task Placement Constraints in the Amazon Elastic Container Service Developer Guide.
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.
4016 4017 4018 4019 4020 4021 |
# File 'pipes/cfn_pipe.rb', line 4016 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 . To learn more, see Cluster Query Language in the Amazon Elastic Container Service Developer Guide.
4029 4030 4031 |
# File 'pipes/cfn_pipe.rb', line 4029 def expression @expression end |
#type ⇒ String? (readonly)
The type of constraint.
Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf to restrict the selection to a group of valid candidates.
4036 4037 4038 |
# File 'pipes/cfn_pipe.rb', line 4036 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
4038 4039 4040 4041 4042 4043 |
# File 'pipes/cfn_pipe.rb', line 4038 def self.jsii_properties { :expression => "expression", :type => "type", } end |
Instance Method Details
#to_jsii ⇒ Object
4045 4046 4047 4048 4049 4050 4051 4052 |
# File 'pipes/cfn_pipe.rb', line 4045 def to_jsii result = {} result.merge!({ "expression" => @expression, "type" => @type, }) result.compact end |