1. Packages
  2. Packages
  3. Nsxt Provider
  4. API Docs
  5. PolicyTransitGatewayStaticRoute
Viewing docs for nsxt 3.12.0
published on Monday, May 18, 2026 by vmware
Viewing docs for nsxt 3.12.0
published on Monday, May 18, 2026 by vmware

    Create PolicyTransitGatewayStaticRoute Resource

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

    Constructor syntax

    new PolicyTransitGatewayStaticRoute(name: string, args: PolicyTransitGatewayStaticRouteArgs, opts?: CustomResourceOptions);
    @overload
    def PolicyTransitGatewayStaticRoute(resource_name: str,
                                        args: PolicyTransitGatewayStaticRouteArgs,
                                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def PolicyTransitGatewayStaticRoute(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        display_name: Optional[str] = None,
                                        parent_path: Optional[str] = None,
                                        description: Optional[str] = None,
                                        enabled_on_secondary: Optional[bool] = None,
                                        network: Optional[str] = None,
                                        next_hop: Optional[PolicyTransitGatewayStaticRouteNextHopArgs] = None,
                                        nsx_id: Optional[str] = None,
                                        policy_transit_gateway_static_route_id: Optional[str] = None,
                                        tags: Optional[Sequence[PolicyTransitGatewayStaticRouteTagArgs]] = None)
    func NewPolicyTransitGatewayStaticRoute(ctx *Context, name string, args PolicyTransitGatewayStaticRouteArgs, opts ...ResourceOption) (*PolicyTransitGatewayStaticRoute, error)
    public PolicyTransitGatewayStaticRoute(string name, PolicyTransitGatewayStaticRouteArgs args, CustomResourceOptions? opts = null)
    public PolicyTransitGatewayStaticRoute(String name, PolicyTransitGatewayStaticRouteArgs args)
    public PolicyTransitGatewayStaticRoute(String name, PolicyTransitGatewayStaticRouteArgs args, CustomResourceOptions options)
    
    type: nsxt:PolicyTransitGatewayStaticRoute
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "nsxt_policytransitgatewaystaticroute" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args PolicyTransitGatewayStaticRouteArgs
    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 PolicyTransitGatewayStaticRouteArgs
    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 PolicyTransitGatewayStaticRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyTransitGatewayStaticRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyTransitGatewayStaticRouteArgs
    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 policyTransitGatewayStaticRouteResource = new Nsxt.PolicyTransitGatewayStaticRoute("policyTransitGatewayStaticRouteResource", new()
    {
        DisplayName = "string",
        ParentPath = "string",
        Description = "string",
        EnabledOnSecondary = false,
        Network = "string",
        NextHop = new Nsxt.Inputs.PolicyTransitGatewayStaticRouteNextHopArgs
        {
            Scopes = new[]
            {
                "string",
            },
            AdminDistance = 0,
        },
        NsxId = "string",
        PolicyTransitGatewayStaticRouteId = "string",
        Tags = new[]
        {
            new Nsxt.Inputs.PolicyTransitGatewayStaticRouteTagArgs
            {
                Scope = "string",
                Tag = "string",
            },
        },
    });
    
    example, err := nsxt.NewPolicyTransitGatewayStaticRoute(ctx, "policyTransitGatewayStaticRouteResource", &nsxt.PolicyTransitGatewayStaticRouteArgs{
    	DisplayName:        pulumi.String("string"),
    	ParentPath:         pulumi.String("string"),
    	Description:        pulumi.String("string"),
    	EnabledOnSecondary: pulumi.Bool(false),
    	Network:            pulumi.String("string"),
    	NextHop: &nsxt.PolicyTransitGatewayStaticRouteNextHopArgs{
    		Scopes: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		AdminDistance: pulumi.Float64(0),
    	},
    	NsxId:                             pulumi.String("string"),
    	PolicyTransitGatewayStaticRouteId: pulumi.String("string"),
    	Tags: nsxt.PolicyTransitGatewayStaticRouteTagArray{
    		&nsxt.PolicyTransitGatewayStaticRouteTagArgs{
    			Scope: pulumi.String("string"),
    			Tag:   pulumi.String("string"),
    		},
    	},
    })
    
    resource "nsxt_policytransitgatewaystaticroute" "policyTransitGatewayStaticRouteResource" {
      display_name         = "string"
      parent_path          = "string"
      description          = "string"
      enabled_on_secondary = false
      network              = "string"
      next_hop = {
        scopes         = ["string"]
        admin_distance = 0
      }
      nsx_id                                 = "string"
      policy_transit_gateway_static_route_id = "string"
      tags {
        scope = "string"
        tag   = "string"
      }
    }
    
    var policyTransitGatewayStaticRouteResource = new PolicyTransitGatewayStaticRoute("policyTransitGatewayStaticRouteResource", PolicyTransitGatewayStaticRouteArgs.builder()
        .displayName("string")
        .parentPath("string")
        .description("string")
        .enabledOnSecondary(false)
        .network("string")
        .nextHop(PolicyTransitGatewayStaticRouteNextHopArgs.builder()
            .scopes("string")
            .adminDistance(0.0)
            .build())
        .nsxId("string")
        .policyTransitGatewayStaticRouteId("string")
        .tags(PolicyTransitGatewayStaticRouteTagArgs.builder()
            .scope("string")
            .tag("string")
            .build())
        .build());
    
    policy_transit_gateway_static_route_resource = nsxt.PolicyTransitGatewayStaticRoute("policyTransitGatewayStaticRouteResource",
        display_name="string",
        parent_path="string",
        description="string",
        enabled_on_secondary=False,
        network="string",
        next_hop={
            "scopes": ["string"],
            "admin_distance": float(0),
        },
        nsx_id="string",
        policy_transit_gateway_static_route_id="string",
        tags=[{
            "scope": "string",
            "tag": "string",
        }])
    
    const policyTransitGatewayStaticRouteResource = new nsxt.PolicyTransitGatewayStaticRoute("policyTransitGatewayStaticRouteResource", {
        displayName: "string",
        parentPath: "string",
        description: "string",
        enabledOnSecondary: false,
        network: "string",
        nextHop: {
            scopes: ["string"],
            adminDistance: 0,
        },
        nsxId: "string",
        policyTransitGatewayStaticRouteId: "string",
        tags: [{
            scope: "string",
            tag: "string",
        }],
    });
    
    type: nsxt:PolicyTransitGatewayStaticRoute
    properties:
        description: string
        displayName: string
        enabledOnSecondary: false
        network: string
        nextHop:
            adminDistance: 0
            scopes:
                - string
        nsxId: string
        parentPath: string
        policyTransitGatewayStaticRouteId: string
        tags:
            - scope: string
              tag: string
    

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

    DisplayName string
    Display name of the resource.
    ParentPath string
    Path of parent object
    Description string
    Description of the resource.
    EnabledOnSecondary bool
    Flag to plumb route on secondary site.
    Network string
    Specify network address in CIDR format.
    NextHop PolicyTransitGatewayStaticRouteNextHop
    Next hop is defined with the following arguments:
    NsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    PolicyTransitGatewayStaticRouteId string
    ID of the resource.
    Tags List<PolicyTransitGatewayStaticRouteTag>
    A list of scope + tag pairs to associate with this resource.
    DisplayName string
    Display name of the resource.
    ParentPath string
    Path of parent object
    Description string
    Description of the resource.
    EnabledOnSecondary bool
    Flag to plumb route on secondary site.
    Network string
    Specify network address in CIDR format.
    NextHop PolicyTransitGatewayStaticRouteNextHopArgs
    Next hop is defined with the following arguments:
    NsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    PolicyTransitGatewayStaticRouteId string
    ID of the resource.
    Tags []PolicyTransitGatewayStaticRouteTagArgs
    A list of scope + tag pairs to associate with this resource.
    display_name string
    Display name of the resource.
    parent_path string
    Path of parent object
    description string
    Description of the resource.
    enabled_on_secondary bool
    Flag to plumb route on secondary site.
    network string
    Specify network address in CIDR format.
    next_hop object
    Next hop is defined with the following arguments:
    nsx_id string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    policy_transit_gateway_static_route_id string
    ID of the resource.
    tags list(object)
    A list of scope + tag pairs to associate with this resource.
    displayName String
    Display name of the resource.
    parentPath String
    Path of parent object
    description String
    Description of the resource.
    enabledOnSecondary Boolean
    Flag to plumb route on secondary site.
    network String
    Specify network address in CIDR format.
    nextHop PolicyTransitGatewayStaticRouteNextHop
    Next hop is defined with the following arguments:
    nsxId String
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    policyTransitGatewayStaticRouteId String
    ID of the resource.
    tags List<PolicyTransitGatewayStaticRouteTag>
    A list of scope + tag pairs to associate with this resource.
    displayName string
    Display name of the resource.
    parentPath string
    Path of parent object
    description string
    Description of the resource.
    enabledOnSecondary boolean
    Flag to plumb route on secondary site.
    network string
    Specify network address in CIDR format.
    nextHop PolicyTransitGatewayStaticRouteNextHop
    Next hop is defined with the following arguments:
    nsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    policyTransitGatewayStaticRouteId string
    ID of the resource.
    tags PolicyTransitGatewayStaticRouteTag[]
    A list of scope + tag pairs to associate with this resource.
    display_name str
    Display name of the resource.
    parent_path str
    Path of parent object
    description str
    Description of the resource.
    enabled_on_secondary bool
    Flag to plumb route on secondary site.
    network str
    Specify network address in CIDR format.
    next_hop PolicyTransitGatewayStaticRouteNextHopArgs
    Next hop is defined with the following arguments:
    nsx_id str
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    policy_transit_gateway_static_route_id str
    ID of the resource.
    tags Sequence[PolicyTransitGatewayStaticRouteTagArgs]
    A list of scope + tag pairs to associate with this resource.
    displayName String
    Display name of the resource.
    parentPath String
    Path of parent object
    description String
    Description of the resource.
    enabledOnSecondary Boolean
    Flag to plumb route on secondary site.
    network String
    Specify network address in CIDR format.
    nextHop Property Map
    Next hop is defined with the following arguments:
    nsxId String
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    policyTransitGatewayStaticRouteId String
    ID of the resource.
    tags List<Property Map>
    A list of scope + tag pairs to associate with this resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PolicyTransitGatewayStaticRoute 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 number
    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 PolicyTransitGatewayStaticRoute Resource

    Get an existing PolicyTransitGatewayStaticRoute 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?: PolicyTransitGatewayStaticRouteState, opts?: CustomResourceOptions): PolicyTransitGatewayStaticRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            enabled_on_secondary: Optional[bool] = None,
            network: Optional[str] = None,
            next_hop: Optional[PolicyTransitGatewayStaticRouteNextHopArgs] = None,
            nsx_id: Optional[str] = None,
            parent_path: Optional[str] = None,
            path: Optional[str] = None,
            policy_transit_gateway_static_route_id: Optional[str] = None,
            revision: Optional[float] = None,
            tags: Optional[Sequence[PolicyTransitGatewayStaticRouteTagArgs]] = None) -> PolicyTransitGatewayStaticRoute
    func GetPolicyTransitGatewayStaticRoute(ctx *Context, name string, id IDInput, state *PolicyTransitGatewayStaticRouteState, opts ...ResourceOption) (*PolicyTransitGatewayStaticRoute, error)
    public static PolicyTransitGatewayStaticRoute Get(string name, Input<string> id, PolicyTransitGatewayStaticRouteState? state, CustomResourceOptions? opts = null)
    public static PolicyTransitGatewayStaticRoute get(String name, Output<String> id, PolicyTransitGatewayStaticRouteState state, CustomResourceOptions options)
    resources:  _:    type: nsxt:PolicyTransitGatewayStaticRoute    get:      id: ${id}
    import {
      to = nsxt_policytransitgatewaystaticroute.example
      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.
    The following state arguments are supported:
    Description string
    Description of the resource.
    DisplayName string
    Display name of the resource.
    EnabledOnSecondary bool
    Flag to plumb route on secondary site.
    Network string
    Specify network address in CIDR format.
    NextHop PolicyTransitGatewayStaticRouteNextHop
    Next hop is defined with the following arguments:
    NsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    ParentPath string
    Path of parent object
    Path string
    The NSX path of the policy resource.
    PolicyTransitGatewayStaticRouteId string
    ID of the resource.
    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<PolicyTransitGatewayStaticRouteTag>
    A list of scope + tag pairs to associate with this resource.
    Description string
    Description of the resource.
    DisplayName string
    Display name of the resource.
    EnabledOnSecondary bool
    Flag to plumb route on secondary site.
    Network string
    Specify network address in CIDR format.
    NextHop PolicyTransitGatewayStaticRouteNextHopArgs
    Next hop is defined with the following arguments:
    NsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    ParentPath string
    Path of parent object
    Path string
    The NSX path of the policy resource.
    PolicyTransitGatewayStaticRouteId string
    ID of the resource.
    Revision float64
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    Tags []PolicyTransitGatewayStaticRouteTagArgs
    A list of scope + tag pairs to associate with this resource.
    description string
    Description of the resource.
    display_name string
    Display name of the resource.
    enabled_on_secondary bool
    Flag to plumb route on secondary site.
    network string
    Specify network address in CIDR format.
    next_hop object
    Next hop is defined with the following arguments:
    nsx_id string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    parent_path string
    Path of parent object
    path string
    The NSX path of the policy resource.
    policy_transit_gateway_static_route_id string
    ID of the resource.
    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(object)
    A list of scope + tag pairs to associate with this resource.
    description String
    Description of the resource.
    displayName String
    Display name of the resource.
    enabledOnSecondary Boolean
    Flag to plumb route on secondary site.
    network String
    Specify network address in CIDR format.
    nextHop PolicyTransitGatewayStaticRouteNextHop
    Next hop is defined with the following arguments:
    nsxId String
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    parentPath String
    Path of parent object
    path String
    The NSX path of the policy resource.
    policyTransitGatewayStaticRouteId String
    ID of the resource.
    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<PolicyTransitGatewayStaticRouteTag>
    A list of scope + tag pairs to associate with this resource.
    description string
    Description of the resource.
    displayName string
    Display name of the resource.
    enabledOnSecondary boolean
    Flag to plumb route on secondary site.
    network string
    Specify network address in CIDR format.
    nextHop PolicyTransitGatewayStaticRouteNextHop
    Next hop is defined with the following arguments:
    nsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    parentPath string
    Path of parent object
    path string
    The NSX path of the policy resource.
    policyTransitGatewayStaticRouteId string
    ID of the resource.
    revision number
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    tags PolicyTransitGatewayStaticRouteTag[]
    A list of scope + tag pairs to associate with this resource.
    description str
    Description of the resource.
    display_name str
    Display name of the resource.
    enabled_on_secondary bool
    Flag to plumb route on secondary site.
    network str
    Specify network address in CIDR format.
    next_hop PolicyTransitGatewayStaticRouteNextHopArgs
    Next hop is defined with the following arguments:
    nsx_id str
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    parent_path str
    Path of parent object
    path str
    The NSX path of the policy resource.
    policy_transit_gateway_static_route_id str
    ID of the resource.
    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[PolicyTransitGatewayStaticRouteTagArgs]
    A list of scope + tag pairs to associate with this resource.
    description String
    Description of the resource.
    displayName String
    Display name of the resource.
    enabledOnSecondary Boolean
    Flag to plumb route on secondary site.
    network String
    Specify network address in CIDR format.
    nextHop Property Map
    Next hop is defined with the following arguments:
    nsxId String
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    parentPath String
    Path of parent object
    path String
    The NSX path of the policy resource.
    policyTransitGatewayStaticRouteId String
    ID of the resource.
    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 resource.

    Supporting Types

    PolicyTransitGatewayStaticRouteNextHop, PolicyTransitGatewayStaticRouteNextHopArgs

    Scopes List<string>
    Set of policy object paths where the rule is applied.
    AdminDistance double
    Scopes []string
    Set of policy object paths where the rule is applied.
    AdminDistance float64
    scopes list(string)
    Set of policy object paths where the rule is applied.
    admin_distance number
    scopes List<String>
    Set of policy object paths where the rule is applied.
    adminDistance Double
    scopes string[]
    Set of policy object paths where the rule is applied.
    adminDistance number
    scopes Sequence[str]
    Set of policy object paths where the rule is applied.
    admin_distance float
    scopes List<String>
    Set of policy object paths where the rule is applied.
    adminDistance Number

    PolicyTransitGatewayStaticRouteTag, PolicyTransitGatewayStaticRouteTagArgs

    Scope string
    Set of policy object paths where the rule is applied.
    Tag string
    A list of scope + tag pairs to associate with this resource.
    Scope string
    Set of policy object paths where the rule is applied.
    Tag string
    A list of scope + tag pairs to associate with this resource.
    scope string
    Set of policy object paths where the rule is applied.
    tag string
    A list of scope + tag pairs to associate with this resource.
    scope String
    Set of policy object paths where the rule is applied.
    tag String
    A list of scope + tag pairs to associate with this resource.
    scope string
    Set of policy object paths where the rule is applied.
    tag string
    A list of scope + tag pairs to associate with this resource.
    scope str
    Set of policy object paths where the rule is applied.
    tag str
    A list of scope + tag pairs to associate with this resource.
    scope String
    Set of policy object paths where the rule is applied.
    tag String
    A list of scope + tag pairs to associate with this resource.

    Package Details

    Repository
    nsxt vmware/terraform-provider-nsxt
    License
    Notes
    This Pulumi package is based on the nsxt Terraform Provider.
    Viewing docs for nsxt 3.12.0
    published on Monday, May 18, 2026 by vmware

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial