Class Router
Represents a Router resource.
To get more information about Router, see:
- API documentation
- How-to Guides
- Google Cloud Router
Example Usage - Router Basic
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var foobarNetwork = new Gcp.Compute.Network("foobarNetwork", new Gcp.Compute.NetworkArgs
{
AutoCreateSubnetworks = false,
});
var foobarRouter = new Gcp.Compute.Router("foobarRouter", new Gcp.Compute.RouterArgs
{
Network = foobarNetwork.Name,
Bgp = new Gcp.Compute.Inputs.RouterBgpArgs
{
Asn = 64514,
AdvertiseMode = "CUSTOM",
AdvertisedGroups =
{
"ALL_SUBNETS",
},
Advertised_ip_ranges =
{
{
{ "range", "1.2.3.4" },
},
{
{ "range", "6.7.0.0/16" },
},
},
},
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Compute
Assembly: Pulumi.Gcp.dll
Syntax
public class Router : CustomResource
Constructors
View SourceRouter(String, RouterArgs, CustomResourceOptions)
Create a Router resource with the given unique name, arguments, and options.
Declaration
public Router(string name, RouterArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| RouterArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceBgp
BGP information specific to this router. Structure is documented below.
Declaration
public Output<RouterBgp> Bgp { get; }
Property Value
| Type | Description |
|---|---|
| Output<RouterBgp> |
CreationTimestamp
Creation timestamp in RFC3339 text format.
Declaration
public Output<string> CreationTimestamp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
User-specified description for the IP range.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
Name of the resource. The name must be 1-63 characters long, and
comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression a-z?
which means the first character must be a lowercase letter, and all
following characters must be a dash, lowercase letter, or digit,
except the last character, which cannot be a dash.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Network
A reference to the network to which this router belongs.
Declaration
public Output<string> Network { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Project
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Region
Region where the router resides.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SelfLink
The URI of the created resource.
Declaration
public Output<string> SelfLink { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, RouterState, CustomResourceOptions)
Get an existing Router resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Router Get(string name, Input<string> id, RouterState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| RouterState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Router |