

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::VpcLattice::Rule
<a name="aws-resource-vpclattice-rule"></a>

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](https://docs.aws.amazon.com/vpc-lattice/latest/ug/listeners.html#listener-rules) in the *Amazon VPC Lattice User Guide*.

## Syntax
<a name="aws-resource-vpclattice-rule-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-vpclattice-rule-syntax.json"></a>

```
{
  "Type" : "AWS::VpcLattice::Rule",
  "Properties" : {
      "[Action](#cfn-vpclattice-rule-action)" : Action,
      "[ListenerIdentifier](#cfn-vpclattice-rule-listeneridentifier)" : String,
      "[Match](#cfn-vpclattice-rule-match)" : Match,
      "[Name](#cfn-vpclattice-rule-name)" : String,
      "[Priority](#cfn-vpclattice-rule-priority)" : Integer,
      "[ServiceIdentifier](#cfn-vpclattice-rule-serviceidentifier)" : String,
      "[Tags](#cfn-vpclattice-rule-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-vpclattice-rule-syntax.yaml"></a>

```
Type: AWS::VpcLattice::Rule
Properties:
  [Action](#cfn-vpclattice-rule-action): 
    Action
  [ListenerIdentifier](#cfn-vpclattice-rule-listeneridentifier): String
  [Match](#cfn-vpclattice-rule-match): 
    Match
  [Name](#cfn-vpclattice-rule-name): String
  [Priority](#cfn-vpclattice-rule-priority): Integer
  [ServiceIdentifier](#cfn-vpclattice-rule-serviceidentifier): String
  [Tags](#cfn-vpclattice-rule-tags): 
    - Tag
```

## Properties
<a name="aws-resource-vpclattice-rule-properties"></a>

`Action`  <a name="cfn-vpclattice-rule-action"></a>
Describes the action for a rule.  
*Required*: Yes  
*Type*: [Action](aws-properties-vpclattice-rule-action.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ListenerIdentifier`  <a name="cfn-vpclattice-rule-listeneridentifier"></a>
The ID or ARN of the listener.  
*Required*: No  
*Type*: String  
*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}))$`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Match`  <a name="cfn-vpclattice-rule-match"></a>
The rule match.  
*Required*: Yes  
*Type*: [Match](aws-properties-vpclattice-rule-match.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-vpclattice-rule-name"></a>
The name of the rule. The name must be unique within the listener. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.  
If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name.  
*Required*: No  
*Type*: String  
*Pattern*: `^(?!rule-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$`  
*Minimum*: `3`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Priority`  <a name="cfn-vpclattice-rule-priority"></a>
The priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.  
*Required*: Yes  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServiceIdentifier`  <a name="cfn-vpclattice-rule-serviceidentifier"></a>
The ID or ARN of the service.  
*Required*: No  
*Type*: String  
*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}))$`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-vpclattice-rule-tags"></a>
The tags for the rule.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-vpclattice-rule-tag.md)  
*Minimum*: `0`  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-vpclattice-rule-return-values"></a>

### Ref
<a name="aws-resource-vpclattice-rule-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the Amazon Resource Name (ARN) of the rule.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-vpclattice-rule-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-vpclattice-rule-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the rule.

`Id`  <a name="Id-fn::getatt"></a>
The ID of the listener.

# AWS::VpcLattice::Rule Action
<a name="aws-properties-vpclattice-rule-action"></a>

Describes the action for a rule.

## Syntax
<a name="aws-properties-vpclattice-rule-action-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-vpclattice-rule-action-syntax.json"></a>

```
{
  "[FixedResponse](#cfn-vpclattice-rule-action-fixedresponse)" : FixedResponse,
  "[Forward](#cfn-vpclattice-rule-action-forward)" : Forward
}
```

### YAML
<a name="aws-properties-vpclattice-rule-action-syntax.yaml"></a>

```
  [FixedResponse](#cfn-vpclattice-rule-action-fixedresponse): 
    FixedResponse
  [Forward](#cfn-vpclattice-rule-action-forward): 
    Forward
```

## Properties
<a name="aws-properties-vpclattice-rule-action-properties"></a>

`FixedResponse`  <a name="cfn-vpclattice-rule-action-fixedresponse"></a>
The fixed response action. The rule returns a custom HTTP response.  
*Required*: No  
*Type*: [FixedResponse](aws-properties-vpclattice-rule-fixedresponse.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Forward`  <a name="cfn-vpclattice-rule-action-forward"></a>
The forward action. Traffic that matches the rule is forwarded to the specified target groups.  
*Required*: No  
*Type*: [Forward](aws-properties-vpclattice-rule-forward.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::VpcLattice::Rule FixedResponse
<a name="aws-properties-vpclattice-rule-fixedresponse"></a>

Describes an action that returns a custom HTTP response.

## Syntax
<a name="aws-properties-vpclattice-rule-fixedresponse-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-vpclattice-rule-fixedresponse-syntax.json"></a>

```
{
  "[StatusCode](#cfn-vpclattice-rule-fixedresponse-statuscode)" : Integer
}
```

### YAML
<a name="aws-properties-vpclattice-rule-fixedresponse-syntax.yaml"></a>

```
  [StatusCode](#cfn-vpclattice-rule-fixedresponse-statuscode): Integer
```

## Properties
<a name="aws-properties-vpclattice-rule-fixedresponse-properties"></a>

`StatusCode`  <a name="cfn-vpclattice-rule-fixedresponse-statuscode"></a>
The HTTP response code. Only `404` and `500` status codes are supported.  
*Required*: Yes  
*Type*: Integer  
*Minimum*: `100`  
*Maximum*: `599`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::VpcLattice::Rule Forward
<a name="aws-properties-vpclattice-rule-forward"></a>

The forward action. Traffic that matches the rule is forwarded to the specified target groups.

## Syntax
<a name="aws-properties-vpclattice-rule-forward-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-vpclattice-rule-forward-syntax.json"></a>

```
{
  "[TargetGroups](#cfn-vpclattice-rule-forward-targetgroups)" : [ WeightedTargetGroup, ... ]
}
```

### YAML
<a name="aws-properties-vpclattice-rule-forward-syntax.yaml"></a>

```
  [TargetGroups](#cfn-vpclattice-rule-forward-targetgroups): 
    - WeightedTargetGroup
```

## Properties
<a name="aws-properties-vpclattice-rule-forward-properties"></a>

`TargetGroups`  <a name="cfn-vpclattice-rule-forward-targetgroups"></a>
The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.  
The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.  
*Required*: Yes  
*Type*: Array of [WeightedTargetGroup](aws-properties-vpclattice-rule-weightedtargetgroup.md)  
*Minimum*: `1`  
*Maximum*: `10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::VpcLattice::Rule HeaderMatch
<a name="aws-properties-vpclattice-rule-headermatch"></a>

Describes the constraints for a header match. Matches incoming requests with rule based on request header value before applying rule action.

## Syntax
<a name="aws-properties-vpclattice-rule-headermatch-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-vpclattice-rule-headermatch-syntax.json"></a>

```
{
  "[CaseSensitive](#cfn-vpclattice-rule-headermatch-casesensitive)" : Boolean,
  "[Match](#cfn-vpclattice-rule-headermatch-match)" : HeaderMatchType,
  "[Name](#cfn-vpclattice-rule-headermatch-name)" : String
}
```

### YAML
<a name="aws-properties-vpclattice-rule-headermatch-syntax.yaml"></a>

```
  [CaseSensitive](#cfn-vpclattice-rule-headermatch-casesensitive): Boolean
  [Match](#cfn-vpclattice-rule-headermatch-match): 
    HeaderMatchType
  [Name](#cfn-vpclattice-rule-headermatch-name): String
```

## Properties
<a name="aws-properties-vpclattice-rule-headermatch-properties"></a>

`CaseSensitive`  <a name="cfn-vpclattice-rule-headermatch-casesensitive"></a>
Indicates whether the match is case sensitive.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Match`  <a name="cfn-vpclattice-rule-headermatch-match"></a>
The header match type.  
*Required*: Yes  
*Type*: [HeaderMatchType](aws-properties-vpclattice-rule-headermatchtype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-vpclattice-rule-headermatch-name"></a>
The name of the header.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `40`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::VpcLattice::Rule HeaderMatchType
<a name="aws-properties-vpclattice-rule-headermatchtype"></a>

Describes a header match type.

## Syntax
<a name="aws-properties-vpclattice-rule-headermatchtype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-vpclattice-rule-headermatchtype-syntax.json"></a>

```
{
  "[Contains](#cfn-vpclattice-rule-headermatchtype-contains)" : String,
  "[Exact](#cfn-vpclattice-rule-headermatchtype-exact)" : String,
  "[Prefix](#cfn-vpclattice-rule-headermatchtype-prefix)" : String
}
```

### YAML
<a name="aws-properties-vpclattice-rule-headermatchtype-syntax.yaml"></a>

```
  [Contains](#cfn-vpclattice-rule-headermatchtype-contains): String
  [Exact](#cfn-vpclattice-rule-headermatchtype-exact): String
  [Prefix](#cfn-vpclattice-rule-headermatchtype-prefix): String
```

## Properties
<a name="aws-properties-vpclattice-rule-headermatchtype-properties"></a>

`Contains`  <a name="cfn-vpclattice-rule-headermatchtype-contains"></a>
A contains type match.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Exact`  <a name="cfn-vpclattice-rule-headermatchtype-exact"></a>
An exact type match.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Prefix`  <a name="cfn-vpclattice-rule-headermatchtype-prefix"></a>
A prefix type match. Matches the value with the prefix.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::VpcLattice::Rule HttpMatch
<a name="aws-properties-vpclattice-rule-httpmatch"></a>

Describes criteria that can be applied to incoming requests.

## Syntax
<a name="aws-properties-vpclattice-rule-httpmatch-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-vpclattice-rule-httpmatch-syntax.json"></a>

```
{
  "[HeaderMatches](#cfn-vpclattice-rule-httpmatch-headermatches)" : [ HeaderMatch, ... ],
  "[Method](#cfn-vpclattice-rule-httpmatch-method)" : String,
  "[PathMatch](#cfn-vpclattice-rule-httpmatch-pathmatch)" : PathMatch
}
```

### YAML
<a name="aws-properties-vpclattice-rule-httpmatch-syntax.yaml"></a>

```
  [HeaderMatches](#cfn-vpclattice-rule-httpmatch-headermatches): 
    - HeaderMatch
  [Method](#cfn-vpclattice-rule-httpmatch-method): String
  [PathMatch](#cfn-vpclattice-rule-httpmatch-pathmatch): 
    PathMatch
```

## Properties
<a name="aws-properties-vpclattice-rule-httpmatch-properties"></a>

`HeaderMatches`  <a name="cfn-vpclattice-rule-httpmatch-headermatches"></a>
The header matches. Matches incoming requests with rule based on request header value before applying rule action.  
*Required*: No  
*Type*: Array of [HeaderMatch](aws-properties-vpclattice-rule-headermatch.md)  
*Maximum*: `5`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Method`  <a name="cfn-vpclattice-rule-httpmatch-method"></a>
The HTTP method type.  
*Required*: No  
*Type*: String  
*Allowed values*: `CONNECT | DELETE | GET | HEAD | OPTIONS | POST | PUT | TRACE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PathMatch`  <a name="cfn-vpclattice-rule-httpmatch-pathmatch"></a>
The path match.  
*Required*: No  
*Type*: [PathMatch](aws-properties-vpclattice-rule-pathmatch.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::VpcLattice::Rule Match
<a name="aws-properties-vpclattice-rule-match"></a>

Describes a rule match.

## Syntax
<a name="aws-properties-vpclattice-rule-match-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-vpclattice-rule-match-syntax.json"></a>

```
{
  "[HttpMatch](#cfn-vpclattice-rule-match-httpmatch)" : HttpMatch
}
```

### YAML
<a name="aws-properties-vpclattice-rule-match-syntax.yaml"></a>

```
  [HttpMatch](#cfn-vpclattice-rule-match-httpmatch): 
    HttpMatch
```

## Properties
<a name="aws-properties-vpclattice-rule-match-properties"></a>

`HttpMatch`  <a name="cfn-vpclattice-rule-match-httpmatch"></a>
The HTTP criteria that a rule must match.  
*Required*: Yes  
*Type*: [HttpMatch](aws-properties-vpclattice-rule-httpmatch.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::VpcLattice::Rule PathMatch
<a name="aws-properties-vpclattice-rule-pathmatch"></a>

Describes the conditions that can be applied when matching a path for incoming requests.

## Syntax
<a name="aws-properties-vpclattice-rule-pathmatch-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-vpclattice-rule-pathmatch-syntax.json"></a>

```
{
  "[CaseSensitive](#cfn-vpclattice-rule-pathmatch-casesensitive)" : Boolean,
  "[Match](#cfn-vpclattice-rule-pathmatch-match)" : PathMatchType
}
```

### YAML
<a name="aws-properties-vpclattice-rule-pathmatch-syntax.yaml"></a>

```
  [CaseSensitive](#cfn-vpclattice-rule-pathmatch-casesensitive): Boolean
  [Match](#cfn-vpclattice-rule-pathmatch-match): 
    PathMatchType
```

## Properties
<a name="aws-properties-vpclattice-rule-pathmatch-properties"></a>

`CaseSensitive`  <a name="cfn-vpclattice-rule-pathmatch-casesensitive"></a>
Indicates whether the match is case sensitive.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Match`  <a name="cfn-vpclattice-rule-pathmatch-match"></a>
The type of path match.  
*Required*: Yes  
*Type*: [PathMatchType](aws-properties-vpclattice-rule-pathmatchtype.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::VpcLattice::Rule PathMatchType
<a name="aws-properties-vpclattice-rule-pathmatchtype"></a>

Describes a path match type. Each rule can include only one of the following types of paths.

## Syntax
<a name="aws-properties-vpclattice-rule-pathmatchtype-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-vpclattice-rule-pathmatchtype-syntax.json"></a>

```
{
  "[Exact](#cfn-vpclattice-rule-pathmatchtype-exact)" : String,
  "[Prefix](#cfn-vpclattice-rule-pathmatchtype-prefix)" : String
}
```

### YAML
<a name="aws-properties-vpclattice-rule-pathmatchtype-syntax.yaml"></a>

```
  [Exact](#cfn-vpclattice-rule-pathmatchtype-exact): String
  [Prefix](#cfn-vpclattice-rule-pathmatchtype-prefix): String
```

## Properties
<a name="aws-properties-vpclattice-rule-pathmatchtype-properties"></a>

`Exact`  <a name="cfn-vpclattice-rule-pathmatchtype-exact"></a>
An exact match of the path.  
*Required*: No  
*Type*: String  
*Pattern*: `^\/[a-zA-Z0-9@:%_+.~#?&\/=-]*$`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Prefix`  <a name="cfn-vpclattice-rule-pathmatchtype-prefix"></a>
A prefix match of the path.  
*Required*: No  
*Type*: String  
*Pattern*: `^\/[a-zA-Z0-9@:%_+.~#?&\/=-]*$`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::VpcLattice::Rule Tag
<a name="aws-properties-vpclattice-rule-tag"></a>

Specifies a tag for a listener rule.

## Syntax
<a name="aws-properties-vpclattice-rule-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-vpclattice-rule-tag-syntax.json"></a>

```
{
  "[Key](#cfn-vpclattice-rule-tag-key)" : String,
  "[Value](#cfn-vpclattice-rule-tag-value)" : String
}
```

### YAML
<a name="aws-properties-vpclattice-rule-tag-syntax.yaml"></a>

```
  [Key](#cfn-vpclattice-rule-tag-key): String
  [Value](#cfn-vpclattice-rule-tag-value): String
```

## Properties
<a name="aws-properties-vpclattice-rule-tag-properties"></a>

`Key`  <a name="cfn-vpclattice-rule-tag-key"></a>
The tag key.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-vpclattice-rule-tag-value"></a>
The tag value.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::VpcLattice::Rule WeightedTargetGroup
<a name="aws-properties-vpclattice-rule-weightedtargetgroup"></a>

Describes the weight of a target group.

## Syntax
<a name="aws-properties-vpclattice-rule-weightedtargetgroup-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-vpclattice-rule-weightedtargetgroup-syntax.json"></a>

```
{
  "[TargetGroupIdentifier](#cfn-vpclattice-rule-weightedtargetgroup-targetgroupidentifier)" : String,
  "[Weight](#cfn-vpclattice-rule-weightedtargetgroup-weight)" : Integer
}
```

### YAML
<a name="aws-properties-vpclattice-rule-weightedtargetgroup-syntax.yaml"></a>

```
  [TargetGroupIdentifier](#cfn-vpclattice-rule-weightedtargetgroup-targetgroupidentifier): String
  [Weight](#cfn-vpclattice-rule-weightedtargetgroup-weight): Integer
```

## Properties
<a name="aws-properties-vpclattice-rule-weightedtargetgroup-properties"></a>

`TargetGroupIdentifier`  <a name="cfn-vpclattice-rule-weightedtargetgroup-targetgroupidentifier"></a>
The ID of the target group.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^((tg-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:targetgroup/tg-[0-9a-z]{17}))$`  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Weight`  <a name="cfn-vpclattice-rule-weightedtargetgroup-weight"></a>
Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `999`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)