Class: AWSCDK::EC2::CfnRouteServerPeerProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_route_server_peer_props.rb

Overview

Properties for defining a CfnRouteServerPeer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bgp_options:, peer_address:, route_server_endpoint_id:, tags: nil) ⇒ CfnRouteServerPeerProps

Returns a new instance of CfnRouteServerPeerProps.

Parameters:

  • bgp_options (AWSCDK::IResolvable, AWSCDK::EC2::CfnRouteServerPeer::BgpOptionsProperty)

    The BGP configuration options for this peer, including ASN (Autonomous System Number) and BFD (Bidrectional Forwarding Detection) settings.

  • peer_address (String)

    The IPv4 address of the peer device.

  • route_server_endpoint_id (String)

    The ID of the route server endpoint associated with this peer.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Any tags assigned to the route server peer.



13
14
15
16
17
18
19
20
21
22
# File 'ec2/cfn_route_server_peer_props.rb', line 13

def initialize(bgp_options:, peer_address:, route_server_endpoint_id:, tags: nil)
  @bgp_options = bgp_options.is_a?(Hash) ? ::AWSCDK::EC2::CfnRouteServerPeer::BgpOptionsProperty.new(**bgp_options.transform_keys(&:to_sym)) : bgp_options
  Jsii::Type.check_type(@bgp_options, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuUm91dGVTZXJ2ZXJQZWVyLkJncE9wdGlvbnNQcm9wZXJ0eSJ9XX19")), "bgpOptions")
  @peer_address = peer_address
  Jsii::Type.check_type(@peer_address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "peerAddress")
  @route_server_endpoint_id = route_server_endpoint_id
  Jsii::Type.check_type(@route_server_endpoint_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "routeServerEndpointId")
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#bgp_optionsAWSCDK::IResolvable, AWSCDK::EC2::CfnRouteServerPeer::BgpOptionsProperty (readonly)

The BGP configuration options for this peer, including ASN (Autonomous System Number) and BFD (Bidrectional Forwarding Detection) settings.



28
29
30
# File 'ec2/cfn_route_server_peer_props.rb', line 28

def bgp_options
  @bgp_options
end

#peer_addressString (readonly)

The IPv4 address of the peer device.



33
34
35
# File 'ec2/cfn_route_server_peer_props.rb', line 33

def peer_address
  @peer_address
end

#route_server_endpoint_idString (readonly)

The ID of the route server endpoint associated with this peer.



38
39
40
# File 'ec2/cfn_route_server_peer_props.rb', line 38

def route_server_endpoint_id
  @route_server_endpoint_id
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

Any tags assigned to the route server peer.



43
44
45
# File 'ec2/cfn_route_server_peer_props.rb', line 43

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



45
46
47
48
49
50
51
52
# File 'ec2/cfn_route_server_peer_props.rb', line 45

def self.jsii_properties
  {
    :bgp_options => "bgpOptions",
    :peer_address => "peerAddress",
    :route_server_endpoint_id => "routeServerEndpointId",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



54
55
56
57
58
59
60
61
62
63
# File 'ec2/cfn_route_server_peer_props.rb', line 54

def to_jsii
  result = {}
  result.merge!({
    "bgpOptions" => @bgp_options,
    "peerAddress" => @peer_address,
    "routeServerEndpointId" => @route_server_endpoint_id,
    "tags" => @tags,
  })
  result.compact
end