@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.067Z") @Stability(value=Stable) public class CfnListener extends CfnResource implements IInspectable
Specifies a listener for an Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.elasticloadbalancingv2.*;
CfnListener cfnListener = CfnListener.Builder.create(this, "MyCfnListener")
.defaultActions(List.of(ActionProperty.builder()
.type("type")
// the properties below are optional
.authenticateCognitoConfig(AuthenticateCognitoConfigProperty.builder()
.userPoolArn("userPoolArn")
.userPoolClientId("userPoolClientId")
.userPoolDomain("userPoolDomain")
// the properties below are optional
.authenticationRequestExtraParams(Map.of(
"authenticationRequestExtraParamsKey", "authenticationRequestExtraParams"))
.onUnauthenticatedRequest("onUnauthenticatedRequest")
.scope("scope")
.sessionCookieName("sessionCookieName")
.sessionTimeout("sessionTimeout")
.build())
.authenticateOidcConfig(AuthenticateOidcConfigProperty.builder()
.authorizationEndpoint("authorizationEndpoint")
.clientId("clientId")
.issuer("issuer")
.tokenEndpoint("tokenEndpoint")
.userInfoEndpoint("userInfoEndpoint")
// the properties below are optional
.authenticationRequestExtraParams(Map.of(
"authenticationRequestExtraParamsKey", "authenticationRequestExtraParams"))
.clientSecret("clientSecret")
.onUnauthenticatedRequest("onUnauthenticatedRequest")
.scope("scope")
.sessionCookieName("sessionCookieName")
.sessionTimeout("sessionTimeout")
.useExistingClientSecret(false)
.build())
.fixedResponseConfig(FixedResponseConfigProperty.builder()
.statusCode("statusCode")
// the properties below are optional
.contentType("contentType")
.messageBody("messageBody")
.build())
.forwardConfig(ForwardConfigProperty.builder()
.targetGroups(List.of(TargetGroupTupleProperty.builder()
.targetGroupArn("targetGroupArn")
.weight(123)
.build()))
.targetGroupStickinessConfig(TargetGroupStickinessConfigProperty.builder()
.durationSeconds(123)
.enabled(false)
.build())
.build())
.order(123)
.redirectConfig(RedirectConfigProperty.builder()
.statusCode("statusCode")
// the properties below are optional
.host("host")
.path("path")
.port("port")
.protocol("protocol")
.query("query")
.build())
.targetGroupArn("targetGroupArn")
.build()))
.loadBalancerArn("loadBalancerArn")
// the properties below are optional
.alpnPolicy(List.of("alpnPolicy"))
.certificates(List.of(CertificateProperty.builder()
.certificateArn("certificateArn")
.build()))
.port(123)
.protocol("protocol")
.sslPolicy("sslPolicy")
.build();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnListener.ActionProperty
Specifies an action for a listener rule.
|
static interface |
CfnListener.AuthenticateCognitoConfigProperty
Specifies information required when integrating with Amazon Cognito to authenticate users.
|
static interface |
CfnListener.AuthenticateOidcConfigProperty
Specifies information required using an identity provide (IdP) that is compliant with OpenID Connect (OIDC) to authenticate users.
|
static class |
CfnListener.Builder
A fluent builder for
CfnListener. |
static interface |
CfnListener.CertificateProperty
Specifies an SSL server certificate to use as the default certificate for a secure listener.
|
static interface |
CfnListener.FixedResponseConfigProperty
Specifies information required when returning a custom HTTP response.
|
static interface |
CfnListener.ForwardConfigProperty
Information for creating an action that distributes requests among one or more target groups.
|
static interface |
CfnListener.RedirectConfigProperty
Information about a redirect action.
|
static interface |
CfnListener.TargetGroupStickinessConfigProperty
Information about the target group stickiness for a rule.
|
static interface |
CfnListener.TargetGroupTupleProperty
Information about how traffic will be distributed between multiple target groups in a forward rule.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnListener(software.constructs.Construct scope,
String id,
CfnListenerProps props)
Create a new `AWS::ElasticLoadBalancingV2::Listener`.
|
protected |
CfnListener(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnListener(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAlpnPolicy()
[TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy.
|
String |
getAttrListenerArn()
The Amazon Resource Name (ARN) of the listener.
|
Object |
getCertificates()
The default SSL server certificate for a secure listener.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getDefaultActions()
The actions for the default rule.
|
String |
getLoadBalancerArn()
The Amazon Resource Name (ARN) of the load balancer.
|
Number |
getPort()
The port on which the load balancer is listening.
|
String |
getProtocol()
The protocol for connections from clients to the load balancer.
|
String |
getSslPolicy()
[HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAlpnPolicy(List<String> value)
[TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy.
|
void |
setCertificates(IResolvable value)
The default SSL server certificate for a secure listener.
|
void |
setCertificates(List<Object> value)
The default SSL server certificate for a secure listener.
|
void |
setDefaultActions(IResolvable value)
The actions for the default rule.
|
void |
setDefaultActions(List<Object> value)
The actions for the default rule.
|
void |
setLoadBalancerArn(String value)
The Amazon Resource Name (ARN) of the load balancer.
|
void |
setPort(Number value)
The port on which the load balancer is listening.
|
void |
setProtocol(String value)
The protocol for connections from clients to the load balancer.
|
void |
setSslPolicy(String value)
[HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnListener(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnListener(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnListener(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnListenerProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrListenerArn()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public Object getDefaultActions()
To create additional rules for an Application Load Balancer, use AWS::ElasticLoadBalancingV2::ListenerRule .
@Stability(value=Stable)
public void setDefaultActions(@NotNull
IResolvable value)
To create additional rules for an Application Load Balancer, use AWS::ElasticLoadBalancingV2::ListenerRule .
@Stability(value=Stable)
public void setDefaultActions(@NotNull
List<Object> value)
To create additional rules for an Application Load Balancer, use AWS::ElasticLoadBalancingV2::ListenerRule .
@Stability(value=Stable) @NotNull public String getLoadBalancerArn()
@Stability(value=Stable)
public void setLoadBalancerArn(@NotNull
String value)
@Stability(value=Stable) @Nullable public List<String> getAlpnPolicy()
@Stability(value=Stable)
public void setAlpnPolicy(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public Object getCertificates()
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 .
@Stability(value=Stable)
public void setCertificates(@Nullable
IResolvable value)
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 .
@Stability(value=Stable)
public void setCertificates(@Nullable
List<Object> value)
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 .
@Stability(value=Stable) @Nullable public Number getPort()
You cannot specify a port for a Gateway Load Balancer.
@Stability(value=Stable)
public void setPort(@Nullable
Number value)
You cannot specify a port for a Gateway Load Balancer.
@Stability(value=Stable) @Nullable public String getProtocol()
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.
@Stability(value=Stable)
public void setProtocol(@Nullable
String value)
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.
@Stability(value=Stable) @Nullable public String getSslPolicy()
For more information, see Security policies in the Application Load Balancers Guide and Security policies in the Network Load Balancers Guide .
@Stability(value=Stable)
public void setSslPolicy(@Nullable
String value)
For more information, see Security policies in the Application Load Balancers Guide and Security policies in the Network Load Balancers Guide .
Copyright © 2022. All rights reserved.