Class: AWSCDK::ECSPatterns::ApplicationTargetProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECSPatterns::ApplicationTargetProps
- Defined in:
- ecs_patterns/application_target_props.rb
Overview
Properties to define an application target group.
Instance Attribute Summary collapse
-
#container_port ⇒ Numeric
readonly
The port number of the container.
-
#host_header ⇒ String?
readonly
Rule applies if the requested host matches the indicated host.
-
#listener ⇒ String?
readonly
Name of the listener the target group attached to.
-
#path_pattern ⇒ String?
readonly
Rule applies if the requested path matches the given path pattern.
-
#priority ⇒ Numeric?
readonly
Priority of this target group.
-
#protocol ⇒ AWSCDK::ECS::Protocol?
readonly
The protocol used for the port mapping.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(container_port:, host_header: nil, listener: nil, path_pattern: nil, priority: nil, protocol: nil) ⇒ ApplicationTargetProps
constructor
A new instance of ApplicationTargetProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(container_port:, host_header: nil, listener: nil, path_pattern: nil, priority: nil, protocol: nil) ⇒ ApplicationTargetProps
Returns a new instance of ApplicationTargetProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'ecs_patterns/application_target_props.rb', line 13 def initialize(container_port:, host_header: nil, listener: nil, path_pattern: nil, priority: nil, protocol: nil) @container_port = container_port Jsii::Type.check_type(@container_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "containerPort") @host_header = host_header Jsii::Type.check_type(@host_header, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostHeader") unless @host_header.nil? @listener = listener Jsii::Type.check_type(@listener, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "listener") unless @listener.nil? @path_pattern = path_pattern Jsii::Type.check_type(@path_pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pathPattern") unless @path_pattern.nil? @priority = priority Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority") unless @priority.nil? @protocol = protocol Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlByb3RvY29sIn0=")), "protocol") unless @protocol.nil? end |
Instance Attribute Details
#container_port ⇒ Numeric (readonly)
The port number of the container.
Only applicable when using application/network load balancers.
33 34 35 |
# File 'ecs_patterns/application_target_props.rb', line 33 def container_port @container_port end |
#host_header ⇒ String? (readonly)
Default: No host condition
Rule applies if the requested host matches the indicated host.
May contain up to three '*' wildcards.
Requires that priority is set.
43 44 45 |
# File 'ecs_patterns/application_target_props.rb', line 43 def host_header @host_header end |
#listener ⇒ String? (readonly)
Default: - default listener (first added listener)
Name of the listener the target group attached to.
48 49 50 |
# File 'ecs_patterns/application_target_props.rb', line 48 def listener @listener end |
#path_pattern ⇒ String? (readonly)
Default: No path condition
Rule applies if the requested path matches the given path pattern.
May contain up to three '*' wildcards.
Requires that priority is set.
58 59 60 |
# File 'ecs_patterns/application_target_props.rb', line 58 def path_pattern @path_pattern end |
#priority ⇒ Numeric? (readonly)
Default: Target groups are used as defaults
Priority of this target group.
The rule with the lowest priority will be used for every request. If priority is not given, these target groups will be added as defaults, and must not have conditions.
Priorities must be unique.
69 70 71 |
# File 'ecs_patterns/application_target_props.rb', line 69 def priority @priority end |
#protocol ⇒ AWSCDK::ECS::Protocol? (readonly)
Default: ecs.Protocol.TCP
The protocol used for the port mapping.
Only applicable when using application load balancers.
76 77 78 |
# File 'ecs_patterns/application_target_props.rb', line 76 def protocol @protocol end |
Class Method Details
.jsii_properties ⇒ Object
78 79 80 81 82 83 84 85 86 87 |
# File 'ecs_patterns/application_target_props.rb', line 78 def self.jsii_properties { :container_port => "containerPort", :host_header => "hostHeader", :listener => "listener", :path_pattern => "pathPattern", :priority => "priority", :protocol => "protocol", } end |
Instance Method Details
#to_jsii ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'ecs_patterns/application_target_props.rb', line 89 def to_jsii result = {} result.merge!({ "containerPort" => @container_port, "hostHeader" => @host_header, "listener" => @listener, "pathPattern" => @path_pattern, "priority" => @priority, "protocol" => @protocol, }) result.compact end |