Class: AWSCDK::GlobalAccelerator::CfnEndpointGroup::PortOverrideProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
global_accelerator/cfn_endpoint_group.rb

Overview

Override specific listener ports used to route traffic to endpoints that are part of an endpoint group.

For example, you can create a port override in which the listener receives user traffic on ports 80 and 443, but your accelerator routes that traffic to ports 1080 and 1443, respectively, on the endpoints.

For more information, see Port overrides in the AWS Global Accelerator Developer Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint_port:, listener_port:) ⇒ PortOverrideProperty

Returns a new instance of PortOverrideProperty.

Parameters:

  • endpoint_port (Numeric)

    The endpoint port that you want a listener port to be mapped to.

  • listener_port (Numeric)

    The listener port that you want to map to a specific endpoint port.



710
711
712
713
714
715
# File 'global_accelerator/cfn_endpoint_group.rb', line 710

def initialize(endpoint_port:, listener_port:)
  @endpoint_port = endpoint_port
  Jsii::Type.check_type(@endpoint_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "endpointPort")
  @listener_port = listener_port
  Jsii::Type.check_type(@listener_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "listenerPort")
end

Instance Attribute Details

#endpoint_portNumeric (readonly)

The endpoint port that you want a listener port to be mapped to.

This is the port on the endpoint, such as the Application Load Balancer or Amazon EC2 instance.



723
724
725
# File 'global_accelerator/cfn_endpoint_group.rb', line 723

def endpoint_port
  @endpoint_port
end

#listener_portNumeric (readonly)

The listener port that you want to map to a specific endpoint port.

This is the port that user traffic arrives to the Global Accelerator on.



730
731
732
# File 'global_accelerator/cfn_endpoint_group.rb', line 730

def listener_port
  @listener_port
end

Class Method Details

.jsii_propertiesObject



732
733
734
735
736
737
# File 'global_accelerator/cfn_endpoint_group.rb', line 732

def self.jsii_properties
  {
    :endpoint_port => "endpointPort",
    :listener_port => "listenerPort",
  }
end

Instance Method Details

#to_jsiiObject



739
740
741
742
743
744
745
746
# File 'global_accelerator/cfn_endpoint_group.rb', line 739

def to_jsii
  result = {}
  result.merge!({
    "endpointPort" => @endpoint_port,
    "listenerPort" => @listener_port,
  })
  result.compact
end