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 string
- The unique name of the resource.
- args PolicyStaticRouteArgs
- 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 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 string
- The unique name of the resource.
- args PolicyStaticRouteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicyStaticRouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
},
},
});
example, err := nsxt.NewPolicyStaticRoute(ctx, "policyStaticRouteResource", &nsxt.PolicyStaticRouteArgs{
DisplayName: pulumi.String("string"),
GatewayPath: pulumi.String("string"),
Network: pulumi.String("string"),
NextHops: nsxt.PolicyStaticRouteNextHopArray{
&nsxt.PolicyStaticRouteNextHopArgs{
AdminDistance: pulumi.Float64(0),
Interface: pulumi.String("string"),
IpAddress: pulumi.String("string"),
},
},
Context: &nsxt.PolicyStaticRouteContextArgs{
ProjectId: pulumi.String("string"),
},
Description: pulumi.String("string"),
NsxId: pulumi.String("string"),
PolicyStaticRouteId: pulumi.String("string"),
Tags: nsxt.PolicyStaticRouteTagArray{
&nsxt.PolicyStaticRouteTagArgs{
Scope: pulumi.String("string"),
Tag: pulumi.String("string"),
},
},
})
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());
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",
}])
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",
}],
});
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
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:
- Display
Name string - Display name of the resource.
- Gateway
Path 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.
- Next
Hops List<PolicyStatic Route Next Hop> - One or more next hops for the static route.
- Context
Policy
Static Route Context - The context which the object belongs to
- Description string
- Description of the resource.
- Nsx
Id string - The NSX ID of this resource. If set, this ID will be used to create the policy resource.
- Policy
Static stringRoute Id - List<Policy
Static Route Tag> - A list of scope + tag pairs to associate with this Tier-0 gateway.
- Display
Name string - Display name of the resource.
- Gateway
Path 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.
- Next
Hops []PolicyStatic Route Next Hop Args - One or more next hops for the static route.
- Context
Policy
Static Route Context Args - The context which the object belongs to
- Description string
- Description of the resource.
- Nsx
Id string - The NSX ID of this resource. If set, this ID will be used to create the policy resource.
- Policy
Static stringRoute Id - []Policy
Static Route Tag Args - A list of scope + tag pairs to associate with this Tier-0 gateway.
- display
Name String - Display name of the resource.
- gateway
Path 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.
- next
Hops List<PolicyStatic Route Next Hop> - One or more next hops for the static route.
- context
Policy
Static Route Context - The context which the object belongs to
- description String
- Description of the resource.
- nsx
Id String - The NSX ID of this resource. If set, this ID will be used to create the policy resource.
- policy
Static StringRoute Id - List<Policy
Static Route Tag> - A list of scope + tag pairs to associate with this Tier-0 gateway.
- display
Name string - Display name of the resource.
- gateway
Path 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.
- next
Hops PolicyStatic Route Next Hop[] - One or more next hops for the static route.
- context
Policy
Static Route Context - The context which the object belongs to
- description string
- Description of the resource.
- nsx
Id string - The NSX ID of this resource. If set, this ID will be used to create the policy resource.
- policy
Static stringRoute Id - Policy
Static Route Tag[] - A list of scope + tag pairs to associate with this Tier-0 gateway.
- 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[PolicyStatic Route Next Hop Args] - One or more next hops for the static route.
- context
Policy
Static Route Context Args - 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_ strroute_ id - Sequence[Policy
Static Route Tag Args] - A list of scope + tag pairs to associate with this Tier-0 gateway.
- display
Name String - Display name of the resource.
- gateway
Path 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.
- next
Hops 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.
- nsx
Id String - The NSX ID of this resource. If set, this ID will be used to create the policy resource.
- policy
Static StringRoute Id - 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:
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
- 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.
- Context
Policy
Static Route Context - The context which the object belongs to
- Description string
- Description of the resource.
- Display
Name string - Display name of the resource.
- Gateway
Path 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.
- Next
Hops List<PolicyStatic Route Next Hop> - One or more next hops for the static route.
- Nsx
Id 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.
- Policy
Static stringRoute Id - Revision double
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- List<Policy
Static Route Tag> - A list of scope + tag pairs to associate with this Tier-0 gateway.
- Context
Policy
Static Route Context Args - The context which the object belongs to
- Description string
- Description of the resource.
- Display
Name string - Display name of the resource.
- Gateway
Path 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.
- Next
Hops []PolicyStatic Route Next Hop Args - One or more next hops for the static route.
- Nsx
Id 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.
- Policy
Static stringRoute Id - Revision float64
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- []Policy
Static Route Tag Args - A list of scope + tag pairs to associate with this Tier-0 gateway.
- context
Policy
Static Route Context - The context which the object belongs to
- description String
- Description of the resource.
- display
Name String - Display name of the resource.
- gateway
Path 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.
- next
Hops List<PolicyStatic Route Next Hop> - One or more next hops for the static route.
- nsx
Id 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.
- policy
Static StringRoute Id - revision Double
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- List<Policy
Static Route Tag> - A list of scope + tag pairs to associate with this Tier-0 gateway.
- context
Policy
Static Route Context - The context which the object belongs to
- description string
- Description of the resource.
- display
Name string - Display name of the resource.
- gateway
Path 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.
- next
Hops PolicyStatic Route Next Hop[] - One or more next hops for the static route.
- nsx
Id 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.
- policy
Static stringRoute Id - revision number
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- Policy
Static Route Tag[] - A list of scope + tag pairs to associate with this Tier-0 gateway.
- context
Policy
Static Route Context Args - 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[PolicyStatic Route Next Hop Args] - 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_ strroute_ id - revision float
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- Sequence[Policy
Static Route Tag Args] - 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.
- display
Name String - Display name of the resource.
- gateway
Path 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.
- next
Hops List<Property Map> - One or more next hops for the static route.
- nsx
Id 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.
- policy
Static StringRoute Id - revision Number
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- List<Property Map>
- A list of scope + tag pairs to associate with this Tier-0 gateway.
Supporting Types
PolicyStaticRouteContext, PolicyStaticRouteContextArgs
- Project
Id string - The ID of the project which the object belongs to
- Project
Id string - The ID of the project which the object belongs to
- project
Id String - The ID of the project which the object belongs to
- project
Id string - The ID of the project which the object belongs to
- project_
id str - The ID of the project which the object belongs to
- project
Id String - The ID of the project which the object belongs to
PolicyStaticRouteNextHop, PolicyStaticRouteNextHopArgs
- Admin
Distance 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.
- Ip
Address string - The gateway address of the next hop.
- Admin
Distance 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.
- Ip
Address string - The gateway address of the next hop.
- admin
Distance 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.
- ip
Address String - The gateway address of the next hop.
- admin
Distance 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.
- ip
Address 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.
- admin
Distance 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.
- ip
Address String - The gateway address of the next hop.
PolicyStaticRouteTag, PolicyStaticRouteTagArgs
Package Details
- Repository
- nsxt vmware/terraform-provider-nsxt
- License
- Notes
- This Pulumi package is based on the
nsxt
Terraform Provider.