Interface CfnRule.ActionProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnRule.ActionProperty.Jsii$Proxy
- Enclosing class:
- CfnRule
@Stability(Stable)
public static interface CfnRule.ActionProperty
extends software.amazon.jsii.JsiiSerializable
Describes the action for a rule.
Each rule must include exactly one of the following types of actions: forward or fixed-response , and it must be the last action to be performed.
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.vpclattice.*;
ActionProperty actionProperty = ActionProperty.builder()
.fixedResponse(FixedResponseProperty.builder()
.statusCode(123)
.build())
.forward(ForwardProperty.builder()
.targetGroups(List.of(WeightedTargetGroupProperty.builder()
.targetGroupIdentifier("targetGroupIdentifier")
// the properties below are optional
.weight(123)
.build()))
.build())
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnRule.ActionPropertystatic final classAn implementation forCfnRule.ActionProperty -
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getFixedResponse
Describes the rule action that returns a custom HTTP response. -
getForward
The forward action.Traffic that matches the rule is forwarded to the specified target groups.
-
builder
- Returns:
- a
CfnRule.ActionProperty.BuilderofCfnRule.ActionProperty
-