Class ListenerProps
Construct properties for Listener.
Inheritance
Namespace: Amazon.CDK.AWS.GlobalAccelerator
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ListenerProps : Object, IListenerProps, IListenerOptions
Syntax (vb)
Public Class ListenerProps
Inherits Object
Implements IListenerProps, IListenerOptions
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.GlobalAccelerator;
Accelerator accelerator;
var listenerProps = new ListenerProps {
Accelerator = accelerator,
PortRanges = new [] { new PortRange {
FromPort = 123,
// the properties below are optional
ToPort = 123
} },
// the properties below are optional
ClientAffinity = ClientAffinity.NONE,
ListenerName = "listenerName",
Protocol = ConnectionProtocol.TCP
};
Synopsis
Constructors
ListenerProps() |
Properties
Accelerator | The accelerator for this listener. |
ClientAffinity | Client affinity to direct all requests from a user to the same endpoint. |
ListenerName | Name of the listener. |
PortRanges | The list of port ranges for the connections from clients to the accelerator. |
Protocol | The protocol for the connections from clients to the accelerator. |
Constructors
ListenerProps()
public ListenerProps()
Properties
Accelerator
The accelerator for this listener.
public IAccelerator Accelerator { get; set; }
Property Value
ClientAffinity
Client affinity to direct all requests from a user to the same endpoint.
public Nullable<ClientAffinity> ClientAffinity { get; set; }
Property Value
System.Nullable<ClientAffinity>
Remarks
If you have stateful applications, client affinity lets you direct all requests from a user to the same endpoint.
By default, each connection from each client is routed to seperate endpoints. Set client affinity to SOURCE_IP to route all connections from a single client to the same endpoint.
Default: ClientAffinity.NONE
ListenerName
Name of the listener.
public string ListenerName { get; set; }
Property Value
System.String
Remarks
Default: - logical ID of the resource
PortRanges
The list of port ranges for the connections from clients to the accelerator.
public IPortRange[] PortRanges { get; set; }
Property Value
Protocol
The protocol for the connections from clients to the accelerator.
public Nullable<ConnectionProtocol> Protocol { get; set; }
Property Value
System.Nullable<ConnectionProtocol>
Remarks
Default: ConnectionProtocol.TCP