1. Packages
  2. Azure Native v1
  3. API Docs
  4. network
  5. NatGateway
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.network.NatGateway

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    Nat Gateway resource. API Version: 2020-11-01.

    Example Usage

    Create nat gateway

    using System.Collections.Generic;
    using System.Linq;
    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/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

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NatGateway(name: string, args: NatGatewayArgs, opts?: CustomResourceOptions);
    @overload
    def NatGateway(resource_name: str,
                   args: NatGatewayInitArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def NatGateway(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   resource_group_name: Optional[str] = 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,
                   sku: Optional[NatGatewaySkuArgs] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   zones: Optional[Sequence[str]] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var natGatewayResource = new AzureNative.Network.NatGateway("natGatewayResource", new()
    {
        ResourceGroupName = "string",
        Id = "string",
        IdleTimeoutInMinutes = 0,
        Location = "string",
        NatGatewayName = "string",
        PublicIpAddresses = new[]
        {
            
            {
                { "id", "string" },
            },
        },
        PublicIpPrefixes = new[]
        {
            
            {
                { "id", "string" },
            },
        },
        Sku = 
        {
            { "name", "string" },
        },
        Tags = 
        {
            { "string", "string" },
        },
        Zones = new[]
        {
            "string",
        },
    });
    
    example, err := network.NewNatGateway(ctx, "natGatewayResource", &network.NatGatewayArgs{
    	ResourceGroupName:    "string",
    	Id:                   "string",
    	IdleTimeoutInMinutes: 0,
    	Location:             "string",
    	NatGatewayName:       "string",
    	PublicIpAddresses: []map[string]interface{}{
    		map[string]interface{}{
    			"id": "string",
    		},
    	},
    	PublicIpPrefixes: []map[string]interface{}{
    		map[string]interface{}{
    			"id": "string",
    		},
    	},
    	Sku: map[string]interface{}{
    		"name": "string",
    	},
    	Tags: map[string]interface{}{
    		"string": "string",
    	},
    	Zones: []string{
    		"string",
    	},
    })
    
    var natGatewayResource = new NatGateway("natGatewayResource", NatGatewayArgs.builder()
        .resourceGroupName("string")
        .id("string")
        .idleTimeoutInMinutes(0)
        .location("string")
        .natGatewayName("string")
        .publicIpAddresses(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .publicIpPrefixes(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .sku(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .zones("string")
        .build());
    
    nat_gateway_resource = azure_native.network.NatGateway("natGatewayResource",
        resource_group_name=string,
        id=string,
        idle_timeout_in_minutes=0,
        location=string,
        nat_gateway_name=string,
        public_ip_addresses=[{
            id: string,
        }],
        public_ip_prefixes=[{
            id: string,
        }],
        sku={
            name: string,
        },
        tags={
            string: string,
        },
        zones=[string])
    
    const natGatewayResource = new azure_native.network.NatGateway("natGatewayResource", {
        resourceGroupName: "string",
        id: "string",
        idleTimeoutInMinutes: 0,
        location: "string",
        natGatewayName: "string",
        publicIpAddresses: [{
            id: "string",
        }],
        publicIpPrefixes: [{
            id: "string",
        }],
        sku: {
            name: "string",
        },
        tags: {
            string: "string",
        },
        zones: ["string"],
    });
    
    type: azure-native:network:NatGateway
    properties:
        id: string
        idleTimeoutInMinutes: 0
        location: string
        natGatewayName: string
        publicIpAddresses:
            - id: string
        publicIpPrefixes:
            - id: string
        resourceGroupName: string
        sku:
            name: string
        tags:
            string: string
        zones:
            - string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The NatGateway resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group.
    Id string
    Resource ID.
    IdleTimeoutInMinutes int
    The idle timeout of the nat gateway.
    Location string
    Resource location.
    NatGatewayName string
    The name of the nat gateway.
    PublicIpAddresses List<Pulumi.AzureNative.Network.Inputs.SubResource>
    An array of public ip addresses associated with the nat gateway resource.
    PublicIpPrefixes List<Pulumi.AzureNative.Network.Inputs.SubResource>
    An array of public ip prefixes associated with the nat gateway resource.
    Sku Pulumi.AzureNative.Network.Inputs.NatGatewaySku
    The nat gateway SKU.
    Tags Dictionary<string, string>
    Resource tags.
    Zones List<string>
    A list of availability zones denoting the zone in which Nat Gateway should be deployed.
    ResourceGroupName string
    The name of the resource group.
    Id string
    Resource ID.
    IdleTimeoutInMinutes int
    The idle timeout of the nat gateway.
    Location string
    Resource location.
    NatGatewayName string
    The name of the nat gateway.
    PublicIpAddresses []SubResourceArgs
    An array of public ip addresses associated with the nat gateway resource.
    PublicIpPrefixes []SubResourceArgs
    An array of public ip prefixes associated with the nat gateway resource.
    Sku NatGatewaySkuArgs
    The nat gateway SKU.
    Tags map[string]string
    Resource tags.
    Zones []string
    A list of availability zones denoting the zone in which Nat Gateway should be deployed.
    resourceGroupName String
    The name of the resource group.
    id String
    Resource ID.
    idleTimeoutInMinutes Integer
    The idle timeout of the nat gateway.
    location String
    Resource location.
    natGatewayName String
    The name of the nat gateway.
    publicIpAddresses List<SubResource>
    An array of public ip addresses associated with the nat gateway resource.
    publicIpPrefixes List<SubResource>
    An array of public ip prefixes associated with the nat gateway resource.
    sku NatGatewaySku
    The nat gateway SKU.
    tags Map<String,String>
    Resource tags.
    zones List<String>
    A list of availability zones denoting the zone in which Nat Gateway should be deployed.
    resourceGroupName string
    The name of the resource group.
    id string
    Resource ID.
    idleTimeoutInMinutes number
    The idle timeout of the nat gateway.
    location string
    Resource location.
    natGatewayName string
    The name of the nat gateway.
    publicIpAddresses SubResource[]
    An array of public ip addresses associated with the nat gateway resource.
    publicIpPrefixes SubResource[]
    An array of public ip prefixes associated with the nat gateway resource.
    sku NatGatewaySku
    The nat gateway SKU.
    tags {[key: string]: string}
    Resource tags.
    zones string[]
    A list of availability zones denoting the zone in which Nat Gateway should be deployed.
    resource_group_name str
    The name of the resource group.
    id str
    Resource ID.
    idle_timeout_in_minutes int
    The idle timeout of the nat gateway.
    location str
    Resource location.
    nat_gateway_name str
    The name of the nat gateway.
    public_ip_addresses Sequence[SubResourceArgs]
    An array of public ip addresses associated with the nat gateway resource.
    public_ip_prefixes Sequence[SubResourceArgs]
    An array of public ip prefixes associated with the nat gateway resource.
    sku NatGatewaySkuArgs
    The nat gateway SKU.
    tags Mapping[str, str]
    Resource tags.
    zones Sequence[str]
    A list of availability zones denoting the zone in which Nat Gateway should be deployed.
    resourceGroupName String
    The name of the resource group.
    id String
    Resource ID.
    idleTimeoutInMinutes Number
    The idle timeout of the nat gateway.
    location String
    Resource location.
    natGatewayName String
    The name of the nat gateway.
    publicIpAddresses List<Property Map>
    An array of public ip addresses associated with the nat gateway resource.
    publicIpPrefixes List<Property Map>
    An array of public ip prefixes associated with the nat gateway resource.
    sku Property Map
    The nat gateway SKU.
    tags 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.
    ProvisioningState string
    The provisioning state of the NAT gateway resource.
    ResourceGuid string
    The resource GUID property of the NAT gateway resource.
    Subnets List<Pulumi.AzureNative.Network.Outputs.SubResourceResponse>
    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.
    ProvisioningState string
    The provisioning state of the NAT gateway resource.
    ResourceGuid string
    The resource GUID property of the NAT gateway resource.
    Subnets []SubResourceResponse
    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.
    provisioningState String
    The provisioning state of the NAT gateway resource.
    resourceGuid String
    The resource GUID property of the NAT gateway resource.
    subnets List<SubResourceResponse>
    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.
    provisioningState string
    The provisioning state of the NAT gateway resource.
    resourceGuid string
    The resource GUID property of the NAT gateway resource.
    subnets SubResourceResponse[]
    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[SubResourceResponse]
    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.
    provisioningState String
    The provisioning state of the NAT gateway resource.
    resourceGuid 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, NatGatewaySkuArgs

    Name string | Pulumi.AzureNative.Network.NatGatewaySkuName
    Name of Nat Gateway SKU.
    Name string | NatGatewaySkuName
    Name of Nat Gateway SKU.
    name String | NatGatewaySkuName
    Name of Nat Gateway SKU.
    name string | NatGatewaySkuName
    Name of Nat Gateway SKU.
    name str | NatGatewaySkuName
    Name of Nat Gateway SKU.
    name String | "Standard"
    Name of Nat Gateway SKU.

    NatGatewaySkuName, NatGatewaySkuNameArgs

    Standard
    Standard
    NatGatewaySkuNameStandard
    Standard
    Standard
    Standard
    Standard
    Standard
    STANDARD
    Standard
    "Standard"
    Standard

    NatGatewaySkuResponse, NatGatewaySkuResponseArgs

    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, SubResourceArgs

    Id string
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    Id string
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    id String
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    id string
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    id str
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    id String
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.

    SubResourceResponse, SubResourceResponseArgs

    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 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi