# NatRuleProperty

A NAT gateway rule on the attachment.

- Source: Generated at build time
- Type last changed: v2.277.0 · 13 Nov 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_networkmanager as networkmanager } from 'aws-cdk-lib';
const natRuleProperty: networkmanager.CfnConnectAttachment.NatRuleProperty = {
  matchSourceCidr: 'matchSourceCidr',
  natCidr: 'natCidr',
  ruleNumber: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_networkmanager as networkmanager

nat_rule_property = networkmanager.CfnConnectAttachment.NatRuleProperty(
    match_source_cidr="matchSourceCidr",
    nat_cidr="natCidr",
    rule_number=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.networkmanager.*;

NatRuleProperty natRuleProperty = NatRuleProperty.builder()
        .matchSourceCidr("matchSourceCidr")
        .natCidr("natCidr")
        .ruleNumber(123)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.NetworkManager;

var natRuleProperty = new NatRuleProperty {
    MatchSourceCidr = "matchSourceCidr",
    NatCidr = "natCidr",
    RuleNumber = 123
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

natRuleProperty := &NatRuleProperty{
	MatchSourceCidr: jsii.String("matchSourceCidr"),
	NatCidr: jsii.String("natCidr"),
	RuleNumber: jsii.Number(123),
}
```

## Properties

- `matchSourceCidr`: string (required) — The IPv4 CIDR that source traffic is matched against for translation.

- `natCidr`: string (required) — The IPv4 CIDR that matched source traffic is translated into.

  Must have the same prefix length as MatchSourceCidr.

- `ruleNumber`: number (required) — The rule number that uniquely identifies the NAT rule on the attachment.
