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",
}));
}
}
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",
}, { async: true }));Using GetRouter
function getRouter(args: GetRouterArgs, opts?: InvokeOptions): Promise<GetRouterResult>function get_router(admin_state_up=None, description=None, distributed=None, enable_snat=None, name=None, region=None, router_id=None, status=None, tags=None, tenant_id=None, opts=None)func LookupRouter(ctx *Context, args *LookupRouterArgs, opts ...InvokeOption) (*LookupRouterResult, error)Note: This function is named
LookupRouterin the Go SDK.
public static class GetRouter {
public static Task<GetRouterResult> InvokeAsync(GetRouterArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Admin
State boolUp 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.
- Enable
Snat 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
regionargument of the provider is used.- Router
Id string The UUID of the router resource.
- Status string
The status of the router (ACTIVE/DOWN).
- List<string>
The list of router tags to filter.
- Tenant
Id string The owner of the router.
- Admin
State boolUp 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.
- Enable
Snat 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
regionargument of the provider is used.- Router
Id string The UUID of the router resource.
- Status string
The status of the router (ACTIVE/DOWN).
- []string
The list of router tags to filter.
- Tenant
Id string The owner of the router.
- admin
State booleanUp 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.
- enable
Snat 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
regionargument of the provider is used.- router
Id string The UUID of the router resource.
- status string
The status of the router (ACTIVE/DOWN).
- string[]
The list of router tags to filter.
- tenant
Id string The owner of the router.
- admin_
state_ boolup 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
regionargument of the provider is used.- router_
id str The UUID of the router resource.
- status str
The status of the router (ACTIVE/DOWN).
- List[str]
The list of router tags to filter.
- tenant_
id str The owner of the router.
GetRouter Result
The following output properties are available:
- List<string>
The set of string tags applied on the router.
- Availability
Zone List<string>Hints 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 List<Pulumi.Ips Open Stack. Networking. Outputs. Get Router External Fixed Ip> The external fixed IPs of the router.
- External
Network stringId The network UUID of an external gateway for the router.
- Id string
The provider-assigned unique ID for this managed resource.
- Admin
State boolUp - Description string
- Distributed bool
- Name string
- Region string
- Router
Id string - Status string
- List<string>
- Tenant
Id string
- []string
The set of string tags applied on the router.
- Availability
Zone []stringHints 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 []GetIps Router External Fixed Ip The external fixed IPs of the router.
- External
Network stringId The network UUID of an external gateway for the router.
- Id string
The provider-assigned unique ID for this managed resource.
- Admin
State boolUp - Description string
- Distributed bool
- Name string
- Region string
- Router
Id string - Status string
- []string
- Tenant
Id string
- string[]
The set of string tags applied on the router.
- availability
Zone string[]Hints The availability zone that is used to make router resources highly available.
- enable
Snat boolean The value that points out if the Source NAT is enabled on the router.
- external
Fixed GetIps Router External Fixed Ip[] The external fixed IPs of the router.
- external
Network stringId The network UUID of an external gateway for the router.
- id string
The provider-assigned unique ID for this managed resource.
- admin
State booleanUp - description string
- distributed boolean
- name string
- region string
- router
Id string - status string
- string[]
- tenant
Id string
- List[str]
The set of string tags applied on the router.
- availability_
zone_ List[str]hints 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_ List[Getips Router External Fixed Ip] The external fixed IPs of the router.
- external_
network_ strid The network UUID of an external gateway for the router.
- id str
The provider-assigned unique ID for this managed resource.
- admin_
state_ boolup - description str
- distributed bool
- name str
- region str
- router_
id str - status str
- List[str]
- tenant_
id str
Supporting Types
GetRouterExternalFixedIp
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- ip_
address str The IP address to set on the router.
- subnet_
id str
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.