@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,266 lines • 185 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BatchComputeEnvironment = exports.BatchComputeEnvironmentUpdatePolicyOutputReference = exports.BatchComputeEnvironmentEksConfigurationOutputReference = exports.BatchComputeEnvironmentComputeResourcesOutputReference = exports.BatchComputeEnvironmentComputeResourcesLaunchTemplateOutputReference = exports.BatchComputeEnvironmentComputeResourcesEc2ConfigurationList = exports.BatchComputeEnvironmentComputeResourcesEc2ConfigurationOutputReference = void 0;
exports.batchComputeEnvironmentComputeResourcesEc2ConfigurationToTerraform = batchComputeEnvironmentComputeResourcesEc2ConfigurationToTerraform;
exports.batchComputeEnvironmentComputeResourcesEc2ConfigurationToHclTerraform = batchComputeEnvironmentComputeResourcesEc2ConfigurationToHclTerraform;
exports.batchComputeEnvironmentComputeResourcesLaunchTemplateToTerraform = batchComputeEnvironmentComputeResourcesLaunchTemplateToTerraform;
exports.batchComputeEnvironmentComputeResourcesLaunchTemplateToHclTerraform = batchComputeEnvironmentComputeResourcesLaunchTemplateToHclTerraform;
exports.batchComputeEnvironmentComputeResourcesToTerraform = batchComputeEnvironmentComputeResourcesToTerraform;
exports.batchComputeEnvironmentComputeResourcesToHclTerraform = batchComputeEnvironmentComputeResourcesToHclTerraform;
exports.batchComputeEnvironmentEksConfigurationToTerraform = batchComputeEnvironmentEksConfigurationToTerraform;
exports.batchComputeEnvironmentEksConfigurationToHclTerraform = batchComputeEnvironmentEksConfigurationToHclTerraform;
exports.batchComputeEnvironmentUpdatePolicyToTerraform = batchComputeEnvironmentUpdatePolicyToTerraform;
exports.batchComputeEnvironmentUpdatePolicyToHclTerraform = batchComputeEnvironmentUpdatePolicyToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function batchComputeEnvironmentComputeResourcesEc2ConfigurationToTerraform(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 {
image_id_override: cdktf.stringToTerraform(struct.imageIdOverride),
image_kubernetes_version: cdktf.stringToTerraform(struct.imageKubernetesVersion),
image_type: cdktf.stringToTerraform(struct.imageType),
};
}
function batchComputeEnvironmentComputeResourcesEc2ConfigurationToHclTerraform(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 = {
image_id_override: {
value: cdktf.stringToHclTerraform(struct.imageIdOverride),
isBlock: false,
type: "simple",
storageClassType: "string",
},
image_kubernetes_version: {
value: cdktf.stringToHclTerraform(struct.imageKubernetesVersion),
isBlock: false,
type: "simple",
storageClassType: "string",
},
image_type: {
value: cdktf.stringToHclTerraform(struct.imageType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BatchComputeEnvironmentComputeResourcesEc2ConfigurationOutputReference 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._imageIdOverride !== undefined) {
hasAnyValues = true;
internalValueResult.imageIdOverride = this._imageIdOverride;
}
if (this._imageKubernetesVersion !== undefined) {
hasAnyValues = true;
internalValueResult.imageKubernetesVersion = this._imageKubernetesVersion;
}
if (this._imageType !== undefined) {
hasAnyValues = true;
internalValueResult.imageType = this._imageType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._imageIdOverride = undefined;
this._imageKubernetesVersion = undefined;
this._imageType = 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._imageIdOverride = value.imageIdOverride;
this._imageKubernetesVersion = value.imageKubernetesVersion;
this._imageType = value.imageType;
}
}
get imageIdOverride() {
return this.getStringAttribute('image_id_override');
}
set imageIdOverride(value) {
this._imageIdOverride = value;
}
resetImageIdOverride() {
this._imageIdOverride = undefined;
}
// Temporarily expose input value. Use with caution.
get imageIdOverrideInput() {
return this._imageIdOverride;
}
get imageKubernetesVersion() {
return this.getStringAttribute('image_kubernetes_version');
}
set imageKubernetesVersion(value) {
this._imageKubernetesVersion = value;
}
resetImageKubernetesVersion() {
this._imageKubernetesVersion = undefined;
}
// Temporarily expose input value. Use with caution.
get imageKubernetesVersionInput() {
return this._imageKubernetesVersion;
}
get imageType() {
return this.getStringAttribute('image_type');
}
set imageType(value) {
this._imageType = value;
}
resetImageType() {
this._imageType = undefined;
}
// Temporarily expose input value. Use with caution.
get imageTypeInput() {
return this._imageType;
}
}
exports.BatchComputeEnvironmentComputeResourcesEc2ConfigurationOutputReference = BatchComputeEnvironmentComputeResourcesEc2ConfigurationOutputReference;
_a = JSII_RTTI_SYMBOL_1;
BatchComputeEnvironmentComputeResourcesEc2ConfigurationOutputReference[_a] = { fqn: "@cdktf/provider-aws.batchComputeEnvironment.BatchComputeEnvironmentComputeResourcesEc2ConfigurationOutputReference", version: "21.22.1" };
class BatchComputeEnvironmentComputeResourcesEc2ConfigurationList 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 BatchComputeEnvironmentComputeResourcesEc2ConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BatchComputeEnvironmentComputeResourcesEc2ConfigurationList = BatchComputeEnvironmentComputeResourcesEc2ConfigurationList;
_b = JSII_RTTI_SYMBOL_1;
BatchComputeEnvironmentComputeResourcesEc2ConfigurationList[_b] = { fqn: "@cdktf/provider-aws.batchComputeEnvironment.BatchComputeEnvironmentComputeResourcesEc2ConfigurationList", version: "21.22.1" };
function batchComputeEnvironmentComputeResourcesLaunchTemplateToTerraform(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 {
launch_template_id: cdktf.stringToTerraform(struct.launchTemplateId),
launch_template_name: cdktf.stringToTerraform(struct.launchTemplateName),
version: cdktf.stringToTerraform(struct.version),
};
}
function batchComputeEnvironmentComputeResourcesLaunchTemplateToHclTerraform(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 = {
launch_template_id: {
value: cdktf.stringToHclTerraform(struct.launchTemplateId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
launch_template_name: {
value: cdktf.stringToHclTerraform(struct.launchTemplateName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
version: {
value: cdktf.stringToHclTerraform(struct.version),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BatchComputeEnvironmentComputeResourcesLaunchTemplateOutputReference 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._launchTemplateId !== undefined) {
hasAnyValues = true;
internalValueResult.launchTemplateId = this._launchTemplateId;
}
if (this._launchTemplateName !== undefined) {
hasAnyValues = true;
internalValueResult.launchTemplateName = this._launchTemplateName;
}
if (this._version !== undefined) {
hasAnyValues = true;
internalValueResult.version = this._version;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._launchTemplateId = undefined;
this._launchTemplateName = undefined;
this._version = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._launchTemplateId = value.launchTemplateId;
this._launchTemplateName = value.launchTemplateName;
this._version = value.version;
}
}
get launchTemplateId() {
return this.getStringAttribute('launch_template_id');
}
set launchTemplateId(value) {
this._launchTemplateId = value;
}
resetLaunchTemplateId() {
this._launchTemplateId = undefined;
}
// Temporarily expose input value. Use with caution.
get launchTemplateIdInput() {
return this._launchTemplateId;
}
get launchTemplateName() {
return this.getStringAttribute('launch_template_name');
}
set launchTemplateName(value) {
this._launchTemplateName = value;
}
resetLaunchTemplateName() {
this._launchTemplateName = undefined;
}
// Temporarily expose input value. Use with caution.
get launchTemplateNameInput() {
return this._launchTemplateName;
}
get version() {
return this.getStringAttribute('version');
}
set version(value) {
this._version = value;
}
resetVersion() {
this._version = undefined;
}
// Temporarily expose input value. Use with caution.
get versionInput() {
return this._version;
}
}
exports.BatchComputeEnvironmentComputeResourcesLaunchTemplateOutputReference = BatchComputeEnvironmentComputeResourcesLaunchTemplateOutputReference;
_c = JSII_RTTI_SYMBOL_1;
BatchComputeEnvironmentComputeResourcesLaunchTemplateOutputReference[_c] = { fqn: "@cdktf/provider-aws.batchComputeEnvironment.BatchComputeEnvironmentComputeResourcesLaunchTemplateOutputReference", version: "21.22.1" };
function batchComputeEnvironmentComputeResourcesToTerraform(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),
bid_percentage: cdktf.numberToTerraform(struct.bidPercentage),
desired_vcpus: cdktf.numberToTerraform(struct.desiredVcpus),
ec2_key_pair: cdktf.stringToTerraform(struct.ec2KeyPair),
image_id: cdktf.stringToTerraform(struct.imageId),
instance_role: cdktf.stringToTerraform(struct.instanceRole),
instance_type: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.instanceType),
max_vcpus: cdktf.numberToTerraform(struct.maxVcpus),
min_vcpus: cdktf.numberToTerraform(struct.minVcpus),
placement_group: cdktf.stringToTerraform(struct.placementGroup),
security_group_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.securityGroupIds),
spot_iam_fleet_role: cdktf.stringToTerraform(struct.spotIamFleetRole),
subnets: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.subnets),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(struct.tags),
type: cdktf.stringToTerraform(struct.type),
ec2_configuration: cdktf.listMapper(batchComputeEnvironmentComputeResourcesEc2ConfigurationToTerraform, true)(struct.ec2Configuration),
launch_template: batchComputeEnvironmentComputeResourcesLaunchTemplateToTerraform(struct.launchTemplate),
};
}
function batchComputeEnvironmentComputeResourcesToHclTerraform(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",
},
bid_percentage: {
value: cdktf.numberToHclTerraform(struct.bidPercentage),
isBlock: false,
type: "simple",
storageClassType: "number",
},
desired_vcpus: {
value: cdktf.numberToHclTerraform(struct.desiredVcpus),
isBlock: false,
type: "simple",
storageClassType: "number",
},
ec2_key_pair: {
value: cdktf.stringToHclTerraform(struct.ec2KeyPair),
isBlock: false,
type: "simple",
storageClassType: "string",
},
image_id: {
value: cdktf.stringToHclTerraform(struct.imageId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
instance_role: {
value: cdktf.stringToHclTerraform(struct.instanceRole),
isBlock: false,
type: "simple",
storageClassType: "string",
},
instance_type: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.instanceType),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
max_vcpus: {
value: cdktf.numberToHclTerraform(struct.maxVcpus),
isBlock: false,
type: "simple",
storageClassType: "number",
},
min_vcpus: {
value: cdktf.numberToHclTerraform(struct.minVcpus),
isBlock: false,
type: "simple",
storageClassType: "number",
},
placement_group: {
value: cdktf.stringToHclTerraform(struct.placementGroup),
isBlock: false,
type: "simple",
storageClassType: "string",
},
security_group_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.securityGroupIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
spot_iam_fleet_role: {
value: cdktf.stringToHclTerraform(struct.spotIamFleetRole),
isBlock: false,
type: "simple",
storageClassType: "string",
},
subnets: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.subnets),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
tags: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.tags),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
type: {
value: cdktf.stringToHclTerraform(struct.type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ec2_configuration: {
value: cdktf.listMapperHcl(batchComputeEnvironmentComputeResourcesEc2ConfigurationToHclTerraform, true)(struct.ec2Configuration),
isBlock: true,
type: "list",
storageClassType: "BatchComputeEnvironmentComputeResourcesEc2ConfigurationList",
},
launch_template: {
value: batchComputeEnvironmentComputeResourcesLaunchTemplateToHclTerraform(struct.launchTemplate),
isBlock: true,
type: "list",
storageClassType: "BatchComputeEnvironmentComputeResourcesLaunchTemplateList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BatchComputeEnvironmentComputeResourcesOutputReference 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;
// ec2_configuration - computed: false, optional: true, required: false
this._ec2Configuration = new BatchComputeEnvironmentComputeResourcesEc2ConfigurationList(this, "ec2_configuration", false);
// launch_template - computed: false, optional: true, required: false
this._launchTemplate = new BatchComputeEnvironmentComputeResourcesLaunchTemplateOutputReference(this, "launch_template");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._allocationStrategy !== undefined) {
hasAnyValues = true;
internalValueResult.allocationStrategy = this._allocationStrategy;
}
if (this._bidPercentage !== undefined) {
hasAnyValues = true;
internalValueResult.bidPercentage = this._bidPercentage;
}
if (this._desiredVcpus !== undefined) {
hasAnyValues = true;
internalValueResult.desiredVcpus = this._desiredVcpus;
}
if (this._ec2KeyPair !== undefined) {
hasAnyValues = true;
internalValueResult.ec2KeyPair = this._ec2KeyPair;
}
if (this._imageId !== undefined) {
hasAnyValues = true;
internalValueResult.imageId = this._imageId;
}
if (this._instanceRole !== undefined) {
hasAnyValues = true;
internalValueResult.instanceRole = this._instanceRole;
}
if (this._instanceType !== undefined) {
hasAnyValues = true;
internalValueResult.instanceType = this._instanceType;
}
if (this._maxVcpus !== undefined) {
hasAnyValues = true;
internalValueResult.maxVcpus = this._maxVcpus;
}
if (this._minVcpus !== undefined) {
hasAnyValues = true;
internalValueResult.minVcpus = this._minVcpus;
}
if (this._placementGroup !== undefined) {
hasAnyValues = true;
internalValueResult.placementGroup = this._placementGroup;
}
if (this._securityGroupIds !== undefined) {
hasAnyValues = true;
internalValueResult.securityGroupIds = this._securityGroupIds;
}
if (this._spotIamFleetRole !== undefined) {
hasAnyValues = true;
internalValueResult.spotIamFleetRole = this._spotIamFleetRole;
}
if (this._subnets !== undefined) {
hasAnyValues = true;
internalValueResult.subnets = this._subnets;
}
if (this._tags !== undefined) {
hasAnyValues = true;
internalValueResult.tags = this._tags;
}
if (this._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
if (this._ec2Configuration?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.ec2Configuration = this._ec2Configuration?.internalValue;
}
if (this._launchTemplate?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.launchTemplate = this._launchTemplate?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._allocationStrategy = undefined;
this._bidPercentage = undefined;
this._desiredVcpus = undefined;
this._ec2KeyPair = undefined;
this._imageId = undefined;
this._instanceRole = undefined;
this._instanceType = undefined;
this._maxVcpus = undefined;
this._minVcpus = undefined;
this._placementGroup = undefined;
this._securityGroupIds = undefined;
this._spotIamFleetRole = undefined;
this._subnets = undefined;
this._tags = undefined;
this._type = undefined;
this._ec2Configuration.internalValue = undefined;
this._launchTemplate.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._allocationStrategy = value.allocationStrategy;
this._bidPercentage = value.bidPercentage;
this._desiredVcpus = value.desiredVcpus;
this._ec2KeyPair = value.ec2KeyPair;
this._imageId = value.imageId;
this._instanceRole = value.instanceRole;
this._instanceType = value.instanceType;
this._maxVcpus = value.maxVcpus;
this._minVcpus = value.minVcpus;
this._placementGroup = value.placementGroup;
this._securityGroupIds = value.securityGroupIds;
this._spotIamFleetRole = value.spotIamFleetRole;
this._subnets = value.subnets;
this._tags = value.tags;
this._type = value.type;
this._ec2Configuration.internalValue = value.ec2Configuration;
this._launchTemplate.internalValue = value.launchTemplate;
}
}
get allocationStrategy() {
return this.getStringAttribute('allocation_strategy');
}
set allocationStrategy(value) {
this._allocationStrategy = value;
}
resetAllocationStrategy() {
this._allocationStrategy = undefined;
}
// Temporarily expose input value. Use with caution.
get allocationStrategyInput() {
return this._allocationStrategy;
}
get bidPercentage() {
return this.getNumberAttribute('bid_percentage');
}
set bidPercentage(value) {
this._bidPercentage = value;
}
resetBidPercentage() {
this._bidPercentage = undefined;
}
// Temporarily expose input value. Use with caution.
get bidPercentageInput() {
return this._bidPercentage;
}
get desiredVcpus() {
return this.getNumberAttribute('desired_vcpus');
}
set desiredVcpus(value) {
this._desiredVcpus = value;
}
resetDesiredVcpus() {
this._desiredVcpus = undefined;
}
// Temporarily expose input value. Use with caution.
get desiredVcpusInput() {
return this._desiredVcpus;
}
get ec2KeyPair() {
return this.getStringAttribute('ec2_key_pair');
}
set ec2KeyPair(value) {
this._ec2KeyPair = value;
}
resetEc2KeyPair() {
this._ec2KeyPair = undefined;
}
// Temporarily expose input value. Use with caution.
get ec2KeyPairInput() {
return this._ec2KeyPair;
}
get imageId() {
return this.getStringAttribute('image_id');
}
set imageId(value) {
this._imageId = value;
}
resetImageId() {
this._imageId = undefined;
}
// Temporarily expose input value. Use with caution.
get imageIdInput() {
return this._imageId;
}
get instanceRole() {
return this.getStringAttribute('instance_role');
}
set instanceRole(value) {
this._instanceRole = value;
}
resetInstanceRole() {
this._instanceRole = undefined;
}
// Temporarily expose input value. Use with caution.
get instanceRoleInput() {
return this._instanceRole;
}
get instanceType() {
return cdktf.Fn.tolist(this.getListAttribute('instance_type'));
}
set instanceType(value) {
this._instanceType = value;
}
resetInstanceType() {
this._instanceType = undefined;
}
// Temporarily expose input value. Use with caution.
get instanceTypeInput() {
return this._instanceType;
}
get maxVcpus() {
return this.getNumberAttribute('max_vcpus');
}
set maxVcpus(value) {
this._maxVcpus = value;
}
// Temporarily expose input value. Use with caution.
get maxVcpusInput() {
return this._maxVcpus;
}
get minVcpus() {
return this.getNumberAttribute('min_vcpus');
}
set minVcpus(value) {
this._minVcpus = value;
}
resetMinVcpus() {
this._minVcpus = undefined;
}
// Temporarily expose input value. Use with caution.
get minVcpusInput() {
return this._minVcpus;
}
get placementGroup() {
return this.getStringAttribute('placement_group');
}
set placementGroup(value) {
this._placementGroup = value;
}
resetPlacementGroup() {
this._placementGroup = undefined;
}
// Temporarily expose input value. Use with caution.
get placementGroupInput() {
return this._placementGroup;
}
get securityGroupIds() {
return cdktf.Fn.tolist(this.getListAttribute('security_group_ids'));
}
set securityGroupIds(value) {
this._securityGroupIds = value;
}
resetSecurityGroupIds() {
this._securityGroupIds = undefined;
}
// Temporarily expose input value. Use with caution.
get securityGroupIdsInput() {
return this._securityGroupIds;
}
get spotIamFleetRole() {
return this.getStringAttribute('spot_iam_fleet_role');
}
set spotIamFleetRole(value) {
this._spotIamFleetRole = value;
}
resetSpotIamFleetRole() {
this._spotIamFleetRole = undefined;
}
// Temporarily expose input value. Use with caution.
get spotIamFleetRoleInput() {
return this._spotIamFleetRole;
}
get subnets() {
return cdktf.Fn.tolist(this.getListAttribute('subnets'));
}
set subnets(value) {
this._subnets = value;
}
// Temporarily expose input value. Use with caution.
get subnetsInput() {
return this._subnets;
}
get tags() {
return this.getStringMapAttribute('tags');
}
set tags(value) {
this._tags = value;
}
resetTags() {
this._tags = undefined;
}
// Temporarily expose input value. Use with caution.
get tagsInput() {
return this._tags;
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
get ec2Configuration() {
return this._ec2Configuration;
}
putEc2Configuration(value) {
this._ec2Configuration.internalValue = value;
}
resetEc2Configuration() {
this._ec2Configuration.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get ec2ConfigurationInput() {
return this._ec2Configuration.internalValue;
}
get launchTemplate() {
return this._launchTemplate;
}
putLaunchTemplate(value) {
this._launchTemplate.internalValue = value;
}
resetLaunchTemplate() {
this._launchTemplate.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get launchTemplateInput() {
return this._launchTemplate.internalValue;
}
}
exports.BatchComputeEnvironmentComputeResourcesOutputReference = BatchComputeEnvironmentComputeResourcesOutputReference;
_d = JSII_RTTI_SYMBOL_1;
BatchComputeEnvironmentComputeResourcesOutputReference[_d] = { fqn: "@cdktf/provider-aws.batchComputeEnvironment.BatchComputeEnvironmentComputeResourcesOutputReference", version: "21.22.1" };
function batchComputeEnvironmentEksConfigurationToTerraform(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 {
eks_cluster_arn: cdktf.stringToTerraform(struct.eksClusterArn),
kubernetes_namespace: cdktf.stringToTerraform(struct.kubernetesNamespace),
};
}
function batchComputeEnvironmentEksConfigurationToHclTerraform(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 = {
eks_cluster_arn: {
value: cdktf.stringToHclTerraform(struct.eksClusterArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
kubernetes_namespace: {
value: cdktf.stringToHclTerraform(struct.kubernetesNamespace),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BatchComputeEnvironmentEksConfigurationOutputReference 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._eksClusterArn !== undefined) {
hasAnyValues = true;
internalValueResult.eksClusterArn = this._eksClusterArn;
}
if (this._kubernetesNamespace !== undefined) {
hasAnyValues = true;
internalValueResult.kubernetesNamespace = this._kubernetesNamespace;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._eksClusterArn = undefined;
this._kubernetesNamespace = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._eksClusterArn = value.eksClusterArn;
this._kubernetesNamespace = value.kubernetesNamespace;
}
}
get eksClusterArn() {
return this.getStringAttribute('eks_cluster_arn');
}
set eksClusterArn(value) {
this._eksClusterArn = value;
}
// Temporarily expose input value. Use with caution.
get eksClusterArnInput() {
return this._eksClusterArn;
}
get kubernetesNamespace() {
return this.getStringAttribute('kubernetes_namespace');
}
set kubernetesNamespace(value) {
this._kubernetesNamespace = value;
}
// Temporarily expose input value. Use with caution.
get kubernetesNamespaceInput() {
return this._kubernetesNamespace;
}
}
exports.BatchComputeEnvironmentEksConfigurationOutputReference = BatchComputeEnvironmentEksConfigurationOutputReference;
_e = JSII_RTTI_SYMBOL_1;
BatchComputeEnvironmentEksConfigurationOutputReference[_e] = { fqn: "@cdktf/provider-aws.batchComputeEnvironment.BatchComputeEnvironmentEksConfigurationOutputReference", version: "21.22.1" };
function batchComputeEnvironmentUpdatePolicyToTerraform(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 {
job_execution_timeout_minutes: cdktf.numberToTerraform(struct.jobExecutionTimeoutMinutes),
terminate_jobs_on_update: cdktf.booleanToTerraform(struct.terminateJobsOnUpdate),
};
}
function batchComputeEnvironmentUpdatePolicyToHclTerraform(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 = {
job_execution_timeout_minutes: {
value: cdktf.numberToHclTerraform(struct.jobExecutionTimeoutMinutes),
isBlock: false,
type: "simple",
storageClassType: "number",
},
terminate_jobs_on_update: {
value: cdktf.booleanToHclTerraform(struct.terminateJobsOnUpdate),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class BatchComputeEnvironmentUpdatePolicyOutputReference 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._jobExecutionTimeoutMinutes !== undefined) {
hasAnyValues = true;
internalValueResult.jobExecutionTimeoutMinutes = this._jobExecutionTimeoutMinutes;
}
if (this._terminateJobsOnUpdate !== undefined) {
hasAnyValues = true;
internalValueResult.terminateJobsOnUpdate = this._terminateJobsOnUpdate;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._jobExecutionTimeoutMinutes = undefined;
this._terminateJobsOnUpdate = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._jobExecutionTimeoutMinutes = value.jobExecutionTimeoutMinutes;
this._terminateJobsOnUpdate = value.terminateJobsOnUpdate;
}
}
get jobExecutionTimeoutMinutes() {
return this.getNumberAttribute('job_execution_timeout_minutes');
}
set jobExecutionTimeoutMinutes(value) {
this._jobExecutionTimeoutMinutes = value;
}
resetJobExecutionTimeoutMinutes() {
this._jobExecutionTimeoutMinutes = undefined;
}
// Temporarily expose input value. Use with caution.
get jobExecutionTimeoutMinutesInput() {
return this._jobExecutionTimeoutMinutes;
}
get terminateJobsOnUpdate() {
return this.getBooleanAttribute('terminate_jobs_on_update');
}
set terminateJobsOnUpdate(value) {
this._terminateJobsOnUpdate = value;
}
resetTerminateJobsOnUpdate() {
this._terminateJobsOnUpdate = undefined;
}
// Temporarily expose input value. Use with caution.
get terminateJobsOnUpdateInput() {
return this._terminateJobsOnUpdate;
}
}
exports.BatchComputeEnvironmentUpdatePolicyOutputReference = BatchComputeEnvironmentUpdatePolicyOutputReference;
_f = JSII_RTTI_SYMBOL_1;
BatchComputeEnvironmentUpdatePolicyOutputReference[_f] = { fqn: "@cdktf/provider-aws.batchComputeEnvironment.BatchComputeEnvironmentUpdatePolicyOutputReference", version: "21.22.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/batch_compute_environment aws_batch_compute_environment}
*/
class BatchComputeEnvironment extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a BatchComputeEnvironment 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 BatchComputeEnvironment to import
* @param importFromId The id of the existing BatchComputeEnvironment that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/batch_compute_environment#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the BatchComputeEnvironment to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_batch_compute_environment", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/batch_compute_environment aws_batch_compute_environment} 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 BatchComputeEnvironmentConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_batch_compute_environment',
terraformGeneratorMetadata: {
providerName: 'aws',
providerVersion: '6.25.0',
providerVersionConstraint: '~> 6.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// compute_resources - computed: false, optional: true, required: false
this._computeResources = new BatchComputeEnvironmentComputeResourcesOutputReference(this, "compute_resources");
// eks_configuration - computed: false, optional: true, required: false
this._eksConfiguration = new BatchComputeEnvironmentEksConfigurationOutputReference(this, "eks_configuration");
// update_policy - computed: false, optional: true, required: false
this._updatePolicy = new BatchComputeEnvironmentUpdatePolicyOutputReference(this, "update_policy");
this._id = config.id;
this._name = config.name;
this._namePrefix = config.namePrefix;
this._region = config.region;
this._serviceRole = config.serviceRole;
this._state = config.state;
this._tags = config.tags;
this._tagsAll = config.tagsAll;
this._type = config.type;
this._computeResources.internalValue = config.computeResources;
this._eksConfiguration.internalValue = config.eksConfiguration;
this._updatePolicy.internalValue = config.updatePolicy;
}
// ==========
// ATTRIBUTES
// ==========
// arn - computed: true, optional: false, required: false
get arn() {
return this.getStringAttribute('arn');
}
// ecs_cluster_arn - computed: true, optional: false, required: false
get ecsClusterArn() {
return this.getStringAttribute('ecs_cluster_arn');
}
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 name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
resetName() {
this._name = undefined;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get namePrefix() {
return this.getStringAttribute('name_prefix');
}
set namePrefix(value) {
this._namePrefix = value;
}
resetNamePrefix() {
this._namePrefix = undefined;
}
// Temporarily expose input value. Use with caution.
get namePrefixInput() {
return this._namePrefix;
}
get region() {
return this.getStringAttribute('region');
}
set region(value) {
this._region = value;
}
resetRegion() {
this._region = undefined;
}
// Temporarily expose input value. Use with caution.
get regionInput() {
return this._region;
}
get serviceRole() {
return this.getStringAttribute('service_role');
}
set serviceRole(value) {
this._serviceRole = value;
}
resetServiceRole() {
this._serviceRole = undefined;
}
// Temporarily expose input value. Use with caution.
get serviceRoleInput() {
return this._serviceRole;
}
get state() {
return this.getStringAttribute('state');
}
set state(value) {
this._state = value;
}
resetState() {
this._state = undefined;
}
// Temporarily expose input value. Use with caution.
get stateInput() {
return this._state;
}
// status - computed: true, optional: false, required: false
get status() {
return this.getStringAttribute('status');
}
// status_reason - computed: true, optional: false, required: false
get statusReason() {
return this.getStringAttribute('status_reason');
}
get tags() {
return this.getStringMapAttribute('tags');
}
set tags(value) {
this._tags = value;
}
resetTags() {
this._tags = undefined;
}
// Temporarily expose input value. Use with caution.
get tagsInput() {
return this._tags;
}
get tagsAll() {
return this.getStringMapAttribute('tags_all');
}
set tagsAll(value) {
this._tagsAll = value;
}
resetTagsAll() {
this._tagsAll = undefined;
}
// Temporarily expose input value. Use with caution.
get tagsAllInput() {
return this._tagsAll;
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
get computeResources() {
return this._computeResources;
}
putComputeResources(value) {
this._computeResources.internalValue = value;
}
resetComputeResources() {
this._computeResources.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get computeResourcesInput() {
return this._computeResources.internalValue;
}
get eksConfiguration() {
return this._eksConfiguration;
}
putEksConfiguration(value) {
this._eksConfiguration.internalValue = value;
}
resetEksConfiguration() {
this._eksConfiguration.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get eksConfigurationInput() {
return this._eksConfiguration.internalValue;
}
get updatePolicy() {
return this._updatePolicy;
}
putUpdatePolicy(value) {
this._updatePolicy.internalValue = value;
}
resetUpdatePolicy() {
this._updatePolicy.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get updatePolicyInput() {
return this._updatePolicy.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
id: cdktf.stringToTerraform(this._id),
name: cdktf.stringToTerraform(this._name),
name_prefix: cdktf.stringToTerraform(this._namePrefix),
region: cdktf.stringToTerraform(this._region),
service_role: cdktf.stringToTerraform(this._serviceRole),
state: cdktf.stringToTerraform(this._state),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
type: cdktf.stringToTerraform(this._type),
compute_resources: batchComputeEnvironmentComputeResourcesToTerraform(this._computeResources.internalValue),
eks_configuration: batchComputeEnvironmentEksConfigurationToTerraform(this._eksConfiguration.internalValue),
update_policy: batchComputeEnvironmentUpdatePolicyToTerraform(this._updatePolicy.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(this._name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name_prefix: {
value: cdktf.stringToHclTerraform(this._namePrefix),
isBlock: false,
type: "simple",
storageClassType: "string",
},
region: {
value: cdktf.stringToHclTerraform(this._region),
isBlock: false,
type: "simple",
storageClassType: "string",
},
service_role: {
value: cdktf.stringToHclTerraform(this._serviceRole),
isBlock: false,
type: "simple",
storageClassType: "string",
},
s