nsxt.StaticRoute
Explore with Pulumi AI
Create StaticRoute Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new StaticRoute(name: string, args: StaticRouteArgs, opts?: CustomResourceOptions);
@overload
def StaticRoute(resource_name: str,
args: StaticRouteArgs,
opts: Optional[ResourceOptions] = None)
@overload
def StaticRoute(resource_name: str,
opts: Optional[ResourceOptions] = None,
logical_router_id: Optional[str] = None,
network: Optional[str] = None,
next_hops: Optional[Sequence[StaticRouteNextHopArgs]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
static_route_id: Optional[str] = None,
tags: Optional[Sequence[StaticRouteTagArgs]] = None)
func NewStaticRoute(ctx *Context, name string, args StaticRouteArgs, opts ...ResourceOption) (*StaticRoute, error)
public StaticRoute(string name, StaticRouteArgs args, CustomResourceOptions? opts = null)
public StaticRoute(String name, StaticRouteArgs args)
public StaticRoute(String name, StaticRouteArgs args, CustomResourceOptions options)
type: nsxt:StaticRoute
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args StaticRouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args StaticRouteArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args StaticRouteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StaticRouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args StaticRouteArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var staticRouteResource = new Nsxt.StaticRoute("staticRouteResource", new()
{
LogicalRouterId = "string",
Network = "string",
NextHops = new[]
{
new Nsxt.Inputs.StaticRouteNextHopArgs
{
AdministrativeDistance = 0,
BfdEnabled = false,
BlackholeAction = "string",
IpAddress = "string",
LogicalRouterPortId = "string",
},
},
Description = "string",
DisplayName = "string",
StaticRouteId = "string",
Tags = new[]
{
new Nsxt.Inputs.StaticRouteTagArgs
{
Scope = "string",
Tag = "string",
},
},
});
example, err := nsxt.NewStaticRoute(ctx, "staticRouteResource", &nsxt.StaticRouteArgs{
LogicalRouterId: pulumi.String("string"),
Network: pulumi.String("string"),
NextHops: .StaticRouteNextHopArray{
&.StaticRouteNextHopArgs{
AdministrativeDistance: pulumi.Float64(0),
BfdEnabled: pulumi.Bool(false),
BlackholeAction: pulumi.String("string"),
IpAddress: pulumi.String("string"),
LogicalRouterPortId: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
StaticRouteId: pulumi.String("string"),
Tags: .StaticRouteTagArray{
&.StaticRouteTagArgs{
Scope: pulumi.String("string"),
Tag: pulumi.String("string"),
},
},
})
var staticRouteResource = new StaticRoute("staticRouteResource", StaticRouteArgs.builder()
.logicalRouterId("string")
.network("string")
.nextHops(StaticRouteNextHopArgs.builder()
.administrativeDistance(0)
.bfdEnabled(false)
.blackholeAction("string")
.ipAddress("string")
.logicalRouterPortId("string")
.build())
.description("string")
.displayName("string")
.staticRouteId("string")
.tags(StaticRouteTagArgs.builder()
.scope("string")
.tag("string")
.build())
.build());
static_route_resource = nsxt.StaticRoute("staticRouteResource",
logical_router_id="string",
network="string",
next_hops=[{
"administrative_distance": 0,
"bfd_enabled": False,
"blackhole_action": "string",
"ip_address": "string",
"logical_router_port_id": "string",
}],
description="string",
display_name="string",
static_route_id="string",
tags=[{
"scope": "string",
"tag": "string",
}])
const staticRouteResource = new nsxt.StaticRoute("staticRouteResource", {
logicalRouterId: "string",
network: "string",
nextHops: [{
administrativeDistance: 0,
bfdEnabled: false,
blackholeAction: "string",
ipAddress: "string",
logicalRouterPortId: "string",
}],
description: "string",
displayName: "string",
staticRouteId: "string",
tags: [{
scope: "string",
tag: "string",
}],
});
type: nsxt:StaticRoute
properties:
description: string
displayName: string
logicalRouterId: string
network: string
nextHops:
- administrativeDistance: 0
bfdEnabled: false
blackholeAction: string
ipAddress: string
logicalRouterPortId: string
staticRouteId: string
tags:
- scope: string
tag: string
StaticRoute Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The StaticRoute resource accepts the following input properties:
- Logical
Router stringId - Logical router id.
- Network string
- CIDR.
- Next
Hops List<StaticRoute Next Hop> - List of Next Hops, each with those arguments:
- Description string
- Description of this resource.
- Display
Name string - The display name of this resource. Defaults to ID if not set.
- Static
Route stringId - ID of the static route.
- List<Static
Route Tag> - A list of scope + tag pairs to associate with this static route.
- Logical
Router stringId - Logical router id.
- Network string
- CIDR.
- Next
Hops []StaticRoute Next Hop Args - List of Next Hops, each with those arguments:
- Description string
- Description of this resource.
- Display
Name string - The display name of this resource. Defaults to ID if not set.
- Static
Route stringId - ID of the static route.
- []Static
Route Tag Args - A list of scope + tag pairs to associate with this static route.
- logical
Router StringId - Logical router id.
- network String
- CIDR.
- next
Hops List<StaticRoute Next Hop> - List of Next Hops, each with those arguments:
- description String
- Description of this resource.
- display
Name String - The display name of this resource. Defaults to ID if not set.
- static
Route StringId - ID of the static route.
- List<Static
Route Tag> - A list of scope + tag pairs to associate with this static route.
- logical
Router stringId - Logical router id.
- network string
- CIDR.
- next
Hops StaticRoute Next Hop[] - List of Next Hops, each with those arguments:
- description string
- Description of this resource.
- display
Name string - The display name of this resource. Defaults to ID if not set.
- static
Route stringId - ID of the static route.
- Static
Route Tag[] - A list of scope + tag pairs to associate with this static route.
- logical_
router_ strid - Logical router id.
- network str
- CIDR.
- next_
hops Sequence[StaticRoute Next Hop Args] - List of Next Hops, each with those arguments:
- description str
- Description of this resource.
- display_
name str - The display name of this resource. Defaults to ID if not set.
- static_
route_ strid - ID of the static route.
- Sequence[Static
Route Tag Args] - A list of scope + tag pairs to associate with this static route.
- logical
Router StringId - Logical router id.
- network String
- CIDR.
- next
Hops List<Property Map> - List of Next Hops, each with those arguments:
- description String
- Description of this resource.
- display
Name String - The display name of this resource. Defaults to ID if not set.
- static
Route StringId - ID of the static route.
- List<Property Map>
- A list of scope + tag pairs to associate with this static route.
Outputs
All input properties are implicitly available as output properties. Additionally, the StaticRoute resource produces the following output properties:
Look up Existing StaticRoute Resource
Get an existing StaticRoute resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: StaticRouteState, opts?: CustomResourceOptions): StaticRoute
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
logical_router_id: Optional[str] = None,
network: Optional[str] = None,
next_hops: Optional[Sequence[StaticRouteNextHopArgs]] = None,
revision: Optional[float] = None,
static_route_id: Optional[str] = None,
tags: Optional[Sequence[StaticRouteTagArgs]] = None) -> StaticRoute
func GetStaticRoute(ctx *Context, name string, id IDInput, state *StaticRouteState, opts ...ResourceOption) (*StaticRoute, error)
public static StaticRoute Get(string name, Input<string> id, StaticRouteState? state, CustomResourceOptions? opts = null)
public static StaticRoute get(String name, Output<String> id, StaticRouteState state, CustomResourceOptions options)
resources: _: type: nsxt:StaticRoute get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Description string
- Description of this resource.
- Display
Name string - The display name of this resource. Defaults to ID if not set.
- Logical
Router stringId - Logical router id.
- Network string
- CIDR.
- Next
Hops List<StaticRoute Next Hop> - List of Next Hops, each with those arguments:
- Revision double
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- Static
Route stringId - ID of the static route.
- List<Static
Route Tag> - A list of scope + tag pairs to associate with this static route.
- Description string
- Description of this resource.
- Display
Name string - The display name of this resource. Defaults to ID if not set.
- Logical
Router stringId - Logical router id.
- Network string
- CIDR.
- Next
Hops []StaticRoute Next Hop Args - List of Next Hops, each with those arguments:
- Revision float64
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- Static
Route stringId - ID of the static route.
- []Static
Route Tag Args - A list of scope + tag pairs to associate with this static route.
- description String
- Description of this resource.
- display
Name String - The display name of this resource. Defaults to ID if not set.
- logical
Router StringId - Logical router id.
- network String
- CIDR.
- next
Hops List<StaticRoute Next Hop> - List of Next Hops, each with those arguments:
- revision Double
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- static
Route StringId - ID of the static route.
- List<Static
Route Tag> - A list of scope + tag pairs to associate with this static route.
- description string
- Description of this resource.
- display
Name string - The display name of this resource. Defaults to ID if not set.
- logical
Router stringId - Logical router id.
- network string
- CIDR.
- next
Hops StaticRoute Next Hop[] - List of Next Hops, each with those arguments:
- revision number
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- static
Route stringId - ID of the static route.
- Static
Route Tag[] - A list of scope + tag pairs to associate with this static route.
- description str
- Description of this resource.
- display_
name str - The display name of this resource. Defaults to ID if not set.
- logical_
router_ strid - Logical router id.
- network str
- CIDR.
- next_
hops Sequence[StaticRoute Next Hop Args] - List of Next Hops, each with those arguments:
- revision float
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- static_
route_ strid - ID of the static route.
- Sequence[Static
Route Tag Args] - A list of scope + tag pairs to associate with this static route.
- description String
- Description of this resource.
- display
Name String - The display name of this resource. Defaults to ID if not set.
- logical
Router StringId - Logical router id.
- network String
- CIDR.
- next
Hops List<Property Map> - List of Next Hops, each with those arguments:
- revision Number
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- static
Route StringId - ID of the static route.
- List<Property Map>
- A list of scope + tag pairs to associate with this static route.
Supporting Types
StaticRouteNextHop, StaticRouteNextHopArgs
- Administrative
Distance double - Administrative Distance for the next hop IP.
- Bfd
Enabled bool - Status of bfd for this next hop where bfd_enabled = true indicate bfd is enabled for this next hop and bfd_enabled = false indicate bfd peer is disabled or not configured for this next hop.
- Blackhole
Action string - Action to be taken on matching packets for NULL routes.
- Ip
Address string - Next Hop IP.
- Logical
Router stringPort Id - Reference of logical router port to be used for next hop.
- Administrative
Distance float64 - Administrative Distance for the next hop IP.
- Bfd
Enabled bool - Status of bfd for this next hop where bfd_enabled = true indicate bfd is enabled for this next hop and bfd_enabled = false indicate bfd peer is disabled or not configured for this next hop.
- Blackhole
Action string - Action to be taken on matching packets for NULL routes.
- Ip
Address string - Next Hop IP.
- Logical
Router stringPort Id - Reference of logical router port to be used for next hop.
- administrative
Distance Double - Administrative Distance for the next hop IP.
- bfd
Enabled Boolean - Status of bfd for this next hop where bfd_enabled = true indicate bfd is enabled for this next hop and bfd_enabled = false indicate bfd peer is disabled or not configured for this next hop.
- blackhole
Action String - Action to be taken on matching packets for NULL routes.
- ip
Address String - Next Hop IP.
- logical
Router StringPort Id - Reference of logical router port to be used for next hop.
- administrative
Distance number - Administrative Distance for the next hop IP.
- bfd
Enabled boolean - Status of bfd for this next hop where bfd_enabled = true indicate bfd is enabled for this next hop and bfd_enabled = false indicate bfd peer is disabled or not configured for this next hop.
- blackhole
Action string - Action to be taken on matching packets for NULL routes.
- ip
Address string - Next Hop IP.
- logical
Router stringPort Id - Reference of logical router port to be used for next hop.
- administrative_
distance float - Administrative Distance for the next hop IP.
- bfd_
enabled bool - Status of bfd for this next hop where bfd_enabled = true indicate bfd is enabled for this next hop and bfd_enabled = false indicate bfd peer is disabled or not configured for this next hop.
- blackhole_
action str - Action to be taken on matching packets for NULL routes.
- ip_
address str - Next Hop IP.
- logical_
router_ strport_ id - Reference of logical router port to be used for next hop.
- administrative
Distance Number - Administrative Distance for the next hop IP.
- bfd
Enabled Boolean - Status of bfd for this next hop where bfd_enabled = true indicate bfd is enabled for this next hop and bfd_enabled = false indicate bfd peer is disabled or not configured for this next hop.
- blackhole
Action String - Action to be taken on matching packets for NULL routes.
- ip
Address String - Next Hop IP.
- logical
Router StringPort Id - Reference of logical router port to be used for next hop.
StaticRouteTag, StaticRouteTagArgs
Package Details
- Repository
- nsxt vmware/terraform-provider-nsxt
- License
- Notes
- This Pulumi package is based on the
nsxt
Terraform Provider.