class Applb::DSL::EC2::LoadBalancer::TargetGroups::TargetGroup

Public Class Methods

new(context, name, lb_name, &block) click to toggle source
# File lib/applb/dsl/target_group.rb, line 98
def initialize(context, name, lb_name, &block)
  @context = context.dup
  @lb_name = lb_name
  @result = Result.new(@context)
  @result.name = name
  @result.target_type = 'instance' # default value

  instance_eval(&block)
end

Public Instance Methods

result() click to toggle source
# File lib/applb/dsl/target_group.rb, line 108
def result
  required(:name, @result.name)
  required(:protocol, @result.protocol)
  required(:port, @result.port)
  required(:vpc_id, @result.vpc_id)

  @result
end

Private Instance Methods

health_check_interval_seconds(health_check_interval_seconds) click to toggle source
# File lib/applb/dsl/target_group.rb, line 147
def health_check_interval_seconds(health_check_interval_seconds)
  @result.health_check_interval_seconds = health_check_interval_seconds
end
health_check_path(health_check_path) click to toggle source
# File lib/applb/dsl/target_group.rb, line 143
def health_check_path(health_check_path)
  @result.health_check_path = health_check_path
end
health_check_port(health_check_port) click to toggle source
# File lib/applb/dsl/target_group.rb, line 139
def health_check_port(health_check_port)
  @result.health_check_port = health_check_port
end
health_check_protocol(health_check_protocol) click to toggle source
# File lib/applb/dsl/target_group.rb, line 135
def health_check_protocol(health_check_protocol)
  @result.health_check_protocol = health_check_protocol
end
health_check_timeout_seconds(health_check_timeout_seconds) click to toggle source
# File lib/applb/dsl/target_group.rb, line 151
def health_check_timeout_seconds(health_check_timeout_seconds)
  @result.health_check_timeout_seconds = health_check_timeout_seconds
end
healthy_threshold_count(healthy_threshold_count) click to toggle source
# File lib/applb/dsl/target_group.rb, line 155
def healthy_threshold_count(healthy_threshold_count)
  @result.healthy_threshold_count = healthy_threshold_count
end
matcher(http_code:) click to toggle source
# File lib/applb/dsl/target_group.rb, line 163
def matcher(http_code:)
  @result.matcher = { http_code: http_code }
end
name(name) click to toggle source
# File lib/applb/dsl/target_group.rb, line 119
def name(name)
  @result.name = name
end
port(port) click to toggle source
# File lib/applb/dsl/target_group.rb, line 127
def port(port)
  @result.port = port
end
protocol(protocol) click to toggle source
# File lib/applb/dsl/target_group.rb, line 123
def protocol(protocol)
  @result.protocol = protocol
end
target_type(target_type) click to toggle source
# File lib/applb/dsl/target_group.rb, line 167
def target_type(target_type)
  @result.target_type = target_type
end
unhealthy_threshold_count(unhealthy_threshold_count) click to toggle source
# File lib/applb/dsl/target_group.rb, line 159
def unhealthy_threshold_count(unhealthy_threshold_count)
  @result.unhealthy_threshold_count = unhealthy_threshold_count
end
vpc_id(vpc_id) click to toggle source
# File lib/applb/dsl/target_group.rb, line 131
def vpc_id(vpc_id)
  @result.vpc_id = vpc_id
end