@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,065 lines • 256 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AutoscalingplansScalingPlan = exports.AutoscalingplansScalingPlanScalingInstructionList = exports.AutoscalingplansScalingPlanScalingInstructionOutputReference = exports.AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationList = exports.AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationOutputReference = exports.AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationOutputReference = exports.AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationOutputReference = exports.AutoscalingplansScalingPlanScalingInstructionPredefinedLoadMetricSpecificationOutputReference = exports.AutoscalingplansScalingPlanScalingInstructionCustomizedLoadMetricSpecificationOutputReference = exports.AutoscalingplansScalingPlanApplicationSourceOutputReference = exports.AutoscalingplansScalingPlanApplicationSourceTagFilterList = exports.AutoscalingplansScalingPlanApplicationSourceTagFilterOutputReference = void 0;
exports.autoscalingplansScalingPlanApplicationSourceTagFilterToTerraform = autoscalingplansScalingPlanApplicationSourceTagFilterToTerraform;
exports.autoscalingplansScalingPlanApplicationSourceTagFilterToHclTerraform = autoscalingplansScalingPlanApplicationSourceTagFilterToHclTerraform;
exports.autoscalingplansScalingPlanApplicationSourceToTerraform = autoscalingplansScalingPlanApplicationSourceToTerraform;
exports.autoscalingplansScalingPlanApplicationSourceToHclTerraform = autoscalingplansScalingPlanApplicationSourceToHclTerraform;
exports.autoscalingplansScalingPlanScalingInstructionCustomizedLoadMetricSpecificationToTerraform = autoscalingplansScalingPlanScalingInstructionCustomizedLoadMetricSpecificationToTerraform;
exports.autoscalingplansScalingPlanScalingInstructionCustomizedLoadMetricSpecificationToHclTerraform = autoscalingplansScalingPlanScalingInstructionCustomizedLoadMetricSpecificationToHclTerraform;
exports.autoscalingplansScalingPlanScalingInstructionPredefinedLoadMetricSpecificationToTerraform = autoscalingplansScalingPlanScalingInstructionPredefinedLoadMetricSpecificationToTerraform;
exports.autoscalingplansScalingPlanScalingInstructionPredefinedLoadMetricSpecificationToHclTerraform = autoscalingplansScalingPlanScalingInstructionPredefinedLoadMetricSpecificationToHclTerraform;
exports.autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationToTerraform = autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationToTerraform;
exports.autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationToHclTerraform = autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationToHclTerraform;
exports.autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationToTerraform = autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationToTerraform;
exports.autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationToHclTerraform = autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationToHclTerraform;
exports.autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationToTerraform = autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationToTerraform;
exports.autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationToHclTerraform = autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationToHclTerraform;
exports.autoscalingplansScalingPlanScalingInstructionToTerraform = autoscalingplansScalingPlanScalingInstructionToTerraform;
exports.autoscalingplansScalingPlanScalingInstructionToHclTerraform = autoscalingplansScalingPlanScalingInstructionToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function autoscalingplansScalingPlanApplicationSourceTagFilterToTerraform(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 {
key: cdktf.stringToTerraform(struct.key),
values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.values),
};
}
function autoscalingplansScalingPlanApplicationSourceTagFilterToHclTerraform(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 = {
key: {
value: cdktf.stringToHclTerraform(struct.key),
isBlock: false,
type: "simple",
storageClassType: "string",
},
values: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.values),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AutoscalingplansScalingPlanApplicationSourceTagFilterOutputReference 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._key !== undefined) {
hasAnyValues = true;
internalValueResult.key = this._key;
}
if (this._values !== undefined) {
hasAnyValues = true;
internalValueResult.values = this._values;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._key = undefined;
this._values = 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._key = value.key;
this._values = value.values;
}
}
get key() {
return this.getStringAttribute('key');
}
set key(value) {
this._key = value;
}
// Temporarily expose input value. Use with caution.
get keyInput() {
return this._key;
}
get values() {
return cdktf.Fn.tolist(this.getListAttribute('values'));
}
set values(value) {
this._values = value;
}
resetValues() {
this._values = undefined;
}
// Temporarily expose input value. Use with caution.
get valuesInput() {
return this._values;
}
}
exports.AutoscalingplansScalingPlanApplicationSourceTagFilterOutputReference = AutoscalingplansScalingPlanApplicationSourceTagFilterOutputReference;
_a = JSII_RTTI_SYMBOL_1;
AutoscalingplansScalingPlanApplicationSourceTagFilterOutputReference[_a] = { fqn: "@cdktf/provider-aws.autoscalingplansScalingPlan.AutoscalingplansScalingPlanApplicationSourceTagFilterOutputReference", version: "21.22.1" };
class AutoscalingplansScalingPlanApplicationSourceTagFilterList 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 AutoscalingplansScalingPlanApplicationSourceTagFilterOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.AutoscalingplansScalingPlanApplicationSourceTagFilterList = AutoscalingplansScalingPlanApplicationSourceTagFilterList;
_b = JSII_RTTI_SYMBOL_1;
AutoscalingplansScalingPlanApplicationSourceTagFilterList[_b] = { fqn: "@cdktf/provider-aws.autoscalingplansScalingPlan.AutoscalingplansScalingPlanApplicationSourceTagFilterList", version: "21.22.1" };
function autoscalingplansScalingPlanApplicationSourceToTerraform(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 {
cloudformation_stack_arn: cdktf.stringToTerraform(struct.cloudformationStackArn),
tag_filter: cdktf.listMapper(autoscalingplansScalingPlanApplicationSourceTagFilterToTerraform, true)(struct.tagFilter),
};
}
function autoscalingplansScalingPlanApplicationSourceToHclTerraform(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 = {
cloudformation_stack_arn: {
value: cdktf.stringToHclTerraform(struct.cloudformationStackArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
tag_filter: {
value: cdktf.listMapperHcl(autoscalingplansScalingPlanApplicationSourceTagFilterToHclTerraform, true)(struct.tagFilter),
isBlock: true,
type: "set",
storageClassType: "AutoscalingplansScalingPlanApplicationSourceTagFilterList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AutoscalingplansScalingPlanApplicationSourceOutputReference 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;
// tag_filter - computed: false, optional: true, required: false
this._tagFilter = new AutoscalingplansScalingPlanApplicationSourceTagFilterList(this, "tag_filter", true);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._cloudformationStackArn !== undefined) {
hasAnyValues = true;
internalValueResult.cloudformationStackArn = this._cloudformationStackArn;
}
if (this._tagFilter?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.tagFilter = this._tagFilter?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._cloudformationStackArn = undefined;
this._tagFilter.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._cloudformationStackArn = value.cloudformationStackArn;
this._tagFilter.internalValue = value.tagFilter;
}
}
get cloudformationStackArn() {
return this.getStringAttribute('cloudformation_stack_arn');
}
set cloudformationStackArn(value) {
this._cloudformationStackArn = value;
}
resetCloudformationStackArn() {
this._cloudformationStackArn = undefined;
}
// Temporarily expose input value. Use with caution.
get cloudformationStackArnInput() {
return this._cloudformationStackArn;
}
get tagFilter() {
return this._tagFilter;
}
putTagFilter(value) {
this._tagFilter.internalValue = value;
}
resetTagFilter() {
this._tagFilter.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get tagFilterInput() {
return this._tagFilter.internalValue;
}
}
exports.AutoscalingplansScalingPlanApplicationSourceOutputReference = AutoscalingplansScalingPlanApplicationSourceOutputReference;
_c = JSII_RTTI_SYMBOL_1;
AutoscalingplansScalingPlanApplicationSourceOutputReference[_c] = { fqn: "@cdktf/provider-aws.autoscalingplansScalingPlan.AutoscalingplansScalingPlanApplicationSourceOutputReference", version: "21.22.1" };
function autoscalingplansScalingPlanScalingInstructionCustomizedLoadMetricSpecificationToTerraform(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 {
dimensions: cdktf.hashMapper(cdktf.stringToTerraform)(struct.dimensions),
metric_name: cdktf.stringToTerraform(struct.metricName),
namespace: cdktf.stringToTerraform(struct.namespace),
statistic: cdktf.stringToTerraform(struct.statistic),
unit: cdktf.stringToTerraform(struct.unit),
};
}
function autoscalingplansScalingPlanScalingInstructionCustomizedLoadMetricSpecificationToHclTerraform(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 = {
dimensions: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.dimensions),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
metric_name: {
value: cdktf.stringToHclTerraform(struct.metricName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
namespace: {
value: cdktf.stringToHclTerraform(struct.namespace),
isBlock: false,
type: "simple",
storageClassType: "string",
},
statistic: {
value: cdktf.stringToHclTerraform(struct.statistic),
isBlock: false,
type: "simple",
storageClassType: "string",
},
unit: {
value: cdktf.stringToHclTerraform(struct.unit),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AutoscalingplansScalingPlanScalingInstructionCustomizedLoadMetricSpecificationOutputReference 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._dimensions !== undefined) {
hasAnyValues = true;
internalValueResult.dimensions = this._dimensions;
}
if (this._metricName !== undefined) {
hasAnyValues = true;
internalValueResult.metricName = this._metricName;
}
if (this._namespace !== undefined) {
hasAnyValues = true;
internalValueResult.namespace = this._namespace;
}
if (this._statistic !== undefined) {
hasAnyValues = true;
internalValueResult.statistic = this._statistic;
}
if (this._unit !== undefined) {
hasAnyValues = true;
internalValueResult.unit = this._unit;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._dimensions = undefined;
this._metricName = undefined;
this._namespace = undefined;
this._statistic = undefined;
this._unit = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._dimensions = value.dimensions;
this._metricName = value.metricName;
this._namespace = value.namespace;
this._statistic = value.statistic;
this._unit = value.unit;
}
}
get dimensions() {
return this.getStringMapAttribute('dimensions');
}
set dimensions(value) {
this._dimensions = value;
}
resetDimensions() {
this._dimensions = undefined;
}
// Temporarily expose input value. Use with caution.
get dimensionsInput() {
return this._dimensions;
}
get metricName() {
return this.getStringAttribute('metric_name');
}
set metricName(value) {
this._metricName = value;
}
// Temporarily expose input value. Use with caution.
get metricNameInput() {
return this._metricName;
}
get namespace() {
return this.getStringAttribute('namespace');
}
set namespace(value) {
this._namespace = value;
}
// Temporarily expose input value. Use with caution.
get namespaceInput() {
return this._namespace;
}
get statistic() {
return this.getStringAttribute('statistic');
}
set statistic(value) {
this._statistic = value;
}
// Temporarily expose input value. Use with caution.
get statisticInput() {
return this._statistic;
}
get unit() {
return this.getStringAttribute('unit');
}
set unit(value) {
this._unit = value;
}
resetUnit() {
this._unit = undefined;
}
// Temporarily expose input value. Use with caution.
get unitInput() {
return this._unit;
}
}
exports.AutoscalingplansScalingPlanScalingInstructionCustomizedLoadMetricSpecificationOutputReference = AutoscalingplansScalingPlanScalingInstructionCustomizedLoadMetricSpecificationOutputReference;
_d = JSII_RTTI_SYMBOL_1;
AutoscalingplansScalingPlanScalingInstructionCustomizedLoadMetricSpecificationOutputReference[_d] = { fqn: "@cdktf/provider-aws.autoscalingplansScalingPlan.AutoscalingplansScalingPlanScalingInstructionCustomizedLoadMetricSpecificationOutputReference", version: "21.22.1" };
function autoscalingplansScalingPlanScalingInstructionPredefinedLoadMetricSpecificationToTerraform(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 {
predefined_load_metric_type: cdktf.stringToTerraform(struct.predefinedLoadMetricType),
resource_label: cdktf.stringToTerraform(struct.resourceLabel),
};
}
function autoscalingplansScalingPlanScalingInstructionPredefinedLoadMetricSpecificationToHclTerraform(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 = {
predefined_load_metric_type: {
value: cdktf.stringToHclTerraform(struct.predefinedLoadMetricType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
resource_label: {
value: cdktf.stringToHclTerraform(struct.resourceLabel),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AutoscalingplansScalingPlanScalingInstructionPredefinedLoadMetricSpecificationOutputReference 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._predefinedLoadMetricType !== undefined) {
hasAnyValues = true;
internalValueResult.predefinedLoadMetricType = this._predefinedLoadMetricType;
}
if (this._resourceLabel !== undefined) {
hasAnyValues = true;
internalValueResult.resourceLabel = this._resourceLabel;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._predefinedLoadMetricType = undefined;
this._resourceLabel = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._predefinedLoadMetricType = value.predefinedLoadMetricType;
this._resourceLabel = value.resourceLabel;
}
}
get predefinedLoadMetricType() {
return this.getStringAttribute('predefined_load_metric_type');
}
set predefinedLoadMetricType(value) {
this._predefinedLoadMetricType = value;
}
// Temporarily expose input value. Use with caution.
get predefinedLoadMetricTypeInput() {
return this._predefinedLoadMetricType;
}
get resourceLabel() {
return this.getStringAttribute('resource_label');
}
set resourceLabel(value) {
this._resourceLabel = value;
}
resetResourceLabel() {
this._resourceLabel = undefined;
}
// Temporarily expose input value. Use with caution.
get resourceLabelInput() {
return this._resourceLabel;
}
}
exports.AutoscalingplansScalingPlanScalingInstructionPredefinedLoadMetricSpecificationOutputReference = AutoscalingplansScalingPlanScalingInstructionPredefinedLoadMetricSpecificationOutputReference;
_e = JSII_RTTI_SYMBOL_1;
AutoscalingplansScalingPlanScalingInstructionPredefinedLoadMetricSpecificationOutputReference[_e] = { fqn: "@cdktf/provider-aws.autoscalingplansScalingPlan.AutoscalingplansScalingPlanScalingInstructionPredefinedLoadMetricSpecificationOutputReference", version: "21.22.1" };
function autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationToTerraform(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 {
dimensions: cdktf.hashMapper(cdktf.stringToTerraform)(struct.dimensions),
metric_name: cdktf.stringToTerraform(struct.metricName),
namespace: cdktf.stringToTerraform(struct.namespace),
statistic: cdktf.stringToTerraform(struct.statistic),
unit: cdktf.stringToTerraform(struct.unit),
};
}
function autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationToHclTerraform(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 = {
dimensions: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.dimensions),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
metric_name: {
value: cdktf.stringToHclTerraform(struct.metricName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
namespace: {
value: cdktf.stringToHclTerraform(struct.namespace),
isBlock: false,
type: "simple",
storageClassType: "string",
},
statistic: {
value: cdktf.stringToHclTerraform(struct.statistic),
isBlock: false,
type: "simple",
storageClassType: "string",
},
unit: {
value: cdktf.stringToHclTerraform(struct.unit),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationOutputReference 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._dimensions !== undefined) {
hasAnyValues = true;
internalValueResult.dimensions = this._dimensions;
}
if (this._metricName !== undefined) {
hasAnyValues = true;
internalValueResult.metricName = this._metricName;
}
if (this._namespace !== undefined) {
hasAnyValues = true;
internalValueResult.namespace = this._namespace;
}
if (this._statistic !== undefined) {
hasAnyValues = true;
internalValueResult.statistic = this._statistic;
}
if (this._unit !== undefined) {
hasAnyValues = true;
internalValueResult.unit = this._unit;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._dimensions = undefined;
this._metricName = undefined;
this._namespace = undefined;
this._statistic = undefined;
this._unit = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._dimensions = value.dimensions;
this._metricName = value.metricName;
this._namespace = value.namespace;
this._statistic = value.statistic;
this._unit = value.unit;
}
}
get dimensions() {
return this.getStringMapAttribute('dimensions');
}
set dimensions(value) {
this._dimensions = value;
}
resetDimensions() {
this._dimensions = undefined;
}
// Temporarily expose input value. Use with caution.
get dimensionsInput() {
return this._dimensions;
}
get metricName() {
return this.getStringAttribute('metric_name');
}
set metricName(value) {
this._metricName = value;
}
// Temporarily expose input value. Use with caution.
get metricNameInput() {
return this._metricName;
}
get namespace() {
return this.getStringAttribute('namespace');
}
set namespace(value) {
this._namespace = value;
}
// Temporarily expose input value. Use with caution.
get namespaceInput() {
return this._namespace;
}
get statistic() {
return this.getStringAttribute('statistic');
}
set statistic(value) {
this._statistic = value;
}
// Temporarily expose input value. Use with caution.
get statisticInput() {
return this._statistic;
}
get unit() {
return this.getStringAttribute('unit');
}
set unit(value) {
this._unit = value;
}
resetUnit() {
this._unit = undefined;
}
// Temporarily expose input value. Use with caution.
get unitInput() {
return this._unit;
}
}
exports.AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationOutputReference = AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationOutputReference;
_f = JSII_RTTI_SYMBOL_1;
AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationOutputReference[_f] = { fqn: "@cdktf/provider-aws.autoscalingplansScalingPlan.AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationOutputReference", version: "21.22.1" };
function autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationToTerraform(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 {
predefined_scaling_metric_type: cdktf.stringToTerraform(struct.predefinedScalingMetricType),
resource_label: cdktf.stringToTerraform(struct.resourceLabel),
};
}
function autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationToHclTerraform(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 = {
predefined_scaling_metric_type: {
value: cdktf.stringToHclTerraform(struct.predefinedScalingMetricType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
resource_label: {
value: cdktf.stringToHclTerraform(struct.resourceLabel),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationOutputReference 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._predefinedScalingMetricType !== undefined) {
hasAnyValues = true;
internalValueResult.predefinedScalingMetricType = this._predefinedScalingMetricType;
}
if (this._resourceLabel !== undefined) {
hasAnyValues = true;
internalValueResult.resourceLabel = this._resourceLabel;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._predefinedScalingMetricType = undefined;
this._resourceLabel = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._predefinedScalingMetricType = value.predefinedScalingMetricType;
this._resourceLabel = value.resourceLabel;
}
}
get predefinedScalingMetricType() {
return this.getStringAttribute('predefined_scaling_metric_type');
}
set predefinedScalingMetricType(value) {
this._predefinedScalingMetricType = value;
}
// Temporarily expose input value. Use with caution.
get predefinedScalingMetricTypeInput() {
return this._predefinedScalingMetricType;
}
get resourceLabel() {
return this.getStringAttribute('resource_label');
}
set resourceLabel(value) {
this._resourceLabel = value;
}
resetResourceLabel() {
this._resourceLabel = undefined;
}
// Temporarily expose input value. Use with caution.
get resourceLabelInput() {
return this._resourceLabel;
}
}
exports.AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationOutputReference = AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationOutputReference;
_g = JSII_RTTI_SYMBOL_1;
AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationOutputReference[_g] = { fqn: "@cdktf/provider-aws.autoscalingplansScalingPlan.AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationOutputReference", version: "21.22.1" };
function autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationToTerraform(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 {
disable_scale_in: cdktf.booleanToTerraform(struct.disableScaleIn),
estimated_instance_warmup: cdktf.numberToTerraform(struct.estimatedInstanceWarmup),
scale_in_cooldown: cdktf.numberToTerraform(struct.scaleInCooldown),
scale_out_cooldown: cdktf.numberToTerraform(struct.scaleOutCooldown),
target_value: cdktf.numberToTerraform(struct.targetValue),
customized_scaling_metric_specification: autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationToTerraform(struct.customizedScalingMetricSpecification),
predefined_scaling_metric_specification: autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationToTerraform(struct.predefinedScalingMetricSpecification),
};
}
function autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationToHclTerraform(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 = {
disable_scale_in: {
value: cdktf.booleanToHclTerraform(struct.disableScaleIn),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
estimated_instance_warmup: {
value: cdktf.numberToHclTerraform(struct.estimatedInstanceWarmup),
isBlock: false,
type: "simple",
storageClassType: "number",
},
scale_in_cooldown: {
value: cdktf.numberToHclTerraform(struct.scaleInCooldown),
isBlock: false,
type: "simple",
storageClassType: "number",
},
scale_out_cooldown: {
value: cdktf.numberToHclTerraform(struct.scaleOutCooldown),
isBlock: false,
type: "simple",
storageClassType: "number",
},
target_value: {
value: cdktf.numberToHclTerraform(struct.targetValue),
isBlock: false,
type: "simple",
storageClassType: "number",
},
customized_scaling_metric_specification: {
value: autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationToHclTerraform(struct.customizedScalingMetricSpecification),
isBlock: true,
type: "list",
storageClassType: "AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationList",
},
predefined_scaling_metric_specification: {
value: autoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationToHclTerraform(struct.predefinedScalingMetricSpecification),
isBlock: true,
type: "list",
storageClassType: "AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationOutputReference 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;
// customized_scaling_metric_specification - computed: false, optional: true, required: false
this._customizedScalingMetricSpecification = new AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationCustomizedScalingMetricSpecificationOutputReference(this, "customized_scaling_metric_specification");
// predefined_scaling_metric_specification - computed: false, optional: true, required: false
this._predefinedScalingMetricSpecification = new AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationPredefinedScalingMetricSpecificationOutputReference(this, "predefined_scaling_metric_specification");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._disableScaleIn !== undefined) {
hasAnyValues = true;
internalValueResult.disableScaleIn = this._disableScaleIn;
}
if (this._estimatedInstanceWarmup !== undefined) {
hasAnyValues = true;
internalValueResult.estimatedInstanceWarmup = this._estimatedInstanceWarmup;
}
if (this._scaleInCooldown !== undefined) {
hasAnyValues = true;
internalValueResult.scaleInCooldown = this._scaleInCooldown;
}
if (this._scaleOutCooldown !== undefined) {
hasAnyValues = true;
internalValueResult.scaleOutCooldown = this._scaleOutCooldown;
}
if (this._targetValue !== undefined) {
hasAnyValues = true;
internalValueResult.targetValue = this._targetValue;
}
if (this._customizedScalingMetricSpecification?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.customizedScalingMetricSpecification = this._customizedScalingMetricSpecification?.internalValue;
}
if (this._predefinedScalingMetricSpecification?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.predefinedScalingMetricSpecification = this._predefinedScalingMetricSpecification?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._disableScaleIn = undefined;
this._estimatedInstanceWarmup = undefined;
this._scaleInCooldown = undefined;
this._scaleOutCooldown = undefined;
this._targetValue = undefined;
this._customizedScalingMetricSpecification.internalValue = undefined;
this._predefinedScalingMetricSpecification.internalValue = 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._disableScaleIn = value.disableScaleIn;
this._estimatedInstanceWarmup = value.estimatedInstanceWarmup;
this._scaleInCooldown = value.scaleInCooldown;
this._scaleOutCooldown = value.scaleOutCooldown;
this._targetValue = value.targetValue;
this._customizedScalingMetricSpecification.internalValue = value.customizedScalingMetricSpecification;
this._predefinedScalingMetricSpecification.internalValue = value.predefinedScalingMetricSpecification;
}
}
get disableScaleIn() {
return this.getBooleanAttribute('disable_scale_in');
}
set disableScaleIn(value) {
this._disableScaleIn = value;
}
resetDisableScaleIn() {
this._disableScaleIn = undefined;
}
// Temporarily expose input value. Use with caution.
get disableScaleInInput() {
return this._disableScaleIn;
}
get estimatedInstanceWarmup() {
return this.getNumberAttribute('estimated_instance_warmup');
}
set estimatedInstanceWarmup(value) {
this._estimatedInstanceWarmup = value;
}
resetEstimatedInstanceWarmup() {
this._estimatedInstanceWarmup = undefined;
}
// Temporarily expose input value. Use with caution.
get estimatedInstanceWarmupInput() {
return this._estimatedInstanceWarmup;
}
get scaleInCooldown() {
return this.getNumberAttribute('scale_in_cooldown');
}
set scaleInCooldown(value) {
this._scaleInCooldown = value;
}
resetScaleInCooldown() {
this._scaleInCooldown = undefined;
}
// Temporarily expose input value. Use with caution.
get scaleInCooldownInput() {
return this._scaleInCooldown;
}
get scaleOutCooldown() {
return this.getNumberAttribute('scale_out_cooldown');
}
set scaleOutCooldown(value) {
this._scaleOutCooldown = value;
}
resetScaleOutCooldown() {
this._scaleOutCooldown = undefined;
}
// Temporarily expose input value. Use with caution.
get scaleOutCooldownInput() {
return this._scaleOutCooldown;
}
get targetValue() {
return this.getNumberAttribute('target_value');
}
set targetValue(value) {
this._targetValue = value;
}
// Temporarily expose input value. Use with caution.
get targetValueInput() {
return this._targetValue;
}
get customizedScalingMetricSpecification() {
return this._customizedScalingMetricSpecification;
}
putCustomizedScalingMetricSpecification(value) {
this._customizedScalingMetricSpecification.internalValue = value;
}
resetCustomizedScalingMetricSpecification() {
this._customizedScalingMetricSpecification.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get customizedScalingMetricSpecificationInput() {
return this._customizedScalingMetricSpecification.internalValue;
}
get predefinedScalingMetricSpecification() {
return this._predefinedScalingMetricSpecification;
}
putPredefinedScalingMetricSpecification(value) {
this._predefinedScalingMetricSpecification.internalValue = value;
}
resetPredefinedScalingMetricSpecification() {
this._predefinedScalingMetricSpecification.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get predefinedScalingMetricSpecificationInput() {
return this._predefinedScalingMetricSpecification.internalValue;
}
}
exports.AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationOutputReference = AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationOutputReference;
_h = JSII_RTTI_SYMBOL_1;
AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationOutputReference[_h] = { fqn: "@cdktf/provider-aws.autoscalingplansScalingPlan.AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationOutputReference", version: "21.22.1" };
class AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationList 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 AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationList = AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationList;
_j = JSII_RTTI_SYMBOL_1;
AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationList[_j] = { fqn: "@cdktf/provider-aws.autoscalingplansScalingPlan.AutoscalingplansScalingPlanScalingInstructionTargetTrackingConfigurationList", version: "21.22.1" };
function autoscalingplansScalingPlanScalingInstructionToTerraform(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 {
disable_dynamic_scaling: cdktf.booleanToTerraform(struct.disableDynamicScaling),
max_capacity: cdktf.numberToTerraform(struct.maxCapacity),
min_capacity: cdktf.numberToTerraform(struct.minCapacity),
predictive_scaling_max_capacity_behavior: cdktf.stringToTerraform(struct.predictiveScalingMaxCapacityBehavior),
predictive_scaling_max_capacity_buffer: cdktf.numberToTerraform(struct.predictiveScalingMaxCapacityBuffer),
predictive_scaling_mode: cdktf.stringToTerraform(struct.predictiveScalingMode),
resource_id: cdktf.st