// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Auto Scaling */ export interface AutoscalingPolicyConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#adjustment_type AutoscalingPolicy#adjustment_type} */ readonly adjustmentType?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#autoscaling_group_name AutoscalingPolicy#autoscaling_group_name} */ readonly autoscalingGroupName: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#cooldown AutoscalingPolicy#cooldown} */ readonly cooldown?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#estimated_instance_warmup AutoscalingPolicy#estimated_instance_warmup} */ readonly estimatedInstanceWarmup?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#metric_aggregation_type AutoscalingPolicy#metric_aggregation_type} */ readonly metricAggregationType?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#min_adjustment_magnitude AutoscalingPolicy#min_adjustment_magnitude} */ readonly minAdjustmentMagnitude?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#name AutoscalingPolicy#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#policy_type AutoscalingPolicy#policy_type} */ readonly policyType?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#scaling_adjustment AutoscalingPolicy#scaling_adjustment} */ readonly scalingAdjustment?: number; /** * predictive_scaling_configuration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#predictive_scaling_configuration AutoscalingPolicy#predictive_scaling_configuration} */ readonly predictiveScalingConfiguration?: AutoscalingPolicyPredictiveScalingConfiguration; /** * step_adjustment block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#step_adjustment AutoscalingPolicy#step_adjustment} */ readonly stepAdjustment?: AutoscalingPolicyStepAdjustment[]; /** * target_tracking_configuration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#target_tracking_configuration AutoscalingPolicy#target_tracking_configuration} */ readonly targetTrackingConfiguration?: AutoscalingPolicyTargetTrackingConfiguration; } export interface AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecification { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#predefined_metric_type AutoscalingPolicy#predefined_metric_type} */ readonly predefinedMetricType: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#resource_label AutoscalingPolicy#resource_label} */ readonly resourceLabel: string; } export function autoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationToTerraform(struct?: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationOutputReference | AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecification): any { if (!cdktf.canInspect(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_metric_type: cdktf.stringToTerraform(struct!.predefinedMetricType), resource_label: cdktf.stringToTerraform(struct!.resourceLabel), } } export class AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecification | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._predefinedMetricType !== undefined) { hasAnyValues = true; internalValueResult.predefinedMetricType = this._predefinedMetricType; } if (this._resourceLabel !== undefined) { hasAnyValues = true; internalValueResult.resourceLabel = this._resourceLabel; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecification | undefined) { if (value === undefined) { this.isEmptyObject = false; this._predefinedMetricType = undefined; this._resourceLabel = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._predefinedMetricType = value.predefinedMetricType; this._resourceLabel = value.resourceLabel; } } // predefined_metric_type - computed: false, optional: false, required: true private _predefinedMetricType?: string; public get predefinedMetricType() { return this.getStringAttribute('predefined_metric_type'); } public set predefinedMetricType(value: string) { this._predefinedMetricType = value; } // Temporarily expose input value. Use with caution. public get predefinedMetricTypeInput() { return this._predefinedMetricType; } // resource_label - computed: false, optional: false, required: true private _resourceLabel?: string; public get resourceLabel() { return this.getStringAttribute('resource_label'); } public set resourceLabel(value: string) { this._resourceLabel = value; } // Temporarily expose input value. Use with caution. public get resourceLabelInput() { return this._resourceLabel; } } export interface AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecification { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#predefined_metric_type AutoscalingPolicy#predefined_metric_type} */ readonly predefinedMetricType: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#resource_label AutoscalingPolicy#resource_label} */ readonly resourceLabel: string; } export function autoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecificationToTerraform(struct?: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecificationOutputReference | AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecification): any { if (!cdktf.canInspect(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_metric_type: cdktf.stringToTerraform(struct!.predefinedMetricType), resource_label: cdktf.stringToTerraform(struct!.resourceLabel), } } export class AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecificationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecification | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._predefinedMetricType !== undefined) { hasAnyValues = true; internalValueResult.predefinedMetricType = this._predefinedMetricType; } if (this._resourceLabel !== undefined) { hasAnyValues = true; internalValueResult.resourceLabel = this._resourceLabel; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecification | undefined) { if (value === undefined) { this.isEmptyObject = false; this._predefinedMetricType = undefined; this._resourceLabel = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._predefinedMetricType = value.predefinedMetricType; this._resourceLabel = value.resourceLabel; } } // predefined_metric_type - computed: false, optional: false, required: true private _predefinedMetricType?: string; public get predefinedMetricType() { return this.getStringAttribute('predefined_metric_type'); } public set predefinedMetricType(value: string) { this._predefinedMetricType = value; } // Temporarily expose input value. Use with caution. public get predefinedMetricTypeInput() { return this._predefinedMetricType; } // resource_label - computed: false, optional: false, required: true private _resourceLabel?: string; public get resourceLabel() { return this.getStringAttribute('resource_label'); } public set resourceLabel(value: string) { this._resourceLabel = value; } // Temporarily expose input value. Use with caution. public get resourceLabelInput() { return this._resourceLabel; } } export interface AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecification { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#predefined_metric_type AutoscalingPolicy#predefined_metric_type} */ readonly predefinedMetricType: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#resource_label AutoscalingPolicy#resource_label} */ readonly resourceLabel: string; } export function autoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecificationToTerraform(struct?: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecificationOutputReference | AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecification): any { if (!cdktf.canInspect(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_metric_type: cdktf.stringToTerraform(struct!.predefinedMetricType), resource_label: cdktf.stringToTerraform(struct!.resourceLabel), } } export class AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecificationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecification | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._predefinedMetricType !== undefined) { hasAnyValues = true; internalValueResult.predefinedMetricType = this._predefinedMetricType; } if (this._resourceLabel !== undefined) { hasAnyValues = true; internalValueResult.resourceLabel = this._resourceLabel; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecification | undefined) { if (value === undefined) { this.isEmptyObject = false; this._predefinedMetricType = undefined; this._resourceLabel = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._predefinedMetricType = value.predefinedMetricType; this._resourceLabel = value.resourceLabel; } } // predefined_metric_type - computed: false, optional: false, required: true private _predefinedMetricType?: string; public get predefinedMetricType() { return this.getStringAttribute('predefined_metric_type'); } public set predefinedMetricType(value: string) { this._predefinedMetricType = value; } // Temporarily expose input value. Use with caution. public get predefinedMetricTypeInput() { return this._predefinedMetricType; } // resource_label - computed: false, optional: false, required: true private _resourceLabel?: string; public get resourceLabel() { return this.getStringAttribute('resource_label'); } public set resourceLabel(value: string) { this._resourceLabel = value; } // Temporarily expose input value. Use with caution. public get resourceLabelInput() { return this._resourceLabel; } } export interface AutoscalingPolicyPredictiveScalingConfigurationMetricSpecification { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#target_value AutoscalingPolicy#target_value} */ readonly targetValue: number; /** * predefined_load_metric_specification block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#predefined_load_metric_specification AutoscalingPolicy#predefined_load_metric_specification} */ readonly predefinedLoadMetricSpecification?: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecification; /** * predefined_metric_pair_specification block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#predefined_metric_pair_specification AutoscalingPolicy#predefined_metric_pair_specification} */ readonly predefinedMetricPairSpecification?: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecification; /** * predefined_scaling_metric_specification block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#predefined_scaling_metric_specification AutoscalingPolicy#predefined_scaling_metric_specification} */ readonly predefinedScalingMetricSpecification?: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecification; } export function autoscalingPolicyPredictiveScalingConfigurationMetricSpecificationToTerraform(struct?: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationOutputReference | AutoscalingPolicyPredictiveScalingConfigurationMetricSpecification): any { if (!cdktf.canInspect(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 { target_value: cdktf.numberToTerraform(struct!.targetValue), predefined_load_metric_specification: autoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationToTerraform(struct!.predefinedLoadMetricSpecification), predefined_metric_pair_specification: autoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecificationToTerraform(struct!.predefinedMetricPairSpecification), predefined_scaling_metric_specification: autoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecificationToTerraform(struct!.predefinedScalingMetricSpecification), } } export class AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): AutoscalingPolicyPredictiveScalingConfigurationMetricSpecification | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._targetValue !== undefined) { hasAnyValues = true; internalValueResult.targetValue = this._targetValue; } if (this._predefinedLoadMetricSpecification?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.predefinedLoadMetricSpecification = this._predefinedLoadMetricSpecification?.internalValue; } if (this._predefinedMetricPairSpecification?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.predefinedMetricPairSpecification = this._predefinedMetricPairSpecification?.internalValue; } if (this._predefinedScalingMetricSpecification?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.predefinedScalingMetricSpecification = this._predefinedScalingMetricSpecification?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecification | undefined) { if (value === undefined) { this.isEmptyObject = false; this._targetValue = undefined; this._predefinedLoadMetricSpecification.internalValue = undefined; this._predefinedMetricPairSpecification.internalValue = undefined; this._predefinedScalingMetricSpecification.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._targetValue = value.targetValue; this._predefinedLoadMetricSpecification.internalValue = value.predefinedLoadMetricSpecification; this._predefinedMetricPairSpecification.internalValue = value.predefinedMetricPairSpecification; this._predefinedScalingMetricSpecification.internalValue = value.predefinedScalingMetricSpecification; } } // target_value - computed: false, optional: false, required: true private _targetValue?: number; public get targetValue() { return this.getNumberAttribute('target_value'); } public set targetValue(value: number) { this._targetValue = value; } // Temporarily expose input value. Use with caution. public get targetValueInput() { return this._targetValue; } // predefined_load_metric_specification - computed: false, optional: true, required: false private _predefinedLoadMetricSpecification = new AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecificationOutputReference(this as any, "predefined_load_metric_specification", true); public get predefinedLoadMetricSpecification() { return this._predefinedLoadMetricSpecification; } public putPredefinedLoadMetricSpecification(value: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedLoadMetricSpecification) { this._predefinedLoadMetricSpecification.internalValue = value; } public resetPredefinedLoadMetricSpecification() { this._predefinedLoadMetricSpecification.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get predefinedLoadMetricSpecificationInput() { return this._predefinedLoadMetricSpecification.internalValue; } // predefined_metric_pair_specification - computed: false, optional: true, required: false private _predefinedMetricPairSpecification = new AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecificationOutputReference(this as any, "predefined_metric_pair_specification", true); public get predefinedMetricPairSpecification() { return this._predefinedMetricPairSpecification; } public putPredefinedMetricPairSpecification(value: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedMetricPairSpecification) { this._predefinedMetricPairSpecification.internalValue = value; } public resetPredefinedMetricPairSpecification() { this._predefinedMetricPairSpecification.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get predefinedMetricPairSpecificationInput() { return this._predefinedMetricPairSpecification.internalValue; } // predefined_scaling_metric_specification - computed: false, optional: true, required: false private _predefinedScalingMetricSpecification = new AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecificationOutputReference(this as any, "predefined_scaling_metric_specification", true); public get predefinedScalingMetricSpecification() { return this._predefinedScalingMetricSpecification; } public putPredefinedScalingMetricSpecification(value: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationPredefinedScalingMetricSpecification) { this._predefinedScalingMetricSpecification.internalValue = value; } public resetPredefinedScalingMetricSpecification() { this._predefinedScalingMetricSpecification.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get predefinedScalingMetricSpecificationInput() { return this._predefinedScalingMetricSpecification.internalValue; } } export interface AutoscalingPolicyPredictiveScalingConfiguration { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#max_capacity_breach_behavior AutoscalingPolicy#max_capacity_breach_behavior} */ readonly maxCapacityBreachBehavior?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#max_capacity_buffer AutoscalingPolicy#max_capacity_buffer} */ readonly maxCapacityBuffer?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#mode AutoscalingPolicy#mode} */ readonly mode?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#scheduling_buffer_time AutoscalingPolicy#scheduling_buffer_time} */ readonly schedulingBufferTime?: string; /** * metric_specification block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#metric_specification AutoscalingPolicy#metric_specification} */ readonly metricSpecification: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecification; } export function autoscalingPolicyPredictiveScalingConfigurationToTerraform(struct?: AutoscalingPolicyPredictiveScalingConfigurationOutputReference | AutoscalingPolicyPredictiveScalingConfiguration): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { max_capacity_breach_behavior: cdktf.stringToTerraform(struct!.maxCapacityBreachBehavior), max_capacity_buffer: cdktf.stringToTerraform(struct!.maxCapacityBuffer), mode: cdktf.stringToTerraform(struct!.mode), scheduling_buffer_time: cdktf.stringToTerraform(struct!.schedulingBufferTime), metric_specification: autoscalingPolicyPredictiveScalingConfigurationMetricSpecificationToTerraform(struct!.metricSpecification), } } export class AutoscalingPolicyPredictiveScalingConfigurationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): AutoscalingPolicyPredictiveScalingConfiguration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._maxCapacityBreachBehavior !== undefined) { hasAnyValues = true; internalValueResult.maxCapacityBreachBehavior = this._maxCapacityBreachBehavior; } if (this._maxCapacityBuffer !== undefined) { hasAnyValues = true; internalValueResult.maxCapacityBuffer = this._maxCapacityBuffer; } if (this._mode !== undefined) { hasAnyValues = true; internalValueResult.mode = this._mode; } if (this._schedulingBufferTime !== undefined) { hasAnyValues = true; internalValueResult.schedulingBufferTime = this._schedulingBufferTime; } if (this._metricSpecification?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.metricSpecification = this._metricSpecification?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: AutoscalingPolicyPredictiveScalingConfiguration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._maxCapacityBreachBehavior = undefined; this._maxCapacityBuffer = undefined; this._mode = undefined; this._schedulingBufferTime = undefined; this._metricSpecification.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._maxCapacityBreachBehavior = value.maxCapacityBreachBehavior; this._maxCapacityBuffer = value.maxCapacityBuffer; this._mode = value.mode; this._schedulingBufferTime = value.schedulingBufferTime; this._metricSpecification.internalValue = value.metricSpecification; } } // max_capacity_breach_behavior - computed: false, optional: true, required: false private _maxCapacityBreachBehavior?: string; public get maxCapacityBreachBehavior() { return this.getStringAttribute('max_capacity_breach_behavior'); } public set maxCapacityBreachBehavior(value: string) { this._maxCapacityBreachBehavior = value; } public resetMaxCapacityBreachBehavior() { this._maxCapacityBreachBehavior = undefined; } // Temporarily expose input value. Use with caution. public get maxCapacityBreachBehaviorInput() { return this._maxCapacityBreachBehavior; } // max_capacity_buffer - computed: false, optional: true, required: false private _maxCapacityBuffer?: string; public get maxCapacityBuffer() { return this.getStringAttribute('max_capacity_buffer'); } public set maxCapacityBuffer(value: string) { this._maxCapacityBuffer = value; } public resetMaxCapacityBuffer() { this._maxCapacityBuffer = undefined; } // Temporarily expose input value. Use with caution. public get maxCapacityBufferInput() { return this._maxCapacityBuffer; } // mode - computed: false, optional: true, required: false private _mode?: string; public get mode() { return this.getStringAttribute('mode'); } public set mode(value: string) { this._mode = value; } public resetMode() { this._mode = undefined; } // Temporarily expose input value. Use with caution. public get modeInput() { return this._mode; } // scheduling_buffer_time - computed: false, optional: true, required: false private _schedulingBufferTime?: string; public get schedulingBufferTime() { return this.getStringAttribute('scheduling_buffer_time'); } public set schedulingBufferTime(value: string) { this._schedulingBufferTime = value; } public resetSchedulingBufferTime() { this._schedulingBufferTime = undefined; } // Temporarily expose input value. Use with caution. public get schedulingBufferTimeInput() { return this._schedulingBufferTime; } // metric_specification - computed: false, optional: false, required: true private _metricSpecification = new AutoscalingPolicyPredictiveScalingConfigurationMetricSpecificationOutputReference(this as any, "metric_specification", true); public get metricSpecification() { return this._metricSpecification; } public putMetricSpecification(value: AutoscalingPolicyPredictiveScalingConfigurationMetricSpecification) { this._metricSpecification.internalValue = value; } // Temporarily expose input value. Use with caution. public get metricSpecificationInput() { return this._metricSpecification.internalValue; } } export interface AutoscalingPolicyStepAdjustment { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#metric_interval_lower_bound AutoscalingPolicy#metric_interval_lower_bound} */ readonly metricIntervalLowerBound?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#metric_interval_upper_bound AutoscalingPolicy#metric_interval_upper_bound} */ readonly metricIntervalUpperBound?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#scaling_adjustment AutoscalingPolicy#scaling_adjustment} */ readonly scalingAdjustment: number; } export function autoscalingPolicyStepAdjustmentToTerraform(struct?: AutoscalingPolicyStepAdjustment): any { if (!cdktf.canInspect(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 { metric_interval_lower_bound: cdktf.stringToTerraform(struct!.metricIntervalLowerBound), metric_interval_upper_bound: cdktf.stringToTerraform(struct!.metricIntervalUpperBound), scaling_adjustment: cdktf.numberToTerraform(struct!.scalingAdjustment), } } export interface AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimension { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#name AutoscalingPolicy#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#value AutoscalingPolicy#value} */ readonly value: string; } export function autoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimensionToTerraform(struct?: AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimension): any { if (!cdktf.canInspect(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 { name: cdktf.stringToTerraform(struct!.name), value: cdktf.stringToTerraform(struct!.value), } } export interface AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecification { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#metric_name AutoscalingPolicy#metric_name} */ readonly metricName: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#namespace AutoscalingPolicy#namespace} */ readonly namespace: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#statistic AutoscalingPolicy#statistic} */ readonly statistic: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#unit AutoscalingPolicy#unit} */ readonly unit?: string; /** * metric_dimension block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#metric_dimension AutoscalingPolicy#metric_dimension} */ readonly metricDimension?: AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimension[]; } export function autoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecificationToTerraform(struct?: AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecificationOutputReference | AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecification): any { if (!cdktf.canInspect(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 { metric_name: cdktf.stringToTerraform(struct!.metricName), namespace: cdktf.stringToTerraform(struct!.namespace), statistic: cdktf.stringToTerraform(struct!.statistic), unit: cdktf.stringToTerraform(struct!.unit), metric_dimension: cdktf.listMapper(autoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimensionToTerraform)(struct!.metricDimension), } } export class AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecificationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecification | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; 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; } if (this._metricDimension !== undefined) { hasAnyValues = true; internalValueResult.metricDimension = this._metricDimension; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecification | undefined) { if (value === undefined) { this.isEmptyObject = false; this._metricName = undefined; this._namespace = undefined; this._statistic = undefined; this._unit = undefined; this._metricDimension = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._metricName = value.metricName; this._namespace = value.namespace; this._statistic = value.statistic; this._unit = value.unit; this._metricDimension = value.metricDimension; } } // metric_name - computed: false, optional: false, required: true private _metricName?: string; public get metricName() { return this.getStringAttribute('metric_name'); } public set metricName(value: string) { this._metricName = value; } // Temporarily expose input value. Use with caution. public get metricNameInput() { return this._metricName; } // namespace - computed: false, optional: false, required: true private _namespace?: string; public get namespace() { return this.getStringAttribute('namespace'); } public set namespace(value: string) { this._namespace = value; } // Temporarily expose input value. Use with caution. public get namespaceInput() { return this._namespace; } // statistic - computed: false, optional: false, required: true private _statistic?: string; public get statistic() { return this.getStringAttribute('statistic'); } public set statistic(value: string) { this._statistic = value; } // Temporarily expose input value. Use with caution. public get statisticInput() { return this._statistic; } // unit - computed: false, optional: true, required: false private _unit?: string; public get unit() { return this.getStringAttribute('unit'); } public set unit(value: string) { this._unit = value; } public resetUnit() { this._unit = undefined; } // Temporarily expose input value. Use with caution. public get unitInput() { return this._unit; } // metric_dimension - computed: false, optional: true, required: false private _metricDimension?: AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimension[]; public get metricDimension() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('metric_dimension') as any; } public set metricDimension(value: AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecificationMetricDimension[]) { this._metricDimension = value; } public resetMetricDimension() { this._metricDimension = undefined; } // Temporarily expose input value. Use with caution. public get metricDimensionInput() { return this._metricDimension; } } export interface AutoscalingPolicyTargetTrackingConfigurationPredefinedMetricSpecification { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#predefined_metric_type AutoscalingPolicy#predefined_metric_type} */ readonly predefinedMetricType: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#resource_label AutoscalingPolicy#resource_label} */ readonly resourceLabel?: string; } export function autoscalingPolicyTargetTrackingConfigurationPredefinedMetricSpecificationToTerraform(struct?: AutoscalingPolicyTargetTrackingConfigurationPredefinedMetricSpecificationOutputReference | AutoscalingPolicyTargetTrackingConfigurationPredefinedMetricSpecification): any { if (!cdktf.canInspect(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_metric_type: cdktf.stringToTerraform(struct!.predefinedMetricType), resource_label: cdktf.stringToTerraform(struct!.resourceLabel), } } export class AutoscalingPolicyTargetTrackingConfigurationPredefinedMetricSpecificationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): AutoscalingPolicyTargetTrackingConfigurationPredefinedMetricSpecification | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._predefinedMetricType !== undefined) { hasAnyValues = true; internalValueResult.predefinedMetricType = this._predefinedMetricType; } if (this._resourceLabel !== undefined) { hasAnyValues = true; internalValueResult.resourceLabel = this._resourceLabel; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: AutoscalingPolicyTargetTrackingConfigurationPredefinedMetricSpecification | undefined) { if (value === undefined) { this.isEmptyObject = false; this._predefinedMetricType = undefined; this._resourceLabel = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._predefinedMetricType = value.predefinedMetricType; this._resourceLabel = value.resourceLabel; } } // predefined_metric_type - computed: false, optional: false, required: true private _predefinedMetricType?: string; public get predefinedMetricType() { return this.getStringAttribute('predefined_metric_type'); } public set predefinedMetricType(value: string) { this._predefinedMetricType = value; } // Temporarily expose input value. Use with caution. public get predefinedMetricTypeInput() { return this._predefinedMetricType; } // resource_label - computed: false, optional: true, required: false private _resourceLabel?: string; public get resourceLabel() { return this.getStringAttribute('resource_label'); } public set resourceLabel(value: string) { this._resourceLabel = value; } public resetResourceLabel() { this._resourceLabel = undefined; } // Temporarily expose input value. Use with caution. public get resourceLabelInput() { return this._resourceLabel; } } export interface AutoscalingPolicyTargetTrackingConfiguration { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#disable_scale_in AutoscalingPolicy#disable_scale_in} */ readonly disableScaleIn?: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#target_value AutoscalingPolicy#target_value} */ readonly targetValue: number; /** * customized_metric_specification block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#customized_metric_specification AutoscalingPolicy#customized_metric_specification} */ readonly customizedMetricSpecification?: AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecification; /** * predefined_metric_specification block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html#predefined_metric_specification AutoscalingPolicy#predefined_metric_specification} */ readonly predefinedMetricSpecification?: AutoscalingPolicyTargetTrackingConfigurationPredefinedMetricSpecification; } export function autoscalingPolicyTargetTrackingConfigurationToTerraform(struct?: AutoscalingPolicyTargetTrackingConfigurationOutputReference | AutoscalingPolicyTargetTrackingConfiguration): any { if (!cdktf.canInspect(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), target_value: cdktf.numberToTerraform(struct!.targetValue), customized_metric_specification: autoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecificationToTerraform(struct!.customizedMetricSpecification), predefined_metric_specification: autoscalingPolicyTargetTrackingConfigurationPredefinedMetricSpecificationToTerraform(struct!.predefinedMetricSpecification), } } export class AutoscalingPolicyTargetTrackingConfigurationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): AutoscalingPolicyTargetTrackingConfiguration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._disableScaleIn !== undefined) { hasAnyValues = true; internalValueResult.disableScaleIn = this._disableScaleIn; } if (this._targetValue !== undefined) { hasAnyValues = true; internalValueResult.targetValue = this._targetValue; } if (this._customizedMetricSpecification?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.customizedMetricSpecification = this._customizedMetricSpecification?.internalValue; } if (this._predefinedMetricSpecification?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.predefinedMetricSpecification = this._predefinedMetricSpecification?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: AutoscalingPolicyTargetTrackingConfiguration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._disableScaleIn = undefined; this._targetValue = undefined; this._customizedMetricSpecification.internalValue = undefined; this._predefinedMetricSpecification.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._disableScaleIn = value.disableScaleIn; this._targetValue = value.targetValue; this._customizedMetricSpecification.internalValue = value.customizedMetricSpecification; this._predefinedMetricSpecification.internalValue = value.predefinedMetricSpecification; } } // disable_scale_in - computed: false, optional: true, required: false private _disableScaleIn?: boolean | cdktf.IResolvable; public get disableScaleIn() { return this.getBooleanAttribute('disable_scale_in') as any; } public set disableScaleIn(value: boolean | cdktf.IResolvable) { this._disableScaleIn = value; } public resetDisableScaleIn() { this._disableScaleIn = undefined; } // Temporarily expose input value. Use with caution. public get disableScaleInInput() { return this._disableScaleIn; } // target_value - computed: false, optional: false, required: true private _targetValue?: number; public get targetValue() { return this.getNumberAttribute('target_value'); } public set targetValue(value: number) { this._targetValue = value; } // Temporarily expose input value. Use with caution. public get targetValueInput() { return this._targetValue; } // customized_metric_specification - computed: false, optional: true, required: false private _customizedMetricSpecification = new AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecificationOutputReference(this as any, "customized_metric_specification", true); public get customizedMetricSpecification() { return this._customizedMetricSpecification; } public putCustomizedMetricSpecification(value: AutoscalingPolicyTargetTrackingConfigurationCustomizedMetricSpecification) { this._customizedMetricSpecification.internalValue = value; } public resetCustomizedMetricSpecification() { this._customizedMetricSpecification.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get customizedMetricSpecificationInput() { return this._customizedMetricSpecification.internalValue; } // predefined_metric_specification - computed: false, optional: true, required: false private _predefinedMetricSpecification = new AutoscalingPolicyTargetTrackingConfigurationPredefinedMetricSpecificationOutputReference(this as any, "predefined_metric_specification", true); public get predefinedMetricSpecification() { return this._predefinedMetricSpecification; } public putPredefinedMetricSpecification(value: AutoscalingPolicyTargetTrackingConfigurationPredefinedMetricSpecification) { this._predefinedMetricSpecification.internalValue = value; } public resetPredefinedMetricSpecification() { this._predefinedMetricSpecification.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get predefinedMetricSpecificationInput() { return this._predefinedMetricSpecification.internalValue; } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html aws_autoscaling_policy} */ export class AutoscalingPolicy extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_autoscaling_policy"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_policy.html aws_autoscaling_policy} 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 AutoscalingPolicyConfig */ public constructor(scope: Construct, id: string, config: AutoscalingPolicyConfig) { super(scope, id, { terraformResourceType: 'aws_autoscaling_policy', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._adjustmentType = config.adjustmentType; this._autoscalingGroupName = config.autoscalingGroupName; this._cooldown = config.cooldown; this._estimatedInstanceWarmup = config.estimatedInstanceWarmup; this._metricAggregationType = config.metricAggregationType; this._minAdjustmentMagnitude = config.minAdjustmentMagnitude; this._name = config.name; this._policyType = config.policyType; this._scalingAdjustment = config.scalingAdjustment; this._predictiveScalingConfiguration.internalValue = config.predictiveScalingConfiguration; this._stepAdjustment = config.stepAdjustment; this._targetTrackingConfiguration.internalValue = config.targetTrackingConfiguration; } // ========== // ATTRIBUTES // ========== // adjustment_type - computed: false, optional: true, required: false private _adjustmentType?: string; public get adjustmentType() { return this.getStringAttribute('adjustment_type'); } public set adjustmentType(value: string) { this._adjustmentType = value; } public resetAdjustmentType() { this._adjustmentType = undefined; } // Temporarily expose input value. Use with caution. public get adjustmentTypeInput() { return this._adjustmentType; } // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // autoscaling_group_name - computed: false, optional: false, required: true private _autoscalingGroupName?: string; public get autoscalingGroupName() { return this.getStringAttribute('autoscaling_group_name'); } public set autoscalingGroupName(value: string) { this._autoscalingGroupName = value; } // Temporarily expose input value. Use with caution. public get autoscalingGroupNameInput() { return this._autoscalingGroupName; } // cooldown - computed: false, optional: true, required: false private _cooldown?: number; public get cooldown() { return this.getNumberAttribute('cooldown'); } public set cooldown(value: number) { this._cooldown = value; } public resetCooldown() { this._cooldown = undefined; } // Temporarily expose input value. Use with caution. public get cooldownInput() { return this._cooldown; } // estimated_instance_warmup - computed: false, optional: true, required: false private _estimatedInstanceWarmup?: number; public get estimatedInstanceWarmup() { return this.getNumberAttribute('estimated_instance_warmup'); } public set estimatedInstanceWarmup(value: number) { this._estimatedInstanceWarmup = value; } public resetEstimatedInstanceWarmup() { this._estimatedInstanceWarmup = undefined; } // Temporarily expose input value. Use with caution. public get estimatedInstanceWarmupInput() { return this._estimatedInstanceWarmup; } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // metric_aggregation_type - computed: true, optional: true, required: false private _metricAggregationType?: string; public get metricAggregationType() { return this.getStringAttribute('metric_aggregation_type'); } public set metricAggregationType(value: string) { this._metricAggregationType = value; } public resetMetricAggregationType() { this._metricAggregationType = undefined; } // Temporarily expose input value. Use with caution. public get metricAggregationTypeInput() { return this._metricAggregationType; } // min_adjustment_magnitude - computed: false, optional: true, required: false private _minAdjustmentMagnitude?: number; public get minAdjustmentMagnitude() { return this.getNumberAttribute('min_adjustment_magnitude'); } public set minAdjustmentMagnitude(value: number) { this._minAdjustmentMagnitude = value; } public resetMinAdjustmentMagnitude() { this._minAdjustmentMagnitude = undefined; } // Temporarily expose input value. Use with caution. public get minAdjustmentMagnitudeInput() { return this._minAdjustmentMagnitude; } // name - computed: false, optional: false, required: true private _name?: string; public get name() { return this.getStringAttribute('name'); } public set name(value: string) { this._name = value; } // Temporarily expose input value. Use with caution. public get nameInput() { return this._name; } // policy_type - computed: false, optional: true, required: false private _policyType?: string; public get policyType() { return this.getStringAttribute('policy_type'); } public set policyType(value: string) { this._policyType = value; } public resetPolicyType() { this._policyType = undefined; } // Temporarily expose input value. Use with caution. public get policyTypeInput() { return this._policyType; } // scaling_adjustment - computed: false, optional: true, required: false private _scalingAdjustment?: number; public get scalingAdjustment() { return this.getNumberAttribute('scaling_adjustment'); } public set scalingAdjustment(value: number) { this._scalingAdjustment = value; } public resetScalingAdjustment() { this._scalingAdjustment = undefined; } // Temporarily expose input value. Use with caution. public get scalingAdjustmentInput() { return this._scalingAdjustment; } // predictive_scaling_configuration - computed: false, optional: true, required: false private _predictiveScalingConfiguration = new AutoscalingPolicyPredictiveScalingConfigurationOutputReference(this as any, "predictive_scaling_configuration", true); public get predictiveScalingConfiguration() { return this._predictiveScalingConfiguration; } public putPredictiveScalingConfiguration(value: AutoscalingPolicyPredictiveScalingConfiguration) { this._predictiveScalingConfiguration.internalValue = value; } public resetPredictiveScalingConfiguration() { this._predictiveScalingConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get predictiveScalingConfigurationInput() { return this._predictiveScalingConfiguration.internalValue; } // step_adjustment - computed: false, optional: true, required: false private _stepAdjustment?: AutoscalingPolicyStepAdjustment[]; public get stepAdjustment() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('step_adjustment') as any; } public set stepAdjustment(value: AutoscalingPolicyStepAdjustment[]) { this._stepAdjustment = value; } public resetStepAdjustment() { this._stepAdjustment = undefined; } // Temporarily expose input value. Use with caution. public get stepAdjustmentInput() { return this._stepAdjustment; } // target_tracking_configuration - computed: false, optional: true, required: false private _targetTrackingConfiguration = new AutoscalingPolicyTargetTrackingConfigurationOutputReference(this as any, "target_tracking_configuration", true); public get targetTrackingConfiguration() { return this._targetTrackingConfiguration; } public putTargetTrackingConfiguration(value: AutoscalingPolicyTargetTrackingConfiguration) { this._targetTrackingConfiguration.internalValue = value; } public resetTargetTrackingConfiguration() { this._targetTrackingConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get targetTrackingConfigurationInput() { return this._targetTrackingConfiguration.internalValue; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { adjustment_type: cdktf.stringToTerraform(this._adjustmentType), autoscaling_group_name: cdktf.stringToTerraform(this._autoscalingGroupName), cooldown: cdktf.numberToTerraform(this._cooldown), estimated_instance_warmup: cdktf.numberToTerraform(this._estimatedInstanceWarmup), metric_aggregation_type: cdktf.stringToTerraform(this._metricAggregationType), min_adjustment_magnitude: cdktf.numberToTerraform(this._minAdjustmentMagnitude), name: cdktf.stringToTerraform(this._name), policy_type: cdktf.stringToTerraform(this._policyType), scaling_adjustment: cdktf.numberToTerraform(this._scalingAdjustment), predictive_scaling_configuration: autoscalingPolicyPredictiveScalingConfigurationToTerraform(this._predictiveScalingConfiguration.internalValue), step_adjustment: cdktf.listMapper(autoscalingPolicyStepAdjustmentToTerraform)(this._stepAdjustment), target_tracking_configuration: autoscalingPolicyTargetTrackingConfigurationToTerraform(this._targetTrackingConfiguration.internalValue), }; } }