Class CfnListenerProps
Properties for defining a CfnListener
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.AWS.ElasticLoadBalancingV2.dll
Syntax (csharp)
public class CfnListenerProps : Object, ICfnListenerProps
Syntax (vb)
Public Class CfnListenerProps
Inherits Object
Implements ICfnListenerProps
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.ElasticLoadBalancingV2;
var cfnListenerProps = new CfnListenerProps {
DefaultActions = new [] { new ActionProperty {
Type = "type",
// the properties below are optional
AuthenticateCognitoConfig = new AuthenticateCognitoConfigProperty {
UserPoolArn = "userPoolArn",
UserPoolClientId = "userPoolClientId",
UserPoolDomain = "userPoolDomain",
// the properties below are optional
AuthenticationRequestExtraParams = new Dictionary<string, string> {
{ "authenticationRequestExtraParamsKey", "authenticationRequestExtraParams" }
},
OnUnauthenticatedRequest = "onUnauthenticatedRequest",
Scope = "scope",
SessionCookieName = "sessionCookieName",
SessionTimeout = "sessionTimeout"
},
AuthenticateOidcConfig = new AuthenticateOidcConfigProperty {
AuthorizationEndpoint = "authorizationEndpoint",
ClientId = "clientId",
Issuer = "issuer",
TokenEndpoint = "tokenEndpoint",
UserInfoEndpoint = "userInfoEndpoint",
// the properties below are optional
AuthenticationRequestExtraParams = new Dictionary<string, string> {
{ "authenticationRequestExtraParamsKey", "authenticationRequestExtraParams" }
},
ClientSecret = "clientSecret",
OnUnauthenticatedRequest = "onUnauthenticatedRequest",
Scope = "scope",
SessionCookieName = "sessionCookieName",
SessionTimeout = "sessionTimeout",
UseExistingClientSecret = false
},
FixedResponseConfig = new FixedResponseConfigProperty {
StatusCode = "statusCode",
// the properties below are optional
ContentType = "contentType",
MessageBody = "messageBody"
},
ForwardConfig = new ForwardConfigProperty {
TargetGroups = new [] { new TargetGroupTupleProperty {
TargetGroupArn = "targetGroupArn",
Weight = 123
} },
TargetGroupStickinessConfig = new TargetGroupStickinessConfigProperty {
DurationSeconds = 123,
Enabled = false
}
},
Order = 123,
RedirectConfig = new RedirectConfigProperty {
StatusCode = "statusCode",
// the properties below are optional
Host = "host",
Path = "path",
Port = "port",
Protocol = "protocol",
Query = "query"
},
TargetGroupArn = "targetGroupArn"
} },
LoadBalancerArn = "loadBalancerArn",
// the properties below are optional
AlpnPolicy = new [] { "alpnPolicy" },
Certificates = new [] { new CertificateProperty {
CertificateArn = "certificateArn"
} },
Port = 123,
Protocol = "protocol",
SslPolicy = "sslPolicy"
};
Synopsis
Constructors
CfnListenerProps() |
Properties
AlpnPolicy | [TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy. |
Certificates | The default SSL server certificate for a secure listener. |
DefaultActions | The actions for the default rule. You cannot define a condition for a default rule. |
LoadBalancerArn | The Amazon Resource Name (ARN) of the load balancer. |
Port | The port on which the load balancer is listening. |
Protocol | The protocol for connections from clients to the load balancer. |
SslPolicy | [HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. |
Constructors
CfnListenerProps()
public CfnListenerProps()
Properties
AlpnPolicy
[TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy.
public string[] AlpnPolicy { get; set; }
Property Value
System.String[]
Remarks
Certificates
The default SSL server certificate for a secure listener.
public object Certificates { get; set; }
Property Value
System.Object
Remarks
You must provide exactly one certificate if the listener protocol is HTTPS or TLS.
To create a certificate list for a secure listener, use AWS::ElasticLoadBalancingV2::ListenerCertificate .
DefaultActions
The actions for the default rule. You cannot define a condition for a default rule.
public object DefaultActions { get; set; }
Property Value
System.Object
Remarks
To create additional rules for an Application Load Balancer, use AWS::ElasticLoadBalancingV2::ListenerRule .
LoadBalancerArn
The Amazon Resource Name (ARN) of the load balancer.
public string LoadBalancerArn { get; set; }
Property Value
System.String
Remarks
Port
The port on which the load balancer is listening.
public Nullable<double> Port { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
You cannot specify a port for a Gateway Load Balancer.
Protocol
The protocol for connections from clients to the load balancer.
public string Protocol { get; set; }
Property Value
System.String
Remarks
For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP, TLS, UDP, and TCP_UDP. You can’t specify the UDP or TCP_UDP protocol if dual-stack mode is enabled. You cannot specify a protocol for a Gateway Load Balancer.
SslPolicy
[HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported.
public string SslPolicy { get; set; }
Property Value
System.String
Remarks
For more information, see Security policies in the Application Load Balancers Guide and Security policies in the Network Load Balancers Guide .