Class: AWSCDK::ElasticLoadBalancingv2::LoadBalancerTargetProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elastic_load_balancingv2/load_balancer_target_props.rb

Overview

Result of attaching a target to load balancer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target_type:, target_json: nil) ⇒ LoadBalancerTargetProps

Returns a new instance of LoadBalancerTargetProps.

Parameters:

  • target_type (AWSCDK::ElasticLoadBalancingv2::TargetType)

    What kind of target this is.

  • target_json (Object, nil) (defaults to: nil)

    JSON representing the target's direct addition to the TargetGroup list.



9
10
11
12
13
14
# File 'elastic_load_balancingv2/load_balancer_target_props.rb', line 9

def initialize(target_type:, target_json: nil)
  @target_type = target_type
  Jsii::Type.check_type(@target_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5UYXJnZXRUeXBlIn0=")), "targetType")
  @target_json = target_json
  Jsii::Type.check_type(@target_json, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "targetJson") unless @target_json.nil?
end

Instance Attribute Details

#target_jsonObject? (readonly)

JSON representing the target's direct addition to the TargetGroup list.

May be omitted if the target is going to register itself later.

Returns:

  • (Object, nil)


25
26
27
# File 'elastic_load_balancingv2/load_balancer_target_props.rb', line 25

def target_json
  @target_json
end

#target_typeAWSCDK::ElasticLoadBalancingv2::TargetType (readonly)

What kind of target this is.



19
20
21
# File 'elastic_load_balancingv2/load_balancer_target_props.rb', line 19

def target_type
  @target_type
end

Class Method Details

.jsii_propertiesObject



27
28
29
30
31
32
# File 'elastic_load_balancingv2/load_balancer_target_props.rb', line 27

def self.jsii_properties
  {
    :target_type => "targetType",
    :target_json => "targetJson",
  }
end

Instance Method Details

#to_jsiiObject



34
35
36
37
38
39
40
41
# File 'elastic_load_balancingv2/load_balancer_target_props.rb', line 34

def to_jsii
  result = {}
  result.merge!({
    "targetType" => @target_type,
    "targetJson" => @target_json,
  })
  result.compact
end