published on Monday, Aug 28, 2023 by pulumiverse
ESXi Nativepublished on Monday, Aug 28, 2023 by pulumiverse
Create VirtualSwitch Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VirtualSwitch(name: string, args?: VirtualSwitchArgs, opts?: CustomResourceOptions);@overload
def VirtualSwitch(resource_name: str,
args: Optional[VirtualSwitchArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def VirtualSwitch(resource_name: str,
opts: Optional[ResourceOptions] = None,
forged_transmits: Optional[bool] = None,
link_discovery_mode: Optional[str] = None,
mac_changes: Optional[bool] = None,
mtu: Optional[int] = None,
name: Optional[str] = None,
ports: Optional[int] = None,
promiscuous_mode: Optional[bool] = None,
uplinks: Optional[Sequence[UplinkArgs]] = None)func NewVirtualSwitch(ctx *Context, name string, args *VirtualSwitchArgs, opts ...ResourceOption) (*VirtualSwitch, error)public VirtualSwitch(string name, VirtualSwitchArgs? args = null, CustomResourceOptions? opts = null)
public VirtualSwitch(String name, VirtualSwitchArgs args)
public VirtualSwitch(String name, VirtualSwitchArgs args, CustomResourceOptions options)
type: esxi-native:VirtualSwitch
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "esxi-native_virtual_switch" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args VirtualSwitchArgs
- 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 VirtualSwitchArgs
- 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 VirtualSwitchArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VirtualSwitchArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VirtualSwitchArgs
- 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 virtualSwitchResource = new EsxiNative.VirtualSwitch("virtualSwitchResource", new()
{
ForgedTransmits = false,
LinkDiscoveryMode = "string",
MacChanges = false,
Mtu = 0,
Name = "string",
Ports = 0,
PromiscuousMode = false,
Uplinks = new[]
{
new EsxiNative.Inputs.UplinkArgs
{
Name = "string",
},
},
});
example, err := esxinative.NewVirtualSwitch(ctx, "virtualSwitchResource", &esxinative.VirtualSwitchArgs{
ForgedTransmits: pulumi.Bool(false),
LinkDiscoveryMode: pulumi.String("string"),
MacChanges: pulumi.Bool(false),
Mtu: pulumi.Int(0),
Name: pulumi.String("string"),
Ports: pulumi.Int(0),
PromiscuousMode: pulumi.Bool(false),
Uplinks: esxi.UplinkArray{
&esxi.UplinkArgs{
Name: pulumi.String("string"),
},
},
})
resource "esxi-native_virtual_switch" "virtualSwitchResource" {
lifecycle {
create_before_destroy = true
}
forged_transmits = false
link_discovery_mode = "string"
mac_changes = false
mtu = 0
name = "string"
ports = 0
promiscuous_mode = false
uplinks {
name = "string"
}
}
var virtualSwitchResource = new VirtualSwitch("virtualSwitchResource", VirtualSwitchArgs.builder()
.forgedTransmits(false)
.linkDiscoveryMode("string")
.macChanges(false)
.mtu(0)
.name("string")
.ports(0)
.promiscuousMode(false)
.uplinks(UplinkArgs.builder()
.name("string")
.build())
.build());
virtual_switch_resource = esxi_native.VirtualSwitch("virtualSwitchResource",
forged_transmits=False,
link_discovery_mode="string",
mac_changes=False,
mtu=0,
name="string",
ports=0,
promiscuous_mode=False,
uplinks=[{
"name": "string",
}])
const virtualSwitchResource = new esxi_native.VirtualSwitch("virtualSwitchResource", {
forgedTransmits: false,
linkDiscoveryMode: "string",
macChanges: false,
mtu: 0,
name: "string",
ports: 0,
promiscuousMode: false,
uplinks: [{
name: "string",
}],
});
type: esxi-native:VirtualSwitch
properties:
forgedTransmits: false
linkDiscoveryMode: string
macChanges: false
mtu: 0
name: string
ports: 0
promiscuousMode: false
uplinks:
- name: string
VirtualSwitch 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 VirtualSwitch resource accepts the following input properties:
- Forged
Transmits bool - Forged transmits (true=Accept/false=Reject).
- Link
Discovery stringMode - Virtual Switch Link Discovery Mode.
- Mac
Changes bool - MAC address changes (true=Accept/false=Reject).
- Mtu int
- Virtual Switch mtu. (1280-9000)
- Name string
- Virtual Switch name.
- Ports int
- Virtual Switch number of ports. (1-4096)
- Promiscuous
Mode bool - Promiscuous mode (true=Accept/false=Reject).
- Uplinks
List<Pulumiverse.
Esxi Native. Inputs. Uplink> - Uplink configuration.
- Forged
Transmits bool - Forged transmits (true=Accept/false=Reject).
- Link
Discovery stringMode - Virtual Switch Link Discovery Mode.
- Mac
Changes bool - MAC address changes (true=Accept/false=Reject).
- Mtu int
- Virtual Switch mtu. (1280-9000)
- Name string
- Virtual Switch name.
- Ports int
- Virtual Switch number of ports. (1-4096)
- Promiscuous
Mode bool - Promiscuous mode (true=Accept/false=Reject).
- Uplinks
[]Uplink
Args - Uplink configuration.
- forged_
transmits bool - Forged transmits (true=Accept/false=Reject).
- link_
discovery_ stringmode - Virtual Switch Link Discovery Mode.
- mac_
changes bool - MAC address changes (true=Accept/false=Reject).
- mtu number
- Virtual Switch mtu. (1280-9000)
- name string
- Virtual Switch name.
- ports number
- Virtual Switch number of ports. (1-4096)
- promiscuous_
mode bool - Promiscuous mode (true=Accept/false=Reject).
- uplinks list(object)
- Uplink configuration.
- forged
Transmits Boolean - Forged transmits (true=Accept/false=Reject).
- link
Discovery StringMode - Virtual Switch Link Discovery Mode.
- mac
Changes Boolean - MAC address changes (true=Accept/false=Reject).
- mtu Integer
- Virtual Switch mtu. (1280-9000)
- name String
- Virtual Switch name.
- ports Integer
- Virtual Switch number of ports. (1-4096)
- promiscuous
Mode Boolean - Promiscuous mode (true=Accept/false=Reject).
- uplinks List<Uplink>
- Uplink configuration.
- forged
Transmits boolean - Forged transmits (true=Accept/false=Reject).
- link
Discovery stringMode - Virtual Switch Link Discovery Mode.
- mac
Changes boolean - MAC address changes (true=Accept/false=Reject).
- mtu number
- Virtual Switch mtu. (1280-9000)
- name string
- Virtual Switch name.
- ports number
- Virtual Switch number of ports. (1-4096)
- promiscuous
Mode boolean - Promiscuous mode (true=Accept/false=Reject).
- uplinks Uplink[]
- Uplink configuration.
- forged_
transmits bool - Forged transmits (true=Accept/false=Reject).
- link_
discovery_ strmode - Virtual Switch Link Discovery Mode.
- mac_
changes bool - MAC address changes (true=Accept/false=Reject).
- mtu int
- Virtual Switch mtu. (1280-9000)
- name str
- Virtual Switch name.
- ports int
- Virtual Switch number of ports. (1-4096)
- promiscuous_
mode bool - Promiscuous mode (true=Accept/false=Reject).
- uplinks
Sequence[Uplink
Args] - Uplink configuration.
- forged
Transmits Boolean - Forged transmits (true=Accept/false=Reject).
- link
Discovery StringMode - Virtual Switch Link Discovery Mode.
- mac
Changes Boolean - MAC address changes (true=Accept/false=Reject).
- mtu Number
- Virtual Switch mtu. (1280-9000)
- name String
- Virtual Switch name.
- ports Number
- Virtual Switch number of ports. (1-4096)
- promiscuous
Mode Boolean - Promiscuous mode (true=Accept/false=Reject).
- uplinks List<Property Map>
- Uplink configuration.
Outputs
All input properties are implicitly available as output properties. Additionally, the VirtualSwitch resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing VirtualSwitch Resource
Get an existing VirtualSwitch 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>, opts?: CustomResourceOptions): VirtualSwitch@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None) -> VirtualSwitchfunc GetVirtualSwitch(ctx *Context, name string, id IDInput, state *VirtualSwitchState, opts ...ResourceOption) (*VirtualSwitch, error)public static VirtualSwitch Get(string name, Input<string> id, CustomResourceOptions? opts = null)public static VirtualSwitch get(String name, Output<String> id, CustomResourceOptions options)resources: existingVirtualSwitch: type: esxi-native:VirtualSwitch get: id: ${id}import {
to = esxi-native_virtual_switch.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state VirtualSwitchState
- Pass nil. This resource has no state arguments.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Supporting Types
Uplink, UplinkArgs
- Name string
- Uplink name.
- Name string
- Uplink name.
- name string
- Uplink name.
- name String
- Uplink name.
- name string
- Uplink name.
- name str
- Uplink name.
- name String
- Uplink name.
Package Details
- Repository
- esxi-native pulumiverse/pulumi-esxi-native
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the Terraform Provider terraform-provider-esxi.
ESXi Nativepublished on Monday, Aug 28, 2023 by pulumiverse