Class AddApplicationActionProps
Properties for adding a new action to a listener.
Inheritance
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AddApplicationActionProps : Object, IAddApplicationActionProps, IAddRuleProps
Syntax (vb)
Public Class AddApplicationActionProps
Inherits Object
Implements IAddApplicationActionProps, IAddRuleProps
Remarks
ExampleMetadata: infused
Examples
ApplicationListener listener;
listener.AddAction("Fixed", new AddApplicationActionProps {
Priority = 10,
Conditions = new [] { ListenerCondition.PathPatterns(new [] { "/ok" }) },
Action = ListenerAction.FixedResponse(200, new FixedResponseOptions {
ContentType = "text/plain",
MessageBody = "OK"
})
});
Synopsis
Constructors
AddApplicationActionProps() |
Properties
Action | Action to perform. |
Conditions | Rule applies if matches the conditions. |
Priority | Priority of this target group. |
RemoveSuffix |
|
Constructors
AddApplicationActionProps()
public AddApplicationActionProps()
Properties
Action
Conditions
Rule applies if matches the conditions.
public ListenerCondition[] Conditions { get; set; }
Property Value
Remarks
Default: - No conditions.
See: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html
Priority
Priority of this target group.
public Nullable<double> Priority { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
The rule with the lowest priority will be used for every request. If priority is not given, these target groups will be added as defaults, and must not have conditions.
Priorities must be unique.
Default: Target groups are used as defaults
RemoveSuffix
ListenerRule
s have a Rule
suffix on their logicalId by default. This allows you to remove that suffix.
public Nullable<bool> RemoveSuffix { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Legacy behavior of the addTargetGroups()
convenience method did not include the Rule
suffix on the logicalId of the generated ListenerRule
.
At some point, increasing complexity of requirements can require users to switch from the addTargetGroups()
method
to the addAction()
method.
When migrating ListenerRule
s deployed by a legacy version of addTargetGroups()
,
you will need to enable this flag to avoid changing the logicalId of your resource.
Otherwise Cfn will attempt to replace the ListenerRule
and fail.
Default: - use standard logicalId with the Rule
suffix