1. Packages
  2. Nsxt Provider
  3. API Docs
  4. VpcStaticRoute
nsxt 3.9.0 published on Friday, Jun 20, 2025 by vmware

nsxt.VpcStaticRoute

Explore with Pulumi AI

nsxt logo
nsxt 3.9.0 published on Friday, Jun 20, 2025 by vmware

    Create VpcStaticRoute Resource

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

    Constructor syntax

    new VpcStaticRoute(name: string, args: VpcStaticRouteArgs, opts?: CustomResourceOptions);
    @overload
    def VpcStaticRoute(resource_name: str,
                       args: VpcStaticRouteArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcStaticRoute(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       context: Optional[VpcStaticRouteContextArgs] = None,
                       display_name: Optional[str] = None,
                       network: Optional[str] = None,
                       next_hops: Optional[Sequence[VpcStaticRouteNextHopArgs]] = None,
                       description: Optional[str] = None,
                       nsx_id: Optional[str] = None,
                       tags: Optional[Sequence[VpcStaticRouteTagArgs]] = None,
                       vpc_static_route_id: Optional[str] = None)
    func NewVpcStaticRoute(ctx *Context, name string, args VpcStaticRouteArgs, opts ...ResourceOption) (*VpcStaticRoute, error)
    public VpcStaticRoute(string name, VpcStaticRouteArgs args, CustomResourceOptions? opts = null)
    public VpcStaticRoute(String name, VpcStaticRouteArgs args)
    public VpcStaticRoute(String name, VpcStaticRouteArgs args, CustomResourceOptions options)
    
    type: nsxt:VpcStaticRoute
    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 VpcStaticRouteArgs
    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 VpcStaticRouteArgs
    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 VpcStaticRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcStaticRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcStaticRouteArgs
    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 vpcStaticRouteResource = new Nsxt.VpcStaticRoute("vpcStaticRouteResource", new()
    {
        Context = new Nsxt.Inputs.VpcStaticRouteContextArgs
        {
            ProjectId = "string",
            VpcId = "string",
        },
        DisplayName = "string",
        Network = "string",
        NextHops = new[]
        {
            new Nsxt.Inputs.VpcStaticRouteNextHopArgs
            {
                AdminDistance = 0,
                IpAddress = "string",
            },
        },
        Description = "string",
        NsxId = "string",
        Tags = new[]
        {
            new Nsxt.Inputs.VpcStaticRouteTagArgs
            {
                Scope = "string",
                Tag = "string",
            },
        },
        VpcStaticRouteId = "string",
    });
    
    example, err := nsxt.NewVpcStaticRoute(ctx, "vpcStaticRouteResource", &nsxt.VpcStaticRouteArgs{
    	Context: &nsxt.VpcStaticRouteContextArgs{
    		ProjectId: pulumi.String("string"),
    		VpcId:     pulumi.String("string"),
    	},
    	DisplayName: pulumi.String("string"),
    	Network:     pulumi.String("string"),
    	NextHops: nsxt.VpcStaticRouteNextHopArray{
    		&nsxt.VpcStaticRouteNextHopArgs{
    			AdminDistance: pulumi.Float64(0),
    			IpAddress:     pulumi.String("string"),
    		},
    	},
    	Description: pulumi.String("string"),
    	NsxId:       pulumi.String("string"),
    	Tags: nsxt.VpcStaticRouteTagArray{
    		&nsxt.VpcStaticRouteTagArgs{
    			Scope: pulumi.String("string"),
    			Tag:   pulumi.String("string"),
    		},
    	},
    	VpcStaticRouteId: pulumi.String("string"),
    })
    
    var vpcStaticRouteResource = new VpcStaticRoute("vpcStaticRouteResource", VpcStaticRouteArgs.builder()
        .context(VpcStaticRouteContextArgs.builder()
            .projectId("string")
            .vpcId("string")
            .build())
        .displayName("string")
        .network("string")
        .nextHops(VpcStaticRouteNextHopArgs.builder()
            .adminDistance(0.0)
            .ipAddress("string")
            .build())
        .description("string")
        .nsxId("string")
        .tags(VpcStaticRouteTagArgs.builder()
            .scope("string")
            .tag("string")
            .build())
        .vpcStaticRouteId("string")
        .build());
    
    vpc_static_route_resource = nsxt.VpcStaticRoute("vpcStaticRouteResource",
        context={
            "project_id": "string",
            "vpc_id": "string",
        },
        display_name="string",
        network="string",
        next_hops=[{
            "admin_distance": 0,
            "ip_address": "string",
        }],
        description="string",
        nsx_id="string",
        tags=[{
            "scope": "string",
            "tag": "string",
        }],
        vpc_static_route_id="string")
    
    const vpcStaticRouteResource = new nsxt.VpcStaticRoute("vpcStaticRouteResource", {
        context: {
            projectId: "string",
            vpcId: "string",
        },
        displayName: "string",
        network: "string",
        nextHops: [{
            adminDistance: 0,
            ipAddress: "string",
        }],
        description: "string",
        nsxId: "string",
        tags: [{
            scope: "string",
            tag: "string",
        }],
        vpcStaticRouteId: "string",
    });
    
    type: nsxt:VpcStaticRoute
    properties:
        context:
            projectId: string
            vpcId: string
        description: string
        displayName: string
        network: string
        nextHops:
            - adminDistance: 0
              ipAddress: string
        nsxId: string
        tags:
            - scope: string
              tag: string
        vpcStaticRouteId: string
    

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

    Context VpcStaticRouteContext
    Resource context
    DisplayName string
    Display name for this resource
    Network string
    NextHops List<VpcStaticRouteNextHop>
    Description string
    Description for this resource
    NsxId string
    NSX ID for this resource
    Tags List<VpcStaticRouteTag>
    Set of opaque identifiers meaningful to the user
    VpcStaticRouteId string
    Context VpcStaticRouteContextArgs
    Resource context
    DisplayName string
    Display name for this resource
    Network string
    NextHops []VpcStaticRouteNextHopArgs
    Description string
    Description for this resource
    NsxId string
    NSX ID for this resource
    Tags []VpcStaticRouteTagArgs
    Set of opaque identifiers meaningful to the user
    VpcStaticRouteId string
    context VpcStaticRouteContext
    Resource context
    displayName String
    Display name for this resource
    network String
    nextHops List<VpcStaticRouteNextHop>
    description String
    Description for this resource
    nsxId String
    NSX ID for this resource
    tags List<VpcStaticRouteTag>
    Set of opaque identifiers meaningful to the user
    vpcStaticRouteId String
    context VpcStaticRouteContext
    Resource context
    displayName string
    Display name for this resource
    network string
    nextHops VpcStaticRouteNextHop[]
    description string
    Description for this resource
    nsxId string
    NSX ID for this resource
    tags VpcStaticRouteTag[]
    Set of opaque identifiers meaningful to the user
    vpcStaticRouteId string
    context VpcStaticRouteContextArgs
    Resource context
    display_name str
    Display name for this resource
    network str
    next_hops Sequence[VpcStaticRouteNextHopArgs]
    description str
    Description for this resource
    nsx_id str
    NSX ID for this resource
    tags Sequence[VpcStaticRouteTagArgs]
    Set of opaque identifiers meaningful to the user
    vpc_static_route_id str
    context Property Map
    Resource context
    displayName String
    Display name for this resource
    network String
    nextHops List<Property Map>
    description String
    Description for this resource
    nsxId String
    NSX ID for this resource
    tags List<Property Map>
    Set of opaque identifiers meaningful to the user
    vpcStaticRouteId String

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Path string
    Policy path for this resource
    Revision double
    The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected
    Id string
    The provider-assigned unique ID for this managed resource.
    Path string
    Policy path for this resource
    Revision float64
    The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected
    id String
    The provider-assigned unique ID for this managed resource.
    path String
    Policy path for this resource
    revision Double
    The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected
    id string
    The provider-assigned unique ID for this managed resource.
    path string
    Policy path for this resource
    revision number
    The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected
    id str
    The provider-assigned unique ID for this managed resource.
    path str
    Policy path for this resource
    revision float
    The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected
    id String
    The provider-assigned unique ID for this managed resource.
    path String
    Policy path for this resource
    revision Number
    The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected

    Look up Existing VpcStaticRoute Resource

    Get an existing VpcStaticRoute 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?: VpcStaticRouteState, opts?: CustomResourceOptions): VpcStaticRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            context: Optional[VpcStaticRouteContextArgs] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            network: Optional[str] = None,
            next_hops: Optional[Sequence[VpcStaticRouteNextHopArgs]] = None,
            nsx_id: Optional[str] = None,
            path: Optional[str] = None,
            revision: Optional[float] = None,
            tags: Optional[Sequence[VpcStaticRouteTagArgs]] = None,
            vpc_static_route_id: Optional[str] = None) -> VpcStaticRoute
    func GetVpcStaticRoute(ctx *Context, name string, id IDInput, state *VpcStaticRouteState, opts ...ResourceOption) (*VpcStaticRoute, error)
    public static VpcStaticRoute Get(string name, Input<string> id, VpcStaticRouteState? state, CustomResourceOptions? opts = null)
    public static VpcStaticRoute get(String name, Output<String> id, VpcStaticRouteState state, CustomResourceOptions options)
    resources:  _:    type: nsxt:VpcStaticRoute    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:
    Context VpcStaticRouteContext
    Resource context
    Description string
    Description for this resource
    DisplayName string
    Display name for this resource
    Network string
    NextHops List<VpcStaticRouteNextHop>
    NsxId string
    NSX ID for this resource
    Path string
    Policy path for this resource
    Revision double
    The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected
    Tags List<VpcStaticRouteTag>
    Set of opaque identifiers meaningful to the user
    VpcStaticRouteId string
    Context VpcStaticRouteContextArgs
    Resource context
    Description string
    Description for this resource
    DisplayName string
    Display name for this resource
    Network string
    NextHops []VpcStaticRouteNextHopArgs
    NsxId string
    NSX ID for this resource
    Path string
    Policy path for this resource
    Revision float64
    The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected
    Tags []VpcStaticRouteTagArgs
    Set of opaque identifiers meaningful to the user
    VpcStaticRouteId string
    context VpcStaticRouteContext
    Resource context
    description String
    Description for this resource
    displayName String
    Display name for this resource
    network String
    nextHops List<VpcStaticRouteNextHop>
    nsxId String
    NSX ID for this resource
    path String
    Policy path for this resource
    revision Double
    The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected
    tags List<VpcStaticRouteTag>
    Set of opaque identifiers meaningful to the user
    vpcStaticRouteId String
    context VpcStaticRouteContext
    Resource context
    description string
    Description for this resource
    displayName string
    Display name for this resource
    network string
    nextHops VpcStaticRouteNextHop[]
    nsxId string
    NSX ID for this resource
    path string
    Policy path for this resource
    revision number
    The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected
    tags VpcStaticRouteTag[]
    Set of opaque identifiers meaningful to the user
    vpcStaticRouteId string
    context VpcStaticRouteContextArgs
    Resource context
    description str
    Description for this resource
    display_name str
    Display name for this resource
    network str
    next_hops Sequence[VpcStaticRouteNextHopArgs]
    nsx_id str
    NSX ID for this resource
    path str
    Policy path for this resource
    revision float
    The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected
    tags Sequence[VpcStaticRouteTagArgs]
    Set of opaque identifiers meaningful to the user
    vpc_static_route_id str
    context Property Map
    Resource context
    description String
    Description for this resource
    displayName String
    Display name for this resource
    network String
    nextHops List<Property Map>
    nsxId String
    NSX ID for this resource
    path String
    Policy path for this resource
    revision Number
    The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected
    tags List<Property Map>
    Set of opaque identifiers meaningful to the user
    vpcStaticRouteId String

    Supporting Types

    VpcStaticRouteContext, VpcStaticRouteContextArgs

    ProjectId string
    Id of the project which the resource belongs to.
    VpcId string
    Id of the VPC which the resource belongs to.
    ProjectId string
    Id of the project which the resource belongs to.
    VpcId string
    Id of the VPC which the resource belongs to.
    projectId String
    Id of the project which the resource belongs to.
    vpcId String
    Id of the VPC which the resource belongs to.
    projectId string
    Id of the project which the resource belongs to.
    vpcId string
    Id of the VPC which the resource belongs to.
    project_id str
    Id of the project which the resource belongs to.
    vpc_id str
    Id of the VPC which the resource belongs to.
    projectId String
    Id of the project which the resource belongs to.
    vpcId String
    Id of the VPC which the resource belongs to.

    VpcStaticRouteNextHop, VpcStaticRouteNextHopArgs

    AdminDistance float64
    IpAddress string

    VpcStaticRouteTag, VpcStaticRouteTagArgs

    Scope string
    Tag string
    Scope string
    Tag string
    scope String
    tag String
    scope string
    tag string
    scope str
    tag str
    scope String
    tag String

    Package Details

    Repository
    nsxt vmware/terraform-provider-nsxt
    License
    Notes
    This Pulumi package is based on the nsxt Terraform Provider.
    nsxt logo
    nsxt 3.9.0 published on Friday, Jun 20, 2025 by vmware