nsxt.VlanLogicalSwitch
Explore with Pulumi AI
Create VlanLogicalSwitch Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VlanLogicalSwitch(name: string, args: VlanLogicalSwitchArgs, opts?: CustomResourceOptions);
@overload
def VlanLogicalSwitch(resource_name: str,
args: VlanLogicalSwitchArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VlanLogicalSwitch(resource_name: str,
opts: Optional[ResourceOptions] = None,
transport_zone_id: Optional[str] = None,
vlan: Optional[float] = None,
address_bindings: Optional[Sequence[VlanLogicalSwitchAddressBindingArgs]] = None,
admin_state: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
ip_pool_id: Optional[str] = None,
mac_pool_id: Optional[str] = None,
switching_profile_ids: Optional[Sequence[VlanLogicalSwitchSwitchingProfileIdArgs]] = None,
tags: Optional[Sequence[VlanLogicalSwitchTagArgs]] = None,
vlan_logical_switch_id: Optional[str] = None)
func NewVlanLogicalSwitch(ctx *Context, name string, args VlanLogicalSwitchArgs, opts ...ResourceOption) (*VlanLogicalSwitch, error)
public VlanLogicalSwitch(string name, VlanLogicalSwitchArgs args, CustomResourceOptions? opts = null)
public VlanLogicalSwitch(String name, VlanLogicalSwitchArgs args)
public VlanLogicalSwitch(String name, VlanLogicalSwitchArgs args, CustomResourceOptions options)
type: nsxt:VlanLogicalSwitch
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 VlanLogicalSwitchArgs
- 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 VlanLogicalSwitchArgs
- 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 VlanLogicalSwitchArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VlanLogicalSwitchArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VlanLogicalSwitchArgs
- 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 vlanLogicalSwitchResource = new Nsxt.VlanLogicalSwitch("vlanLogicalSwitchResource", new()
{
TransportZoneId = "string",
Vlan = 0,
AddressBindings = new[]
{
new Nsxt.Inputs.VlanLogicalSwitchAddressBindingArgs
{
IpAddress = "string",
MacAddress = "string",
Vlan = 0,
},
},
AdminState = "string",
Description = "string",
DisplayName = "string",
IpPoolId = "string",
MacPoolId = "string",
SwitchingProfileIds = new[]
{
new Nsxt.Inputs.VlanLogicalSwitchSwitchingProfileIdArgs
{
Key = "string",
Value = "string",
},
},
Tags = new[]
{
new Nsxt.Inputs.VlanLogicalSwitchTagArgs
{
Scope = "string",
Tag = "string",
},
},
VlanLogicalSwitchId = "string",
});
example, err := nsxt.NewVlanLogicalSwitch(ctx, "vlanLogicalSwitchResource", &nsxt.VlanLogicalSwitchArgs{
TransportZoneId: pulumi.String("string"),
Vlan: pulumi.Float64(0),
AddressBindings: nsxt.VlanLogicalSwitchAddressBindingArray{
&nsxt.VlanLogicalSwitchAddressBindingArgs{
IpAddress: pulumi.String("string"),
MacAddress: pulumi.String("string"),
Vlan: pulumi.Float64(0),
},
},
AdminState: pulumi.String("string"),
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
IpPoolId: pulumi.String("string"),
MacPoolId: pulumi.String("string"),
SwitchingProfileIds: nsxt.VlanLogicalSwitchSwitchingProfileIdArray{
&nsxt.VlanLogicalSwitchSwitchingProfileIdArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Tags: nsxt.VlanLogicalSwitchTagArray{
&nsxt.VlanLogicalSwitchTagArgs{
Scope: pulumi.String("string"),
Tag: pulumi.String("string"),
},
},
VlanLogicalSwitchId: pulumi.String("string"),
})
var vlanLogicalSwitchResource = new VlanLogicalSwitch("vlanLogicalSwitchResource", VlanLogicalSwitchArgs.builder()
.transportZoneId("string")
.vlan(0)
.addressBindings(VlanLogicalSwitchAddressBindingArgs.builder()
.ipAddress("string")
.macAddress("string")
.vlan(0)
.build())
.adminState("string")
.description("string")
.displayName("string")
.ipPoolId("string")
.macPoolId("string")
.switchingProfileIds(VlanLogicalSwitchSwitchingProfileIdArgs.builder()
.key("string")
.value("string")
.build())
.tags(VlanLogicalSwitchTagArgs.builder()
.scope("string")
.tag("string")
.build())
.vlanLogicalSwitchId("string")
.build());
vlan_logical_switch_resource = nsxt.VlanLogicalSwitch("vlanLogicalSwitchResource",
transport_zone_id="string",
vlan=0,
address_bindings=[{
"ip_address": "string",
"mac_address": "string",
"vlan": 0,
}],
admin_state="string",
description="string",
display_name="string",
ip_pool_id="string",
mac_pool_id="string",
switching_profile_ids=[{
"key": "string",
"value": "string",
}],
tags=[{
"scope": "string",
"tag": "string",
}],
vlan_logical_switch_id="string")
const vlanLogicalSwitchResource = new nsxt.VlanLogicalSwitch("vlanLogicalSwitchResource", {
transportZoneId: "string",
vlan: 0,
addressBindings: [{
ipAddress: "string",
macAddress: "string",
vlan: 0,
}],
adminState: "string",
description: "string",
displayName: "string",
ipPoolId: "string",
macPoolId: "string",
switchingProfileIds: [{
key: "string",
value: "string",
}],
tags: [{
scope: "string",
tag: "string",
}],
vlanLogicalSwitchId: "string",
});
type: nsxt:VlanLogicalSwitch
properties:
addressBindings:
- ipAddress: string
macAddress: string
vlan: 0
adminState: string
description: string
displayName: string
ipPoolId: string
macPoolId: string
switchingProfileIds:
- key: string
value: string
tags:
- scope: string
tag: string
transportZoneId: string
vlan: 0
vlanLogicalSwitchId: string
VlanLogicalSwitch 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 VlanLogicalSwitch resource accepts the following input properties:
- Transport
Zone stringId - Transport Zone ID for the logical switch.
- Vlan double
- Vlan for the logical switch.
- Address
Bindings List<VlanLogical Switch Address Binding> - List of Address Bindings for the logical switch. This setting allows to provide bindings between IP address, mac Address and vlan.
- Admin
State string - Admin state for the logical switch. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- Description string
- Description of the resource.
- Display
Name string - Display name, defaults to ID if not set.
- Ip
Pool stringId - Ip Pool ID to be associated with the logical switch.
- Mac
Pool stringId - Mac Pool ID to be associated with the logical switch.
- Switching
Profile List<VlanIds Logical Switch Switching Profile Id> - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- List<Vlan
Logical Switch Tag> - A list of scope + tag pairs to associate with this logical switch.
- Vlan
Logical stringSwitch Id - ID of the logical switch.
- Transport
Zone stringId - Transport Zone ID for the logical switch.
- Vlan float64
- Vlan for the logical switch.
- Address
Bindings []VlanLogical Switch Address Binding Args - List of Address Bindings for the logical switch. This setting allows to provide bindings between IP address, mac Address and vlan.
- Admin
State string - Admin state for the logical switch. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- Description string
- Description of the resource.
- Display
Name string - Display name, defaults to ID if not set.
- Ip
Pool stringId - Ip Pool ID to be associated with the logical switch.
- Mac
Pool stringId - Mac Pool ID to be associated with the logical switch.
- Switching
Profile []VlanIds Logical Switch Switching Profile Id Args - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- []Vlan
Logical Switch Tag Args - A list of scope + tag pairs to associate with this logical switch.
- Vlan
Logical stringSwitch Id - ID of the logical switch.
- transport
Zone StringId - Transport Zone ID for the logical switch.
- vlan Double
- Vlan for the logical switch.
- address
Bindings List<VlanLogical Switch Address Binding> - List of Address Bindings for the logical switch. This setting allows to provide bindings between IP address, mac Address and vlan.
- admin
State String - Admin state for the logical switch. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description String
- Description of the resource.
- display
Name String - Display name, defaults to ID if not set.
- ip
Pool StringId - Ip Pool ID to be associated with the logical switch.
- mac
Pool StringId - Mac Pool ID to be associated with the logical switch.
- switching
Profile List<VlanIds Logical Switch Switching Profile Id> - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- List<Vlan
Logical Switch Tag> - A list of scope + tag pairs to associate with this logical switch.
- vlan
Logical StringSwitch Id - ID of the logical switch.
- transport
Zone stringId - Transport Zone ID for the logical switch.
- vlan number
- Vlan for the logical switch.
- address
Bindings VlanLogical Switch Address Binding[] - List of Address Bindings for the logical switch. This setting allows to provide bindings between IP address, mac Address and vlan.
- admin
State string - Admin state for the logical switch. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description string
- Description of the resource.
- display
Name string - Display name, defaults to ID if not set.
- ip
Pool stringId - Ip Pool ID to be associated with the logical switch.
- mac
Pool stringId - Mac Pool ID to be associated with the logical switch.
- switching
Profile VlanIds Logical Switch Switching Profile Id[] - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- Vlan
Logical Switch Tag[] - A list of scope + tag pairs to associate with this logical switch.
- vlan
Logical stringSwitch Id - ID of the logical switch.
- transport_
zone_ strid - Transport Zone ID for the logical switch.
- vlan float
- Vlan for the logical switch.
- address_
bindings Sequence[VlanLogical Switch Address Binding Args] - List of Address Bindings for the logical switch. This setting allows to provide bindings between IP address, mac Address and vlan.
- admin_
state str - Admin state for the logical switch. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description str
- Description of the resource.
- display_
name str - Display name, defaults to ID if not set.
- ip_
pool_ strid - Ip Pool ID to be associated with the logical switch.
- mac_
pool_ strid - Mac Pool ID to be associated with the logical switch.
- switching_
profile_ Sequence[Vlanids Logical Switch Switching Profile Id Args] - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- Sequence[Vlan
Logical Switch Tag Args] - A list of scope + tag pairs to associate with this logical switch.
- vlan_
logical_ strswitch_ id - ID of the logical switch.
- transport
Zone StringId - Transport Zone ID for the logical switch.
- vlan Number
- Vlan for the logical switch.
- address
Bindings List<Property Map> - List of Address Bindings for the logical switch. This setting allows to provide bindings between IP address, mac Address and vlan.
- admin
State String - Admin state for the logical switch. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description String
- Description of the resource.
- display
Name String - Display name, defaults to ID if not set.
- ip
Pool StringId - Ip Pool ID to be associated with the logical switch.
- mac
Pool StringId - Mac Pool ID to be associated with the logical switch.
- switching
Profile List<Property Map>Ids - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- List<Property Map>
- A list of scope + tag pairs to associate with this logical switch.
- vlan
Logical StringSwitch Id - ID of the logical switch.
Outputs
All input properties are implicitly available as output properties. Additionally, the VlanLogicalSwitch resource produces the following output properties:
Look up Existing VlanLogicalSwitch Resource
Get an existing VlanLogicalSwitch 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?: VlanLogicalSwitchState, opts?: CustomResourceOptions): VlanLogicalSwitch
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address_bindings: Optional[Sequence[VlanLogicalSwitchAddressBindingArgs]] = None,
admin_state: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
ip_pool_id: Optional[str] = None,
mac_pool_id: Optional[str] = None,
revision: Optional[float] = None,
switching_profile_ids: Optional[Sequence[VlanLogicalSwitchSwitchingProfileIdArgs]] = None,
tags: Optional[Sequence[VlanLogicalSwitchTagArgs]] = None,
transport_zone_id: Optional[str] = None,
vlan: Optional[float] = None,
vlan_logical_switch_id: Optional[str] = None) -> VlanLogicalSwitch
func GetVlanLogicalSwitch(ctx *Context, name string, id IDInput, state *VlanLogicalSwitchState, opts ...ResourceOption) (*VlanLogicalSwitch, error)
public static VlanLogicalSwitch Get(string name, Input<string> id, VlanLogicalSwitchState? state, CustomResourceOptions? opts = null)
public static VlanLogicalSwitch get(String name, Output<String> id, VlanLogicalSwitchState state, CustomResourceOptions options)
resources: _: type: nsxt:VlanLogicalSwitch 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.
- Address
Bindings List<VlanLogical Switch Address Binding> - List of Address Bindings for the logical switch. This setting allows to provide bindings between IP address, mac Address and vlan.
- Admin
State string - Admin state for the logical switch. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- Description string
- Description of the resource.
- Display
Name string - Display name, defaults to ID if not set.
- Ip
Pool stringId - Ip Pool ID to be associated with the logical switch.
- Mac
Pool stringId - Mac Pool ID to be associated with the logical switch.
- Revision double
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- Switching
Profile List<VlanIds Logical Switch Switching Profile Id> - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- List<Vlan
Logical Switch Tag> - A list of scope + tag pairs to associate with this logical switch.
- Transport
Zone stringId - Transport Zone ID for the logical switch.
- Vlan double
- Vlan for the logical switch.
- Vlan
Logical stringSwitch Id - ID of the logical switch.
- Address
Bindings []VlanLogical Switch Address Binding Args - List of Address Bindings for the logical switch. This setting allows to provide bindings between IP address, mac Address and vlan.
- Admin
State string - Admin state for the logical switch. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- Description string
- Description of the resource.
- Display
Name string - Display name, defaults to ID if not set.
- Ip
Pool stringId - Ip Pool ID to be associated with the logical switch.
- Mac
Pool stringId - Mac Pool ID to be associated with the logical switch.
- Revision float64
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- Switching
Profile []VlanIds Logical Switch Switching Profile Id Args - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- []Vlan
Logical Switch Tag Args - A list of scope + tag pairs to associate with this logical switch.
- Transport
Zone stringId - Transport Zone ID for the logical switch.
- Vlan float64
- Vlan for the logical switch.
- Vlan
Logical stringSwitch Id - ID of the logical switch.
- address
Bindings List<VlanLogical Switch Address Binding> - List of Address Bindings for the logical switch. This setting allows to provide bindings between IP address, mac Address and vlan.
- admin
State String - Admin state for the logical switch. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description String
- Description of the resource.
- display
Name String - Display name, defaults to ID if not set.
- ip
Pool StringId - Ip Pool ID to be associated with the logical switch.
- mac
Pool StringId - Mac Pool ID to be associated with the logical switch.
- revision Double
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- switching
Profile List<VlanIds Logical Switch Switching Profile Id> - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- List<Vlan
Logical Switch Tag> - A list of scope + tag pairs to associate with this logical switch.
- transport
Zone StringId - Transport Zone ID for the logical switch.
- vlan Double
- Vlan for the logical switch.
- vlan
Logical StringSwitch Id - ID of the logical switch.
- address
Bindings VlanLogical Switch Address Binding[] - List of Address Bindings for the logical switch. This setting allows to provide bindings between IP address, mac Address and vlan.
- admin
State string - Admin state for the logical switch. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description string
- Description of the resource.
- display
Name string - Display name, defaults to ID if not set.
- ip
Pool stringId - Ip Pool ID to be associated with the logical switch.
- mac
Pool stringId - Mac Pool ID to be associated with the logical switch.
- revision number
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- switching
Profile VlanIds Logical Switch Switching Profile Id[] - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- Vlan
Logical Switch Tag[] - A list of scope + tag pairs to associate with this logical switch.
- transport
Zone stringId - Transport Zone ID for the logical switch.
- vlan number
- Vlan for the logical switch.
- vlan
Logical stringSwitch Id - ID of the logical switch.
- address_
bindings Sequence[VlanLogical Switch Address Binding Args] - List of Address Bindings for the logical switch. This setting allows to provide bindings between IP address, mac Address and vlan.
- admin_
state str - Admin state for the logical switch. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description str
- Description of the resource.
- display_
name str - Display name, defaults to ID if not set.
- ip_
pool_ strid - Ip Pool ID to be associated with the logical switch.
- mac_
pool_ strid - Mac Pool ID to be associated with the logical switch.
- revision float
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- switching_
profile_ Sequence[Vlanids Logical Switch Switching Profile Id Args] - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- Sequence[Vlan
Logical Switch Tag Args] - A list of scope + tag pairs to associate with this logical switch.
- transport_
zone_ strid - Transport Zone ID for the logical switch.
- vlan float
- Vlan for the logical switch.
- vlan_
logical_ strswitch_ id - ID of the logical switch.
- address
Bindings List<Property Map> - List of Address Bindings for the logical switch. This setting allows to provide bindings between IP address, mac Address and vlan.
- admin
State String - Admin state for the logical switch. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description String
- Description of the resource.
- display
Name String - Display name, defaults to ID if not set.
- ip
Pool StringId - Ip Pool ID to be associated with the logical switch.
- mac
Pool StringId - Mac Pool ID to be associated with the logical switch.
- revision Number
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- switching
Profile List<Property Map>Ids - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- List<Property Map>
- A list of scope + tag pairs to associate with this logical switch.
- transport
Zone StringId - Transport Zone ID for the logical switch.
- vlan Number
- Vlan for the logical switch.
- vlan
Logical StringSwitch Id - ID of the logical switch.
Supporting Types
VlanLogicalSwitchAddressBinding, VlanLogicalSwitchAddressBindingArgs
- Ip
Address string - A single IP address or a subnet cidr
- Mac
Address string - A single MAC address
- Vlan double
- Vlan for the logical switch.
- Ip
Address string - A single IP address or a subnet cidr
- Mac
Address string - A single MAC address
- Vlan float64
- Vlan for the logical switch.
- ip
Address String - A single IP address or a subnet cidr
- mac
Address String - A single MAC address
- vlan Double
- Vlan for the logical switch.
- ip
Address string - A single IP address or a subnet cidr
- mac
Address string - A single MAC address
- vlan number
- Vlan for the logical switch.
- ip_
address str - A single IP address or a subnet cidr
- mac_
address str - A single MAC address
- vlan float
- Vlan for the logical switch.
- ip
Address String - A single IP address or a subnet cidr
- mac
Address String - A single MAC address
- vlan Number
- Vlan for the logical switch.
VlanLogicalSwitchSwitchingProfileId, VlanLogicalSwitchSwitchingProfileIdArgs
VlanLogicalSwitchTag, VlanLogicalSwitchTagArgs
Package Details
- Repository
- nsxt vmware/terraform-provider-nsxt
- License
- Notes
- This Pulumi package is based on the
nsxt
Terraform Provider.