Class CfnRule
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.vpclattice.CfnRule
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-11T15:56:07.123Z")
@Stability(Stable)
public class CfnRule
extends CfnResource
implements IInspectable, ITaggable
Creates a listener rule.
Each listener has a default rule for checking connection requests, but you can define additional rules. Each rule consists of a priority, one or more actions, and one or more conditions. For more information, see Listener rules in the Amazon VPC Lattice User Guide .
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.*; CfnRule cfnRule = CfnRule.Builder.create(this, "MyCfnRule") .action(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()) .match(MatchProperty.builder() .httpMatch(HttpMatchProperty.builder() .headerMatches(List.of(HeaderMatchProperty.builder() .match(HeaderMatchTypeProperty.builder() .contains("contains") .exact("exact") .prefix("prefix") .build()) .name("name") // the properties below are optional .caseSensitive(false) .build())) .method("method") .pathMatch(PathMatchProperty.builder() .match(PathMatchTypeProperty.builder() .exact("exact") .prefix("prefix") .build()) // the properties below are optional .caseSensitive(false) .build()) .build()) .build()) .priority(123) // the properties below are optional .listenerIdentifier("listenerIdentifier") .name("name") .serviceIdentifier("serviceIdentifier") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Describes the action for a rule.static final class
A fluent builder forCfnRule
.static interface
Describes an action that returns a custom HTTP response.static interface
The forward action.static interface
Describes the constraints for a header match.static interface
Describes a header match type.static interface
Describes criteria that can be applied to incoming requests.static interface
Describes a rule match.static interface
Describes the conditions that can be applied when matching a path for incoming requests.static interface
Describes a path match type.static interface
Describes the weight of a target group.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnRule
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnRule
(software.amazon.jsii.JsiiObjectRef objRef) CfnRule
(software.constructs.Construct scope, String id, CfnRuleProps props) -
Method Summary
Modifier and TypeMethodDescriptionDescribes the action for a rule.The Amazon Resource Name (ARN) of the rule.The ID of the listener.The ID or Amazon Resource Name (ARN) of the listener.getMatch()
The rule match.getName()
The name of the rule.The priority assigned to the rule.The ID or Amazon Resource Name (ARN) of the service.getTags()
Tag Manager which manages the tags for this resource.The tags for the rule.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAction
(IResolvable value) Describes the action for a rule.void
setAction
(CfnRule.ActionProperty value) Describes the action for a rule.void
setListenerIdentifier
(String value) The ID or Amazon Resource Name (ARN) of the listener.void
setMatch
(IResolvable value) The rule match.void
setMatch
(CfnRule.MatchProperty value) The rule match.void
The name of the rule.void
setPriority
(Number value) The priority assigned to the rule.void
setServiceIdentifier
(String value) The ID or Amazon Resource Name (ARN) of the service.void
setTagsRaw
(List<CfnTag> value) The tags for the rule.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnRule
protected CfnRule(software.amazon.jsii.JsiiObjectRef objRef) -
CfnRule
protected CfnRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnRule
@Stability(Stable) public CfnRule(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnRuleProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the rule. -
getAttrId
The ID of the listener. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getAction
Describes the action for a rule. -
setAction
Describes the action for a rule. -
setAction
Describes the action for a rule. -
getMatch
The rule match. -
setMatch
The rule match. -
setMatch
The rule match. -
getPriority
The priority assigned to the rule. -
setPriority
The priority assigned to the rule. -
getListenerIdentifier
The ID or Amazon Resource Name (ARN) of the listener. -
setListenerIdentifier
The ID or Amazon Resource Name (ARN) of the listener. -
getName
The name of the rule. -
setName
The name of the rule. -
getServiceIdentifier
The ID or Amazon Resource Name (ARN) of the service. -
setServiceIdentifier
The ID or Amazon Resource Name (ARN) of the service. -
getTagsRaw
The tags for the rule. -
setTagsRaw
The tags for the rule.
-