Class CfnListener
A CloudFormation AWS::GlobalAccelerator::Listener
.
Inherited Members
Namespace: Amazon.CDK.AWS.GlobalAccelerator
Assembly: Amazon.CDK.AWS.GlobalAccelerator.dll
Syntax (csharp)
public class CfnListener : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnListener
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
The AWS::GlobalAccelerator::Listener
resource is a Global Accelerator resource type that contains information about how you create a listener to process inbound connections from clients to an accelerator. Connections arrive to assigned static IP addresses on a port, port range, or list of port ranges that you specify.
CloudformationResource: AWS::GlobalAccelerator::Listener
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;
var cfnListener = new CfnListener(this, "MyCfnListener", new CfnListenerProps {
AcceleratorArn = "acceleratorArn",
PortRanges = new [] { new PortRangeProperty {
FromPort = 123,
ToPort = 123
} },
Protocol = "protocol",
// the properties below are optional
ClientAffinity = "clientAffinity"
});
Synopsis
Constructors
CfnListener(Construct, String, ICfnListenerProps) | Create a new |
CfnListener(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnListener(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AcceleratorArn | The Amazon Resource Name (ARN) of your accelerator. |
AttrListenerArn | The ARN of the listener, such as |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
ClientAffinity | Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request. |
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. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnListener(Construct, String, ICfnListenerProps)
Create a new AWS::GlobalAccelerator::Listener
.
public CfnListener(Construct scope, string id, ICfnListenerProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnListenerProps
- resource properties.
CfnListener(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnListener(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnListener(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnListener(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AcceleratorArn
The Amazon Resource Name (ARN) of your accelerator.
public virtual string AcceleratorArn { get; set; }
Property Value
System.String
Remarks
AttrListenerArn
The ARN of the listener, such as arn:aws:globalaccelerator::012345678901:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh/listener/0123vxyz
.
public virtual string AttrListenerArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: ListenerArn
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
ClientAffinity
Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request.
public virtual string ClientAffinity { get; set; }
Property Value
System.String
Remarks
Client affinity gives you control over whether to always route each client to the same specific endpoint.
AWS Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client affinity is NONE
, Global Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, source port, destination IP address, destination port, and protocol—to select the hash value, and then chooses the best endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not be always routed to the same endpoint because the hash value changes.
If you want a given client to always be routed to the same endpoint, set client affinity to SOURCE_IP
instead. When you use the SOURCE_IP
setting, Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) IP address and destination IP address—to select the hash value.
The default value is NONE
.
PortRanges
The list of port ranges for the connections from clients to the accelerator.
public virtual object PortRanges { get; set; }
Property Value
System.Object
Remarks
Protocol
The protocol for the connections from clients to the accelerator.
public virtual string Protocol { get; set; }
Property Value
System.String
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>