1. Registry
  2. Packages
  3. ESXi Native
  4. API Docs
  5. VirtualSwitch
Viewing docs for ESXi Native v1.0.0
published on Monday, Aug 28, 2023 by pulumiverse
esxi-native logo ESXi Native
Viewing docs for ESXi Native v1.0.0
published 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:

    ForgedTransmits bool
    Forged transmits (true=Accept/false=Reject).
    LinkDiscoveryMode string
    Virtual Switch Link Discovery Mode.
    MacChanges 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)
    PromiscuousMode bool
    Promiscuous mode (true=Accept/false=Reject).
    Uplinks List<Pulumiverse.EsxiNative.Inputs.Uplink>
    Uplink configuration.
    ForgedTransmits bool
    Forged transmits (true=Accept/false=Reject).
    LinkDiscoveryMode string
    Virtual Switch Link Discovery Mode.
    MacChanges 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)
    PromiscuousMode bool
    Promiscuous mode (true=Accept/false=Reject).
    Uplinks []UplinkArgs
    Uplink configuration.
    forged_transmits bool
    Forged transmits (true=Accept/false=Reject).
    link_discovery_mode string
    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.
    forgedTransmits Boolean
    Forged transmits (true=Accept/false=Reject).
    linkDiscoveryMode String
    Virtual Switch Link Discovery Mode.
    macChanges 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)
    promiscuousMode Boolean
    Promiscuous mode (true=Accept/false=Reject).
    uplinks List<Uplink>
    Uplink configuration.
    forgedTransmits boolean
    Forged transmits (true=Accept/false=Reject).
    linkDiscoveryMode string
    Virtual Switch Link Discovery Mode.
    macChanges 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)
    promiscuousMode boolean
    Promiscuous mode (true=Accept/false=Reject).
    uplinks Uplink[]
    Uplink configuration.
    forged_transmits bool
    Forged transmits (true=Accept/false=Reject).
    link_discovery_mode str
    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[UplinkArgs]
    Uplink configuration.
    forgedTransmits Boolean
    Forged transmits (true=Accept/false=Reject).
    linkDiscoveryMode String
    Virtual Switch Link Discovery Mode.
    macChanges 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)
    promiscuousMode 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) -> VirtualSwitch
    func 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

    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-native logo ESXi Native
    Viewing docs for ESXi Native v1.0.0
    published on Monday, Aug 28, 2023 by pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial