@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.085Z") @Stability(value=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()))
.listenerArn("listenerArn")
.priority(123)
.build();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnListenerRule.ActionProperty
Specifies an action for a listener rule.
|
static interface |
CfnListenerRule.AuthenticateCognitoConfigProperty
Specifies information required when integrating with Amazon Cognito to authenticate users.
|
static interface |
CfnListenerRule.AuthenticateOidcConfigProperty
Specifies information required using an identity provide (IdP) that is compliant with OpenID Connect (OIDC) to authenticate users.
|
static class |
CfnListenerRule.Builder
A fluent builder for
CfnListenerRule. |
static interface |
CfnListenerRule.FixedResponseConfigProperty
Specifies information required when returning a custom HTTP response.
|
static interface |
CfnListenerRule.ForwardConfigProperty
Information for creating an action that distributes requests among one or more target groups.
|
static interface |
CfnListenerRule.HostHeaderConfigProperty
Information about a host header condition.
|
static interface |
CfnListenerRule.HttpHeaderConfigProperty
Information about an HTTP header condition.
|
static interface |
CfnListenerRule.HttpRequestMethodConfigProperty
Information about an HTTP method condition.
|
static interface |
CfnListenerRule.PathPatternConfigProperty
Information about a path pattern condition.
|
static interface |
CfnListenerRule.QueryStringConfigProperty
Information about a query string condition.
|
static interface |
CfnListenerRule.QueryStringKeyValueProperty
Information about a key/value pair.
|
static interface |
CfnListenerRule.RedirectConfigProperty
Information about a redirect action.
|
static interface |
CfnListenerRule.RuleConditionProperty
Specifies a condition for a listener rule.
|
static interface |
CfnListenerRule.SourceIpConfigProperty
Information about a source IP condition.
|
static interface |
CfnListenerRule.TargetGroupStickinessConfigProperty
Information about the target group stickiness for a rule.
|
static interface |
CfnListenerRule.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 |
|---|---|
|
CfnListenerRule(software.constructs.Construct scope,
String id,
CfnListenerRuleProps props)
Create a new `AWS::ElasticLoadBalancingV2::ListenerRule`.
|
protected |
CfnListenerRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnListenerRule(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getActions()
The actions.
|
IResolvable |
getAttrIsDefault()
Indicates whether this is the default rule.
|
String |
getAttrRuleArn()
The Amazon Resource Name (ARN) of the rule.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getConditions()
The conditions.
|
String |
getListenerArn()
The Amazon Resource Name (ARN) of the listener.
|
Number |
getPriority()
The rule priority.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setActions(IResolvable value)
The actions.
|
void |
setActions(List<Object> value)
The actions.
|
void |
setConditions(IResolvable value)
The conditions.
|
void |
setConditions(List<Object> value)
The conditions.
|
void |
setListenerArn(String value)
The Amazon Resource Name (ARN) of the listener.
|
void |
setPriority(Number value)
The rule priority.
|
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 CfnListenerRule(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnListenerRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnListenerRule(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnListenerRuleProps 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 IResolvable getAttrIsDefault()
@Stability(value=Stable) @NotNull public String getAttrRuleArn()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public Object getActions()
The rule must include exactly one of the following types of actions: forward , fixed-response , or redirect , 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.
@Stability(value=Stable)
public void setActions(@NotNull
IResolvable value)
The rule must include exactly one of the following types of actions: forward , fixed-response , or redirect , 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.
@Stability(value=Stable)
public void setActions(@NotNull
List<Object> value)
The rule must include exactly one of the following types of actions: forward , fixed-response , or redirect , 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.
@Stability(value=Stable) @NotNull public Object getConditions()
The rule can optionally include up to one of each of the following conditions: http-request-method , host-header , path-pattern , and source-ip . A rule can also optionally include one or more of each of the following conditions: http-header and query-string .
@Stability(value=Stable)
public void setConditions(@NotNull
IResolvable value)
The rule can optionally include up to one of each of the following conditions: http-request-method , host-header , path-pattern , and source-ip . A rule can also optionally include one or more of each of the following conditions: http-header and query-string .
@Stability(value=Stable)
public void setConditions(@NotNull
List<Object> value)
The rule can optionally include up to one of each of the following conditions: http-request-method , host-header , path-pattern , and source-ip . A rule can also optionally include one or more of each of the following conditions: http-header and query-string .
@Stability(value=Stable) @NotNull public String getListenerArn()
@Stability(value=Stable)
public void setListenerArn(@NotNull
String value)
@Stability(value=Stable) @NotNull public Number getPriority()
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.
@Stability(value=Stable)
public void setPriority(@NotNull
Number value)
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.
Copyright © 2022. All rights reserved.