Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.vsphere.HostVirtualSwitchArgs Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.vsphere;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class HostVirtualSwitchArgs extends com.pulumi.resources.ResourceArgs {
public static final HostVirtualSwitchArgs Empty = new HostVirtualSwitchArgs();
/**
* List of active network adapters used for load balancing.
*
*/
@Import(name="activeNics", required=true)
private Output> activeNics;
/**
* @return List of active network adapters used for load balancing.
*
*/
public Output> activeNics() {
return this.activeNics;
}
/**
* Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than
* that of its own.
*
*/
@Import(name="allowForgedTransmits")
private @Nullable Output allowForgedTransmits;
/**
* @return Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than
* that of its own.
*
*/
public Optional> allowForgedTransmits() {
return Optional.ofNullable(this.allowForgedTransmits);
}
/**
* Controls whether or not the Media Access Control (MAC) address can be changed.
*
*/
@Import(name="allowMacChanges")
private @Nullable Output allowMacChanges;
/**
* @return Controls whether or not the Media Access Control (MAC) address can be changed.
*
*/
public Optional> allowMacChanges() {
return Optional.ofNullable(this.allowMacChanges);
}
/**
* Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
*
*/
@Import(name="allowPromiscuous")
private @Nullable Output allowPromiscuous;
/**
* @return Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
*
*/
public Optional> allowPromiscuous() {
return Optional.ofNullable(this.allowPromiscuous);
}
/**
* Determines how often, in seconds, a beacon should be sent to probe for the validity of a link.
*
*/
@Import(name="beaconInterval")
private @Nullable Output beaconInterval;
/**
* @return Determines how often, in seconds, a beacon should be sent to probe for the validity of a link.
*
*/
public Optional> beaconInterval() {
return Optional.ofNullable(this.beaconInterval);
}
/**
* Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used
* only.
*
*/
@Import(name="checkBeacon")
private @Nullable Output checkBeacon;
/**
* @return Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used
* only.
*
*/
public Optional> checkBeacon() {
return Optional.ofNullable(this.checkBeacon);
}
/**
* If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
*
*/
@Import(name="failback")
private @Nullable Output failback;
/**
* @return If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
*
*/
public Optional> failback() {
return Optional.ofNullable(this.failback);
}
/**
* The managed object ID of
* the host to set the virtual switch up on. Forces a new resource if changed.
*
*/
@Import(name="hostSystemId", required=true)
private Output hostSystemId;
/**
* @return The managed object ID of
* the host to set the virtual switch up on. Forces a new resource if changed.
*
*/
public Output hostSystemId() {
return this.hostSystemId;
}
/**
* Whether to advertise or listen for link discovery. Valid values are advertise, both, listen, and none.
*
*/
@Import(name="linkDiscoveryOperation")
private @Nullable Output linkDiscoveryOperation;
/**
* @return Whether to advertise or listen for link discovery. Valid values are advertise, both, listen, and none.
*
*/
public Optional> linkDiscoveryOperation() {
return Optional.ofNullable(this.linkDiscoveryOperation);
}
/**
* The discovery protocol type. Valid values are cdp and lldp.
*
*/
@Import(name="linkDiscoveryProtocol")
private @Nullable Output linkDiscoveryProtocol;
/**
* @return The discovery protocol type. Valid values are cdp and lldp.
*
*/
public Optional> linkDiscoveryProtocol() {
return Optional.ofNullable(this.linkDiscoveryProtocol);
}
/**
* The maximum transmission unit (MTU) for the virtual
* switch. Default: `1500`.
*
*/
@Import(name="mtu")
private @Nullable Output mtu;
/**
* @return The maximum transmission unit (MTU) for the virtual
* switch. Default: `1500`.
*
*/
public Optional> mtu() {
return Optional.ofNullable(this.mtu);
}
/**
* The name of the virtual switch. Forces a new resource if
* changed.
*
*/
@Import(name="name")
private @Nullable Output name;
/**
* @return The name of the virtual switch. Forces a new resource if
* changed.
*
*/
public Optional> name() {
return Optional.ofNullable(this.name);
}
/**
* The list of network adapters to bind to this virtual switch.
*
*/
@Import(name="networkAdapters", required=true)
private Output> networkAdapters;
/**
* @return The list of network adapters to bind to this virtual switch.
*
*/
public Output> networkAdapters() {
return this.networkAdapters;
}
/**
* If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
*
*/
@Import(name="notifySwitches")
private @Nullable Output notifySwitches;
/**
* @return If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
*
*/
public Optional> notifySwitches() {
return Optional.ofNullable(this.notifySwitches);
}
/**
* The number of ports to create with this
* virtual switch. Default: `128`.
*
* > **NOTE:** Changing the port count requires a reboot of the host. This provider
* will not restart the host for you.
*
*/
@Import(name="numberOfPorts")
private @Nullable Output numberOfPorts;
/**
* @return The number of ports to create with this
* virtual switch. Default: `128`.
*
* > **NOTE:** Changing the port count requires a reboot of the host. This provider
* will not restart the host for you.
*
*/
public Optional> numberOfPorts() {
return Optional.ofNullable(this.numberOfPorts);
}
/**
* The average bandwidth in bits per second if traffic shaping is enabled.
*
*/
@Import(name="shapingAverageBandwidth")
private @Nullable Output shapingAverageBandwidth;
/**
* @return The average bandwidth in bits per second if traffic shaping is enabled.
*
*/
public Optional> shapingAverageBandwidth() {
return Optional.ofNullable(this.shapingAverageBandwidth);
}
/**
* The maximum burst size allowed in bytes if traffic shaping is enabled.
*
*/
@Import(name="shapingBurstSize")
private @Nullable Output shapingBurstSize;
/**
* @return The maximum burst size allowed in bytes if traffic shaping is enabled.
*
*/
public Optional> shapingBurstSize() {
return Optional.ofNullable(this.shapingBurstSize);
}
/**
* Enable traffic shaping on this virtual switch or port group.
*
*/
@Import(name="shapingEnabled")
private @Nullable Output shapingEnabled;
/**
* @return Enable traffic shaping on this virtual switch or port group.
*
*/
public Optional> shapingEnabled() {
return Optional.ofNullable(this.shapingEnabled);
}
/**
* The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
*
*/
@Import(name="shapingPeakBandwidth")
private @Nullable Output shapingPeakBandwidth;
/**
* @return The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
*
*/
public Optional> shapingPeakBandwidth() {
return Optional.ofNullable(this.shapingPeakBandwidth);
}
/**
* List of standby network adapters used for failover.
*
*/
@Import(name="standbyNics")
private @Nullable Output> standbyNics;
/**
* @return List of standby network adapters used for failover.
*
*/
public Optional>> standbyNics() {
return Optional.ofNullable(this.standbyNics);
}
/**
* The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or
* failover_explicit.
*
*/
@Import(name="teamingPolicy")
private @Nullable Output teamingPolicy;
/**
* @return The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or
* failover_explicit.
*
*/
public Optional> teamingPolicy() {
return Optional.ofNullable(this.teamingPolicy);
}
private HostVirtualSwitchArgs() {}
private HostVirtualSwitchArgs(HostVirtualSwitchArgs $) {
this.activeNics = $.activeNics;
this.allowForgedTransmits = $.allowForgedTransmits;
this.allowMacChanges = $.allowMacChanges;
this.allowPromiscuous = $.allowPromiscuous;
this.beaconInterval = $.beaconInterval;
this.checkBeacon = $.checkBeacon;
this.failback = $.failback;
this.hostSystemId = $.hostSystemId;
this.linkDiscoveryOperation = $.linkDiscoveryOperation;
this.linkDiscoveryProtocol = $.linkDiscoveryProtocol;
this.mtu = $.mtu;
this.name = $.name;
this.networkAdapters = $.networkAdapters;
this.notifySwitches = $.notifySwitches;
this.numberOfPorts = $.numberOfPorts;
this.shapingAverageBandwidth = $.shapingAverageBandwidth;
this.shapingBurstSize = $.shapingBurstSize;
this.shapingEnabled = $.shapingEnabled;
this.shapingPeakBandwidth = $.shapingPeakBandwidth;
this.standbyNics = $.standbyNics;
this.teamingPolicy = $.teamingPolicy;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(HostVirtualSwitchArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private HostVirtualSwitchArgs $;
public Builder() {
$ = new HostVirtualSwitchArgs();
}
public Builder(HostVirtualSwitchArgs defaults) {
$ = new HostVirtualSwitchArgs(Objects.requireNonNull(defaults));
}
/**
* @param activeNics List of active network adapters used for load balancing.
*
* @return builder
*
*/
public Builder activeNics(Output> activeNics) {
$.activeNics = activeNics;
return this;
}
/**
* @param activeNics List of active network adapters used for load balancing.
*
* @return builder
*
*/
public Builder activeNics(List activeNics) {
return activeNics(Output.of(activeNics));
}
/**
* @param activeNics List of active network adapters used for load balancing.
*
* @return builder
*
*/
public Builder activeNics(String... activeNics) {
return activeNics(List.of(activeNics));
}
/**
* @param allowForgedTransmits Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than
* that of its own.
*
* @return builder
*
*/
public Builder allowForgedTransmits(@Nullable Output allowForgedTransmits) {
$.allowForgedTransmits = allowForgedTransmits;
return this;
}
/**
* @param allowForgedTransmits Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than
* that of its own.
*
* @return builder
*
*/
public Builder allowForgedTransmits(Boolean allowForgedTransmits) {
return allowForgedTransmits(Output.of(allowForgedTransmits));
}
/**
* @param allowMacChanges Controls whether or not the Media Access Control (MAC) address can be changed.
*
* @return builder
*
*/
public Builder allowMacChanges(@Nullable Output allowMacChanges) {
$.allowMacChanges = allowMacChanges;
return this;
}
/**
* @param allowMacChanges Controls whether or not the Media Access Control (MAC) address can be changed.
*
* @return builder
*
*/
public Builder allowMacChanges(Boolean allowMacChanges) {
return allowMacChanges(Output.of(allowMacChanges));
}
/**
* @param allowPromiscuous Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
*
* @return builder
*
*/
public Builder allowPromiscuous(@Nullable Output allowPromiscuous) {
$.allowPromiscuous = allowPromiscuous;
return this;
}
/**
* @param allowPromiscuous Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
*
* @return builder
*
*/
public Builder allowPromiscuous(Boolean allowPromiscuous) {
return allowPromiscuous(Output.of(allowPromiscuous));
}
/**
* @param beaconInterval Determines how often, in seconds, a beacon should be sent to probe for the validity of a link.
*
* @return builder
*
*/
public Builder beaconInterval(@Nullable Output beaconInterval) {
$.beaconInterval = beaconInterval;
return this;
}
/**
* @param beaconInterval Determines how often, in seconds, a beacon should be sent to probe for the validity of a link.
*
* @return builder
*
*/
public Builder beaconInterval(Integer beaconInterval) {
return beaconInterval(Output.of(beaconInterval));
}
/**
* @param checkBeacon Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used
* only.
*
* @return builder
*
*/
public Builder checkBeacon(@Nullable Output checkBeacon) {
$.checkBeacon = checkBeacon;
return this;
}
/**
* @param checkBeacon Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used
* only.
*
* @return builder
*
*/
public Builder checkBeacon(Boolean checkBeacon) {
return checkBeacon(Output.of(checkBeacon));
}
/**
* @param failback If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
*
* @return builder
*
*/
public Builder failback(@Nullable Output failback) {
$.failback = failback;
return this;
}
/**
* @param failback If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
*
* @return builder
*
*/
public Builder failback(Boolean failback) {
return failback(Output.of(failback));
}
/**
* @param hostSystemId The managed object ID of
* the host to set the virtual switch up on. Forces a new resource if changed.
*
* @return builder
*
*/
public Builder hostSystemId(Output hostSystemId) {
$.hostSystemId = hostSystemId;
return this;
}
/**
* @param hostSystemId The managed object ID of
* the host to set the virtual switch up on. Forces a new resource if changed.
*
* @return builder
*
*/
public Builder hostSystemId(String hostSystemId) {
return hostSystemId(Output.of(hostSystemId));
}
/**
* @param linkDiscoveryOperation Whether to advertise or listen for link discovery. Valid values are advertise, both, listen, and none.
*
* @return builder
*
*/
public Builder linkDiscoveryOperation(@Nullable Output linkDiscoveryOperation) {
$.linkDiscoveryOperation = linkDiscoveryOperation;
return this;
}
/**
* @param linkDiscoveryOperation Whether to advertise or listen for link discovery. Valid values are advertise, both, listen, and none.
*
* @return builder
*
*/
public Builder linkDiscoveryOperation(String linkDiscoveryOperation) {
return linkDiscoveryOperation(Output.of(linkDiscoveryOperation));
}
/**
* @param linkDiscoveryProtocol The discovery protocol type. Valid values are cdp and lldp.
*
* @return builder
*
*/
public Builder linkDiscoveryProtocol(@Nullable Output linkDiscoveryProtocol) {
$.linkDiscoveryProtocol = linkDiscoveryProtocol;
return this;
}
/**
* @param linkDiscoveryProtocol The discovery protocol type. Valid values are cdp and lldp.
*
* @return builder
*
*/
public Builder linkDiscoveryProtocol(String linkDiscoveryProtocol) {
return linkDiscoveryProtocol(Output.of(linkDiscoveryProtocol));
}
/**
* @param mtu The maximum transmission unit (MTU) for the virtual
* switch. Default: `1500`.
*
* @return builder
*
*/
public Builder mtu(@Nullable Output mtu) {
$.mtu = mtu;
return this;
}
/**
* @param mtu The maximum transmission unit (MTU) for the virtual
* switch. Default: `1500`.
*
* @return builder
*
*/
public Builder mtu(Integer mtu) {
return mtu(Output.of(mtu));
}
/**
* @param name The name of the virtual switch. Forces a new resource if
* changed.
*
* @return builder
*
*/
public Builder name(@Nullable Output name) {
$.name = name;
return this;
}
/**
* @param name The name of the virtual switch. Forces a new resource if
* changed.
*
* @return builder
*
*/
public Builder name(String name) {
return name(Output.of(name));
}
/**
* @param networkAdapters The list of network adapters to bind to this virtual switch.
*
* @return builder
*
*/
public Builder networkAdapters(Output> networkAdapters) {
$.networkAdapters = networkAdapters;
return this;
}
/**
* @param networkAdapters The list of network adapters to bind to this virtual switch.
*
* @return builder
*
*/
public Builder networkAdapters(List networkAdapters) {
return networkAdapters(Output.of(networkAdapters));
}
/**
* @param networkAdapters The list of network adapters to bind to this virtual switch.
*
* @return builder
*
*/
public Builder networkAdapters(String... networkAdapters) {
return networkAdapters(List.of(networkAdapters));
}
/**
* @param notifySwitches If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
*
* @return builder
*
*/
public Builder notifySwitches(@Nullable Output notifySwitches) {
$.notifySwitches = notifySwitches;
return this;
}
/**
* @param notifySwitches If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
*
* @return builder
*
*/
public Builder notifySwitches(Boolean notifySwitches) {
return notifySwitches(Output.of(notifySwitches));
}
/**
* @param numberOfPorts The number of ports to create with this
* virtual switch. Default: `128`.
*
* > **NOTE:** Changing the port count requires a reboot of the host. This provider
* will not restart the host for you.
*
* @return builder
*
*/
public Builder numberOfPorts(@Nullable Output numberOfPorts) {
$.numberOfPorts = numberOfPorts;
return this;
}
/**
* @param numberOfPorts The number of ports to create with this
* virtual switch. Default: `128`.
*
* > **NOTE:** Changing the port count requires a reboot of the host. This provider
* will not restart the host for you.
*
* @return builder
*
*/
public Builder numberOfPorts(Integer numberOfPorts) {
return numberOfPorts(Output.of(numberOfPorts));
}
/**
* @param shapingAverageBandwidth The average bandwidth in bits per second if traffic shaping is enabled.
*
* @return builder
*
*/
public Builder shapingAverageBandwidth(@Nullable Output shapingAverageBandwidth) {
$.shapingAverageBandwidth = shapingAverageBandwidth;
return this;
}
/**
* @param shapingAverageBandwidth The average bandwidth in bits per second if traffic shaping is enabled.
*
* @return builder
*
*/
public Builder shapingAverageBandwidth(Integer shapingAverageBandwidth) {
return shapingAverageBandwidth(Output.of(shapingAverageBandwidth));
}
/**
* @param shapingBurstSize The maximum burst size allowed in bytes if traffic shaping is enabled.
*
* @return builder
*
*/
public Builder shapingBurstSize(@Nullable Output shapingBurstSize) {
$.shapingBurstSize = shapingBurstSize;
return this;
}
/**
* @param shapingBurstSize The maximum burst size allowed in bytes if traffic shaping is enabled.
*
* @return builder
*
*/
public Builder shapingBurstSize(Integer shapingBurstSize) {
return shapingBurstSize(Output.of(shapingBurstSize));
}
/**
* @param shapingEnabled Enable traffic shaping on this virtual switch or port group.
*
* @return builder
*
*/
public Builder shapingEnabled(@Nullable Output shapingEnabled) {
$.shapingEnabled = shapingEnabled;
return this;
}
/**
* @param shapingEnabled Enable traffic shaping on this virtual switch or port group.
*
* @return builder
*
*/
public Builder shapingEnabled(Boolean shapingEnabled) {
return shapingEnabled(Output.of(shapingEnabled));
}
/**
* @param shapingPeakBandwidth The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
*
* @return builder
*
*/
public Builder shapingPeakBandwidth(@Nullable Output shapingPeakBandwidth) {
$.shapingPeakBandwidth = shapingPeakBandwidth;
return this;
}
/**
* @param shapingPeakBandwidth The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
*
* @return builder
*
*/
public Builder shapingPeakBandwidth(Integer shapingPeakBandwidth) {
return shapingPeakBandwidth(Output.of(shapingPeakBandwidth));
}
/**
* @param standbyNics List of standby network adapters used for failover.
*
* @return builder
*
*/
public Builder standbyNics(@Nullable Output> standbyNics) {
$.standbyNics = standbyNics;
return this;
}
/**
* @param standbyNics List of standby network adapters used for failover.
*
* @return builder
*
*/
public Builder standbyNics(List standbyNics) {
return standbyNics(Output.of(standbyNics));
}
/**
* @param standbyNics List of standby network adapters used for failover.
*
* @return builder
*
*/
public Builder standbyNics(String... standbyNics) {
return standbyNics(List.of(standbyNics));
}
/**
* @param teamingPolicy The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or
* failover_explicit.
*
* @return builder
*
*/
public Builder teamingPolicy(@Nullable Output teamingPolicy) {
$.teamingPolicy = teamingPolicy;
return this;
}
/**
* @param teamingPolicy The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or
* failover_explicit.
*
* @return builder
*
*/
public Builder teamingPolicy(String teamingPolicy) {
return teamingPolicy(Output.of(teamingPolicy));
}
public HostVirtualSwitchArgs build() {
if ($.activeNics == null) {
throw new MissingRequiredPropertyException("HostVirtualSwitchArgs", "activeNics");
}
if ($.hostSystemId == null) {
throw new MissingRequiredPropertyException("HostVirtualSwitchArgs", "hostSystemId");
}
if ($.networkAdapters == null) {
throw new MissingRequiredPropertyException("HostVirtualSwitchArgs", "networkAdapters");
}
return $;
}
}
}