1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. getRouterNat
Google Cloud Classic v7.2.2 published on Monday, Jan 1, 0001 by Pulumi

gcp.compute.getRouterNat

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.2 published on Monday, Jan 1, 0001 by Pulumi

    To get more information about Snapshot, see:

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = Gcp.Compute.GetRouterNat.Invoke(new()
        {
            Name = "my-nat",
            Router = "my-router",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.LookupRouterNat(ctx, &compute.LookupRouterNatArgs{
    			Name:   "my-nat",
    			Router: "my-router",
    		}, nil)
    		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.gcp.compute.ComputeFunctions;
    import com.pulumi.gcp.compute.inputs.GetRouterNatArgs;
    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) {
            final var foo = ComputeFunctions.getRouterNat(GetRouterNatArgs.builder()
                .name("my-nat")
                .router("my-router")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    foo = gcp.compute.get_router_nat(name="my-nat",
        router="my-router")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const foo = gcp.compute.getRouterNat({
        name: "my-nat",
        router: "my-router",
    });
    
    variables:
      foo:
        fn::invoke:
          Function: gcp:compute:getRouterNat
          Arguments:
            name: my-nat
            router: my-router
    

    Using getRouterNat

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getRouterNat(args: GetRouterNatArgs, opts?: InvokeOptions): Promise<GetRouterNatResult>
    function getRouterNatOutput(args: GetRouterNatOutputArgs, opts?: InvokeOptions): Output<GetRouterNatResult>
    def get_router_nat(name: Optional[str] = None,
                       project: Optional[str] = None,
                       region: Optional[str] = None,
                       router: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetRouterNatResult
    def get_router_nat_output(name: Optional[pulumi.Input[str]] = None,
                       project: Optional[pulumi.Input[str]] = None,
                       region: Optional[pulumi.Input[str]] = None,
                       router: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetRouterNatResult]
    func LookupRouterNat(ctx *Context, args *LookupRouterNatArgs, opts ...InvokeOption) (*LookupRouterNatResult, error)
    func LookupRouterNatOutput(ctx *Context, args *LookupRouterNatOutputArgs, opts ...InvokeOption) LookupRouterNatResultOutput

    > Note: This function is named LookupRouterNat in the Go SDK.

    public static class GetRouterNat 
    {
        public static Task<GetRouterNatResult> InvokeAsync(GetRouterNatArgs args, InvokeOptions? opts = null)
        public static Output<GetRouterNatResult> Invoke(GetRouterNatInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRouterNatResult> getRouterNat(GetRouterNatArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:compute/getRouterNat:getRouterNat
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string

    Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.

    Router string

    The name of the Cloud Router in which this NAT will be configured.


    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Region string

    Region where the router and NAT reside.

    Name string

    Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.

    Router string

    The name of the Cloud Router in which this NAT will be configured.


    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Region string

    Region where the router and NAT reside.

    name String

    Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.

    router String

    The name of the Cloud Router in which this NAT will be configured.


    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    region String

    Region where the router and NAT reside.

    name string

    Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.

    router string

    The name of the Cloud Router in which this NAT will be configured.


    project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    region string

    Region where the router and NAT reside.

    name str

    Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.

    router str

    The name of the Cloud Router in which this NAT will be configured.


    project str

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    region str

    Region where the router and NAT reside.

    name String

    Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.

    router String

    The name of the Cloud Router in which this NAT will be configured.


    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    region String

    Region where the router and NAT reside.

    getRouterNat Result

    The following output properties are available:

    Supporting Types

    GetRouterNatLogConfig

    Enable bool
    Filter string
    Enable bool
    Filter string
    enable Boolean
    filter String
    enable boolean
    filter string
    enable bool
    filter str
    enable Boolean
    filter String

    GetRouterNatRule

    GetRouterNatRuleAction

    SourceNatActiveIps List<string>
    SourceNatActiveRanges List<string>
    SourceNatDrainIps List<string>
    SourceNatDrainRanges List<string>
    sourceNatActiveIps List<String>
    sourceNatActiveRanges List<String>
    sourceNatDrainIps List<String>
    sourceNatDrainRanges List<String>
    sourceNatActiveIps List<String>
    sourceNatActiveRanges List<String>
    sourceNatDrainIps List<String>
    sourceNatDrainRanges List<String>

    GetRouterNatSubnetwork

    Name string

    Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.

    SecondaryIpRangeNames List<string>
    SourceIpRangesToNats List<string>
    Name string

    Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.

    SecondaryIpRangeNames []string
    SourceIpRangesToNats []string
    name String

    Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.

    secondaryIpRangeNames List<String>
    sourceIpRangesToNats List<String>
    name string

    Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.

    secondaryIpRangeNames string[]
    sourceIpRangesToNats string[]
    name str

    Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.

    secondary_ip_range_names Sequence[str]
    source_ip_ranges_to_nats Sequence[str]
    name String

    Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.

    secondaryIpRangeNames List<String>
    sourceIpRangesToNats List<String>

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the google-beta Terraform Provider.

    gcp logo
    Google Cloud Classic v7.2.2 published on Monday, Jan 1, 0001 by Pulumi