Class ListenerProps
Construct properties for Listener.
Inherited Members
Namespace: Amazon.CDK.AWS.GlobalAccelerator
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ListenerProps : IListenerProps, IListenerOptions
Syntax (vb)
Public Class ListenerProps 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;
using Amazon.CDK.Interfaces.GlobalAccelerator;
IAcceleratorRef acceleratorRef;
var listenerProps = new ListenerProps {
Accelerator = acceleratorRef,
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() | Construct properties for Listener. |
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()
Construct properties for Listener.
public ListenerProps()
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;
using Amazon.CDK.Interfaces.GlobalAccelerator;
IAcceleratorRef acceleratorRef;
var listenerProps = new ListenerProps {
Accelerator = acceleratorRef,
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
};
Properties
Accelerator
The accelerator for this listener.
public IAcceleratorRef Accelerator { get; set; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
ClientAffinity
Client affinity to direct all requests from a user to the same endpoint.
public ClientAffinity? ClientAffinity { get; set; }
Property Value
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 separate 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
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
Remarks
ExampleMetadata: fixture=_generated
Protocol
The protocol for the connections from clients to the accelerator.
public ConnectionProtocol? Protocol { get; set; }
Property Value
Remarks
Default: ConnectionProtocol.TCP