nsxt.PolicyL2VpnService
Explore with Pulumi AI
Create PolicyL2VpnService Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PolicyL2VpnService(name: string, args: PolicyL2VpnServiceArgs, opts?: CustomResourceOptions);
@overload
def PolicyL2VpnService(resource_name: str,
args: PolicyL2VpnServiceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PolicyL2VpnService(resource_name: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
description: Optional[str] = None,
enable_hub: Optional[bool] = None,
encap_ip_pools: Optional[Sequence[str]] = None,
gateway_path: Optional[str] = None,
locale_service_path: Optional[str] = None,
mode: Optional[str] = None,
nsx_id: Optional[str] = None,
policy_l2_vpn_service_id: Optional[str] = None,
tags: Optional[Sequence[PolicyL2VpnServiceTagArgs]] = None)
func NewPolicyL2VpnService(ctx *Context, name string, args PolicyL2VpnServiceArgs, opts ...ResourceOption) (*PolicyL2VpnService, error)
public PolicyL2VpnService(string name, PolicyL2VpnServiceArgs args, CustomResourceOptions? opts = null)
public PolicyL2VpnService(String name, PolicyL2VpnServiceArgs args)
public PolicyL2VpnService(String name, PolicyL2VpnServiceArgs args, CustomResourceOptions options)
type: nsxt:PolicyL2VpnService
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 PolicyL2VpnServiceArgs
- 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 PolicyL2VpnServiceArgs
- 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 PolicyL2VpnServiceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicyL2VpnServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PolicyL2VpnServiceArgs
- 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 policyL2VpnServiceResource = new Nsxt.PolicyL2VpnService("policyL2VpnServiceResource", new()
{
DisplayName = "string",
Description = "string",
EnableHub = false,
EncapIpPools = new[]
{
"string",
},
GatewayPath = "string",
Mode = "string",
NsxId = "string",
PolicyL2VpnServiceId = "string",
Tags = new[]
{
new Nsxt.Inputs.PolicyL2VpnServiceTagArgs
{
Scope = "string",
Tag = "string",
},
},
});
example, err := nsxt.NewPolicyL2VpnService(ctx, "policyL2VpnServiceResource", &nsxt.PolicyL2VpnServiceArgs{
DisplayName: pulumi.String("string"),
Description: pulumi.String("string"),
EnableHub: pulumi.Bool(false),
EncapIpPools: pulumi.StringArray{
pulumi.String("string"),
},
GatewayPath: pulumi.String("string"),
Mode: pulumi.String("string"),
NsxId: pulumi.String("string"),
PolicyL2VpnServiceId: pulumi.String("string"),
Tags: nsxt.PolicyL2VpnServiceTagArray{
&nsxt.PolicyL2VpnServiceTagArgs{
Scope: pulumi.String("string"),
Tag: pulumi.String("string"),
},
},
})
var policyL2VpnServiceResource = new PolicyL2VpnService("policyL2VpnServiceResource", PolicyL2VpnServiceArgs.builder()
.displayName("string")
.description("string")
.enableHub(false)
.encapIpPools("string")
.gatewayPath("string")
.mode("string")
.nsxId("string")
.policyL2VpnServiceId("string")
.tags(PolicyL2VpnServiceTagArgs.builder()
.scope("string")
.tag("string")
.build())
.build());
policy_l2_vpn_service_resource = nsxt.PolicyL2VpnService("policyL2VpnServiceResource",
display_name="string",
description="string",
enable_hub=False,
encap_ip_pools=["string"],
gateway_path="string",
mode="string",
nsx_id="string",
policy_l2_vpn_service_id="string",
tags=[{
"scope": "string",
"tag": "string",
}])
const policyL2VpnServiceResource = new nsxt.PolicyL2VpnService("policyL2VpnServiceResource", {
displayName: "string",
description: "string",
enableHub: false,
encapIpPools: ["string"],
gatewayPath: "string",
mode: "string",
nsxId: "string",
policyL2VpnServiceId: "string",
tags: [{
scope: "string",
tag: "string",
}],
});
type: nsxt:PolicyL2VpnService
properties:
description: string
displayName: string
enableHub: false
encapIpPools:
- string
gatewayPath: string
mode: string
nsxId: string
policyL2VpnServiceId: string
tags:
- scope: string
tag: string
PolicyL2VpnService 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 PolicyL2VpnService resource accepts the following input properties:
- Display
Name string - Display name of the resource.
- Description string
- Description of the resource.
- Enable
Hub bool - This property applies only in
SERVER
mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default istrue
. - Encap
Ip List<string>Pools - IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
- Gateway
Path string - Path of gateway associated with the L2 VPN Service. Note that at least one of
gateway_path
andlocale_service_path
must be specified for the L2 VPN Service object. - Locale
Service stringPath - Path of the locale service associated with the L2 VPN Service.
- Mode string
- Specify an L2VPN service mode as SERVER or CLIENT. Value is one of
SERVER
,CLIENT
. Default isSERVER
. - Nsx
Id string - The NSX ID of this resource. If set, this ID will be used to create the resource.
- Policy
L2Vpn stringService Id - ID of the resource.
- List<Policy
L2Vpn Service Tag> - A list of scope + tag pairs to associate with this resource.
- Display
Name string - Display name of the resource.
- Description string
- Description of the resource.
- Enable
Hub bool - This property applies only in
SERVER
mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default istrue
. - Encap
Ip []stringPools - IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
- Gateway
Path string - Path of gateway associated with the L2 VPN Service. Note that at least one of
gateway_path
andlocale_service_path
must be specified for the L2 VPN Service object. - Locale
Service stringPath - Path of the locale service associated with the L2 VPN Service.
- Mode string
- Specify an L2VPN service mode as SERVER or CLIENT. Value is one of
SERVER
,CLIENT
. Default isSERVER
. - Nsx
Id string - The NSX ID of this resource. If set, this ID will be used to create the resource.
- Policy
L2Vpn stringService Id - ID of the resource.
- []Policy
L2Vpn Service Tag Args - A list of scope + tag pairs to associate with this resource.
- display
Name String - Display name of the resource.
- description String
- Description of the resource.
- enable
Hub Boolean - This property applies only in
SERVER
mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default istrue
. - encap
Ip List<String>Pools - IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
- gateway
Path String - Path of gateway associated with the L2 VPN Service. Note that at least one of
gateway_path
andlocale_service_path
must be specified for the L2 VPN Service object. - locale
Service StringPath - Path of the locale service associated with the L2 VPN Service.
- mode String
- Specify an L2VPN service mode as SERVER or CLIENT. Value is one of
SERVER
,CLIENT
. Default isSERVER
. - nsx
Id String - The NSX ID of this resource. If set, this ID will be used to create the resource.
- policy
L2Vpn StringService Id - ID of the resource.
- List<Policy
L2Vpn Service Tag> - A list of scope + tag pairs to associate with this resource.
- display
Name string - Display name of the resource.
- description string
- Description of the resource.
- enable
Hub boolean - This property applies only in
SERVER
mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default istrue
. - encap
Ip string[]Pools - IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
- gateway
Path string - Path of gateway associated with the L2 VPN Service. Note that at least one of
gateway_path
andlocale_service_path
must be specified for the L2 VPN Service object. - locale
Service stringPath - Path of the locale service associated with the L2 VPN Service.
- mode string
- Specify an L2VPN service mode as SERVER or CLIENT. Value is one of
SERVER
,CLIENT
. Default isSERVER
. - nsx
Id string - The NSX ID of this resource. If set, this ID will be used to create the resource.
- policy
L2Vpn stringService Id - ID of the resource.
- Policy
L2Vpn Service Tag[] - A list of scope + tag pairs to associate with this resource.
- display_
name str - Display name of the resource.
- description str
- Description of the resource.
- enable_
hub bool - This property applies only in
SERVER
mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default istrue
. - encap_
ip_ Sequence[str]pools - IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
- gateway_
path str - Path of gateway associated with the L2 VPN Service. Note that at least one of
gateway_path
andlocale_service_path
must be specified for the L2 VPN Service object. - locale_
service_ strpath - Path of the locale service associated with the L2 VPN Service.
- mode str
- Specify an L2VPN service mode as SERVER or CLIENT. Value is one of
SERVER
,CLIENT
. Default isSERVER
. - nsx_
id str - The NSX ID of this resource. If set, this ID will be used to create the resource.
- policy_
l2_ strvpn_ service_ id - ID of the resource.
- Sequence[Policy
L2Vpn Service Tag Args] - A list of scope + tag pairs to associate with this resource.
- display
Name String - Display name of the resource.
- description String
- Description of the resource.
- enable
Hub Boolean - This property applies only in
SERVER
mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default istrue
. - encap
Ip List<String>Pools - IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
- gateway
Path String - Path of gateway associated with the L2 VPN Service. Note that at least one of
gateway_path
andlocale_service_path
must be specified for the L2 VPN Service object. - locale
Service StringPath - Path of the locale service associated with the L2 VPN Service.
- mode String
- Specify an L2VPN service mode as SERVER or CLIENT. Value is one of
SERVER
,CLIENT
. Default isSERVER
. - nsx
Id String - The NSX ID of this resource. If set, this ID will be used to create the resource.
- policy
L2Vpn StringService Id - ID of the resource.
- 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 PolicyL2VpnService resource produces the following output properties:
Look up Existing PolicyL2VpnService Resource
Get an existing PolicyL2VpnService 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?: PolicyL2VpnServiceState, opts?: CustomResourceOptions): PolicyL2VpnService
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
enable_hub: Optional[bool] = None,
encap_ip_pools: Optional[Sequence[str]] = None,
gateway_path: Optional[str] = None,
locale_service_path: Optional[str] = None,
mode: Optional[str] = None,
nsx_id: Optional[str] = None,
path: Optional[str] = None,
policy_l2_vpn_service_id: Optional[str] = None,
revision: Optional[float] = None,
tags: Optional[Sequence[PolicyL2VpnServiceTagArgs]] = None) -> PolicyL2VpnService
func GetPolicyL2VpnService(ctx *Context, name string, id IDInput, state *PolicyL2VpnServiceState, opts ...ResourceOption) (*PolicyL2VpnService, error)
public static PolicyL2VpnService Get(string name, Input<string> id, PolicyL2VpnServiceState? state, CustomResourceOptions? opts = null)
public static PolicyL2VpnService get(String name, Output<String> id, PolicyL2VpnServiceState state, CustomResourceOptions options)
resources: _: type: nsxt:PolicyL2VpnService 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.
- Description string
- Description of the resource.
- Display
Name string - Display name of the resource.
- Enable
Hub bool - This property applies only in
SERVER
mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default istrue
. - Encap
Ip List<string>Pools - IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
- Gateway
Path string - Path of gateway associated with the L2 VPN Service. Note that at least one of
gateway_path
andlocale_service_path
must be specified for the L2 VPN Service object. - Locale
Service stringPath - Path of the locale service associated with the L2 VPN Service.
- Mode string
- Specify an L2VPN service mode as SERVER or CLIENT. Value is one of
SERVER
,CLIENT
. Default isSERVER
. - Nsx
Id string - The NSX ID of this resource. If set, this ID will be used to create the resource.
- Path string
- The NSX path of the policy resource.
- Policy
L2Vpn stringService Id - 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.
- List<Policy
L2Vpn Service Tag> - 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.
- Enable
Hub bool - This property applies only in
SERVER
mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default istrue
. - Encap
Ip []stringPools - IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
- Gateway
Path string - Path of gateway associated with the L2 VPN Service. Note that at least one of
gateway_path
andlocale_service_path
must be specified for the L2 VPN Service object. - Locale
Service stringPath - Path of the locale service associated with the L2 VPN Service.
- Mode string
- Specify an L2VPN service mode as SERVER or CLIENT. Value is one of
SERVER
,CLIENT
. Default isSERVER
. - Nsx
Id string - The NSX ID of this resource. If set, this ID will be used to create the resource.
- Path string
- The NSX path of the policy resource.
- Policy
L2Vpn stringService Id - 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.
- []Policy
L2Vpn Service Tag Args - 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.
- enable
Hub Boolean - This property applies only in
SERVER
mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default istrue
. - encap
Ip List<String>Pools - IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
- gateway
Path String - Path of gateway associated with the L2 VPN Service. Note that at least one of
gateway_path
andlocale_service_path
must be specified for the L2 VPN Service object. - locale
Service StringPath - Path of the locale service associated with the L2 VPN Service.
- mode String
- Specify an L2VPN service mode as SERVER or CLIENT. Value is one of
SERVER
,CLIENT
. Default isSERVER
. - nsx
Id String - The NSX ID of this resource. If set, this ID will be used to create the resource.
- path String
- The NSX path of the policy resource.
- policy
L2Vpn StringService Id - 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.
- List<Policy
L2Vpn Service Tag> - 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.
- enable
Hub boolean - This property applies only in
SERVER
mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default istrue
. - encap
Ip string[]Pools - IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
- gateway
Path string - Path of gateway associated with the L2 VPN Service. Note that at least one of
gateway_path
andlocale_service_path
must be specified for the L2 VPN Service object. - locale
Service stringPath - Path of the locale service associated with the L2 VPN Service.
- mode string
- Specify an L2VPN service mode as SERVER or CLIENT. Value is one of
SERVER
,CLIENT
. Default isSERVER
. - nsx
Id string - The NSX ID of this resource. If set, this ID will be used to create the resource.
- path string
- The NSX path of the policy resource.
- policy
L2Vpn stringService Id - 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.
- Policy
L2Vpn Service Tag[] - 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.
- enable_
hub bool - This property applies only in
SERVER
mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default istrue
. - encap_
ip_ Sequence[str]pools - IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
- gateway_
path str - Path of gateway associated with the L2 VPN Service. Note that at least one of
gateway_path
andlocale_service_path
must be specified for the L2 VPN Service object. - locale_
service_ strpath - Path of the locale service associated with the L2 VPN Service.
- mode str
- Specify an L2VPN service mode as SERVER or CLIENT. Value is one of
SERVER
,CLIENT
. Default isSERVER
. - nsx_
id str - The NSX ID of this resource. If set, this ID will be used to create the resource.
- path str
- The NSX path of the policy resource.
- policy_
l2_ strvpn_ service_ id - 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.
- Sequence[Policy
L2Vpn Service Tag Args] - 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.
- enable
Hub Boolean - This property applies only in
SERVER
mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default istrue
. - encap
Ip List<String>Pools - IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
- gateway
Path String - Path of gateway associated with the L2 VPN Service. Note that at least one of
gateway_path
andlocale_service_path
must be specified for the L2 VPN Service object. - locale
Service StringPath - Path of the locale service associated with the L2 VPN Service.
- mode String
- Specify an L2VPN service mode as SERVER or CLIENT. Value is one of
SERVER
,CLIENT
. Default isSERVER
. - nsx
Id String - The NSX ID of this resource. If set, this ID will be used to create the resource.
- path String
- The NSX path of the policy resource.
- policy
L2Vpn StringService Id - 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.
- List<Property Map>
- A list of scope + tag pairs to associate with this resource.
Supporting Types
PolicyL2VpnServiceTag, PolicyL2VpnServiceTagArgs
Package Details
- Repository
- nsxt vmware/terraform-provider-nsxt
- License
- Notes
- This Pulumi package is based on the
nsxt
Terraform Provider.