# AWS::VpcLattice::Rule 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. ## Syntax To declare this entity in your AWS CloudFormation template, use the following syntax: ### JSON
{ "Type" : "AWS::VpcLattice::Rule", "Properties" : { "Action" : Action, "ListenerIdentifier" : String, "Match" : Match, "Name" : String, "Priority" : Integer, "ServiceIdentifier" : String, "Tags" : [ Tag, ... ] } }### YAML
Type: AWS::VpcLattice::Rule Properties: Action: Action ListenerIdentifier: String Match: Match Name: String Priority: Integer ServiceIdentifier: String Tags: - Tag## Properties #### Action _Required_: Yes _Type_: Action _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### ListenerIdentifier _Required_: No _Type_: String _Minimum Length_:
20
_Maximum Length_: 2048
_Pattern_: ^((listener-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z]{17}))$
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### Match
_Required_: Yes
_Type_: Match
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### Name
_Required_: No
_Type_: String
_Minimum Length_: 3
_Maximum Length_: 63
_Pattern_: ^(?!rule-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### Priority
_Required_: Yes
_Type_: Integer
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### ServiceIdentifier
_Required_: No
_Type_: String
_Minimum Length_: 20
_Maximum Length_: 2048
_Pattern_: ^((svc-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:service/svc-[0-9a-z]{17}))$
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### Tags
_Required_: No
_Type_: List of Tag
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
## Return Values
### Ref
When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the Arn.
### Fn::GetAtt
The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the `Fn::GetAtt` intrinsic function, see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html).
#### Arn
Returns the Arn
value.
#### Id
Returns the Id
value.