Class: AWSCDK::CfnTrafficRoute

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cfn_traffic_route.rb

Overview

A traffic route, representing where the traffic is being directed to.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logical_id:, type:) ⇒ CfnTrafficRoute

Returns a new instance of CfnTrafficRoute.

Parameters:

  • logical_id (String)

    The logical id of the target resource.

  • type (String)

    The resource type of the route.



9
10
11
12
13
14
# File 'cfn_traffic_route.rb', line 9

def initialize(logical_id:, type:)
  @logical_id = logical_id
  Jsii::Type.check_type(@logical_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logicalId")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
end

Instance Attribute Details

#logical_idString (readonly)

The logical id of the target resource.

Returns:

  • (String)


19
20
21
# File 'cfn_traffic_route.rb', line 19

def logical_id
  @logical_id
end

#typeString (readonly)

The resource type of the route.

Today, the only allowed value is 'AWS::ElasticLoadBalancingV2::Listener'.

Returns:

  • (String)


25
26
27
# File 'cfn_traffic_route.rb', line 25

def type
  @type
end

Class Method Details

.jsii_propertiesObject



27
28
29
30
31
32
# File 'cfn_traffic_route.rb', line 27

def self.jsii_properties
  {
    :logical_id => "logicalId",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



34
35
36
37
38
39
40
41
# File 'cfn_traffic_route.rb', line 34

def to_jsii
  result = {}
  result.merge!({
    "logicalId" => @logical_id,
    "type" => @type,
  })
  result.compact
end