Class CfnListenerRuleProps
Properties for defining a CfnListenerRule
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.AWS.ElasticLoadBalancingV2.dll
Syntax (csharp)
public class CfnListenerRuleProps : Object, ICfnListenerRuleProps
Syntax (vb)
Public Class CfnListenerRuleProps
Inherits Object
Implements ICfnListenerRuleProps
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 cfnListenerRuleProps = new CfnListenerRuleProps {
Actions = 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 = 123
},
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 = 123,
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"
} },
Conditions = new [] { new RuleConditionProperty {
Field = "field",
HostHeaderConfig = new HostHeaderConfigProperty {
Values = new [] { "values" }
},
HttpHeaderConfig = new HttpHeaderConfigProperty {
HttpHeaderName = "httpHeaderName",
Values = new [] { "values" }
},
HttpRequestMethodConfig = new HttpRequestMethodConfigProperty {
Values = new [] { "values" }
},
PathPatternConfig = new PathPatternConfigProperty {
Values = new [] { "values" }
},
QueryStringConfig = new QueryStringConfigProperty {
Values = new [] { new QueryStringKeyValueProperty {
Key = "key",
Value = "value"
} }
},
SourceIpConfig = new SourceIpConfigProperty {
Values = new [] { "values" }
},
Values = new [] { "values" }
} },
Priority = 123,
// the properties below are optional
ListenerArn = "listenerArn"
};
Synopsis
Constructors
CfnListenerRuleProps() |
Properties
Actions | The actions. |
Conditions | The conditions. |
ListenerArn | The Amazon Resource Name (ARN) of the listener. |
Priority | The rule priority. A listener can't have multiple rules with the same priority. |
Constructors
CfnListenerRuleProps()
public CfnListenerRuleProps()
Properties
Actions
The actions.
public object Actions { get; set; }
Property Value
System.Object
Remarks
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.
Conditions
The conditions.
public object Conditions { get; set; }
Property Value
System.Object
Remarks
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
.
ListenerArn
The Amazon Resource Name (ARN) of the listener.
public string ListenerArn { get; set; }
Property Value
System.String
Remarks
Priority
The rule priority. A listener can't have multiple rules with the same priority.
public double Priority { get; set; }
Property Value
System.Double
Remarks
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.