@cdktf/provider-vsphere
Version:
Prebuilt vsphere Provider for Terraform CDK (cdktf)
1,192 lines • 179 kB
JavaScript
"use strict";
var _a, _b, _c;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DistributedPortGroup = exports.DistributedPortGroupVlanRangeList = exports.DistributedPortGroupVlanRangeOutputReference = void 0;
exports.distributedPortGroupVlanRangeToTerraform = distributedPortGroupVlanRangeToTerraform;
exports.distributedPortGroupVlanRangeToHclTerraform = distributedPortGroupVlanRangeToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function distributedPortGroupVlanRangeToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
max_vlan: cdktf.numberToTerraform(struct.maxVlan),
min_vlan: cdktf.numberToTerraform(struct.minVlan),
};
}
function distributedPortGroupVlanRangeToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
max_vlan: {
value: cdktf.numberToHclTerraform(struct.maxVlan),
isBlock: false,
type: "simple",
storageClassType: "number",
},
min_vlan: {
value: cdktf.numberToHclTerraform(struct.minVlan),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DistributedPortGroupVlanRangeOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._maxVlan !== undefined) {
hasAnyValues = true;
internalValueResult.maxVlan = this._maxVlan;
}
if (this._minVlan !== undefined) {
hasAnyValues = true;
internalValueResult.minVlan = this._minVlan;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._maxVlan = undefined;
this._minVlan = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._maxVlan = value.maxVlan;
this._minVlan = value.minVlan;
}
}
get maxVlan() {
return this.getNumberAttribute('max_vlan');
}
set maxVlan(value) {
this._maxVlan = value;
}
// Temporarily expose input value. Use with caution.
get maxVlanInput() {
return this._maxVlan;
}
get minVlan() {
return this.getNumberAttribute('min_vlan');
}
set minVlan(value) {
this._minVlan = value;
}
// Temporarily expose input value. Use with caution.
get minVlanInput() {
return this._minVlan;
}
}
exports.DistributedPortGroupVlanRangeOutputReference = DistributedPortGroupVlanRangeOutputReference;
_a = JSII_RTTI_SYMBOL_1;
DistributedPortGroupVlanRangeOutputReference[_a] = { fqn: "@cdktf/provider-vsphere.distributedPortGroup.DistributedPortGroupVlanRangeOutputReference", version: "11.2.1" };
class DistributedPortGroupVlanRangeList extends cdktf.ComplexList {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, wrapsSet) {
super(terraformResource, terraformAttribute, wrapsSet);
this.terraformResource = terraformResource;
this.terraformAttribute = terraformAttribute;
this.wrapsSet = wrapsSet;
}
/**
* @param index the index of the item to return
*/
get(index) {
return new DistributedPortGroupVlanRangeOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.DistributedPortGroupVlanRangeList = DistributedPortGroupVlanRangeList;
_b = JSII_RTTI_SYMBOL_1;
DistributedPortGroupVlanRangeList[_b] = { fqn: "@cdktf/provider-vsphere.distributedPortGroup.DistributedPortGroupVlanRangeList", version: "11.2.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/vmware/vsphere/2.15.0/docs/resources/distributed_port_group vsphere_distributed_port_group}
*/
class DistributedPortGroup extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a DistributedPortGroup resource upon running "cdktf plan <stack-name>"
* @param scope The scope in which to define this construct
* @param importToId The construct id used in the generated config for the DistributedPortGroup to import
* @param importFromId The id of the existing DistributedPortGroup that should be imported. Refer to the {@link https://registry.terraform.io/providers/vmware/vsphere/2.15.0/docs/resources/distributed_port_group#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the DistributedPortGroup to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "vsphere_distributed_port_group", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/vmware/vsphere/2.15.0/docs/resources/distributed_port_group vsphere_distributed_port_group} Resource
*
* @param scope The scope in which to define this construct
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
* @param options DistributedPortGroupConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'vsphere_distributed_port_group',
terraformGeneratorMetadata: {
providerName: 'vsphere',
providerVersion: '2.15.0',
providerVersionConstraint: '~> 2.13'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// vlan_range - computed: false, optional: true, required: false
this._vlanRange = new DistributedPortGroupVlanRangeList(this, "vlan_range", true);
this._activeUplinks = config.activeUplinks;
this._allowForgedTransmits = config.allowForgedTransmits;
this._allowMacChanges = config.allowMacChanges;
this._allowPromiscuous = config.allowPromiscuous;
this._autoExpand = config.autoExpand;
this._blockAllPorts = config.blockAllPorts;
this._blockOverrideAllowed = config.blockOverrideAllowed;
this._checkBeacon = config.checkBeacon;
this._customAttributes = config.customAttributes;
this._description = config.description;
this._directpathGen2Allowed = config.directpathGen2Allowed;
this._distributedVirtualSwitchUuid = config.distributedVirtualSwitchUuid;
this._egressShapingAverageBandwidth = config.egressShapingAverageBandwidth;
this._egressShapingBurstSize = config.egressShapingBurstSize;
this._egressShapingEnabled = config.egressShapingEnabled;
this._egressShapingPeakBandwidth = config.egressShapingPeakBandwidth;
this._failback = config.failback;
this._id = config.id;
this._ingressShapingAverageBandwidth = config.ingressShapingAverageBandwidth;
this._ingressShapingBurstSize = config.ingressShapingBurstSize;
this._ingressShapingEnabled = config.ingressShapingEnabled;
this._ingressShapingPeakBandwidth = config.ingressShapingPeakBandwidth;
this._lacpEnabled = config.lacpEnabled;
this._lacpMode = config.lacpMode;
this._livePortMovingAllowed = config.livePortMovingAllowed;
this._name = config.name;
this._netflowEnabled = config.netflowEnabled;
this._netflowOverrideAllowed = config.netflowOverrideAllowed;
this._networkResourcePoolKey = config.networkResourcePoolKey;
this._networkResourcePoolOverrideAllowed = config.networkResourcePoolOverrideAllowed;
this._notifySwitches = config.notifySwitches;
this._numberOfPorts = config.numberOfPorts;
this._portConfigResetAtDisconnect = config.portConfigResetAtDisconnect;
this._portNameFormat = config.portNameFormat;
this._portPrivateSecondaryVlanId = config.portPrivateSecondaryVlanId;
this._securityPolicyOverrideAllowed = config.securityPolicyOverrideAllowed;
this._shapingOverrideAllowed = config.shapingOverrideAllowed;
this._standbyUplinks = config.standbyUplinks;
this._tags = config.tags;
this._teamingPolicy = config.teamingPolicy;
this._trafficFilterOverrideAllowed = config.trafficFilterOverrideAllowed;
this._txUplink = config.txUplink;
this._type = config.type;
this._uplinkTeamingOverrideAllowed = config.uplinkTeamingOverrideAllowed;
this._vlanId = config.vlanId;
this._vlanOverrideAllowed = config.vlanOverrideAllowed;
this._vlanRange.internalValue = config.vlanRange;
}
get activeUplinks() {
return this.getListAttribute('active_uplinks');
}
set activeUplinks(value) {
this._activeUplinks = value;
}
resetActiveUplinks() {
this._activeUplinks = undefined;
}
// Temporarily expose input value. Use with caution.
get activeUplinksInput() {
return this._activeUplinks;
}
get allowForgedTransmits() {
return this.getBooleanAttribute('allow_forged_transmits');
}
set allowForgedTransmits(value) {
this._allowForgedTransmits = value;
}
resetAllowForgedTransmits() {
this._allowForgedTransmits = undefined;
}
// Temporarily expose input value. Use with caution.
get allowForgedTransmitsInput() {
return this._allowForgedTransmits;
}
get allowMacChanges() {
return this.getBooleanAttribute('allow_mac_changes');
}
set allowMacChanges(value) {
this._allowMacChanges = value;
}
resetAllowMacChanges() {
this._allowMacChanges = undefined;
}
// Temporarily expose input value. Use with caution.
get allowMacChangesInput() {
return this._allowMacChanges;
}
get allowPromiscuous() {
return this.getBooleanAttribute('allow_promiscuous');
}
set allowPromiscuous(value) {
this._allowPromiscuous = value;
}
resetAllowPromiscuous() {
this._allowPromiscuous = undefined;
}
// Temporarily expose input value. Use with caution.
get allowPromiscuousInput() {
return this._allowPromiscuous;
}
get autoExpand() {
return this.getBooleanAttribute('auto_expand');
}
set autoExpand(value) {
this._autoExpand = value;
}
resetAutoExpand() {
this._autoExpand = undefined;
}
// Temporarily expose input value. Use with caution.
get autoExpandInput() {
return this._autoExpand;
}
get blockAllPorts() {
return this.getBooleanAttribute('block_all_ports');
}
set blockAllPorts(value) {
this._blockAllPorts = value;
}
resetBlockAllPorts() {
this._blockAllPorts = undefined;
}
// Temporarily expose input value. Use with caution.
get blockAllPortsInput() {
return this._blockAllPorts;
}
get blockOverrideAllowed() {
return this.getBooleanAttribute('block_override_allowed');
}
set blockOverrideAllowed(value) {
this._blockOverrideAllowed = value;
}
resetBlockOverrideAllowed() {
this._blockOverrideAllowed = undefined;
}
// Temporarily expose input value. Use with caution.
get blockOverrideAllowedInput() {
return this._blockOverrideAllowed;
}
get checkBeacon() {
return this.getBooleanAttribute('check_beacon');
}
set checkBeacon(value) {
this._checkBeacon = value;
}
resetCheckBeacon() {
this._checkBeacon = undefined;
}
// Temporarily expose input value. Use with caution.
get checkBeaconInput() {
return this._checkBeacon;
}
// config_version - computed: true, optional: false, required: false
get configVersion() {
return this.getStringAttribute('config_version');
}
get customAttributes() {
return this.getStringMapAttribute('custom_attributes');
}
set customAttributes(value) {
this._customAttributes = value;
}
resetCustomAttributes() {
this._customAttributes = undefined;
}
// Temporarily expose input value. Use with caution.
get customAttributesInput() {
return this._customAttributes;
}
get description() {
return this.getStringAttribute('description');
}
set description(value) {
this._description = value;
}
resetDescription() {
this._description = undefined;
}
// Temporarily expose input value. Use with caution.
get descriptionInput() {
return this._description;
}
get directpathGen2Allowed() {
return this.getBooleanAttribute('directpath_gen2_allowed');
}
set directpathGen2Allowed(value) {
this._directpathGen2Allowed = value;
}
resetDirectpathGen2Allowed() {
this._directpathGen2Allowed = undefined;
}
// Temporarily expose input value. Use with caution.
get directpathGen2AllowedInput() {
return this._directpathGen2Allowed;
}
get distributedVirtualSwitchUuid() {
return this.getStringAttribute('distributed_virtual_switch_uuid');
}
set distributedVirtualSwitchUuid(value) {
this._distributedVirtualSwitchUuid = value;
}
// Temporarily expose input value. Use with caution.
get distributedVirtualSwitchUuidInput() {
return this._distributedVirtualSwitchUuid;
}
get egressShapingAverageBandwidth() {
return this.getNumberAttribute('egress_shaping_average_bandwidth');
}
set egressShapingAverageBandwidth(value) {
this._egressShapingAverageBandwidth = value;
}
resetEgressShapingAverageBandwidth() {
this._egressShapingAverageBandwidth = undefined;
}
// Temporarily expose input value. Use with caution.
get egressShapingAverageBandwidthInput() {
return this._egressShapingAverageBandwidth;
}
get egressShapingBurstSize() {
return this.getNumberAttribute('egress_shaping_burst_size');
}
set egressShapingBurstSize(value) {
this._egressShapingBurstSize = value;
}
resetEgressShapingBurstSize() {
this._egressShapingBurstSize = undefined;
}
// Temporarily expose input value. Use with caution.
get egressShapingBurstSizeInput() {
return this._egressShapingBurstSize;
}
get egressShapingEnabled() {
return this.getBooleanAttribute('egress_shaping_enabled');
}
set egressShapingEnabled(value) {
this._egressShapingEnabled = value;
}
resetEgressShapingEnabled() {
this._egressShapingEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get egressShapingEnabledInput() {
return this._egressShapingEnabled;
}
get egressShapingPeakBandwidth() {
return this.getNumberAttribute('egress_shaping_peak_bandwidth');
}
set egressShapingPeakBandwidth(value) {
this._egressShapingPeakBandwidth = value;
}
resetEgressShapingPeakBandwidth() {
this._egressShapingPeakBandwidth = undefined;
}
// Temporarily expose input value. Use with caution.
get egressShapingPeakBandwidthInput() {
return this._egressShapingPeakBandwidth;
}
get failback() {
return this.getBooleanAttribute('failback');
}
set failback(value) {
this._failback = value;
}
resetFailback() {
this._failback = undefined;
}
// Temporarily expose input value. Use with caution.
get failbackInput() {
return this._failback;
}
get id() {
return this.getStringAttribute('id');
}
set id(value) {
this._id = value;
}
resetId() {
this._id = undefined;
}
// Temporarily expose input value. Use with caution.
get idInput() {
return this._id;
}
get ingressShapingAverageBandwidth() {
return this.getNumberAttribute('ingress_shaping_average_bandwidth');
}
set ingressShapingAverageBandwidth(value) {
this._ingressShapingAverageBandwidth = value;
}
resetIngressShapingAverageBandwidth() {
this._ingressShapingAverageBandwidth = undefined;
}
// Temporarily expose input value. Use with caution.
get ingressShapingAverageBandwidthInput() {
return this._ingressShapingAverageBandwidth;
}
get ingressShapingBurstSize() {
return this.getNumberAttribute('ingress_shaping_burst_size');
}
set ingressShapingBurstSize(value) {
this._ingressShapingBurstSize = value;
}
resetIngressShapingBurstSize() {
this._ingressShapingBurstSize = undefined;
}
// Temporarily expose input value. Use with caution.
get ingressShapingBurstSizeInput() {
return this._ingressShapingBurstSize;
}
get ingressShapingEnabled() {
return this.getBooleanAttribute('ingress_shaping_enabled');
}
set ingressShapingEnabled(value) {
this._ingressShapingEnabled = value;
}
resetIngressShapingEnabled() {
this._ingressShapingEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get ingressShapingEnabledInput() {
return this._ingressShapingEnabled;
}
get ingressShapingPeakBandwidth() {
return this.getNumberAttribute('ingress_shaping_peak_bandwidth');
}
set ingressShapingPeakBandwidth(value) {
this._ingressShapingPeakBandwidth = value;
}
resetIngressShapingPeakBandwidth() {
this._ingressShapingPeakBandwidth = undefined;
}
// Temporarily expose input value. Use with caution.
get ingressShapingPeakBandwidthInput() {
return this._ingressShapingPeakBandwidth;
}
// key - computed: true, optional: false, required: false
get key() {
return this.getStringAttribute('key');
}
get lacpEnabled() {
return this.getBooleanAttribute('lacp_enabled');
}
set lacpEnabled(value) {
this._lacpEnabled = value;
}
resetLacpEnabled() {
this._lacpEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get lacpEnabledInput() {
return this._lacpEnabled;
}
get lacpMode() {
return this.getStringAttribute('lacp_mode');
}
set lacpMode(value) {
this._lacpMode = value;
}
resetLacpMode() {
this._lacpMode = undefined;
}
// Temporarily expose input value. Use with caution.
get lacpModeInput() {
return this._lacpMode;
}
get livePortMovingAllowed() {
return this.getBooleanAttribute('live_port_moving_allowed');
}
set livePortMovingAllowed(value) {
this._livePortMovingAllowed = value;
}
resetLivePortMovingAllowed() {
this._livePortMovingAllowed = undefined;
}
// Temporarily expose input value. Use with caution.
get livePortMovingAllowedInput() {
return this._livePortMovingAllowed;
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get netflowEnabled() {
return this.getBooleanAttribute('netflow_enabled');
}
set netflowEnabled(value) {
this._netflowEnabled = value;
}
resetNetflowEnabled() {
this._netflowEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get netflowEnabledInput() {
return this._netflowEnabled;
}
get netflowOverrideAllowed() {
return this.getBooleanAttribute('netflow_override_allowed');
}
set netflowOverrideAllowed(value) {
this._netflowOverrideAllowed = value;
}
resetNetflowOverrideAllowed() {
this._netflowOverrideAllowed = undefined;
}
// Temporarily expose input value. Use with caution.
get netflowOverrideAllowedInput() {
return this._netflowOverrideAllowed;
}
get networkResourcePoolKey() {
return this.getStringAttribute('network_resource_pool_key');
}
set networkResourcePoolKey(value) {
this._networkResourcePoolKey = value;
}
resetNetworkResourcePoolKey() {
this._networkResourcePoolKey = undefined;
}
// Temporarily expose input value. Use with caution.
get networkResourcePoolKeyInput() {
return this._networkResourcePoolKey;
}
get networkResourcePoolOverrideAllowed() {
return this.getBooleanAttribute('network_resource_pool_override_allowed');
}
set networkResourcePoolOverrideAllowed(value) {
this._networkResourcePoolOverrideAllowed = value;
}
resetNetworkResourcePoolOverrideAllowed() {
this._networkResourcePoolOverrideAllowed = undefined;
}
// Temporarily expose input value. Use with caution.
get networkResourcePoolOverrideAllowedInput() {
return this._networkResourcePoolOverrideAllowed;
}
get notifySwitches() {
return this.getBooleanAttribute('notify_switches');
}
set notifySwitches(value) {
this._notifySwitches = value;
}
resetNotifySwitches() {
this._notifySwitches = undefined;
}
// Temporarily expose input value. Use with caution.
get notifySwitchesInput() {
return this._notifySwitches;
}
get numberOfPorts() {
return this.getNumberAttribute('number_of_ports');
}
set numberOfPorts(value) {
this._numberOfPorts = value;
}
resetNumberOfPorts() {
this._numberOfPorts = undefined;
}
// Temporarily expose input value. Use with caution.
get numberOfPortsInput() {
return this._numberOfPorts;
}
get portConfigResetAtDisconnect() {
return this.getBooleanAttribute('port_config_reset_at_disconnect');
}
set portConfigResetAtDisconnect(value) {
this._portConfigResetAtDisconnect = value;
}
resetPortConfigResetAtDisconnect() {
this._portConfigResetAtDisconnect = undefined;
}
// Temporarily expose input value. Use with caution.
get portConfigResetAtDisconnectInput() {
return this._portConfigResetAtDisconnect;
}
get portNameFormat() {
return this.getStringAttribute('port_name_format');
}
set portNameFormat(value) {
this._portNameFormat = value;
}
resetPortNameFormat() {
this._portNameFormat = undefined;
}
// Temporarily expose input value. Use with caution.
get portNameFormatInput() {
return this._portNameFormat;
}
get portPrivateSecondaryVlanId() {
return this.getNumberAttribute('port_private_secondary_vlan_id');
}
set portPrivateSecondaryVlanId(value) {
this._portPrivateSecondaryVlanId = value;
}
resetPortPrivateSecondaryVlanId() {
this._portPrivateSecondaryVlanId = undefined;
}
// Temporarily expose input value. Use with caution.
get portPrivateSecondaryVlanIdInput() {
return this._portPrivateSecondaryVlanId;
}
get securityPolicyOverrideAllowed() {
return this.getBooleanAttribute('security_policy_override_allowed');
}
set securityPolicyOverrideAllowed(value) {
this._securityPolicyOverrideAllowed = value;
}
resetSecurityPolicyOverrideAllowed() {
this._securityPolicyOverrideAllowed = undefined;
}
// Temporarily expose input value. Use with caution.
get securityPolicyOverrideAllowedInput() {
return this._securityPolicyOverrideAllowed;
}
get shapingOverrideAllowed() {
return this.getBooleanAttribute('shaping_override_allowed');
}
set shapingOverrideAllowed(value) {
this._shapingOverrideAllowed = value;
}
resetShapingOverrideAllowed() {
this._shapingOverrideAllowed = undefined;
}
// Temporarily expose input value. Use with caution.
get shapingOverrideAllowedInput() {
return this._shapingOverrideAllowed;
}
get standbyUplinks() {
return this.getListAttribute('standby_uplinks');
}
set standbyUplinks(value) {
this._standbyUplinks = value;
}
resetStandbyUplinks() {
this._standbyUplinks = undefined;
}
// Temporarily expose input value. Use with caution.
get standbyUplinksInput() {
return this._standbyUplinks;
}
get tags() {
return cdktf.Fn.tolist(this.getListAttribute('tags'));
}
set tags(value) {
this._tags = value;
}
resetTags() {
this._tags = undefined;
}
// Temporarily expose input value. Use with caution.
get tagsInput() {
return this._tags;
}
get teamingPolicy() {
return this.getStringAttribute('teaming_policy');
}
set teamingPolicy(value) {
this._teamingPolicy = value;
}
resetTeamingPolicy() {
this._teamingPolicy = undefined;
}
// Temporarily expose input value. Use with caution.
get teamingPolicyInput() {
return this._teamingPolicy;
}
get trafficFilterOverrideAllowed() {
return this.getBooleanAttribute('traffic_filter_override_allowed');
}
set trafficFilterOverrideAllowed(value) {
this._trafficFilterOverrideAllowed = value;
}
resetTrafficFilterOverrideAllowed() {
this._trafficFilterOverrideAllowed = undefined;
}
// Temporarily expose input value. Use with caution.
get trafficFilterOverrideAllowedInput() {
return this._trafficFilterOverrideAllowed;
}
get txUplink() {
return this.getBooleanAttribute('tx_uplink');
}
set txUplink(value) {
this._txUplink = value;
}
resetTxUplink() {
this._txUplink = undefined;
}
// Temporarily expose input value. Use with caution.
get txUplinkInput() {
return this._txUplink;
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
resetType() {
this._type = undefined;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
get uplinkTeamingOverrideAllowed() {
return this.getBooleanAttribute('uplink_teaming_override_allowed');
}
set uplinkTeamingOverrideAllowed(value) {
this._uplinkTeamingOverrideAllowed = value;
}
resetUplinkTeamingOverrideAllowed() {
this._uplinkTeamingOverrideAllowed = undefined;
}
// Temporarily expose input value. Use with caution.
get uplinkTeamingOverrideAllowedInput() {
return this._uplinkTeamingOverrideAllowed;
}
get vlanId() {
return this.getNumberAttribute('vlan_id');
}
set vlanId(value) {
this._vlanId = value;
}
resetVlanId() {
this._vlanId = undefined;
}
// Temporarily expose input value. Use with caution.
get vlanIdInput() {
return this._vlanId;
}
get vlanOverrideAllowed() {
return this.getBooleanAttribute('vlan_override_allowed');
}
set vlanOverrideAllowed(value) {
this._vlanOverrideAllowed = value;
}
resetVlanOverrideAllowed() {
this._vlanOverrideAllowed = undefined;
}
// Temporarily expose input value. Use with caution.
get vlanOverrideAllowedInput() {
return this._vlanOverrideAllowed;
}
get vlanRange() {
return this._vlanRange;
}
putVlanRange(value) {
this._vlanRange.internalValue = value;
}
resetVlanRange() {
this._vlanRange.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get vlanRangeInput() {
return this._vlanRange.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
active_uplinks: cdktf.listMapper(cdktf.stringToTerraform, false)(this._activeUplinks),
allow_forged_transmits: cdktf.booleanToTerraform(this._allowForgedTransmits),
allow_mac_changes: cdktf.booleanToTerraform(this._allowMacChanges),
allow_promiscuous: cdktf.booleanToTerraform(this._allowPromiscuous),
auto_expand: cdktf.booleanToTerraform(this._autoExpand),
block_all_ports: cdktf.booleanToTerraform(this._blockAllPorts),
block_override_allowed: cdktf.booleanToTerraform(this._blockOverrideAllowed),
check_beacon: cdktf.booleanToTerraform(this._checkBeacon),
custom_attributes: cdktf.hashMapper(cdktf.stringToTerraform)(this._customAttributes),
description: cdktf.stringToTerraform(this._description),
directpath_gen2_allowed: cdktf.booleanToTerraform(this._directpathGen2Allowed),
distributed_virtual_switch_uuid: cdktf.stringToTerraform(this._distributedVirtualSwitchUuid),
egress_shaping_average_bandwidth: cdktf.numberToTerraform(this._egressShapingAverageBandwidth),
egress_shaping_burst_size: cdktf.numberToTerraform(this._egressShapingBurstSize),
egress_shaping_enabled: cdktf.booleanToTerraform(this._egressShapingEnabled),
egress_shaping_peak_bandwidth: cdktf.numberToTerraform(this._egressShapingPeakBandwidth),
failback: cdktf.booleanToTerraform(this._failback),
id: cdktf.stringToTerraform(this._id),
ingress_shaping_average_bandwidth: cdktf.numberToTerraform(this._ingressShapingAverageBandwidth),
ingress_shaping_burst_size: cdktf.numberToTerraform(this._ingressShapingBurstSize),
ingress_shaping_enabled: cdktf.booleanToTerraform(this._ingressShapingEnabled),
ingress_shaping_peak_bandwidth: cdktf.numberToTerraform(this._ingressShapingPeakBandwidth),
lacp_enabled: cdktf.booleanToTerraform(this._lacpEnabled),
lacp_mode: cdktf.stringToTerraform(this._lacpMode),
live_port_moving_allowed: cdktf.booleanToTerraform(this._livePortMovingAllowed),
name: cdktf.stringToTerraform(this._name),
netflow_enabled: cdktf.booleanToTerraform(this._netflowEnabled),
netflow_override_allowed: cdktf.booleanToTerraform(this._netflowOverrideAllowed),
network_resource_pool_key: cdktf.stringToTerraform(this._networkResourcePoolKey),
network_resource_pool_override_allowed: cdktf.booleanToTerraform(this._networkResourcePoolOverrideAllowed),
notify_switches: cdktf.booleanToTerraform(this._notifySwitches),
number_of_ports: cdktf.numberToTerraform(this._numberOfPorts),
port_config_reset_at_disconnect: cdktf.booleanToTerraform(this._portConfigResetAtDisconnect),
port_name_format: cdktf.stringToTerraform(this._portNameFormat),
port_private_secondary_vlan_id: cdktf.numberToTerraform(this._portPrivateSecondaryVlanId),
security_policy_override_allowed: cdktf.booleanToTerraform(this._securityPolicyOverrideAllowed),
shaping_override_allowed: cdktf.booleanToTerraform(this._shapingOverrideAllowed),
standby_uplinks: cdktf.listMapper(cdktf.stringToTerraform, false)(this._standbyUplinks),
tags: cdktf.listMapper(cdktf.stringToTerraform, false)(this._tags),
teaming_policy: cdktf.stringToTerraform(this._teamingPolicy),
traffic_filter_override_allowed: cdktf.booleanToTerraform(this._trafficFilterOverrideAllowed),
tx_uplink: cdktf.booleanToTerraform(this._txUplink),
type: cdktf.stringToTerraform(this._type),
uplink_teaming_override_allowed: cdktf.booleanToTerraform(this._uplinkTeamingOverrideAllowed),
vlan_id: cdktf.numberToTerraform(this._vlanId),
vlan_override_allowed: cdktf.booleanToTerraform(this._vlanOverrideAllowed),
vlan_range: cdktf.listMapper(distributedPortGroupVlanRangeToTerraform, true)(this._vlanRange.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
active_uplinks: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._activeUplinks),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
allow_forged_transmits: {
value: cdktf.booleanToHclTerraform(this._allowForgedTransmits),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
allow_mac_changes: {
value: cdktf.booleanToHclTerraform(this._allowMacChanges),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
allow_promiscuous: {
value: cdktf.booleanToHclTerraform(this._allowPromiscuous),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
auto_expand: {
value: cdktf.booleanToHclTerraform(this._autoExpand),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
block_all_ports: {
value: cdktf.booleanToHclTerraform(this._blockAllPorts),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
block_override_allowed: {
value: cdktf.booleanToHclTerraform(this._blockOverrideAllowed),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
check_beacon: {
value: cdktf.booleanToHclTerraform(this._checkBeacon),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
custom_attributes: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._customAttributes),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
description: {
value: cdktf.stringToHclTerraform(this._description),
isBlock: false,
type: "simple",
storageClassType: "string",
},
directpath_gen2_allowed: {
value: cdktf.booleanToHclTerraform(this._directpathGen2Allowed),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
distributed_virtual_switch_uuid: {
value: cdktf.stringToHclTerraform(this._distributedVirtualSwitchUuid),
isBlock: false,
type: "simple",
storageClassType: "string",
},
egress_shaping_average_bandwidth: {
value: cdktf.numberToHclTerraform(this._egressShapingAverageBandwidth),
isBlock: false,
type: "simple",
storageClassType: "number",
},
egress_shaping_burst_size: {
value: cdktf.numberToHclTerraform(this._egressShapingBurstSize),
isBlock: false,
type: "simple",
storageClassType: "number",
},
egress_shaping_enabled: {
value: cdktf.booleanToHclTerraform(this._egressShapingEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
egress_shaping_peak_bandwidth: {
value: cdktf.numberToHclTerraform(this._egressShapingPeakBandwidth),
isBlock: false,
type: "simple",
storageClassType: "number",
},
failback: {
value: cdktf.booleanToHclTerraform(this._failback),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ingress_shaping_average_bandwidth: {
value: cdktf.numberToHclTerraform(this._ingressShapingAverageBandwidth),
isBlock: false,
type: "simple",
storageClassType: "number",
},
ingress_shaping_burst_size: {
value: cdktf.numberToHclTerraform(this._ingressShapingBurstSize),
isBlock: false,
type: "simple",
storageClassType: "number",
},
ingress_shaping_enabled: {
value: cdktf.booleanToHclTerraform(this._ingressShapingEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
ingress_shaping_peak_bandwidth: {
value: cdktf.numberToHclTerraform(this._ingressShapingPeakBandwidth),
isBlock: false,
type: "simple",
storageClassType: "number",
},
lacp_enabled: {
value: cdktf.booleanToHclTerraform(this._lacpEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
lacp_mode: {
value: cdktf.stringToHclTerraform(this._lacpMode),
isBlock: false,
type: "simple",
storageClassType: "string",
},
live_port_moving_allowed: {
value: cdktf.booleanToHclTerraform(this._livePortMovingAllowed),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
name: {
value: cdktf.stringToHclTerraform(this._name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
netflow_enabled: {
value: cdktf.booleanToHclTerraform(this._netflowEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
netflow_override_allowed: {
value: cdktf.booleanToHclTerraform(this._netflowOverrideAllowed),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
network_resource_pool_key: {
value: cdktf.stringToHclTerraform(this._networkResourcePoolKey),
isBlock: false,
type: "simple",
storageClassType: "string",
},
network_resource_pool_override_allowed: {
value: cdktf.booleanToHclTerraform(this._networkResourcePoolOverrideAllowed),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
notify_switches: {
value: cdktf.booleanToHclTerraform(this._notifySwitches),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
number_of_ports: {
value: cdktf.numberToHclTerraform(this._numberOfPorts),
isBlock: false,
type: "simple",
storageClassType: "number",
},
port_config_reset_at_disconnect: {
value: cdktf.booleanToHclTerraform(this._portConfigResetAtDisconnect),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
port_name_format: {
value: cdktf.stringToHclTerraform(this._portNameFormat),
isBlock: false,
type: "simple",
storageClassType: "string",
},
port_private_secondary_vlan_id: {
value: cdktf.numberToHclTerraform(this._portPrivateSecondaryVlanId),
isBlock: false,
type: "simple",
storageClassType: "number",
},
security_policy_override_allowed: {
value: cdktf.booleanToHclTerraform(this._securityPolicyOverrideAllowed),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
shaping_override_allowed: {
value: cdktf.booleanToHclTerraform(this._shapingOverrideAllowed),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
standby_uplinks: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._standbyUplinks),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
tags: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._tags),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
teaming_policy: {
value: cdktf.stringToHclTerraform(this._teamingPolicy),
isBlock: false,
type: "simple",
storageClassType: "string",
},
traffic_filter_override_allowed: {
value: cdktf.booleanToHclTerraform(this._trafficFilterOverrideAllowed),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
tx_uplink: {
value: cdktf.booleanToHclTerraform(this._txUplink),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
type: {
value: cdktf.stringToHclTerraform(this._type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
uplink_teaming_override_allowed: {
value: cdktf.booleanToHclTerraform(this._uplinkTeamingOverrideAllowed),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
vlan_id: {
value: cdktf.numberToHclTerraform(this._vlanId),
isBlock: false,
type: "simple",
storageClassType: "number",
},
vlan_override_allowed: {
value: cdktf.booleanToHclTerraform(this._vlanOverrideAllowed),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
vlan_range: {
value: cdktf.listMapperHcl(distributedPortGroupVlanRangeToHclTerraform, true)(this._vlanRange.internalValue),
isBlock: true,
type: "set",
storageClassType: "DistributedPortGroupVlanRangeList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.DistributedPortGroup = DistributedPortGroup;
_c = JSII_RTTI_SYMBOL_1;
DistributedPortGroup[_c] = { fqn: "@cdktf/provider-vsphere.distributedPortGroup.DistributedPortGroup", version: "11.2.1" };
// =================
// STATIC PROPERTIES
// =================
DistributedPortGroup.tfResourceType = "vsphere_distributed_port_group";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZGlzdHJpYnV0ZWQtcG9ydC1ncm91cC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBeVRBLDRGQVNDO0FBR0Qsa0dBc0JDOztBQWxWRCwrQkFBK0I7QUFnVC9CLFNBQWdCLHdDQUF3QyxDQUFDLE1BQTBEO0lBQ2pILElBQUksQ0FBQyxLQUFLLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEtBQUssQ0FBQyxZQUFZLENBQUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFBQyxPQUFPLE1BQU0sQ0FBQztJQUFDLENBQUM7SUFDNUYsSUFBSSxLQUFLLENBQUMsZ0JBQWdCLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUNuQyxNQUFNLElBQUksS0FBSyxDQUFDLG9IQUFvSCxDQUFDLENBQUM7SUFDeEksQ0FBQztJQUNELE9BQU87UUFDTCxRQUFRLEVBQUUsS0FBSyxDQUFDLGlCQUFpQixDQUFDLE1BQU8sQ0FBQyxPQUFPLENBQUM7UUFDbEQsUUFBUSxFQUFFLEtBQUssQ0FBQyxpQkFBaUIsQ0FBQyxNQUFPLENBQUMsT0FBTyxDQUFDO0tBQ25ELENBQUE7QUFDSCxDQUFDO0FBR0QsU0FBZ0IsMkNBQTJDLENBQUMsTUFBMEQ7SUFDcEgsSUFBSS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