OpenStack

Pulumi Official
Package maintained by Pulumi
v3.8.0 published on Monday, Feb 7, 2022 by Pulumi

getRouter

Use this data source to get the ID of an available OpenStack router.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var router = Output.Create(OpenStack.Networking.GetRouter.InvokeAsync(new OpenStack.Networking.GetRouterArgs
        {
            Name = "router_1",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/networking"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "router_1"
		_, err := networking.LookupRouter(ctx, &networking.LookupRouterArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_openstack as openstack

router = openstack.networking.get_router(name="router_1")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const router = pulumi.output(openstack.networking.getRouter({
    name: "router_1",
}));

Coming soon!

Using getRouter

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 getRouter(args: GetRouterArgs, opts?: InvokeOptions): Promise<GetRouterResult>
function getRouterOutput(args: GetRouterOutputArgs, opts?: InvokeOptions): Output<GetRouterResult>
def get_router(admin_state_up: Optional[bool] = None,
               description: Optional[str] = None,
               distributed: Optional[bool] = None,
               enable_snat: Optional[bool] = None,
               name: Optional[str] = None,
               region: Optional[str] = None,
               router_id: Optional[str] = None,
               status: Optional[str] = None,
               tags: Optional[Sequence[str]] = None,
               tenant_id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetRouterResult
def get_router_output(admin_state_up: Optional[pulumi.Input[bool]] = None,
               description: Optional[pulumi.Input[str]] = None,
               distributed: Optional[pulumi.Input[bool]] = None,
               enable_snat: Optional[pulumi.Input[bool]] = None,
               name: Optional[pulumi.Input[str]] = None,
               region: Optional[pulumi.Input[str]] = None,
               router_id: Optional[pulumi.Input[str]] = None,
               status: Optional[pulumi.Input[str]] = None,
               tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
               tenant_id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetRouterResult]
func LookupRouter(ctx *Context, args *LookupRouterArgs, opts ...InvokeOption) (*LookupRouterResult, error)
func LookupRouterOutput(ctx *Context, args *LookupRouterOutputArgs, opts ...InvokeOption) LookupRouterResultOutput

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

public static class GetRouter 
{
    public static Task<GetRouterResult> InvokeAsync(GetRouterArgs args, InvokeOptions? opts = null)
    public static Output<GetRouterResult> Invoke(GetRouterInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRouterResult> getRouter(GetRouterArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: openstack:networking/getRouter:getRouter
  Arguments:
    # Arguments dictionary

The following arguments are supported:

AdminStateUp bool

Administrative up/down status for the router (must be "true" or "false" if provided).

Description string

Human-readable description of the router.

Distributed bool

Indicates whether or not to get a distributed router.

EnableSnat bool

The value that points out if the Source NAT is enabled on the router.

Name string

The name of the router.

Region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve router ids. If omitted, the region argument of the provider is used.

RouterId string

The UUID of the router resource.

Status string

The status of the router (ACTIVE/DOWN).

Tags List<string>

The list of router tags to filter.

TenantId string

The owner of the router.

AdminStateUp bool

Administrative up/down status for the router (must be "true" or "false" if provided).

Description string

Human-readable description of the router.

Distributed bool

Indicates whether or not to get a distributed router.

EnableSnat bool

The value that points out if the Source NAT is enabled on the router.

Name string

The name of the router.

Region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve router ids. If omitted, the region argument of the provider is used.

RouterId string

The UUID of the router resource.

Status string

The status of the router (ACTIVE/DOWN).

Tags []string

The list of router tags to filter.

TenantId string

The owner of the router.

adminStateUp Boolean

Administrative up/down status for the router (must be "true" or "false" if provided).

description String

Human-readable description of the router.

distributed Boolean

Indicates whether or not to get a distributed router.

enableSnat Boolean

The value that points out if the Source NAT is enabled on the router.

name String

The name of the router.

region String

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve router ids. If omitted, the region argument of the provider is used.

routerId String

The UUID of the router resource.

status String

The status of the router (ACTIVE/DOWN).

tags List

The list of router tags to filter.

tenantId String

The owner of the router.

adminStateUp boolean

Administrative up/down status for the router (must be "true" or "false" if provided).

description string

Human-readable description of the router.

distributed boolean

Indicates whether or not to get a distributed router.

enableSnat boolean

The value that points out if the Source NAT is enabled on the router.

name string

The name of the router.

region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve router ids. If omitted, the region argument of the provider is used.

routerId string

The UUID of the router resource.

status string

The status of the router (ACTIVE/DOWN).

tags string[]

The list of router tags to filter.

tenantId string

The owner of the router.

admin_state_up bool

Administrative up/down status for the router (must be "true" or "false" if provided).

description str

Human-readable description of the router.

distributed bool

Indicates whether or not to get a distributed router.

enable_snat bool

The value that points out if the Source NAT is enabled on the router.

name str

The name of the router.

region str

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve router ids. If omitted, the region argument of the provider is used.

router_id str

The UUID of the router resource.

status str

The status of the router (ACTIVE/DOWN).

tags Sequence[str]

The list of router tags to filter.

tenant_id str

The owner of the router.

adminStateUp Boolean

Administrative up/down status for the router (must be "true" or "false" if provided).

description String

Human-readable description of the router.

distributed Boolean

Indicates whether or not to get a distributed router.

enableSnat Boolean

The value that points out if the Source NAT is enabled on the router.

name String

The name of the router.

region String

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve router ids. If omitted, the region argument of the provider is used.

routerId String

The UUID of the router resource.

status String

The status of the router (ACTIVE/DOWN).

tags List

The list of router tags to filter.

tenantId String

The owner of the router.

getRouter Result

The following output properties are available:

AllTags List<string>

The set of string tags applied on the router.

AvailabilityZoneHints List<string>

The availability zone that is used to make router resources highly available.

EnableSnat bool

The value that points out if the Source NAT is enabled on the router.

ExternalFixedIps List<Pulumi.OpenStack.Networking.Outputs.GetRouterExternalFixedIp>

The external fixed IPs of the router.

ExternalNetworkId string

The network UUID of an external gateway for the router.

Id string

The provider-assigned unique ID for this managed resource.

AdminStateUp bool
Description string
Distributed bool
Name string
Region string
RouterId string
Status string
Tags List<string>
TenantId string
AllTags []string

The set of string tags applied on the router.

AvailabilityZoneHints []string

The availability zone that is used to make router resources highly available.

EnableSnat bool

The value that points out if the Source NAT is enabled on the router.

ExternalFixedIps []GetRouterExternalFixedIp

The external fixed IPs of the router.

ExternalNetworkId string

The network UUID of an external gateway for the router.

Id string

The provider-assigned unique ID for this managed resource.

AdminStateUp bool
Description string
Distributed bool
Name string
Region string
RouterId string
Status string
Tags []string
TenantId string
allTags List

The set of string tags applied on the router.

availabilityZoneHints List

The availability zone that is used to make router resources highly available.

enableSnat Boolean

The value that points out if the Source NAT is enabled on the router.

externalFixedIps ListRouterExternalFixedIp>

The external fixed IPs of the router.

externalNetworkId String

The network UUID of an external gateway for the router.

id String

The provider-assigned unique ID for this managed resource.

adminStateUp Boolean
description String
distributed Boolean
name String
region String
routerId String
status String
tags List
tenantId String
allTags string[]

The set of string tags applied on the router.

availabilityZoneHints string[]

The availability zone that is used to make router resources highly available.

enableSnat boolean

The value that points out if the Source NAT is enabled on the router.

externalFixedIps GetRouterExternalFixedIp[]

The external fixed IPs of the router.

externalNetworkId string

The network UUID of an external gateway for the router.

id string

The provider-assigned unique ID for this managed resource.

adminStateUp boolean
description string
distributed boolean
name string
region string
routerId string
status string
tags string[]
tenantId string
all_tags Sequence[str]

The set of string tags applied on the router.

availability_zone_hints Sequence[str]

The availability zone that is used to make router resources highly available.

enable_snat bool

The value that points out if the Source NAT is enabled on the router.

external_fixed_ips Sequence[GetRouterExternalFixedIp]

The external fixed IPs of the router.

external_network_id str

The network UUID of an external gateway for the router.

id str

The provider-assigned unique ID for this managed resource.

admin_state_up bool
description str
distributed bool
name str
region str
router_id str
status str
tags Sequence[str]
tenant_id str
allTags List

The set of string tags applied on the router.

availabilityZoneHints List

The availability zone that is used to make router resources highly available.

enableSnat Boolean

The value that points out if the Source NAT is enabled on the router.

externalFixedIps List

The external fixed IPs of the router.

externalNetworkId String

The network UUID of an external gateway for the router.

id String

The provider-assigned unique ID for this managed resource.

adminStateUp Boolean
description String
distributed Boolean
name String
region String
routerId String
status String
tags List
tenantId String

Supporting Types

GetRouterExternalFixedIp

IpAddress string

The IP address to set on the router.

SubnetId string
IpAddress string

The IP address to set on the router.

SubnetId string
ipAddress String

The IP address to set on the router.

subnetId String
ipAddress string

The IP address to set on the router.

subnetId string
ip_address str

The IP address to set on the router.

subnet_id str
ipAddress String

The IP address to set on the router.

subnetId String

Package Details

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

This Pulumi package is based on the openstack Terraform Provider.