1. Packages
  2. Nsxt Provider
  3. API Docs
  4. PolicyStaticRoute
nsxt 3.8.0 published on Monday, Apr 14, 2025 by vmware

nsxt.PolicyStaticRoute

Explore with Pulumi AI

Create PolicyStaticRoute Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new PolicyStaticRoute(name: string, args: PolicyStaticRouteArgs, opts?: CustomResourceOptions);
@overload
def PolicyStaticRoute(resource_name: str,
                      args: PolicyStaticRouteArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def PolicyStaticRoute(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      display_name: Optional[str] = None,
                      gateway_path: Optional[str] = None,
                      network: Optional[str] = None,
                      next_hops: Optional[Sequence[PolicyStaticRouteNextHopArgs]] = None,
                      context: Optional[PolicyStaticRouteContextArgs] = None,
                      description: Optional[str] = None,
                      nsx_id: Optional[str] = None,
                      policy_static_route_id: Optional[str] = None,
                      tags: Optional[Sequence[PolicyStaticRouteTagArgs]] = None)
func NewPolicyStaticRoute(ctx *Context, name string, args PolicyStaticRouteArgs, opts ...ResourceOption) (*PolicyStaticRoute, error)
public PolicyStaticRoute(string name, PolicyStaticRouteArgs args, CustomResourceOptions? opts = null)
public PolicyStaticRoute(String name, PolicyStaticRouteArgs args)
public PolicyStaticRoute(String name, PolicyStaticRouteArgs args, CustomResourceOptions options)
type: nsxt:PolicyStaticRoute
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PolicyStaticRouteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PolicyStaticRouteArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PolicyStaticRouteArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PolicyStaticRouteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PolicyStaticRouteArgs
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 policyStaticRouteResource = new Nsxt.PolicyStaticRoute("policyStaticRouteResource", new()
{
    DisplayName = "string",
    GatewayPath = "string",
    Network = "string",
    NextHops = new[]
    {
        new Nsxt.Inputs.PolicyStaticRouteNextHopArgs
        {
            AdminDistance = 0,
            Interface = "string",
            IpAddress = "string",
        },
    },
    Context = new Nsxt.Inputs.PolicyStaticRouteContextArgs
    {
        ProjectId = "string",
    },
    Description = "string",
    NsxId = "string",
    PolicyStaticRouteId = "string",
    Tags = new[]
    {
        new Nsxt.Inputs.PolicyStaticRouteTagArgs
        {
            Scope = "string",
            Tag = "string",
        },
    },
});
Copy
example, err := nsxt.NewPolicyStaticRoute(ctx, "policyStaticRouteResource", &nsxt.PolicyStaticRouteArgs{
DisplayName: pulumi.String("string"),
GatewayPath: pulumi.String("string"),
Network: pulumi.String("string"),
NextHops: .PolicyStaticRouteNextHopArray{
&.PolicyStaticRouteNextHopArgs{
AdminDistance: pulumi.Float64(0),
Interface: pulumi.String("string"),
IpAddress: pulumi.String("string"),
},
},
Context: &.PolicyStaticRouteContextArgs{
ProjectId: pulumi.String("string"),
},
Description: pulumi.String("string"),
NsxId: pulumi.String("string"),
PolicyStaticRouteId: pulumi.String("string"),
Tags: .PolicyStaticRouteTagArray{
&.PolicyStaticRouteTagArgs{
Scope: pulumi.String("string"),
Tag: pulumi.String("string"),
},
},
})
Copy
var policyStaticRouteResource = new PolicyStaticRoute("policyStaticRouteResource", PolicyStaticRouteArgs.builder()
    .displayName("string")
    .gatewayPath("string")
    .network("string")
    .nextHops(PolicyStaticRouteNextHopArgs.builder()
        .adminDistance(0)
        .interface_("string")
        .ipAddress("string")
        .build())
    .context(PolicyStaticRouteContextArgs.builder()
        .projectId("string")
        .build())
    .description("string")
    .nsxId("string")
    .policyStaticRouteId("string")
    .tags(PolicyStaticRouteTagArgs.builder()
        .scope("string")
        .tag("string")
        .build())
    .build());
Copy
policy_static_route_resource = nsxt.PolicyStaticRoute("policyStaticRouteResource",
    display_name="string",
    gateway_path="string",
    network="string",
    next_hops=[{
        "admin_distance": 0,
        "interface": "string",
        "ip_address": "string",
    }],
    context={
        "project_id": "string",
    },
    description="string",
    nsx_id="string",
    policy_static_route_id="string",
    tags=[{
        "scope": "string",
        "tag": "string",
    }])
Copy
const policyStaticRouteResource = new nsxt.PolicyStaticRoute("policyStaticRouteResource", {
    displayName: "string",
    gatewayPath: "string",
    network: "string",
    nextHops: [{
        adminDistance: 0,
        "interface": "string",
        ipAddress: "string",
    }],
    context: {
        projectId: "string",
    },
    description: "string",
    nsxId: "string",
    policyStaticRouteId: "string",
    tags: [{
        scope: "string",
        tag: "string",
    }],
});
Copy
type: nsxt:PolicyStaticRoute
properties:
    context:
        projectId: string
    description: string
    displayName: string
    gatewayPath: string
    network: string
    nextHops:
        - adminDistance: 0
          interface: string
          ipAddress: string
    nsxId: string
    policyStaticRouteId: string
    tags:
        - scope: string
          tag: string
Copy

PolicyStaticRoute 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 PolicyStaticRoute resource accepts the following input properties:

DisplayName This property is required. string
Display name of the resource.
GatewayPath This property is required. string
The NSX Policy path to the Tier0 or Tier1 Gateway for this Static Route.
Network This property is required. string
The network address in CIDR format for the route.
NextHops This property is required. List<PolicyStaticRouteNextHop>
One or more next hops for the static route.
Context PolicyStaticRouteContext
The context which the object belongs to
Description string
Description of the resource.
NsxId string
The NSX ID of this resource. If set, this ID will be used to create the policy resource.
PolicyStaticRouteId string
Tags List<PolicyStaticRouteTag>
A list of scope + tag pairs to associate with this Tier-0 gateway.
DisplayName This property is required. string
Display name of the resource.
GatewayPath This property is required. string
The NSX Policy path to the Tier0 or Tier1 Gateway for this Static Route.
Network This property is required. string
The network address in CIDR format for the route.
NextHops This property is required. []PolicyStaticRouteNextHopArgs
One or more next hops for the static route.
Context PolicyStaticRouteContextArgs
The context which the object belongs to
Description string
Description of the resource.
NsxId string
The NSX ID of this resource. If set, this ID will be used to create the policy resource.
PolicyStaticRouteId string
Tags []PolicyStaticRouteTagArgs
A list of scope + tag pairs to associate with this Tier-0 gateway.
displayName This property is required. String
Display name of the resource.
gatewayPath This property is required. String
The NSX Policy path to the Tier0 or Tier1 Gateway for this Static Route.
network This property is required. String
The network address in CIDR format for the route.
nextHops This property is required. List<PolicyStaticRouteNextHop>
One or more next hops for the static route.
context PolicyStaticRouteContext
The context which the object belongs to
description String
Description of the resource.
nsxId String
The NSX ID of this resource. If set, this ID will be used to create the policy resource.
policyStaticRouteId String
tags List<PolicyStaticRouteTag>
A list of scope + tag pairs to associate with this Tier-0 gateway.
displayName This property is required. string
Display name of the resource.
gatewayPath This property is required. string
The NSX Policy path to the Tier0 or Tier1 Gateway for this Static Route.
network This property is required. string
The network address in CIDR format for the route.
nextHops This property is required. PolicyStaticRouteNextHop[]
One or more next hops for the static route.
context PolicyStaticRouteContext
The context which the object belongs to
description string
Description of the resource.
nsxId string
The NSX ID of this resource. If set, this ID will be used to create the policy resource.
policyStaticRouteId string
tags PolicyStaticRouteTag[]
A list of scope + tag pairs to associate with this Tier-0 gateway.
display_name This property is required. str
Display name of the resource.
gateway_path This property is required. str
The NSX Policy path to the Tier0 or Tier1 Gateway for this Static Route.
network This property is required. str
The network address in CIDR format for the route.
next_hops This property is required. Sequence[PolicyStaticRouteNextHopArgs]
One or more next hops for the static route.
context PolicyStaticRouteContextArgs
The context which the object belongs to
description str
Description of the resource.
nsx_id str
The NSX ID of this resource. If set, this ID will be used to create the policy resource.
policy_static_route_id str
tags Sequence[PolicyStaticRouteTagArgs]
A list of scope + tag pairs to associate with this Tier-0 gateway.
displayName This property is required. String
Display name of the resource.
gatewayPath This property is required. String
The NSX Policy path to the Tier0 or Tier1 Gateway for this Static Route.
network This property is required. String
The network address in CIDR format for the route.
nextHops This property is required. List<Property Map>
One or more next hops for the static route.
context Property Map
The context which the object belongs to
description String
Description of the resource.
nsxId String
The NSX ID of this resource. If set, this ID will be used to create the policy resource.
policyStaticRouteId String
tags List<Property Map>
A list of scope + tag pairs to associate with this Tier-0 gateway.

Outputs

All input properties are implicitly available as output properties. Additionally, the PolicyStaticRoute resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Path string
The NSX path of the policy resource.
Revision double
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
Id string
The provider-assigned unique ID for this managed resource.
Path string
The NSX path of the policy resource.
Revision float64
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
id String
The provider-assigned unique ID for this managed resource.
path String
The NSX path of the policy resource.
revision Double
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
id string
The provider-assigned unique ID for this managed resource.
path string
The NSX path of the policy resource.
revision number
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
id str
The provider-assigned unique ID for this managed resource.
path str
The NSX path of the policy resource.
revision float
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
id String
The provider-assigned unique ID for this managed resource.
path String
The NSX path of the policy resource.
revision Number
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.

Look up Existing PolicyStaticRoute Resource

Get an existing PolicyStaticRoute 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?: PolicyStaticRouteState, opts?: CustomResourceOptions): PolicyStaticRoute
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        context: Optional[PolicyStaticRouteContextArgs] = None,
        description: Optional[str] = None,
        display_name: Optional[str] = None,
        gateway_path: Optional[str] = None,
        network: Optional[str] = None,
        next_hops: Optional[Sequence[PolicyStaticRouteNextHopArgs]] = None,
        nsx_id: Optional[str] = None,
        path: Optional[str] = None,
        policy_static_route_id: Optional[str] = None,
        revision: Optional[float] = None,
        tags: Optional[Sequence[PolicyStaticRouteTagArgs]] = None) -> PolicyStaticRoute
func GetPolicyStaticRoute(ctx *Context, name string, id IDInput, state *PolicyStaticRouteState, opts ...ResourceOption) (*PolicyStaticRoute, error)
public static PolicyStaticRoute Get(string name, Input<string> id, PolicyStaticRouteState? state, CustomResourceOptions? opts = null)
public static PolicyStaticRoute get(String name, Output<String> id, PolicyStaticRouteState state, CustomResourceOptions options)
resources:  _:    type: nsxt:PolicyStaticRoute    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
Context PolicyStaticRouteContext
The context which the object belongs to
Description string
Description of the resource.
DisplayName string
Display name of the resource.
GatewayPath string
The NSX Policy path to the Tier0 or Tier1 Gateway for this Static Route.
Network string
The network address in CIDR format for the route.
NextHops List<PolicyStaticRouteNextHop>
One or more next hops for the static route.
NsxId string
The NSX ID of this resource. If set, this ID will be used to create the policy resource.
Path string
The NSX path of the policy resource.
PolicyStaticRouteId string
Revision double
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
Tags List<PolicyStaticRouteTag>
A list of scope + tag pairs to associate with this Tier-0 gateway.
Context PolicyStaticRouteContextArgs
The context which the object belongs to
Description string
Description of the resource.
DisplayName string
Display name of the resource.
GatewayPath string
The NSX Policy path to the Tier0 or Tier1 Gateway for this Static Route.
Network string
The network address in CIDR format for the route.
NextHops []PolicyStaticRouteNextHopArgs
One or more next hops for the static route.
NsxId string
The NSX ID of this resource. If set, this ID will be used to create the policy resource.
Path string
The NSX path of the policy resource.
PolicyStaticRouteId string
Revision float64
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
Tags []PolicyStaticRouteTagArgs
A list of scope + tag pairs to associate with this Tier-0 gateway.
context PolicyStaticRouteContext
The context which the object belongs to
description String
Description of the resource.
displayName String
Display name of the resource.
gatewayPath String
The NSX Policy path to the Tier0 or Tier1 Gateway for this Static Route.
network String
The network address in CIDR format for the route.
nextHops List<PolicyStaticRouteNextHop>
One or more next hops for the static route.
nsxId String
The NSX ID of this resource. If set, this ID will be used to create the policy resource.
path String
The NSX path of the policy resource.
policyStaticRouteId String
revision Double
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
tags List<PolicyStaticRouteTag>
A list of scope + tag pairs to associate with this Tier-0 gateway.
context PolicyStaticRouteContext
The context which the object belongs to
description string
Description of the resource.
displayName string
Display name of the resource.
gatewayPath string
The NSX Policy path to the Tier0 or Tier1 Gateway for this Static Route.
network string
The network address in CIDR format for the route.
nextHops PolicyStaticRouteNextHop[]
One or more next hops for the static route.
nsxId string
The NSX ID of this resource. If set, this ID will be used to create the policy resource.
path string
The NSX path of the policy resource.
policyStaticRouteId string
revision number
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
tags PolicyStaticRouteTag[]
A list of scope + tag pairs to associate with this Tier-0 gateway.
context PolicyStaticRouteContextArgs
The context which the object belongs to
description str
Description of the resource.
display_name str
Display name of the resource.
gateway_path str
The NSX Policy path to the Tier0 or Tier1 Gateway for this Static Route.
network str
The network address in CIDR format for the route.
next_hops Sequence[PolicyStaticRouteNextHopArgs]
One or more next hops for the static route.
nsx_id str
The NSX ID of this resource. If set, this ID will be used to create the policy resource.
path str
The NSX path of the policy resource.
policy_static_route_id str
revision float
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
tags Sequence[PolicyStaticRouteTagArgs]
A list of scope + tag pairs to associate with this Tier-0 gateway.
context Property Map
The context which the object belongs to
description String
Description of the resource.
displayName String
Display name of the resource.
gatewayPath String
The NSX Policy path to the Tier0 or Tier1 Gateway for this Static Route.
network String
The network address in CIDR format for the route.
nextHops List<Property Map>
One or more next hops for the static route.
nsxId String
The NSX ID of this resource. If set, this ID will be used to create the policy resource.
path String
The NSX path of the policy resource.
policyStaticRouteId String
revision Number
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
tags List<Property Map>
A list of scope + tag pairs to associate with this Tier-0 gateway.

Supporting Types

PolicyStaticRouteContext
, PolicyStaticRouteContextArgs

ProjectId This property is required. string
The ID of the project which the object belongs to
ProjectId This property is required. string
The ID of the project which the object belongs to
projectId This property is required. String
The ID of the project which the object belongs to
projectId This property is required. string
The ID of the project which the object belongs to
project_id This property is required. str
The ID of the project which the object belongs to
projectId This property is required. String
The ID of the project which the object belongs to

PolicyStaticRouteNextHop
, PolicyStaticRouteNextHopArgs

AdminDistance double
The cost associated with the next hop. Valid values are 1 - 255 and the default is 1.
Interface string
The policy path to the interface associated with the static route.
IpAddress string
The gateway address of the next hop.
AdminDistance float64
The cost associated with the next hop. Valid values are 1 - 255 and the default is 1.
Interface string
The policy path to the interface associated with the static route.
IpAddress string
The gateway address of the next hop.
adminDistance Double
The cost associated with the next hop. Valid values are 1 - 255 and the default is 1.
interface_ String
The policy path to the interface associated with the static route.
ipAddress String
The gateway address of the next hop.
adminDistance number
The cost associated with the next hop. Valid values are 1 - 255 and the default is 1.
interface string
The policy path to the interface associated with the static route.
ipAddress string
The gateway address of the next hop.
admin_distance float
The cost associated with the next hop. Valid values are 1 - 255 and the default is 1.
interface str
The policy path to the interface associated with the static route.
ip_address str
The gateway address of the next hop.
adminDistance Number
The cost associated with the next hop. Valid values are 1 - 255 and the default is 1.
interface String
The policy path to the interface associated with the static route.
ipAddress String
The gateway address of the next hop.

PolicyStaticRouteTag
, PolicyStaticRouteTagArgs

Scope string
Tag string
A list of scope + tag pairs to associate with this Tier-0 gateway.
Scope string
Tag string
A list of scope + tag pairs to associate with this Tier-0 gateway.
scope String
tag String
A list of scope + tag pairs to associate with this Tier-0 gateway.
scope string
tag string
A list of scope + tag pairs to associate with this Tier-0 gateway.
scope str
tag str
A list of scope + tag pairs to associate with this Tier-0 gateway.
scope String
tag String
A list of scope + tag pairs to associate with this Tier-0 gateway.

Package Details

Repository
nsxt vmware/terraform-provider-nsxt
License
Notes
This Pulumi package is based on the nsxt Terraform Provider.