azure-native.network.NatGateway
Explore with Pulumi AI
Nat Gateway resource. API Version: 2020-11-01.
Example Usage
Create nat gateway
using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var natGateway = new AzureNative.Network.NatGateway("natGateway", new()
{
Location = "westus",
NatGatewayName = "test-natgateway",
PublicIpAddresses = new[]
{
new AzureNative.Network.Inputs.SubResourceArgs
{
Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1",
},
},
PublicIpPrefixes = new[]
{
new AzureNative.Network.Inputs.SubResourceArgs
{
Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1",
},
},
ResourceGroupName = "rg1",
Sku = new AzureNative.Network.Inputs.NatGatewaySkuArgs
{
Name = "Standard",
},
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native/sdk/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewNatGateway(ctx, "natGateway", &network.NatGatewayArgs{
Location: pulumi.String("westus"),
NatGatewayName: pulumi.String("test-natgateway"),
PublicIpAddresses: []network.SubResourceArgs{
{
Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1"),
},
},
PublicIpPrefixes: []network.SubResourceArgs{
{
Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1"),
},
},
ResourceGroupName: pulumi.String("rg1"),
Sku: &network.NatGatewaySkuArgs{
Name: pulumi.String("Standard"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.NatGateway;
import com.pulumi.azurenative.network.NatGatewayArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var natGateway = new NatGateway("natGateway", NatGatewayArgs.builder()
.location("westus")
.natGatewayName("test-natgateway")
.publicIpAddresses(Map.of("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1"))
.publicIpPrefixes(Map.of("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1"))
.resourceGroupName("rg1")
.sku(Map.of("name", "Standard"))
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
nat_gateway = azure_native.network.NatGateway("natGateway",
location="westus",
nat_gateway_name="test-natgateway",
public_ip_addresses=[azure_native.network.SubResourceArgs(
id="/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1",
)],
public_ip_prefixes=[azure_native.network.SubResourceArgs(
id="/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1",
)],
resource_group_name="rg1",
sku=azure_native.network.NatGatewaySkuArgs(
name="Standard",
))
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const natGateway = new azure_native.network.NatGateway("natGateway", {
location: "westus",
natGatewayName: "test-natgateway",
publicIpAddresses: [{
id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1",
}],
publicIpPrefixes: [{
id: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1",
}],
resourceGroupName: "rg1",
sku: {
name: "Standard",
},
});
resources:
natGateway:
type: azure-native:network:NatGateway
properties:
location: westus
natGatewayName: test-natgateway
publicIpAddresses:
- id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1
publicIpPrefixes:
- id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1
resourceGroupName: rg1
sku:
name: Standard
Create NatGateway Resource
new NatGateway(name: string, args: NatGatewayArgs, opts?: CustomResourceOptions);
@overload
def NatGateway(resource_name: str,
opts: Optional[ResourceOptions] = None,
id: Optional[str] = None,
idle_timeout_in_minutes: Optional[int] = None,
location: Optional[str] = None,
nat_gateway_name: Optional[str] = None,
public_ip_addresses: Optional[Sequence[SubResourceArgs]] = None,
public_ip_prefixes: Optional[Sequence[SubResourceArgs]] = None,
resource_group_name: Optional[str] = None,
sku: Optional[NatGatewaySkuArgs] = None,
tags: Optional[Mapping[str, str]] = None,
zones: Optional[Sequence[str]] = None)
@overload
def NatGateway(resource_name: str,
args: NatGatewayInitArgs,
opts: Optional[ResourceOptions] = None)
func NewNatGateway(ctx *Context, name string, args NatGatewayArgs, opts ...ResourceOption) (*NatGateway, error)
public NatGateway(string name, NatGatewayArgs args, CustomResourceOptions? opts = null)
public NatGateway(String name, NatGatewayArgs args)
public NatGateway(String name, NatGatewayArgs args, CustomResourceOptions options)
type: azure-native:network:NatGateway
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NatGatewayArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NatGatewayInitArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NatGatewayArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NatGatewayArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NatGatewayArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
NatGateway Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The NatGateway resource accepts the following input properties:
- Resource
Group stringName The name of the resource group.
- Id string
Resource ID.
- Idle
Timeout intIn Minutes The idle timeout of the nat gateway.
- Location string
Resource location.
- Nat
Gateway stringName The name of the nat gateway.
- Public
Ip List<Pulumi.Addresses Azure Native. Network. Inputs. Sub Resource Args> An array of public ip addresses associated with the nat gateway resource.
- Public
Ip List<Pulumi.Prefixes Azure Native. Network. Inputs. Sub Resource Args> An array of public ip prefixes associated with the nat gateway resource.
- Sku
Pulumi.
Azure Native. Network. Inputs. Nat Gateway Sku Args The nat gateway SKU.
- Dictionary<string, string>
Resource tags.
- Zones List<string>
A list of availability zones denoting the zone in which Nat Gateway should be deployed.
- Resource
Group stringName The name of the resource group.
- Id string
Resource ID.
- Idle
Timeout intIn Minutes The idle timeout of the nat gateway.
- Location string
Resource location.
- Nat
Gateway stringName The name of the nat gateway.
- Public
Ip []SubAddresses Resource Args An array of public ip addresses associated with the nat gateway resource.
- Public
Ip []SubPrefixes Resource Args An array of public ip prefixes associated with the nat gateway resource.
- Sku
Nat
Gateway Sku Args The nat gateway SKU.
- map[string]string
Resource tags.
- Zones []string
A list of availability zones denoting the zone in which Nat Gateway should be deployed.
- resource
Group StringName The name of the resource group.
- id String
Resource ID.
- idle
Timeout IntegerIn Minutes The idle timeout of the nat gateway.
- location String
Resource location.
- nat
Gateway StringName The name of the nat gateway.
- public
Ip List<SubAddresses Resource Args> An array of public ip addresses associated with the nat gateway resource.
- public
Ip List<SubPrefixes Resource Args> An array of public ip prefixes associated with the nat gateway resource.
- sku
Nat
Gateway Sku Args The nat gateway SKU.
- Map<String,String>
Resource tags.
- zones List<String>
A list of availability zones denoting the zone in which Nat Gateway should be deployed.
- resource
Group stringName The name of the resource group.
- id string
Resource ID.
- idle
Timeout numberIn Minutes The idle timeout of the nat gateway.
- location string
Resource location.
- nat
Gateway stringName The name of the nat gateway.
- public
Ip SubAddresses Resource Args[] An array of public ip addresses associated with the nat gateway resource.
- public
Ip SubPrefixes Resource Args[] An array of public ip prefixes associated with the nat gateway resource.
- sku
Nat
Gateway Sku Args The nat gateway SKU.
- {[key: string]: string}
Resource tags.
- zones string[]
A list of availability zones denoting the zone in which Nat Gateway should be deployed.
- resource_
group_ strname The name of the resource group.
- id str
Resource ID.
- idle_
timeout_ intin_ minutes The idle timeout of the nat gateway.
- location str
Resource location.
- nat_
gateway_ strname The name of the nat gateway.
- public_
ip_ Sequence[Subaddresses Resource Args] An array of public ip addresses associated with the nat gateway resource.
- public_
ip_ Sequence[Subprefixes Resource Args] An array of public ip prefixes associated with the nat gateway resource.
- sku
Nat
Gateway Sku Args The nat gateway SKU.
- Mapping[str, str]
Resource tags.
- zones Sequence[str]
A list of availability zones denoting the zone in which Nat Gateway should be deployed.
- resource
Group StringName The name of the resource group.
- id String
Resource ID.
- idle
Timeout NumberIn Minutes The idle timeout of the nat gateway.
- location String
Resource location.
- nat
Gateway StringName The name of the nat gateway.
- public
Ip List<Property Map>Addresses An array of public ip addresses associated with the nat gateway resource.
- public
Ip List<Property Map>Prefixes An array of public ip prefixes associated with the nat gateway resource.
- sku Property Map
The nat gateway SKU.
- Map<String>
Resource tags.
- zones List<String>
A list of availability zones denoting the zone in which Nat Gateway should be deployed.
Outputs
All input properties are implicitly available as output properties. Additionally, the NatGateway resource produces the following output properties:
- Etag string
A unique read-only string that changes whenever the resource is updated.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
Resource name.
- Provisioning
State string The provisioning state of the NAT gateway resource.
- Resource
Guid string The resource GUID property of the NAT gateway resource.
- Subnets
List<Pulumi.
Azure Native. Network. Outputs. Sub Resource Response> An array of references to the subnets using this nat gateway resource.
- Type string
Resource type.
- Etag string
A unique read-only string that changes whenever the resource is updated.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
Resource name.
- Provisioning
State string The provisioning state of the NAT gateway resource.
- Resource
Guid string The resource GUID property of the NAT gateway resource.
- Subnets
[]Sub
Resource Response An array of references to the subnets using this nat gateway resource.
- Type string
Resource type.
- etag String
A unique read-only string that changes whenever the resource is updated.
- id String
The provider-assigned unique ID for this managed resource.
- name String
Resource name.
- provisioning
State String The provisioning state of the NAT gateway resource.
- resource
Guid String The resource GUID property of the NAT gateway resource.
- subnets
List<Sub
Resource Response> An array of references to the subnets using this nat gateway resource.
- type String
Resource type.
- etag string
A unique read-only string that changes whenever the resource is updated.
- id string
The provider-assigned unique ID for this managed resource.
- name string
Resource name.
- provisioning
State string The provisioning state of the NAT gateway resource.
- resource
Guid string The resource GUID property of the NAT gateway resource.
- subnets
Sub
Resource Response[] An array of references to the subnets using this nat gateway resource.
- type string
Resource type.
- etag str
A unique read-only string that changes whenever the resource is updated.
- id str
The provider-assigned unique ID for this managed resource.
- name str
Resource name.
- provisioning_
state str The provisioning state of the NAT gateway resource.
- resource_
guid str The resource GUID property of the NAT gateway resource.
- subnets
Sequence[Sub
Resource Response] An array of references to the subnets using this nat gateway resource.
- type str
Resource type.
- etag String
A unique read-only string that changes whenever the resource is updated.
- id String
The provider-assigned unique ID for this managed resource.
- name String
Resource name.
- provisioning
State String The provisioning state of the NAT gateway resource.
- resource
Guid String The resource GUID property of the NAT gateway resource.
- subnets List<Property Map>
An array of references to the subnets using this nat gateway resource.
- type String
Resource type.
Supporting Types
NatGatewaySku
- Name
string | Pulumi.
Azure Native. Network. Nat Gateway Sku Name Name of Nat Gateway SKU.
- Name
string | Nat
Gateway Sku Name Name of Nat Gateway SKU.
- name
String | Nat
Gateway Sku Name Name of Nat Gateway SKU.
- name
string | Nat
Gateway Sku Name Name of Nat Gateway SKU.
- name
str | Nat
Gateway Sku Name Name of Nat Gateway SKU.
- name String | "Standard"
Name of Nat Gateway SKU.
NatGatewaySkuName
- Standard
- Standard
- Nat
Gateway Sku Name Standard - Standard
- Standard
- Standard
- Standard
- Standard
- STANDARD
- Standard
- "Standard"
- Standard
NatGatewaySkuResponse
- Name string
Name of Nat Gateway SKU.
- Name string
Name of Nat Gateway SKU.
- name String
Name of Nat Gateway SKU.
- name string
Name of Nat Gateway SKU.
- name str
Name of Nat Gateway SKU.
- name String
Name of Nat Gateway SKU.
SubResource
- Id string
Resource Id.
- Id string
Resource Id.
- id String
Resource Id.
- id string
Resource Id.
- id str
Resource Id.
- id String
Resource Id.
SubResourceResponse
- Id string
Resource ID.
- Id string
Resource ID.
- id String
Resource ID.
- id string
Resource ID.
- id str
Resource ID.
- id String
Resource ID.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:network:NatGateway test-natGateway /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/natGateways/test-natGateway
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0