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

nsxt.StaticRoute

Explore with Pulumi AI

nsxt logo
nsxt 3.8.0 published on Monday, Apr 14, 2025 by vmware

    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:

    LogicalRouterId string
    Logical router id.
    Network string
    CIDR.
    NextHops List<StaticRouteNextHop>
    List of Next Hops, each with those arguments:
    Description string
    Description of this resource.
    DisplayName string
    The display name of this resource. Defaults to ID if not set.
    StaticRouteId string
    ID of the static route.
    Tags List<StaticRouteTag>
    A list of scope + tag pairs to associate with this static route.
    LogicalRouterId string
    Logical router id.
    Network string
    CIDR.
    NextHops []StaticRouteNextHopArgs
    List of Next Hops, each with those arguments:
    Description string
    Description of this resource.
    DisplayName string
    The display name of this resource. Defaults to ID if not set.
    StaticRouteId string
    ID of the static route.
    Tags []StaticRouteTagArgs
    A list of scope + tag pairs to associate with this static route.
    logicalRouterId String
    Logical router id.
    network String
    CIDR.
    nextHops List<StaticRouteNextHop>
    List of Next Hops, each with those arguments:
    description String
    Description of this resource.
    displayName String
    The display name of this resource. Defaults to ID if not set.
    staticRouteId String
    ID of the static route.
    tags List<StaticRouteTag>
    A list of scope + tag pairs to associate with this static route.
    logicalRouterId string
    Logical router id.
    network string
    CIDR.
    nextHops StaticRouteNextHop[]
    List of Next Hops, each with those arguments:
    description string
    Description of this resource.
    displayName string
    The display name of this resource. Defaults to ID if not set.
    staticRouteId string
    ID of the static route.
    tags StaticRouteTag[]
    A list of scope + tag pairs to associate with this static route.
    logical_router_id str
    Logical router id.
    network str
    CIDR.
    next_hops Sequence[StaticRouteNextHopArgs]
    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_id str
    ID of the static route.
    tags Sequence[StaticRouteTagArgs]
    A list of scope + tag pairs to associate with this static route.
    logicalRouterId String
    Logical router id.
    network String
    CIDR.
    nextHops List<Property Map>
    List of Next Hops, each with those arguments:
    description String
    Description of this resource.
    displayName String
    The display name of this resource. Defaults to ID if not set.
    staticRouteId String
    ID of the static route.
    tags 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:

    Id string
    The provider-assigned unique ID for this managed 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.
    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.
    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.
    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.
    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.
    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 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.
    The following state arguments are supported:
    Description string
    Description of this resource.
    DisplayName string
    The display name of this resource. Defaults to ID if not set.
    LogicalRouterId string
    Logical router id.
    Network string
    CIDR.
    NextHops List<StaticRouteNextHop>
    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.
    StaticRouteId string
    ID of the static route.
    Tags List<StaticRouteTag>
    A list of scope + tag pairs to associate with this static route.
    Description string
    Description of this resource.
    DisplayName string
    The display name of this resource. Defaults to ID if not set.
    LogicalRouterId string
    Logical router id.
    Network string
    CIDR.
    NextHops []StaticRouteNextHopArgs
    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.
    StaticRouteId string
    ID of the static route.
    Tags []StaticRouteTagArgs
    A list of scope + tag pairs to associate with this static route.
    description String
    Description of this resource.
    displayName String
    The display name of this resource. Defaults to ID if not set.
    logicalRouterId String
    Logical router id.
    network String
    CIDR.
    nextHops List<StaticRouteNextHop>
    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.
    staticRouteId String
    ID of the static route.
    tags List<StaticRouteTag>
    A list of scope + tag pairs to associate with this static route.
    description string
    Description of this resource.
    displayName string
    The display name of this resource. Defaults to ID if not set.
    logicalRouterId string
    Logical router id.
    network string
    CIDR.
    nextHops StaticRouteNextHop[]
    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.
    staticRouteId string
    ID of the static route.
    tags StaticRouteTag[]
    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_id str
    Logical router id.
    network str
    CIDR.
    next_hops Sequence[StaticRouteNextHopArgs]
    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_id str
    ID of the static route.
    tags Sequence[StaticRouteTagArgs]
    A list of scope + tag pairs to associate with this static route.
    description String
    Description of this resource.
    displayName String
    The display name of this resource. Defaults to ID if not set.
    logicalRouterId String
    Logical router id.
    network String
    CIDR.
    nextHops 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.
    staticRouteId String
    ID of the static route.
    tags List<Property Map>
    A list of scope + tag pairs to associate with this static route.

    Supporting Types

    StaticRouteNextHop, StaticRouteNextHopArgs

    AdministrativeDistance double
    Administrative Distance for the next hop IP.
    BfdEnabled 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.
    BlackholeAction string
    Action to be taken on matching packets for NULL routes.
    IpAddress string
    Next Hop IP.
    LogicalRouterPortId string
    Reference of logical router port to be used for next hop.
    AdministrativeDistance float64
    Administrative Distance for the next hop IP.
    BfdEnabled 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.
    BlackholeAction string
    Action to be taken on matching packets for NULL routes.
    IpAddress string
    Next Hop IP.
    LogicalRouterPortId string
    Reference of logical router port to be used for next hop.
    administrativeDistance Double
    Administrative Distance for the next hop IP.
    bfdEnabled 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.
    blackholeAction String
    Action to be taken on matching packets for NULL routes.
    ipAddress String
    Next Hop IP.
    logicalRouterPortId String
    Reference of logical router port to be used for next hop.
    administrativeDistance number
    Administrative Distance for the next hop IP.
    bfdEnabled 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.
    blackholeAction string
    Action to be taken on matching packets for NULL routes.
    ipAddress string
    Next Hop IP.
    logicalRouterPortId string
    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_port_id str
    Reference of logical router port to be used for next hop.
    administrativeDistance Number
    Administrative Distance for the next hop IP.
    bfdEnabled 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.
    blackholeAction String
    Action to be taken on matching packets for NULL routes.
    ipAddress String
    Next Hop IP.
    logicalRouterPortId String
    Reference of logical router port to be used for next hop.

    StaticRouteTag, StaticRouteTagArgs

    Scope string
    Tag string
    A list of scope + tag pairs to associate with this static route.
    Scope string
    Tag string
    A list of scope + tag pairs to associate with this static route.
    scope String
    tag String
    A list of scope + tag pairs to associate with this static route.
    scope string
    tag string
    A list of scope + tag pairs to associate with this static route.
    scope str
    tag str
    A list of scope + tag pairs to associate with this static route.
    scope String
    tag String
    A list of scope + tag pairs to associate with this static route.

    Package Details

    Repository
    nsxt vmware/terraform-provider-nsxt
    License
    Notes
    This Pulumi package is based on the nsxt Terraform Provider.
    nsxt logo
    nsxt 3.8.0 published on Monday, Apr 14, 2025 by vmware