gcp.compute.getRouterNat
Explore with Pulumi AI
To get more information about Snapshot, see:
- API documentation
- How-to Guides
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:
- Drain
Nat List<string>Ips - Enable
Dynamic boolPort Allocation - Enable
Endpoint boolIndependent Mapping - Icmp
Idle intTimeout Sec - Id string
The provider-assigned unique ID for this managed resource.
- Log
Configs List<GetRouter Nat Log Config> - Max
Ports intPer Vm - Min
Ports intPer Vm - Name string
- Nat
Ip stringAllocate Option - Nat
Ips List<string> - Router string
- Rules
List<Get
Router Nat Rule> - Source
Subnetwork stringIp Ranges To Nat - Subnetworks
List<Get
Router Nat Subnetwork> - Tcp
Established intIdle Timeout Sec - Tcp
Time intWait Timeout Sec - Tcp
Transitory intIdle Timeout Sec - Type string
- Udp
Idle intTimeout Sec - Project string
- Region string
- Drain
Nat []stringIps - Enable
Dynamic boolPort Allocation - Enable
Endpoint boolIndependent Mapping - Icmp
Idle intTimeout Sec - Id string
The provider-assigned unique ID for this managed resource.
- Log
Configs []GetRouter Nat Log Config - Max
Ports intPer Vm - Min
Ports intPer Vm - Name string
- Nat
Ip stringAllocate Option - Nat
Ips []string - Router string
- Rules
[]Get
Router Nat Rule - Source
Subnetwork stringIp Ranges To Nat - Subnetworks
[]Get
Router Nat Subnetwork - Tcp
Established intIdle Timeout Sec - Tcp
Time intWait Timeout Sec - Tcp
Transitory intIdle Timeout Sec - Type string
- Udp
Idle intTimeout Sec - Project string
- Region string
- drain
Nat List<String>Ips - enable
Dynamic BooleanPort Allocation - enable
Endpoint BooleanIndependent Mapping - icmp
Idle IntegerTimeout Sec - id String
The provider-assigned unique ID for this managed resource.
- log
Configs List<GetRouter Nat Log Config> - max
Ports IntegerPer Vm - min
Ports IntegerPer Vm - name String
- nat
Ip StringAllocate Option - nat
Ips List<String> - router String
- rules
List<Get
Router Nat Rule> - source
Subnetwork StringIp Ranges To Nat - subnetworks
List<Get
Router Nat Subnetwork> - tcp
Established IntegerIdle Timeout Sec - tcp
Time IntegerWait Timeout Sec - tcp
Transitory IntegerIdle Timeout Sec - type String
- udp
Idle IntegerTimeout Sec - project String
- region String
- drain
Nat string[]Ips - enable
Dynamic booleanPort Allocation - enable
Endpoint booleanIndependent Mapping - icmp
Idle numberTimeout Sec - id string
The provider-assigned unique ID for this managed resource.
- log
Configs GetRouter Nat Log Config[] - max
Ports numberPer Vm - min
Ports numberPer Vm - name string
- nat
Ip stringAllocate Option - nat
Ips string[] - router string
- rules
Get
Router Nat Rule[] - source
Subnetwork stringIp Ranges To Nat - subnetworks
Get
Router Nat Subnetwork[] - tcp
Established numberIdle Timeout Sec - tcp
Time numberWait Timeout Sec - tcp
Transitory numberIdle Timeout Sec - type string
- udp
Idle numberTimeout Sec - project string
- region string
- drain_
nat_ Sequence[str]ips - enable_
dynamic_ boolport_ allocation - enable_
endpoint_ boolindependent_ mapping - icmp_
idle_ inttimeout_ sec - id str
The provider-assigned unique ID for this managed resource.
- log_
configs Sequence[GetRouter Nat Log Config] - max_
ports_ intper_ vm - min_
ports_ intper_ vm - name str
- nat_
ip_ strallocate_ option - nat_
ips Sequence[str] - router str
- rules
Sequence[Get
Router Nat Rule] - source_
subnetwork_ strip_ ranges_ to_ nat - subnetworks
Sequence[Get
Router Nat Subnetwork] - tcp_
established_ intidle_ timeout_ sec - tcp_
time_ intwait_ timeout_ sec - tcp_
transitory_ intidle_ timeout_ sec - type str
- udp_
idle_ inttimeout_ sec - project str
- region str
- drain
Nat List<String>Ips - enable
Dynamic BooleanPort Allocation - enable
Endpoint BooleanIndependent Mapping - icmp
Idle NumberTimeout Sec - id String
The provider-assigned unique ID for this managed resource.
- log
Configs List<Property Map> - max
Ports NumberPer Vm - min
Ports NumberPer Vm - name String
- nat
Ip StringAllocate Option - nat
Ips List<String> - router String
- rules List<Property Map>
- source
Subnetwork StringIp Ranges To Nat - subnetworks List<Property Map>
- tcp
Established NumberIdle Timeout Sec - tcp
Time NumberWait Timeout Sec - tcp
Transitory NumberIdle Timeout Sec - type String
- udp
Idle NumberTimeout Sec - project String
- region String
Supporting Types
GetRouterNatLogConfig
GetRouterNatRule
- Actions
List<Get
Router Nat Rule Action> - Description string
- Match string
- Rule
Number int
- Actions
[]Get
Router Nat Rule Action - Description string
- Match string
- Rule
Number int
- actions
List<Get
Router Nat Rule Action> - description String
- match String
- rule
Number Integer
- actions
Get
Router Nat Rule Action[] - description string
- match string
- rule
Number number
- actions List<Property Map>
- description String
- match String
- rule
Number Number
GetRouterNatRuleAction
- Source
Nat List<string>Active Ips - Source
Nat List<string>Active Ranges - Source
Nat List<string>Drain Ips - Source
Nat List<string>Drain Ranges
- Source
Nat []stringActive Ips - Source
Nat []stringActive Ranges - Source
Nat []stringDrain Ips - Source
Nat []stringDrain Ranges
- source
Nat List<String>Active Ips - source
Nat List<String>Active Ranges - source
Nat List<String>Drain Ips - source
Nat List<String>Drain Ranges
- source
Nat string[]Active Ips - source
Nat string[]Active Ranges - source
Nat string[]Drain Ips - source
Nat string[]Drain Ranges
- source_
nat_ Sequence[str]active_ ips - source_
nat_ Sequence[str]active_ ranges - source_
nat_ Sequence[str]drain_ ips - source_
nat_ Sequence[str]drain_ ranges
- source
Nat List<String>Active Ips - source
Nat List<String>Active Ranges - source
Nat List<String>Drain Ips - source
Nat List<String>Drain Ranges
GetRouterNatSubnetwork
- Name string
Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.
- Secondary
Ip List<string>Range Names - Source
Ip List<string>Ranges To Nats
- Name string
Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.
- Secondary
Ip []stringRange Names - Source
Ip []stringRanges To Nats
- name String
Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.
- secondary
Ip List<String>Range Names - source
Ip List<String>Ranges To Nats
- name string
Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.
- secondary
Ip string[]Range Names - source
Ip string[]Ranges To Nats
- name str
Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.
- secondary_
ip_ Sequence[str]range_ names - source_
ip_ Sequence[str]ranges_ to_ nats
- name String
Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035.
- secondary
Ip List<String>Range Names - source
Ip List<String>Ranges To Nats
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.