getRouter

Get a router within GCE from its name and VPC.

Example Usage

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.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 my-router = ComputeFunctions.getRouter(GetRouterArgs.builder()
.name("myrouter-us-east1")
.network("my-network")
.build());
}
}

Return

A collection of values returned by getRouter.

Parameters

argument

A collection of arguments for invoking getRouter.


suspend fun getRouter(name: String, network: String, project: String? = null, region: String? = null): GetRouterResult

Return

A collection of values returned by getRouter.

Parameters

name

The name of the router.

network

The VPC network on which this router lives.

project

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

region

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

See also


suspend fun getRouter(argument: suspend GetRouterPlainArgsBuilder.() -> Unit): GetRouterResult

Return

A collection of values returned by getRouter.

Parameters

argument

Builder for com.pulumi.gcp.compute.kotlin.inputs.GetRouterPlainArgs.

See also