Class: AWSCDK::Pipes::CfnPipe::PlacementConstraintProperty

Inherits:
Jsii::Struct
  • Object
show all
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

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.



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

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

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



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_jsiiObject



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