# AzureNatGatewayResource Constructors

- Package: [Aspire.Hosting.Azure.Network](/reference/api/csharp/aspire.hosting.azure.network.md)
- Type: [AzureNatGatewayResource](/reference/api/csharp/aspire.hosting.azure.network/azurenatgatewayresource.md)
- Kind: `Constructors`
- Members: `1`

Represents an Azure NAT Gateway resource.

## AzureNatGatewayResource(string, Action<AzureResourceInfrastructure>)

- Name: `Constructor(string, Action<AzureResourceInfrastructure>)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureNatGatewayResource.cs#L20-L35)

Represents an Azure NAT Gateway resource.

```csharp
public class AzureNatGatewayResource
{
    public AzureNatGatewayResource(
        string name,
        Action<AzureResourceInfrastructure> configureInfrastructure)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the resource.
- `configureInfrastructure` (`Action<AzureResourceInfrastructure>`)
  Callback to configure the Azure NAT Gateway resource.

## Remarks

A NAT Gateway provides outbound internet connectivity for resources in a virtual network subnet. Use `AzureProvisioningResourceExtensions.ConfigureInfrastructure` to configure specific `Azure.Provisioning` properties.
