Google Cloud (GCP) Classic

Pulumi Official
Package maintained by Pulumi
v6.24.0 published on Tuesday, May 17, 2022 by Pulumi

getRouterStatus

Get a Cloud Router’s status within GCE from its name and region. This data source exposes the routes learned by a Cloud Router via BGP peers.

For more information see the official documentation and API.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var my_router = Output.Create(Gcp.Compute.GetRouterStatus.InvokeAsync(new Gcp.Compute.GetRouterStatusArgs
        {
            Name = "myrouter",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := compute.GetRouterStatus(ctx, &compute.GetRouterStatusArgs{
			Name: "myrouter",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var my-router = Output.of(ComputeFunctions.getRouterStatus(GetRouterStatusArgs.builder()
            .name("myrouter")
            .build()));

        }
}
import pulumi
import pulumi_gcp as gcp

my_router = gcp.compute.get_router_status(name="myrouter")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const my_router = pulumi.output(gcp.compute.getRouterStatus({
    name: "myrouter",
}));
variables:
  my-router:
    Fn::Invoke:
      Function: gcp:compute:getRouterStatus
      Arguments:
        name: myrouter

Using getRouterStatus

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 getRouterStatus(args: GetRouterStatusArgs, opts?: InvokeOptions): Promise<GetRouterStatusResult>
function getRouterStatusOutput(args: GetRouterStatusOutputArgs, opts?: InvokeOptions): Output<GetRouterStatusResult>
def get_router_status(name: Optional[str] = None,
                      project: Optional[str] = None,
                      region: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetRouterStatusResult
def get_router_status_output(name: Optional[pulumi.Input[str]] = None,
                      project: Optional[pulumi.Input[str]] = None,
                      region: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetRouterStatusResult]
func GetRouterStatus(ctx *Context, args *GetRouterStatusArgs, opts ...InvokeOption) (*GetRouterStatusResult, error)
func GetRouterStatusOutput(ctx *Context, args *GetRouterStatusOutputArgs, opts ...InvokeOption) GetRouterStatusResultOutput

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

public static class GetRouterStatus 
{
    public static Task<GetRouterStatusResult> InvokeAsync(GetRouterStatusArgs args, InvokeOptions? opts = null)
    public static Output<GetRouterStatusResult> Invoke(GetRouterStatusInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRouterStatusResult> getRouterStatus(GetRouterStatusArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: gcp:compute/getRouterStatus:getRouterStatus
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

The name of the router.

Project string

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

Region string

The region this router has been created in. If unspecified, this defaults to the region configured in the provider.

Name string

The name of the router.

Project string

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

Region string

The region this router has been created in. If unspecified, this defaults to the region configured in the provider.

name String

The name of the router.

project String

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

region String

The region this router has been created in. If unspecified, this defaults to the region configured in the provider.

name string

The name of the router.

project string

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

region string

The region this router has been created in. If unspecified, this defaults to the region configured in the provider.

name str

The name of the router.

project str

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

region str

The region this router has been created in. If unspecified, this defaults to the region configured in the provider.

name String

The name of the router.

project String

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

region String

The region this router has been created in. If unspecified, this defaults to the region configured in the provider.

getRouterStatus Result

The following output properties are available:

BestRoutes List<GetRouterStatusBestRoute>
BestRoutesForRouters List<GetRouterStatusBestRoutesForRouter>
Id string

The provider-assigned unique ID for this managed resource.

Name string
Network string

The network name or resource link to the parent network of this subnetwork.

Region string
Project string
BestRoutes []GetRouterStatusBestRoute
BestRoutesForRouters []GetRouterStatusBestRoutesForRouter
Id string

The provider-assigned unique ID for this managed resource.

Name string
Network string

The network name or resource link to the parent network of this subnetwork.

Region string
Project string
bestRoutes ListRouterStatusBestRoute>
bestRoutesForRouters ListRouterStatusBestRoutesForRouter>
id String

The provider-assigned unique ID for this managed resource.

name String
network String

The network name or resource link to the parent network of this subnetwork.

region String
project String
bestRoutes GetRouterStatusBestRoute[]
bestRoutesForRouters GetRouterStatusBestRoutesForRouter[]
id string

The provider-assigned unique ID for this managed resource.

name string
network string

The network name or resource link to the parent network of this subnetwork.

region string
project string
best_routes Sequence[GetRouterStatusBestRoute]
best_routes_for_routers Sequence[GetRouterStatusBestRoutesForRouter]
id str

The provider-assigned unique ID for this managed resource.

name str
network str

The network name or resource link to the parent network of this subnetwork.

region str
project str
bestRoutes List
bestRoutesForRouters List
id String

The provider-assigned unique ID for this managed resource.

name String
network String

The network name or resource link to the parent network of this subnetwork.

region String
project String

Supporting Types

GetRouterStatusBestRoute

Description string
DestRange string
Name string

The name of the router.

Network string

The network name or resource link to the parent network of this subnetwork.

NextHopGateway string
NextHopIlb string
NextHopInstance string
NextHopInstanceZone string
NextHopIp string
NextHopNetwork string
NextHopVpnTunnel string
Priority int
Project string

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

SelfLink string
Tags List<string>
Description string
DestRange string
Name string

The name of the router.

Network string

The network name or resource link to the parent network of this subnetwork.

NextHopGateway string
NextHopIlb string
NextHopInstance string
NextHopInstanceZone string
NextHopIp string
NextHopNetwork string
NextHopVpnTunnel string
Priority int
Project string

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

SelfLink string
Tags []string
description String
destRange String
name String

The name of the router.

network String

The network name or resource link to the parent network of this subnetwork.

nextHopGateway String
nextHopIlb String
nextHopInstance String
nextHopInstanceZone String
nextHopIp String
nextHopNetwork String
nextHopVpnTunnel String
priority Integer
project String

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

selfLink String
tags List
description string
destRange string
name string

The name of the router.

network string

The network name or resource link to the parent network of this subnetwork.

nextHopGateway string
nextHopIlb string
nextHopInstance string
nextHopInstanceZone string
nextHopIp string
nextHopNetwork string
nextHopVpnTunnel string
priority number
project string

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

selfLink string
tags string[]
description str
dest_range str
name str

The name of the router.

network str

The network name or resource link to the parent network of this subnetwork.

next_hop_gateway str
next_hop_ilb str
next_hop_instance str
next_hop_instance_zone str
next_hop_ip str
next_hop_network str
next_hop_vpn_tunnel str
priority int
project str

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

self_link str
tags Sequence[str]
description String
destRange String
name String

The name of the router.

network String

The network name or resource link to the parent network of this subnetwork.

nextHopGateway String
nextHopIlb String
nextHopInstance String
nextHopInstanceZone String
nextHopIp String
nextHopNetwork String
nextHopVpnTunnel String
priority Number
project String

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

selfLink String
tags List

GetRouterStatusBestRoutesForRouter

Description string
DestRange string
Name string

The name of the router.

Network string

The network name or resource link to the parent network of this subnetwork.

NextHopGateway string
NextHopIlb string
NextHopInstance string
NextHopInstanceZone string
NextHopIp string
NextHopNetwork string
NextHopVpnTunnel string
Priority int
Project string

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

SelfLink string
Tags List<string>
Description string
DestRange string
Name string

The name of the router.

Network string

The network name or resource link to the parent network of this subnetwork.

NextHopGateway string
NextHopIlb string
NextHopInstance string
NextHopInstanceZone string
NextHopIp string
NextHopNetwork string
NextHopVpnTunnel string
Priority int
Project string

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

SelfLink string
Tags []string
description String
destRange String
name String

The name of the router.

network String

The network name or resource link to the parent network of this subnetwork.

nextHopGateway String
nextHopIlb String
nextHopInstance String
nextHopInstanceZone String
nextHopIp String
nextHopNetwork String
nextHopVpnTunnel String
priority Integer
project String

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

selfLink String
tags List
description string
destRange string
name string

The name of the router.

network string

The network name or resource link to the parent network of this subnetwork.

nextHopGateway string
nextHopIlb string
nextHopInstance string
nextHopInstanceZone string
nextHopIp string
nextHopNetwork string
nextHopVpnTunnel string
priority number
project string

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

selfLink string
tags string[]
description str
dest_range str
name str

The name of the router.

network str

The network name or resource link to the parent network of this subnetwork.

next_hop_gateway str
next_hop_ilb str
next_hop_instance str
next_hop_instance_zone str
next_hop_ip str
next_hop_network str
next_hop_vpn_tunnel str
priority int
project str

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

self_link str
tags Sequence[str]
description String
destRange String
name String

The name of the router.

network String

The network name or resource link to the parent network of this subnetwork.

nextHopGateway String
nextHopIlb String
nextHopInstance String
nextHopInstanceZone String
nextHopIp String
nextHopNetwork String
nextHopVpnTunnel String
priority Number
project String

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

selfLink String
tags List

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

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