Viewing docs for Google Cloud v9.15.0
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
Viewing docs for Google Cloud v9.15.0
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
Get a list of routers. For more information see the official API documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const all = gcp.compute.getRouters({
project: foobar.project,
region: foobar.region,
});
import pulumi
import pulumi_gcp as gcp
all = gcp.compute.get_routers(project=foobar["project"],
region=foobar["region"])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.GetRouters(ctx, &compute.GetRoutersArgs{
Project: pulumi.StringRef(foobar.Project),
Region: pulumi.StringRef(foobar.Region),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var all = Gcp.Compute.GetRouters.Invoke(new()
{
Project = foobar.Project,
Region = foobar.Region,
});
});
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.GetRoutersArgs;
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 all = ComputeFunctions.getRouters(GetRoutersArgs.builder()
.project(foobar.project())
.region(foobar.region())
.build());
}
}
variables:
all:
fn::invoke:
function: gcp:compute:getRouters
arguments:
project: ${foobar.project}
region: ${foobar.region}
Using getRouters
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 getRouters(args: GetRoutersArgs, opts?: InvokeOptions): Promise<GetRoutersResult>
function getRoutersOutput(args: GetRoutersOutputArgs, opts?: InvokeOptions): Output<GetRoutersResult>def get_routers(project: Optional[str] = None,
region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRoutersResult
def get_routers_output(project: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRoutersResult]func GetRouters(ctx *Context, args *GetRoutersArgs, opts ...InvokeOption) (*GetRoutersResult, error)
func GetRoutersOutput(ctx *Context, args *GetRoutersOutputArgs, opts ...InvokeOption) GetRoutersResultOutput> Note: This function is named GetRouters in the Go SDK.
public static class GetRouters
{
public static Task<GetRoutersResult> InvokeAsync(GetRoutersArgs args, InvokeOptions? opts = null)
public static Output<GetRoutersResult> Invoke(GetRoutersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRoutersResult> getRouters(GetRoutersArgs args, InvokeOptions options)
public static Output<GetRoutersResult> getRouters(GetRoutersArgs args, InvokeOptions options)
fn::invoke:
function: gcp:compute/getRouters:getRouters
arguments:
# arguments dictionaryThe following arguments are supported:
getRouters Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Project string
- Region string
- Routers
List<Get
Routers Router>
- Id string
- The provider-assigned unique ID for this managed resource.
- Project string
- Region string
- Routers
[]Get
Routers Router
- id String
- The provider-assigned unique ID for this managed resource.
- project String
- region String
- routers
List<Get
Routers Router>
- id string
- The provider-assigned unique ID for this managed resource.
- project string
- region string
- routers
Get
Routers Router[]
- id str
- The provider-assigned unique ID for this managed resource.
- project str
- region str
- routers
Sequence[Get
Routers Router]
- id String
- The provider-assigned unique ID for this managed resource.
- project String
- region String
- routers List<Property Map>
Supporting Types
GetRoutersRouter
- Bgp
Peers List<GetRouters Router Bgp Peer> - Bgps
List<Get
Routers Router Bgp> - Creation
Timestamp string - Description string
- Encrypted
Interconnect boolRouter - Interfaces
List<Get
Routers Router Interface> - Md5Authentication
Keys List<GetRouters Router Md5Authentication Key> - Name string
- Nats
List<Get
Routers Router Nat> - Network string
- Self
Link string
- bgp
Peers List<GetRouters Router Bgp Peer> - bgps
List<Get
Routers Router Bgp> - creation
Timestamp String - description String
- encrypted
Interconnect BooleanRouter - interfaces
List<Get
Routers Router Interface> - md5Authentication
Keys List<GetRouters Router Md5Authentication Key> - name String
- nats
List<Get
Routers Router Nat> - network String
- self
Link String
- bgp
Peers GetRouters Router Bgp Peer[] - bgps
Get
Routers Router Bgp[] - creation
Timestamp string - description string
- encrypted
Interconnect booleanRouter - interfaces
Get
Routers Router Interface[] - md5Authentication
Keys GetRouters Router Md5Authentication Key[] - name string
- nats
Get
Routers Router Nat[] - network string
- self
Link string
- bgp_
peers Sequence[GetRouters Router Bgp Peer] - bgps
Sequence[Get
Routers Router Bgp] - creation_
timestamp str - description str
- encrypted_
interconnect_ boolrouter - interfaces
Sequence[Get
Routers Router Interface] - md5_
authentication_ Sequence[Getkeys Routers Router Md5Authentication Key] - name str
- nats
Sequence[Get
Routers Router Nat] - network str
- self_
link str
GetRoutersRouterBgp
- Advertise
Mode string - Advertised
Groups List<string> - Advertised
Ip List<GetRanges Routers Router Bgp Advertised Ip Range> - Asn int
- Keepalive
Interval int
- advertise
Mode String - advertised
Groups List<String> - advertised
Ip List<GetRanges Routers Router Bgp Advertised Ip Range> - asn Integer
- keepalive
Interval Integer
- advertise
Mode string - advertised
Groups string[] - advertised
Ip GetRanges Routers Router Bgp Advertised Ip Range[] - asn number
- keepalive
Interval number
- advertise
Mode String - advertised
Groups List<String> - advertised
Ip List<Property Map>Ranges - asn Number
- keepalive
Interval Number
GetRoutersRouterBgpAdvertisedIpRange
- Description string
- Range string
- Description string
- Range string
- description String
- range String
- description string
- range string
- description str
- range str
- description String
- range String
GetRoutersRouterBgpPeer
- Advertise
Mode string - Advertised
Route intPriority - Enable string
- Enable
Ipv6 bool - Interface
Name string - Ip
Address string - Management
Type string - Name string
- Peer
Asn int - Peer
Ip stringAddress
- Advertise
Mode string - Advertised
Route intPriority - Enable string
- Enable
Ipv6 bool - Interface
Name string - Ip
Address string - Management
Type string - Name string
- Peer
Asn int - Peer
Ip stringAddress
- advertise
Mode String - advertised
Route IntegerPriority - enable String
- enable
Ipv6 Boolean - interface
Name String - ip
Address String - management
Type String - name String
- peer
Asn Integer - peer
Ip StringAddress
- advertise
Mode string - advertised
Route numberPriority - enable string
- enable
Ipv6 boolean - interface
Name string - ip
Address string - management
Type string - name string
- peer
Asn number - peer
Ip stringAddress
- advertise_
mode str - advertised_
route_ intpriority - enable str
- enable_
ipv6 bool - interface_
name str - ip_
address str - management_
type str - name str
- peer_
asn int - peer_
ip_ straddress
- advertise
Mode String - advertised
Route NumberPriority - enable String
- enable
Ipv6 Boolean - interface
Name String - ip
Address String - management
Type String - name String
- peer
Asn Number - peer
Ip StringAddress
GetRoutersRouterInterface
- Ip
Range string - Linked
Interconnect stringAttachment - Linked
Vpn stringTunnel - Name string
- Private
Ip stringAddress - Redundant
Interface string - Subnetwork string
- Ip
Range string - Linked
Interconnect stringAttachment - Linked
Vpn stringTunnel - Name string
- Private
Ip stringAddress - Redundant
Interface string - Subnetwork string
- ip
Range String - linked
Interconnect StringAttachment - linked
Vpn StringTunnel - name String
- private
Ip StringAddress - redundant
Interface String - subnetwork String
- ip
Range string - linked
Interconnect stringAttachment - linked
Vpn stringTunnel - name string
- private
Ip stringAddress - redundant
Interface string - subnetwork string
- ip_
range str - linked_
interconnect_ strattachment - linked_
vpn_ strtunnel - name str
- private_
ip_ straddress - redundant_
interface str - subnetwork str
- ip
Range String - linked
Interconnect StringAttachment - linked
Vpn StringTunnel - name String
- private
Ip StringAddress - redundant
Interface String - subnetwork String
GetRoutersRouterMd5AuthenticationKey
GetRoutersRouterNat
- Enable
Endpoint boolIndependent Mapping - Icmp
Idle intTimeout Sec - Min
Ports intPer Vm - Name string
- Nat
Ip stringAllocate Option - Nat
Ips List<string> - Source
Subnetwork stringIp Ranges To Nat - Tcp
Established intIdle Timeout Sec - Tcp
Transitory intIdle Timeout Sec - Udp
Idle intTimeout Sec
- Enable
Endpoint boolIndependent Mapping - Icmp
Idle intTimeout Sec - Min
Ports intPer Vm - Name string
- Nat
Ip stringAllocate Option - Nat
Ips []string - Source
Subnetwork stringIp Ranges To Nat - Tcp
Established intIdle Timeout Sec - Tcp
Transitory intIdle Timeout Sec - Udp
Idle intTimeout Sec
- enable
Endpoint BooleanIndependent Mapping - icmp
Idle IntegerTimeout Sec - min
Ports IntegerPer Vm - name String
- nat
Ip StringAllocate Option - nat
Ips List<String> - source
Subnetwork StringIp Ranges To Nat - tcp
Established IntegerIdle Timeout Sec - tcp
Transitory IntegerIdle Timeout Sec - udp
Idle IntegerTimeout Sec
- enable
Endpoint booleanIndependent Mapping - icmp
Idle numberTimeout Sec - min
Ports numberPer Vm - name string
- nat
Ip stringAllocate Option - nat
Ips string[] - source
Subnetwork stringIp Ranges To Nat - tcp
Established numberIdle Timeout Sec - tcp
Transitory numberIdle Timeout Sec - udp
Idle numberTimeout Sec
- enable
Endpoint BooleanIndependent Mapping - icmp
Idle NumberTimeout Sec - min
Ports NumberPer Vm - name String
- nat
Ip StringAllocate Option - nat
Ips List<String> - source
Subnetwork StringIp Ranges To Nat - tcp
Established NumberIdle Timeout Sec - tcp
Transitory NumberIdle Timeout Sec - udp
Idle NumberTimeout Sec
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
Viewing docs for Google Cloud v9.15.0
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
