Class CfnListenerRule
Specifies a listener rule.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnListenerRule : CfnResource, IInspectable
Syntax (vb)
Public Class CfnListenerRule
Inherits CfnResource
Implements IInspectable
Remarks
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 .
CloudformationResource: AWS::ElasticLoadBalancingV2::ListenerRule
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 cfnListenerRule = new CfnListenerRule(this, "MyCfnListenerRule", 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
CfnListenerRule(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnListenerRule(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnListenerRule(Construct, String, ICfnListenerRuleProps) |
Properties
Actions | The actions. |
AttrIsDefault | Indicates whether this is the default rule. |
AttrRuleArn | The Amazon Resource Name (ARN) of the rule. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Conditions | The conditions. |
ListenerArn | The Amazon Resource Name (ARN) of the listener. |
Priority | The rule priority. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnListenerRule(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnListenerRule(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnListenerRule(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnListenerRule(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnListenerRule(Construct, String, ICfnListenerRuleProps)
public CfnListenerRule(Construct scope, string id, ICfnListenerRuleProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnListenerRuleProps
Resource properties.
Properties
Actions
The actions.
public virtual object Actions { get; set; }
Property Value
System.Object
AttrIsDefault
Indicates whether this is the default rule.
public virtual IResolvable AttrIsDefault { get; }
Property Value
Remarks
CloudformationAttribute: IsDefault
AttrRuleArn
The Amazon Resource Name (ARN) of the rule.
public virtual string AttrRuleArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: RuleArn
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Conditions
The conditions.
public virtual object Conditions { get; set; }
Property Value
System.Object
ListenerArn
The Amazon Resource Name (ARN) of the listener.
public virtual string ListenerArn { get; set; }
Property Value
System.String
Priority
The rule priority.
public virtual double Priority { get; set; }
Property Value
System.Double
Remarks
A listener can't have multiple rules with the same priority.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>