Interface CfnListenerRuleProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnListenerRuleProps.Jsii$Proxy
CfnListenerRule.
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.*;
CfnListenerRuleProps cfnListenerRuleProps = CfnListenerRuleProps.builder()
.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 TypeInterfaceDescriptionstatic final classA builder forCfnListenerRulePropsstatic final classAn implementation forCfnListenerRuleProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CfnListenerRuleProps.Builderbuilder()The actions.The conditions.default StringThe Amazon Resource Name (ARN) of the listener.The rule priority.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getActions
The actions.The rule must include exactly one of the following types of actions:
forward,fixed-response, orredirect, and it must be the last action to be performed. If the rule is for an HTTPS listener, it can also optionally include an authentication action.- See Also:
-
getConditions
The conditions.The rule can optionally include up to one of each of the following conditions:
http-request-method,host-header,path-pattern, andsource-ip. A rule can also optionally include one or more of each of the following conditions:http-headerandquery-string.- See Also:
-
getPriority
The rule priority. A listener can't have multiple rules with the same priority.If you try to reorder rules by updating their priorities, do not specify a new priority if an existing rule already uses this priority, as this can cause an error. If you need to reuse a priority with a different rule, you must remove it as a priority first, and then specify it in a subsequent update.
- See Also:
-
getListenerArn
The Amazon Resource Name (ARN) of the listener.- See Also:
-
builder
- Returns:
- a
CfnListenerRuleProps.BuilderofCfnListenerRuleProps
-