gcp.compute.getRouterStatus
Explore with Pulumi AI
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 System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_router = Gcp.Compute.GetRouterStatus.Invoke(new()
{
Name = "myrouter",
});
});
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.GetRouterStatus(ctx, &compute.GetRouterStatusArgs{
Name: "myrouter",
}, 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.GetRouterStatusArgs;
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 my-router = 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 = 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:
getRouterStatus Result
The following output properties are available:
- Best
Routes List<GetRouter Status Best Route> List of best
compute#routes
configurations for this router's network. See gcp.compute.Route resource for available attributes.- Best
Routes List<GetFor Routers Router Status Best Routes For Router> List of best
compute#routes
for this specific router. See gcp.compute.Route resource for available attributes.- 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 []GetRouter Status Best Route List of best
compute#routes
configurations for this router's network. See gcp.compute.Route resource for available attributes.- Best
Routes []GetFor Routers Router Status Best Routes For Router List of best
compute#routes
for this specific router. See gcp.compute.Route resource for available attributes.- 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 List<GetRouter Status Best Route> List of best
compute#routes
configurations for this router's network. See gcp.compute.Route resource for available attributes.- best
Routes List<GetFor Routers Router Status Best Routes For Router> List of best
compute#routes
for this specific router. See gcp.compute.Route resource for available attributes.- 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 GetRouter Status Best Route[] List of best
compute#routes
configurations for this router's network. See gcp.compute.Route resource for available attributes.- best
Routes GetFor Routers Router Status Best Routes For Router[] List of best
compute#routes
for this specific router. See gcp.compute.Route resource for available attributes.- 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[GetRouter Status Best Route] List of best
compute#routes
configurations for this router's network. See gcp.compute.Route resource for available attributes.- best_
routes_ Sequence[Getfor_ routers Router Status Best Routes For Router] List of best
compute#routes
for this specific router. See gcp.compute.Route resource for available attributes.- 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
- best
Routes List<Property Map> List of best
compute#routes
configurations for this router's network. See gcp.compute.Route resource for available attributes.- best
Routes List<Property Map>For Routers List of best
compute#routes
for this specific router. See gcp.compute.Route resource for available attributes.- 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
- Dest
Range string - Name string
The name of the router.
- Network string
The network name or resource link to the parent network of this subnetwork.
- Next
Hop stringGateway - Next
Hop stringIlb - Next
Hop stringInstance - Next
Hop stringInstance Zone - Next
Hop stringIp - Next
Hop stringNetwork - Next
Hop stringVpn Tunnel - Priority int
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Self
Link string - List<string>
- Description string
- Dest
Range string - Name string
The name of the router.
- Network string
The network name or resource link to the parent network of this subnetwork.
- Next
Hop stringGateway - Next
Hop stringIlb - Next
Hop stringInstance - Next
Hop stringInstance Zone - Next
Hop stringIp - Next
Hop stringNetwork - Next
Hop stringVpn Tunnel - Priority int
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Self
Link string - []string
- description String
- dest
Range String - name String
The name of the router.
- network String
The network name or resource link to the parent network of this subnetwork.
- next
Hop StringGateway - next
Hop StringIlb - next
Hop StringInstance - next
Hop StringInstance Zone - next
Hop StringIp - next
Hop StringNetwork - next
Hop StringVpn Tunnel - priority Integer
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- self
Link String - List<String>
- description string
- dest
Range string - name string
The name of the router.
- network string
The network name or resource link to the parent network of this subnetwork.
- next
Hop stringGateway - next
Hop stringIlb - next
Hop stringInstance - next
Hop stringInstance Zone - next
Hop stringIp - next
Hop stringNetwork - next
Hop stringVpn Tunnel - priority number
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- self
Link string - 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_ strgateway - next_
hop_ strilb - next_
hop_ strinstance - next_
hop_ strinstance_ zone - next_
hop_ strip - next_
hop_ strnetwork - next_
hop_ strvpn_ tunnel - 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 - Sequence[str]
- description String
- dest
Range String - name String
The name of the router.
- network String
The network name or resource link to the parent network of this subnetwork.
- next
Hop StringGateway - next
Hop StringIlb - next
Hop StringInstance - next
Hop StringInstance Zone - next
Hop StringIp - next
Hop StringNetwork - next
Hop StringVpn Tunnel - priority Number
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- self
Link String - List<String>
GetRouterStatusBestRoutesForRouter
- Description string
- Dest
Range string - Name string
The name of the router.
- Network string
The network name or resource link to the parent network of this subnetwork.
- Next
Hop stringGateway - Next
Hop stringIlb - Next
Hop stringInstance - Next
Hop stringInstance Zone - Next
Hop stringIp - Next
Hop stringNetwork - Next
Hop stringVpn Tunnel - Priority int
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Self
Link string - List<string>
- Description string
- Dest
Range string - Name string
The name of the router.
- Network string
The network name or resource link to the parent network of this subnetwork.
- Next
Hop stringGateway - Next
Hop stringIlb - Next
Hop stringInstance - Next
Hop stringInstance Zone - Next
Hop stringIp - Next
Hop stringNetwork - Next
Hop stringVpn Tunnel - Priority int
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Self
Link string - []string
- description String
- dest
Range String - name String
The name of the router.
- network String
The network name or resource link to the parent network of this subnetwork.
- next
Hop StringGateway - next
Hop StringIlb - next
Hop StringInstance - next
Hop StringInstance Zone - next
Hop StringIp - next
Hop StringNetwork - next
Hop StringVpn Tunnel - priority Integer
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- self
Link String - List<String>
- description string
- dest
Range string - name string
The name of the router.
- network string
The network name or resource link to the parent network of this subnetwork.
- next
Hop stringGateway - next
Hop stringIlb - next
Hop stringInstance - next
Hop stringInstance Zone - next
Hop stringIp - next
Hop stringNetwork - next
Hop stringVpn Tunnel - priority number
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- self
Link string - 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_ strgateway - next_
hop_ strilb - next_
hop_ strinstance - next_
hop_ strinstance_ zone - next_
hop_ strip - next_
hop_ strnetwork - next_
hop_ strvpn_ tunnel - 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 - Sequence[str]
- description String
- dest
Range String - name String
The name of the router.
- network String
The network name or resource link to the parent network of this subnetwork.
- next
Hop StringGateway - next
Hop StringIlb - next
Hop StringInstance - next
Hop StringInstance Zone - next
Hop StringIp - next
Hop StringNetwork - next
Hop StringVpn Tunnel - priority Number
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- self
Link String - 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.