Class CfnListenerRule
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.elasticloadbalancingv2.CfnListenerRule
- All Implemented Interfaces:
IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-21T06:34:08.143Z")
@Stability(Stable)
public class CfnListenerRule
extends CfnResource
implements IInspectable
Specifies a listener rule.
The listener must be associated with an Application Load Balancer. Each rule consists of a priority, one or more actions, and one or more conditions.
For more information, see Quotas for your Application Load Balancers in the User Guide for Application Load Balancers .
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.*;
CfnListenerRule cfnListenerRule = CfnListenerRule.Builder.create(this, "MyCfnListenerRule")
.actions(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(123)
.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(123)
.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()))
.conditions(List.of(RuleConditionProperty.builder()
.field("field")
.hostHeaderConfig(HostHeaderConfigProperty.builder()
.values(List.of("values"))
.build())
.httpHeaderConfig(HttpHeaderConfigProperty.builder()
.httpHeaderName("httpHeaderName")
.values(List.of("values"))
.build())
.httpRequestMethodConfig(HttpRequestMethodConfigProperty.builder()
.values(List.of("values"))
.build())
.pathPatternConfig(PathPatternConfigProperty.builder()
.values(List.of("values"))
.build())
.queryStringConfig(QueryStringConfigProperty.builder()
.values(List.of(QueryStringKeyValueProperty.builder()
.key("key")
.value("value")
.build()))
.build())
.sourceIpConfig(SourceIpConfigProperty.builder()
.values(List.of("values"))
.build())
.values(List.of("values"))
.build()))
.priority(123)
// the properties below are optional
.listenerArn("listenerArn")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSpecifies an action for a listener rule.static interfaceSpecifies information required when integrating with Amazon Cognito to authenticate users.static interfaceSpecifies information required using an identity provide (IdP) that is compliant with OpenID Connect (OIDC) to authenticate users.static final classA fluent builder forCfnListenerRule.static interfaceSpecifies information required when returning a custom HTTP response.static interfaceInformation for creating an action that distributes requests among one or more target groups.static interfaceInformation about a host header condition.static interfaceInformation about an HTTP header condition.static interfaceInformation about an HTTP method condition.static interfaceInformation about a path pattern condition.static interfaceInformation about a query string condition.static interfaceInformation about a key/value pair.static interfaceInformation about a redirect action.static interfaceSpecifies a condition for a listener rule.static interfaceInformation about a source IP condition.static interfaceInformation about the target group stickiness for a rule.static interfaceInformation about how traffic will be distributed between multiple target groups in a forward rule.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnListenerRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnListenerRule(software.amazon.jsii.JsiiObjectRef objRef) CfnListenerRule(software.constructs.Construct scope, String id, CfnListenerRuleProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe actions.Indicates whether this is the default rule.The Amazon Resource Name (ARN) of the rule.The conditions.The Amazon Resource Name (ARN) of the listener.The rule priority.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetActions(List<Object> value) The actions.voidsetActions(IResolvable value) The actions.voidsetConditions(List<Object> value) The conditions.voidsetConditions(IResolvable value) The conditions.voidsetListenerArn(String value) The Amazon Resource Name (ARN) of the listener.voidsetPriority(Number value) The rule priority.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnListenerRule
protected CfnListenerRule(software.amazon.jsii.JsiiObjectRef objRef) -
CfnListenerRule
protected CfnListenerRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnListenerRule
@Stability(Stable) public CfnListenerRule(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnListenerRuleProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrIsDefault
Indicates whether this is the default rule. -
getAttrRuleArn
The Amazon Resource Name (ARN) of the rule. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getActions
The actions. -
setActions
The actions. -
setActions
The actions. -
getConditions
The conditions. -
setConditions
The conditions. -
setConditions
The conditions. -
getPriority
The rule priority.A listener can't have multiple rules with the same priority.
-
setPriority
The rule priority.A listener can't have multiple rules with the same priority.
-
getListenerArn
The Amazon Resource Name (ARN) of the listener. -
setListenerArn
The Amazon Resource Name (ARN) of the listener.
-