@cdktf/provider-databricks
Version:
Prebuilt databricks Provider for Terraform CDK (cdktf)
1,162 lines • 247 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
Object.defineProperty(exports, "__esModule", { value: true });
exports.InstancePool = exports.InstancePoolPreloadedDockerImageList = exports.InstancePoolPreloadedDockerImageOutputReference = exports.InstancePoolPreloadedDockerImageBasicAuthOutputReference = exports.InstancePoolInstancePoolFleetAttributesOutputReference = exports.InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideList = exports.InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideOutputReference = exports.InstancePoolInstancePoolFleetAttributesFleetSpotOptionOutputReference = exports.InstancePoolInstancePoolFleetAttributesFleetOnDemandOptionOutputReference = exports.InstancePoolGcpAttributesOutputReference = exports.InstancePoolDiskSpecOutputReference = exports.InstancePoolDiskSpecDiskTypeOutputReference = exports.InstancePoolAzureAttributesOutputReference = exports.InstancePoolAwsAttributesOutputReference = void 0;
exports.instancePoolAwsAttributesToTerraform = instancePoolAwsAttributesToTerraform;
exports.instancePoolAwsAttributesToHclTerraform = instancePoolAwsAttributesToHclTerraform;
exports.instancePoolAzureAttributesToTerraform = instancePoolAzureAttributesToTerraform;
exports.instancePoolAzureAttributesToHclTerraform = instancePoolAzureAttributesToHclTerraform;
exports.instancePoolDiskSpecDiskTypeToTerraform = instancePoolDiskSpecDiskTypeToTerraform;
exports.instancePoolDiskSpecDiskTypeToHclTerraform = instancePoolDiskSpecDiskTypeToHclTerraform;
exports.instancePoolDiskSpecToTerraform = instancePoolDiskSpecToTerraform;
exports.instancePoolDiskSpecToHclTerraform = instancePoolDiskSpecToHclTerraform;
exports.instancePoolGcpAttributesToTerraform = instancePoolGcpAttributesToTerraform;
exports.instancePoolGcpAttributesToHclTerraform = instancePoolGcpAttributesToHclTerraform;
exports.instancePoolInstancePoolFleetAttributesFleetOnDemandOptionToTerraform = instancePoolInstancePoolFleetAttributesFleetOnDemandOptionToTerraform;
exports.instancePoolInstancePoolFleetAttributesFleetOnDemandOptionToHclTerraform = instancePoolInstancePoolFleetAttributesFleetOnDemandOptionToHclTerraform;
exports.instancePoolInstancePoolFleetAttributesFleetSpotOptionToTerraform = instancePoolInstancePoolFleetAttributesFleetSpotOptionToTerraform;
exports.instancePoolInstancePoolFleetAttributesFleetSpotOptionToHclTerraform = instancePoolInstancePoolFleetAttributesFleetSpotOptionToHclTerraform;
exports.instancePoolInstancePoolFleetAttributesLaunchTemplateOverrideToTerraform = instancePoolInstancePoolFleetAttributesLaunchTemplateOverrideToTerraform;
exports.instancePoolInstancePoolFleetAttributesLaunchTemplateOverrideToHclTerraform = instancePoolInstancePoolFleetAttributesLaunchTemplateOverrideToHclTerraform;
exports.instancePoolInstancePoolFleetAttributesToTerraform = instancePoolInstancePoolFleetAttributesToTerraform;
exports.instancePoolInstancePoolFleetAttributesToHclTerraform = instancePoolInstancePoolFleetAttributesToHclTerraform;
exports.instancePoolPreloadedDockerImageBasicAuthToTerraform = instancePoolPreloadedDockerImageBasicAuthToTerraform;
exports.instancePoolPreloadedDockerImageBasicAuthToHclTerraform = instancePoolPreloadedDockerImageBasicAuthToHclTerraform;
exports.instancePoolPreloadedDockerImageToTerraform = instancePoolPreloadedDockerImageToTerraform;
exports.instancePoolPreloadedDockerImageToHclTerraform = instancePoolPreloadedDockerImageToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function instancePoolAwsAttributesToTerraform(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 {
availability: cdktf.stringToTerraform(struct.availability),
instance_profile_arn: cdktf.stringToTerraform(struct.instanceProfileArn),
spot_bid_price_percent: cdktf.numberToTerraform(struct.spotBidPricePercent),
zone_id: cdktf.stringToTerraform(struct.zoneId),
};
}
function instancePoolAwsAttributesToHclTerraform(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 = {
availability: {
value: cdktf.stringToHclTerraform(struct.availability),
isBlock: false,
type: "simple",
storageClassType: "string",
},
instance_profile_arn: {
value: cdktf.stringToHclTerraform(struct.instanceProfileArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
spot_bid_price_percent: {
value: cdktf.numberToHclTerraform(struct.spotBidPricePercent),
isBlock: false,
type: "simple",
storageClassType: "number",
},
zone_id: {
value: cdktf.stringToHclTerraform(struct.zoneId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class InstancePoolAwsAttributesOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._availability !== undefined) {
hasAnyValues = true;
internalValueResult.availability = this._availability;
}
if (this._instanceProfileArn !== undefined) {
hasAnyValues = true;
internalValueResult.instanceProfileArn = this._instanceProfileArn;
}
if (this._spotBidPricePercent !== undefined) {
hasAnyValues = true;
internalValueResult.spotBidPricePercent = this._spotBidPricePercent;
}
if (this._zoneId !== undefined) {
hasAnyValues = true;
internalValueResult.zoneId = this._zoneId;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._availability = undefined;
this._instanceProfileArn = undefined;
this._spotBidPricePercent = undefined;
this._zoneId = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._availability = value.availability;
this._instanceProfileArn = value.instanceProfileArn;
this._spotBidPricePercent = value.spotBidPricePercent;
this._zoneId = value.zoneId;
}
}
get availability() {
return this.getStringAttribute('availability');
}
set availability(value) {
this._availability = value;
}
resetAvailability() {
this._availability = undefined;
}
// Temporarily expose input value. Use with caution.
get availabilityInput() {
return this._availability;
}
get instanceProfileArn() {
return this.getStringAttribute('instance_profile_arn');
}
set instanceProfileArn(value) {
this._instanceProfileArn = value;
}
resetInstanceProfileArn() {
this._instanceProfileArn = undefined;
}
// Temporarily expose input value. Use with caution.
get instanceProfileArnInput() {
return this._instanceProfileArn;
}
get spotBidPricePercent() {
return this.getNumberAttribute('spot_bid_price_percent');
}
set spotBidPricePercent(value) {
this._spotBidPricePercent = value;
}
resetSpotBidPricePercent() {
this._spotBidPricePercent = undefined;
}
// Temporarily expose input value. Use with caution.
get spotBidPricePercentInput() {
return this._spotBidPricePercent;
}
get zoneId() {
return this.getStringAttribute('zone_id');
}
set zoneId(value) {
this._zoneId = value;
}
resetZoneId() {
this._zoneId = undefined;
}
// Temporarily expose input value. Use with caution.
get zoneIdInput() {
return this._zoneId;
}
}
exports.InstancePoolAwsAttributesOutputReference = InstancePoolAwsAttributesOutputReference;
_a = JSII_RTTI_SYMBOL_1;
InstancePoolAwsAttributesOutputReference[_a] = { fqn: "@cdktf/provider-databricks.instancePool.InstancePoolAwsAttributesOutputReference", version: "15.16.1" };
function instancePoolAzureAttributesToTerraform(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 {
availability: cdktf.stringToTerraform(struct.availability),
spot_bid_max_price: cdktf.numberToTerraform(struct.spotBidMaxPrice),
};
}
function instancePoolAzureAttributesToHclTerraform(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 = {
availability: {
value: cdktf.stringToHclTerraform(struct.availability),
isBlock: false,
type: "simple",
storageClassType: "string",
},
spot_bid_max_price: {
value: cdktf.numberToHclTerraform(struct.spotBidMaxPrice),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class InstancePoolAzureAttributesOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._availability !== undefined) {
hasAnyValues = true;
internalValueResult.availability = this._availability;
}
if (this._spotBidMaxPrice !== undefined) {
hasAnyValues = true;
internalValueResult.spotBidMaxPrice = this._spotBidMaxPrice;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._availability = undefined;
this._spotBidMaxPrice = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._availability = value.availability;
this._spotBidMaxPrice = value.spotBidMaxPrice;
}
}
get availability() {
return this.getStringAttribute('availability');
}
set availability(value) {
this._availability = value;
}
resetAvailability() {
this._availability = undefined;
}
// Temporarily expose input value. Use with caution.
get availabilityInput() {
return this._availability;
}
get spotBidMaxPrice() {
return this.getNumberAttribute('spot_bid_max_price');
}
set spotBidMaxPrice(value) {
this._spotBidMaxPrice = value;
}
resetSpotBidMaxPrice() {
this._spotBidMaxPrice = undefined;
}
// Temporarily expose input value. Use with caution.
get spotBidMaxPriceInput() {
return this._spotBidMaxPrice;
}
}
exports.InstancePoolAzureAttributesOutputReference = InstancePoolAzureAttributesOutputReference;
_b = JSII_RTTI_SYMBOL_1;
InstancePoolAzureAttributesOutputReference[_b] = { fqn: "@cdktf/provider-databricks.instancePool.InstancePoolAzureAttributesOutputReference", version: "15.16.1" };
function instancePoolDiskSpecDiskTypeToTerraform(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 {
azure_disk_volume_type: cdktf.stringToTerraform(struct.azureDiskVolumeType),
ebs_volume_type: cdktf.stringToTerraform(struct.ebsVolumeType),
};
}
function instancePoolDiskSpecDiskTypeToHclTerraform(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 = {
azure_disk_volume_type: {
value: cdktf.stringToHclTerraform(struct.azureDiskVolumeType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ebs_volume_type: {
value: cdktf.stringToHclTerraform(struct.ebsVolumeType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class InstancePoolDiskSpecDiskTypeOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._azureDiskVolumeType !== undefined) {
hasAnyValues = true;
internalValueResult.azureDiskVolumeType = this._azureDiskVolumeType;
}
if (this._ebsVolumeType !== undefined) {
hasAnyValues = true;
internalValueResult.ebsVolumeType = this._ebsVolumeType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._azureDiskVolumeType = undefined;
this._ebsVolumeType = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._azureDiskVolumeType = value.azureDiskVolumeType;
this._ebsVolumeType = value.ebsVolumeType;
}
}
get azureDiskVolumeType() {
return this.getStringAttribute('azure_disk_volume_type');
}
set azureDiskVolumeType(value) {
this._azureDiskVolumeType = value;
}
resetAzureDiskVolumeType() {
this._azureDiskVolumeType = undefined;
}
// Temporarily expose input value. Use with caution.
get azureDiskVolumeTypeInput() {
return this._azureDiskVolumeType;
}
get ebsVolumeType() {
return this.getStringAttribute('ebs_volume_type');
}
set ebsVolumeType(value) {
this._ebsVolumeType = value;
}
resetEbsVolumeType() {
this._ebsVolumeType = undefined;
}
// Temporarily expose input value. Use with caution.
get ebsVolumeTypeInput() {
return this._ebsVolumeType;
}
}
exports.InstancePoolDiskSpecDiskTypeOutputReference = InstancePoolDiskSpecDiskTypeOutputReference;
_c = JSII_RTTI_SYMBOL_1;
InstancePoolDiskSpecDiskTypeOutputReference[_c] = { fqn: "@cdktf/provider-databricks.instancePool.InstancePoolDiskSpecDiskTypeOutputReference", version: "15.16.1" };
function instancePoolDiskSpecToTerraform(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 {
disk_count: cdktf.numberToTerraform(struct.diskCount),
disk_size: cdktf.numberToTerraform(struct.diskSize),
disk_type: instancePoolDiskSpecDiskTypeToTerraform(struct.diskType),
};
}
function instancePoolDiskSpecToHclTerraform(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 = {
disk_count: {
value: cdktf.numberToHclTerraform(struct.diskCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
disk_size: {
value: cdktf.numberToHclTerraform(struct.diskSize),
isBlock: false,
type: "simple",
storageClassType: "number",
},
disk_type: {
value: instancePoolDiskSpecDiskTypeToHclTerraform(struct.diskType),
isBlock: true,
type: "list",
storageClassType: "InstancePoolDiskSpecDiskTypeList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class InstancePoolDiskSpecOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
// disk_type - computed: false, optional: true, required: false
this._diskType = new InstancePoolDiskSpecDiskTypeOutputReference(this, "disk_type");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._diskCount !== undefined) {
hasAnyValues = true;
internalValueResult.diskCount = this._diskCount;
}
if (this._diskSize !== undefined) {
hasAnyValues = true;
internalValueResult.diskSize = this._diskSize;
}
if (this._diskType?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.diskType = this._diskType?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._diskCount = undefined;
this._diskSize = undefined;
this._diskType.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._diskCount = value.diskCount;
this._diskSize = value.diskSize;
this._diskType.internalValue = value.diskType;
}
}
get diskCount() {
return this.getNumberAttribute('disk_count');
}
set diskCount(value) {
this._diskCount = value;
}
resetDiskCount() {
this._diskCount = undefined;
}
// Temporarily expose input value. Use with caution.
get diskCountInput() {
return this._diskCount;
}
get diskSize() {
return this.getNumberAttribute('disk_size');
}
set diskSize(value) {
this._diskSize = value;
}
resetDiskSize() {
this._diskSize = undefined;
}
// Temporarily expose input value. Use with caution.
get diskSizeInput() {
return this._diskSize;
}
get diskType() {
return this._diskType;
}
putDiskType(value) {
this._diskType.internalValue = value;
}
resetDiskType() {
this._diskType.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get diskTypeInput() {
return this._diskType.internalValue;
}
}
exports.InstancePoolDiskSpecOutputReference = InstancePoolDiskSpecOutputReference;
_d = JSII_RTTI_SYMBOL_1;
InstancePoolDiskSpecOutputReference[_d] = { fqn: "@cdktf/provider-databricks.instancePool.InstancePoolDiskSpecOutputReference", version: "15.16.1" };
function instancePoolGcpAttributesToTerraform(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 {
gcp_availability: cdktf.stringToTerraform(struct.gcpAvailability),
local_ssd_count: cdktf.numberToTerraform(struct.localSsdCount),
zone_id: cdktf.stringToTerraform(struct.zoneId),
};
}
function instancePoolGcpAttributesToHclTerraform(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 = {
gcp_availability: {
value: cdktf.stringToHclTerraform(struct.gcpAvailability),
isBlock: false,
type: "simple",
storageClassType: "string",
},
local_ssd_count: {
value: cdktf.numberToHclTerraform(struct.localSsdCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
zone_id: {
value: cdktf.stringToHclTerraform(struct.zoneId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class InstancePoolGcpAttributesOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._gcpAvailability !== undefined) {
hasAnyValues = true;
internalValueResult.gcpAvailability = this._gcpAvailability;
}
if (this._localSsdCount !== undefined) {
hasAnyValues = true;
internalValueResult.localSsdCount = this._localSsdCount;
}
if (this._zoneId !== undefined) {
hasAnyValues = true;
internalValueResult.zoneId = this._zoneId;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._gcpAvailability = undefined;
this._localSsdCount = undefined;
this._zoneId = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._gcpAvailability = value.gcpAvailability;
this._localSsdCount = value.localSsdCount;
this._zoneId = value.zoneId;
}
}
get gcpAvailability() {
return this.getStringAttribute('gcp_availability');
}
set gcpAvailability(value) {
this._gcpAvailability = value;
}
resetGcpAvailability() {
this._gcpAvailability = undefined;
}
// Temporarily expose input value. Use with caution.
get gcpAvailabilityInput() {
return this._gcpAvailability;
}
get localSsdCount() {
return this.getNumberAttribute('local_ssd_count');
}
set localSsdCount(value) {
this._localSsdCount = value;
}
resetLocalSsdCount() {
this._localSsdCount = undefined;
}
// Temporarily expose input value. Use with caution.
get localSsdCountInput() {
return this._localSsdCount;
}
get zoneId() {
return this.getStringAttribute('zone_id');
}
set zoneId(value) {
this._zoneId = value;
}
resetZoneId() {
this._zoneId = undefined;
}
// Temporarily expose input value. Use with caution.
get zoneIdInput() {
return this._zoneId;
}
}
exports.InstancePoolGcpAttributesOutputReference = InstancePoolGcpAttributesOutputReference;
_e = JSII_RTTI_SYMBOL_1;
InstancePoolGcpAttributesOutputReference[_e] = { fqn: "@cdktf/provider-databricks.instancePool.InstancePoolGcpAttributesOutputReference", version: "15.16.1" };
function instancePoolInstancePoolFleetAttributesFleetOnDemandOptionToTerraform(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 {
allocation_strategy: cdktf.stringToTerraform(struct.allocationStrategy),
instance_pools_to_use_count: cdktf.numberToTerraform(struct.instancePoolsToUseCount),
};
}
function instancePoolInstancePoolFleetAttributesFleetOnDemandOptionToHclTerraform(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 = {
allocation_strategy: {
value: cdktf.stringToHclTerraform(struct.allocationStrategy),
isBlock: false,
type: "simple",
storageClassType: "string",
},
instance_pools_to_use_count: {
value: cdktf.numberToHclTerraform(struct.instancePoolsToUseCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class InstancePoolInstancePoolFleetAttributesFleetOnDemandOptionOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._allocationStrategy !== undefined) {
hasAnyValues = true;
internalValueResult.allocationStrategy = this._allocationStrategy;
}
if (this._instancePoolsToUseCount !== undefined) {
hasAnyValues = true;
internalValueResult.instancePoolsToUseCount = this._instancePoolsToUseCount;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._allocationStrategy = undefined;
this._instancePoolsToUseCount = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._allocationStrategy = value.allocationStrategy;
this._instancePoolsToUseCount = value.instancePoolsToUseCount;
}
}
get allocationStrategy() {
return this.getStringAttribute('allocation_strategy');
}
set allocationStrategy(value) {
this._allocationStrategy = value;
}
// Temporarily expose input value. Use with caution.
get allocationStrategyInput() {
return this._allocationStrategy;
}
get instancePoolsToUseCount() {
return this.getNumberAttribute('instance_pools_to_use_count');
}
set instancePoolsToUseCount(value) {
this._instancePoolsToUseCount = value;
}
resetInstancePoolsToUseCount() {
this._instancePoolsToUseCount = undefined;
}
// Temporarily expose input value. Use with caution.
get instancePoolsToUseCountInput() {
return this._instancePoolsToUseCount;
}
}
exports.InstancePoolInstancePoolFleetAttributesFleetOnDemandOptionOutputReference = InstancePoolInstancePoolFleetAttributesFleetOnDemandOptionOutputReference;
_f = JSII_RTTI_SYMBOL_1;
InstancePoolInstancePoolFleetAttributesFleetOnDemandOptionOutputReference[_f] = { fqn: "@cdktf/provider-databricks.instancePool.InstancePoolInstancePoolFleetAttributesFleetOnDemandOptionOutputReference", version: "15.16.1" };
function instancePoolInstancePoolFleetAttributesFleetSpotOptionToTerraform(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 {
allocation_strategy: cdktf.stringToTerraform(struct.allocationStrategy),
instance_pools_to_use_count: cdktf.numberToTerraform(struct.instancePoolsToUseCount),
};
}
function instancePoolInstancePoolFleetAttributesFleetSpotOptionToHclTerraform(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 = {
allocation_strategy: {
value: cdktf.stringToHclTerraform(struct.allocationStrategy),
isBlock: false,
type: "simple",
storageClassType: "string",
},
instance_pools_to_use_count: {
value: cdktf.numberToHclTerraform(struct.instancePoolsToUseCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class InstancePoolInstancePoolFleetAttributesFleetSpotOptionOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._allocationStrategy !== undefined) {
hasAnyValues = true;
internalValueResult.allocationStrategy = this._allocationStrategy;
}
if (this._instancePoolsToUseCount !== undefined) {
hasAnyValues = true;
internalValueResult.instancePoolsToUseCount = this._instancePoolsToUseCount;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._allocationStrategy = undefined;
this._instancePoolsToUseCount = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._allocationStrategy = value.allocationStrategy;
this._instancePoolsToUseCount = value.instancePoolsToUseCount;
}
}
get allocationStrategy() {
return this.getStringAttribute('allocation_strategy');
}
set allocationStrategy(value) {
this._allocationStrategy = value;
}
// Temporarily expose input value. Use with caution.
get allocationStrategyInput() {
return this._allocationStrategy;
}
get instancePoolsToUseCount() {
return this.getNumberAttribute('instance_pools_to_use_count');
}
set instancePoolsToUseCount(value) {
this._instancePoolsToUseCount = value;
}
resetInstancePoolsToUseCount() {
this._instancePoolsToUseCount = undefined;
}
// Temporarily expose input value. Use with caution.
get instancePoolsToUseCountInput() {
return this._instancePoolsToUseCount;
}
}
exports.InstancePoolInstancePoolFleetAttributesFleetSpotOptionOutputReference = InstancePoolInstancePoolFleetAttributesFleetSpotOptionOutputReference;
_g = JSII_RTTI_SYMBOL_1;
InstancePoolInstancePoolFleetAttributesFleetSpotOptionOutputReference[_g] = { fqn: "@cdktf/provider-databricks.instancePool.InstancePoolInstancePoolFleetAttributesFleetSpotOptionOutputReference", version: "15.16.1" };
function instancePoolInstancePoolFleetAttributesLaunchTemplateOverrideToTerraform(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 {
availability_zone: cdktf.stringToTerraform(struct.availabilityZone),
instance_type: cdktf.stringToTerraform(struct.instanceType),
};
}
function instancePoolInstancePoolFleetAttributesLaunchTemplateOverrideToHclTerraform(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 = {
availability_zone: {
value: cdktf.stringToHclTerraform(struct.availabilityZone),
isBlock: false,
type: "simple",
storageClassType: "string",
},
instance_type: {
value: cdktf.stringToHclTerraform(struct.instanceType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideOutputReference 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._availabilityZone !== undefined) {
hasAnyValues = true;
internalValueResult.availabilityZone = this._availabilityZone;
}
if (this._instanceType !== undefined) {
hasAnyValues = true;
internalValueResult.instanceType = this._instanceType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._availabilityZone = undefined;
this._instanceType = 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._availabilityZone = value.availabilityZone;
this._instanceType = value.instanceType;
}
}
get availabilityZone() {
return this.getStringAttribute('availability_zone');
}
set availabilityZone(value) {
this._availabilityZone = value;
}
// Temporarily expose input value. Use with caution.
get availabilityZoneInput() {
return this._availabilityZone;
}
get instanceType() {
return this.getStringAttribute('instance_type');
}
set instanceType(value) {
this._instanceType = value;
}
// Temporarily expose input value. Use with caution.
get instanceTypeInput() {
return this._instanceType;
}
}
exports.InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideOutputReference = InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideOutputReference;
_h = JSII_RTTI_SYMBOL_1;
InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideOutputReference[_h] = { fqn: "@cdktf/provider-databricks.instancePool.InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideOutputReference", version: "15.16.1" };
class InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideList 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 InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideList = InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideList;
_j = JSII_RTTI_SYMBOL_1;
InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideList[_j] = { fqn: "@cdktf/provider-databricks.instancePool.InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideList", version: "15.16.1" };
function instancePoolInstancePoolFleetAttributesToTerraform(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 {
fleet_on_demand_option: instancePoolInstancePoolFleetAttributesFleetOnDemandOptionToTerraform(struct.fleetOnDemandOption),
fleet_spot_option: instancePoolInstancePoolFleetAttributesFleetSpotOptionToTerraform(struct.fleetSpotOption),
launch_template_override: cdktf.listMapper(instancePoolInstancePoolFleetAttributesLaunchTemplateOverrideToTerraform, true)(struct.launchTemplateOverride),
};
}
function instancePoolInstancePoolFleetAttributesToHclTerraform(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 = {
fleet_on_demand_option: {
value: instancePoolInstancePoolFleetAttributesFleetOnDemandOptionToHclTerraform(struct.fleetOnDemandOption),
isBlock: true,
type: "list",
storageClassType: "InstancePoolInstancePoolFleetAttributesFleetOnDemandOptionList",
},
fleet_spot_option: {
value: instancePoolInstancePoolFleetAttributesFleetSpotOptionToHclTerraform(struct.fleetSpotOption),
isBlock: true,
type: "list",
storageClassType: "InstancePoolInstancePoolFleetAttributesFleetSpotOptionList",
},
launch_template_override: {
value: cdktf.listMapperHcl(instancePoolInstancePoolFleetAttributesLaunchTemplateOverrideToHclTerraform, true)(struct.launchTemplateOverride),
isBlock: true,
type: "set",
storageClassType: "InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class InstancePoolInstancePoolFleetAttributesOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
// fleet_on_demand_option - computed: false, optional: true, required: false
this._fleetOnDemandOption = new InstancePoolInstancePoolFleetAttributesFleetOnDemandOptionOutputReference(this, "fleet_on_demand_option");
// fleet_spot_option - computed: false, optional: true, required: false
this._fleetSpotOption = new InstancePoolInstancePoolFleetAttributesFleetSpotOptionOutputReference(this, "fleet_spot_option");
// launch_template_override - computed: false, optional: false, required: true
this._launchTemplateOverride = new InstancePoolInstancePoolFleetAttributesLaunchTemplateOverrideList(this, "launch_template_override", true);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._fleetOnDemandOption?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.fleetOnDemandOption = this._fleetOnDemandOption?.internalValue;
}
if (this._fleetSpotOption?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.fleetSpotOption = this._fleetSpotOption?.internalValue;
}
if (this._launchTemplateOverride?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.launchTemplateOverride = this._launchTemplateOverride?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._fleetOnDemandOption.internalValue = undefined;
this._fleetSpotOption.internalValue = undefined;
this._launchTemplateOverride.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._fleetOnDemandOption.internalValue = value.fleetOnDemandOption;
this._fleetSpotOption.internalValue = value.fleetSpotOption;
this._launchTemplateOverride.internalValue = value.launchTemplateOverride;
}
}
get fleetOnDemandOption() {
return this._fleetOnDemandOption;
}
putFleetOnDemandOption(value) {
this._fleetOnDemandOption.internalValue = value;
}
resetFleetOnDemandOption() {
this._fleetOnDemandOption.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get fleetOnDemandOptionInput() {
return this._fleetOnDemandOption.internalValue;
}
get fleetSpotOption() {
return this._fleetSpotOption;
}
putFleetSpotOption(value) {
this._fleetSpotOption.internalValue = value;
}
resetFleetSpotOption() {
this._fleetSpotOption.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get fleetSpotOptionInput() {
return this._fleetSpotOption.internalValue;
}
get launchTemplateOverride() {
return this._launchTemplateOverride;
}
putLaunchTemplateOverride(value) {
this._launchTemplateOverride.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get launchTemplateOverrideInput() {
return this._launchTemplateOverride.internalValue;
}
}
exports.InstancePoolInstancePoolFleetAttributesOutputReference = InstancePoolInstancePoolFleetAttributesOutputReference;
_k = JSII_RTTI_SYMBOL_1;
InstancePoolInstancePoolFleetAttributesOutputReference[_k] = { fqn: "@cdktf/provider-databricks.instancePool.InstancePoolInstancePoolFleetAttributesOutputReference", version: "15.16.1" };
function instancePoolPreloadedDockerImageBasicAuthToTerraform(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 {
password: cdktf.stringToTerraform(struct.password),
username: cdktf.stringToTerraform(struct.username),
};
}
function instancePoolPreloadedDockerImageBasicAuthToHclTerraform(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 = {
password: {
value: cdktf.stringToHclTerraform(struct.password),
isBlock: false,
type: "simple",
storageClassType: "string",
},
username: {
value: cdktf.stringToHclTerraform(struct.username),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class InstancePoolPreloadedDockerImageBasicAuthOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._password !== undefined) {
hasAnyValues = true;
internalValueResult.password = this._password;
}
if (this._username !== undefined) {
hasAnyValues = true;
internalValueResult.username = this._username;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._password = undefined;
this._username = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._password = value.password;
this._username = value.username;
}
}
get password() {
return this.getStringAttribute('password');
}
set password(value) {
this._password = value;
}
// Temporarily expose input value. Use with caution.
get passwor