1. Packages
  2. Edgecenter Provider
  3. API Docs
  4. getRouter
edgecenter 0.7.34 published on Monday, Apr 14, 2025 by edge-center

edgecenter.getRouter

Explore with Pulumi AI

edgecenter 0.7.34 published on Monday, Apr 14, 2025 by edge-center

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as edgecenter from "@pulumi/edgecenter";

const pr = edgecenter.getProject({
    name: "test",
});
const rg = edgecenter.getRegion({
    name: "ED-10 Preprod",
});
const tr = Promise.all([rg, pr]).then(([rg, pr]) => edgecenter.getRouter({
    name: "test_router",
    regionId: rg.id,
    projectId: pr.id,
}));
export const view = tr;
Copy
import pulumi
import pulumi_edgecenter as edgecenter

pr = edgecenter.get_project(name="test")
rg = edgecenter.get_region(name="ED-10 Preprod")
tr = edgecenter.get_router(name="test_router",
    region_id=rg.id,
    project_id=pr.id)
pulumi.export("view", tr)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		pr, err := edgecenter.LookupProject(ctx, &edgecenter.LookupProjectArgs{
			Name: pulumi.StringRef("test"),
		}, nil)
		if err != nil {
			return err
		}
		rg, err := edgecenter.GetRegion(ctx, &edgecenter.GetRegionArgs{
			Name: "ED-10 Preprod",
		}, nil)
		if err != nil {
			return err
		}
		tr, err := edgecenter.LookupRouter(ctx, &edgecenter.LookupRouterArgs{
			Name:      "test_router",
			RegionId:  pulumi.Float64Ref(rg.Id),
			ProjectId: pulumi.Float64Ref(pr.Id),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("view", tr)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;

return await Deployment.RunAsync(() => 
{
    var pr = Edgecenter.GetProject.Invoke(new()
    {
        Name = "test",
    });

    var rg = Edgecenter.GetRegion.Invoke(new()
    {
        Name = "ED-10 Preprod",
    });

    var tr = Edgecenter.GetRouter.Invoke(new()
    {
        Name = "test_router",
        RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
        ProjectId = pr.Apply(getProjectResult => getProjectResult.Id),
    });

    return new Dictionary<string, object?>
    {
        ["view"] = tr,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.EdgecenterFunctions;
import com.pulumi.edgecenter.inputs.GetProjectArgs;
import com.pulumi.edgecenter.inputs.GetRegionArgs;
import com.pulumi.edgecenter.inputs.GetRouterArgs;
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 pr = EdgecenterFunctions.getProject(GetProjectArgs.builder()
            .name("test")
            .build());

        final var rg = EdgecenterFunctions.getRegion(GetRegionArgs.builder()
            .name("ED-10 Preprod")
            .build());

        final var tr = EdgecenterFunctions.getRouter(GetRouterArgs.builder()
            .name("test_router")
            .regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
            .projectId(pr.applyValue(getProjectResult -> getProjectResult.id()))
            .build());

        ctx.export("view", tr.applyValue(getRouterResult -> getRouterResult));
    }
}
Copy
variables:
  pr:
    fn::invoke:
      function: edgecenter:getProject
      arguments:
        name: test
  rg:
    fn::invoke:
      function: edgecenter:getRegion
      arguments:
        name: ED-10 Preprod
  tr:
    fn::invoke:
      function: edgecenter:getRouter
      arguments:
        name: test_router
        regionId: ${rg.id}
        projectId: ${pr.id}
outputs:
  view: ${tr}
Copy

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>
Copy
def get_router(id: Optional[str] = None,
               name: Optional[str] = None,
               project_id: Optional[float] = None,
               project_name: Optional[str] = None,
               region_id: Optional[float] = None,
               region_name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetRouterResult
def get_router_output(id: Optional[pulumi.Input[str]] = None,
               name: Optional[pulumi.Input[str]] = None,
               project_id: Optional[pulumi.Input[float]] = None,
               project_name: Optional[pulumi.Input[str]] = None,
               region_id: Optional[pulumi.Input[float]] = None,
               region_name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetRouterResult]
Copy
func LookupRouter(ctx *Context, args *LookupRouterArgs, opts ...InvokeOption) (*LookupRouterResult, error)
func LookupRouterOutput(ctx *Context, args *LookupRouterOutputArgs, opts ...InvokeOption) LookupRouterResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetRouterResult> getRouter(GetRouterArgs args, InvokeOptions options)
public static Output<GetRouterResult> getRouter(GetRouterArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: edgecenter:index/getRouter:getRouter
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the load router.
Id string
The ID of this resource.
ProjectId double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
Name This property is required. string
The name of the load router.
Id string
The ID of this resource.
ProjectId float64
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId float64
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
name This property is required. String
The name of the load router.
id String
The ID of this resource.
projectId Double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
name This property is required. string
The name of the load router.
id string
The ID of this resource.
projectId number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
name This property is required. str
The name of the load router.
id str
The ID of this resource.
project_id float
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
project_name str
The name of the project. Either 'projectid' or 'projectname' must be specified.
region_id float
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
region_name str
The name of the region. Either 'regionid' or 'regionname' must be specified.
name This property is required. String
The name of the load router.
id String
The ID of this resource.
projectId Number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.

getRouter Result

The following output properties are available:

ExternalGatewayInfos List<GetRouterExternalGatewayInfo>
Information related to the external gateway.
Id string
The ID of this resource.
Interfaces List<GetRouterInterface>
Set of interfaces associated with the router.
Name string
The name of the load router.
Routes List<GetRouterRoute>
List of static routes to be applied to the router.
Status string
The current status of the router resource.
ProjectId double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
ExternalGatewayInfos []GetRouterExternalGatewayInfo
Information related to the external gateway.
Id string
The ID of this resource.
Interfaces []GetRouterInterface
Set of interfaces associated with the router.
Name string
The name of the load router.
Routes []GetRouterRoute
List of static routes to be applied to the router.
Status string
The current status of the router resource.
ProjectId float64
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId float64
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
externalGatewayInfos List<GetRouterExternalGatewayInfo>
Information related to the external gateway.
id String
The ID of this resource.
interfaces List<GetRouterInterface>
Set of interfaces associated with the router.
name String
The name of the load router.
routes List<GetRouterRoute>
List of static routes to be applied to the router.
status String
The current status of the router resource.
projectId Double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
externalGatewayInfos GetRouterExternalGatewayInfo[]
Information related to the external gateway.
id string
The ID of this resource.
interfaces GetRouterInterface[]
Set of interfaces associated with the router.
name string
The name of the load router.
routes GetRouterRoute[]
List of static routes to be applied to the router.
status string
The current status of the router resource.
projectId number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
external_gateway_infos Sequence[GetRouterExternalGatewayInfo]
Information related to the external gateway.
id str
The ID of this resource.
interfaces Sequence[GetRouterInterface]
Set of interfaces associated with the router.
name str
The name of the load router.
routes Sequence[GetRouterRoute]
List of static routes to be applied to the router.
status str
The current status of the router resource.
project_id float
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
project_name str
The name of the project. Either 'projectid' or 'projectname' must be specified.
region_id float
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
region_name str
The name of the region. Either 'regionid' or 'regionname' must be specified.
externalGatewayInfos List<Property Map>
Information related to the external gateway.
id String
The ID of this resource.
interfaces List<Property Map>
Set of interfaces associated with the router.
name String
The name of the load router.
routes List<Property Map>
List of static routes to be applied to the router.
status String
The current status of the router resource.
projectId Number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.

Supporting Types

GetRouterExternalGatewayInfo

ExternalFixedIps This property is required. List<GetRouterExternalGatewayInfoExternalFixedIp>
NetworkId This property is required. string
ExternalFixedIps This property is required. []GetRouterExternalGatewayInfoExternalFixedIp
NetworkId This property is required. string
externalFixedIps This property is required. List<GetRouterExternalGatewayInfoExternalFixedIp>
networkId This property is required. String
externalFixedIps This property is required. GetRouterExternalGatewayInfoExternalFixedIp[]
networkId This property is required. string
external_fixed_ips This property is required. Sequence[GetRouterExternalGatewayInfoExternalFixedIp]
network_id This property is required. str
externalFixedIps This property is required. List<Property Map>
networkId This property is required. String

GetRouterExternalGatewayInfoExternalFixedIp

IpAddress This property is required. string
SubnetId This property is required. string
IpAddress This property is required. string
SubnetId This property is required. string
ipAddress This property is required. String
subnetId This property is required. String
ipAddress This property is required. string
subnetId This property is required. string
ip_address This property is required. str
subnet_id This property is required. str
ipAddress This property is required. String
subnetId This property is required. String

GetRouterInterface

IpAddress This property is required. string
MacAddress This property is required. string
NetworkId This property is required. string
PortId This property is required. string
SubnetId This property is required. string
Type This property is required. string
IpAddress This property is required. string
MacAddress This property is required. string
NetworkId This property is required. string
PortId This property is required. string
SubnetId This property is required. string
Type This property is required. string
ipAddress This property is required. String
macAddress This property is required. String
networkId This property is required. String
portId This property is required. String
subnetId This property is required. String
type This property is required. String
ipAddress This property is required. string
macAddress This property is required. string
networkId This property is required. string
portId This property is required. string
subnetId This property is required. string
type This property is required. string
ip_address This property is required. str
mac_address This property is required. str
network_id This property is required. str
port_id This property is required. str
subnet_id This property is required. str
type This property is required. str
ipAddress This property is required. String
macAddress This property is required. String
networkId This property is required. String
portId This property is required. String
subnetId This property is required. String
type This property is required. String

GetRouterRoute

Destination This property is required. string
Nexthop This property is required. string
Destination This property is required. string
Nexthop This property is required. string
destination This property is required. String
nexthop This property is required. String
destination This property is required. string
nexthop This property is required. string
destination This property is required. str
nexthop This property is required. str
destination This property is required. String
nexthop This property is required. String

Package Details

Repository
edgecenter edge-center/terraform-provider-edgecenter
License
Notes
This Pulumi package is based on the edgecenter Terraform Provider.
edgecenter 0.7.34 published on Monday, Apr 14, 2025 by edge-center