import * as core from "@terrascript/core"; export interface PredefinedMetricPairSpecificationArgs extends core.SchemaArgs { predefinedMetricType: string | core.StringOut; resourceLabel: string | core.StringOut; } export class PredefinedMetricPairSpecification extends core.Schema { @core.attr(String) public predefinedMetricType!: string | core.StringOut; @core.attr(String) public resourceLabel!: string | core.StringOut; } export interface PredefinedScalingMetricSpecificationArgs extends core.SchemaArgs { predefinedMetricType: string | core.StringOut; resourceLabel: string | core.StringOut; } export class PredefinedScalingMetricSpecification extends core.Schema { @core.attr(String) public predefinedMetricType!: string | core.StringOut; @core.attr(String) public resourceLabel!: string | core.StringOut; } export interface DimensionsArgs extends core.SchemaArgs { name: string | core.StringOut; value: string | core.StringOut; } export class Dimensions extends core.Schema { @core.attr(String) public name!: string | core.StringOut; @core.attr(String) public value!: string | core.StringOut; } export interface MetricArgs extends core.SchemaArgs { dimensions?: core.Array | core.ArrayOut; metricName: string | core.StringOut; namespace: string | core.StringOut; } export class Metric extends core.Schema { @core.attr(Dimensions, { kind: "array" }) public dimensions?: core.Array | core.ArrayOut; @core.attr(String) public metricName!: string | core.StringOut; @core.attr(String) public namespace!: string | core.StringOut; } export interface MetricStatArgs extends core.SchemaArgs { metric: Metric; stat: string | core.StringOut; unit?: string | core.StringOut; } export class MetricStat extends core.Schema { @core.attr(Metric) public metric!: Metric; @core.attr(String) public stat!: string | core.StringOut; @core.attr(String) public unit?: string | core.StringOut; } export interface MetricDataQueriesArgs extends core.SchemaArgs { expression?: string | core.StringOut; id: string | core.StringOut; label?: string | core.StringOut; metricStat?: MetricStat; returnData?: boolean | core.BooleanOut; } export class MetricDataQueries extends core.Schema { @core.attr(String) public expression?: string | core.StringOut; @core.attr(String) public id!: string | core.StringOut; @core.attr(String) public label?: string | core.StringOut; @core.attr(MetricStat) public metricStat?: MetricStat; @core.attr(Boolean) public returnData?: boolean | core.BooleanOut; } export interface CustomizedCapacityMetricSpecificationArgs extends core.SchemaArgs { metricDataQueries: | core.Array | core.ArrayOut; } export class CustomizedCapacityMetricSpecification extends core.Schema { @core.attr(MetricDataQueries, { kind: "array" }) public metricDataQueries!: | core.Array | core.ArrayOut; } export interface CustomizedLoadMetricSpecificationArgs extends core.SchemaArgs { metricDataQueries: | core.Array | core.ArrayOut; } export class CustomizedLoadMetricSpecification extends core.Schema { @core.attr(MetricDataQueries, { kind: "array" }) public metricDataQueries!: | core.Array | core.ArrayOut; } export interface CustomizedScalingMetricSpecificationArgs extends core.SchemaArgs { metricDataQueries: | core.Array | core.ArrayOut; } export class CustomizedScalingMetricSpecification extends core.Schema { @core.attr(MetricDataQueries, { kind: "array" }) public metricDataQueries!: | core.Array | core.ArrayOut; } export interface PredefinedLoadMetricSpecificationArgs extends core.SchemaArgs { predefinedMetricType: string | core.StringOut; resourceLabel: string | core.StringOut; } export class PredefinedLoadMetricSpecification extends core.Schema { @core.attr(String) public predefinedMetricType!: string | core.StringOut; @core.attr(String) public resourceLabel!: string | core.StringOut; } export interface MetricSpecificationArgs extends core.SchemaArgs { customizedCapacityMetricSpecification?: CustomizedCapacityMetricSpecification; customizedLoadMetricSpecification?: CustomizedLoadMetricSpecification; customizedScalingMetricSpecification?: CustomizedScalingMetricSpecification; predefinedLoadMetricSpecification?: PredefinedLoadMetricSpecification; predefinedMetricPairSpecification?: PredefinedMetricPairSpecification; predefinedScalingMetricSpecification?: PredefinedScalingMetricSpecification; targetValue: number | core.NumberOut; } export class MetricSpecification extends core.Schema { @core.attr(CustomizedCapacityMetricSpecification) public customizedCapacityMetricSpecification?: CustomizedCapacityMetricSpecification; @core.attr(CustomizedLoadMetricSpecification) public customizedLoadMetricSpecification?: CustomizedLoadMetricSpecification; @core.attr(CustomizedScalingMetricSpecification) public customizedScalingMetricSpecification?: CustomizedScalingMetricSpecification; @core.attr(PredefinedLoadMetricSpecification) public predefinedLoadMetricSpecification?: PredefinedLoadMetricSpecification; @core.attr(PredefinedMetricPairSpecification) public predefinedMetricPairSpecification?: PredefinedMetricPairSpecification; @core.attr(PredefinedScalingMetricSpecification) public predefinedScalingMetricSpecification?: PredefinedScalingMetricSpecification; @core.attr(Number) public targetValue!: number | core.NumberOut; } export interface PredictiveScalingConfigurationArgs extends core.SchemaArgs { maxCapacityBreachBehavior?: string | core.StringOut; maxCapacityBuffer?: string | core.StringOut; metricSpecification: MetricSpecification; mode?: string | core.StringOut; schedulingBufferTime?: string | core.StringOut; } export class PredictiveScalingConfiguration extends core.Schema { @core.attr(String) public maxCapacityBreachBehavior?: string | core.StringOut; @core.attr(String) public maxCapacityBuffer?: string | core.StringOut; @core.attr(MetricSpecification) public metricSpecification!: MetricSpecification; @core.attr(String) public mode?: string | core.StringOut; @core.attr(String) public schedulingBufferTime?: string | core.StringOut; } export interface StepAdjustmentArgs extends core.SchemaArgs { metricIntervalLowerBound?: string | core.StringOut; metricIntervalUpperBound?: string | core.StringOut; scalingAdjustment: number | core.NumberOut; } export class StepAdjustment extends core.Schema { @core.attr(String) public metricIntervalLowerBound?: string | core.StringOut; @core.attr(String) public metricIntervalUpperBound?: string | core.StringOut; @core.attr(Number) public scalingAdjustment!: number | core.NumberOut; } export interface PredefinedMetricSpecificationArgs extends core.SchemaArgs { predefinedMetricType: string | core.StringOut; resourceLabel?: string | core.StringOut; } export class PredefinedMetricSpecification extends core.Schema { @core.attr(String) public predefinedMetricType!: string | core.StringOut; @core.attr(String) public resourceLabel?: string | core.StringOut; } export interface MetricDimensionArgs extends core.SchemaArgs { name: string | core.StringOut; value: string | core.StringOut; } export class MetricDimension extends core.Schema { @core.attr(String) public name!: string | core.StringOut; @core.attr(String) public value!: string | core.StringOut; } export interface CustomizedMetricSpecificationArgs extends core.SchemaArgs { metricDimension?: | core.Array | core.ArrayOut; metricName: string | core.StringOut; namespace: string | core.StringOut; statistic: string | core.StringOut; unit?: string | core.StringOut; } export class CustomizedMetricSpecification extends core.Schema { @core.attr(MetricDimension, { kind: "array" }) public metricDimension?: | core.Array | core.ArrayOut; @core.attr(String) public metricName!: string | core.StringOut; @core.attr(String) public namespace!: string | core.StringOut; @core.attr(String) public statistic!: string | core.StringOut; @core.attr(String) public unit?: string | core.StringOut; } export interface TargetTrackingConfigurationArgs extends core.SchemaArgs { customizedMetricSpecification?: CustomizedMetricSpecification; disableScaleIn?: boolean | core.BooleanOut; predefinedMetricSpecification?: PredefinedMetricSpecification; targetValue: number | core.NumberOut; } export class TargetTrackingConfiguration extends core.Schema { @core.attr(CustomizedMetricSpecification) public customizedMetricSpecification?: CustomizedMetricSpecification; @core.attr(Boolean) public disableScaleIn?: boolean | core.BooleanOut; @core.attr(PredefinedMetricSpecification) public predefinedMetricSpecification?: PredefinedMetricSpecification; @core.attr(Number) public targetValue!: number | core.NumberOut; } export interface PolicyArgs extends core.ResourceArgs { /** * (Optional) Specifies whether the adjustment is an absolute number or a percentage of the current cap * acity. Valid values are `ChangeInCapacity`, `ExactCapacity`, and `PercentChangeInCapacity`. */ adjustmentType?: string | core.StringOut; /** * (Required) The name of the autoscaling group. */ autoscalingGroupName: string | core.StringOut; /** * (Optional) The amount of time, in seconds, after a scaling activity completes and before the next sc * aling activity can start. */ cooldown?: number | core.NumberOut; /** * (Optional) Indicates whether the scaling policy is enabled or disabled. Default: `true`. */ enabled?: boolean | core.BooleanOut; /** * (Optional) The estimated time, in seconds, until a newly launched instance will contribute CloudWatc * h metrics. Without a value, AWS will default to the group's specified cooldown period. */ estimatedInstanceWarmup?: number | core.NumberOut; /** * (Optional) The aggregation type for the policy's metrics. Valid values are "Minimum", "Maximum", and * "Average". Without a value, AWS will treat the aggregation type as "Average". */ metricAggregationType?: string | core.StringOut; /** * (Optional) Minimum value to scale by when `adjustment_type` is set to `PercentChangeInCapacity`. */ minAdjustmentMagnitude?: number | core.NumberOut; /** * (Required) The name of the policy. */ name: string | core.StringOut; /** * (Optional) The policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "Pred * ictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling." */ policyType?: string | core.StringOut; /** * (Optional) The predictive scaling policy configuration to use with Amazon EC2 Auto Scaling. */ predictiveScalingConfiguration?: PredictiveScalingConfiguration; /** * (Optional) The number of instances by which to scale. `adjustment_type` determines the interpretatio * n of this number (e.g., as an absolute number or as a percentage of the existing Auto Scaling group * size). A positive increment adds to the current capacity and a negative value removes from the curre * nt capacity. */ scalingAdjustment?: number | core.NumberOut; /** * (Optional) A set of adjustments that manage */ stepAdjustment?: core.Array | core.ArrayOut; /** * (Optional) A target tracking policy. These have the following structure: */ targetTrackingConfiguration?: TargetTrackingConfiguration; } export class Policy extends core.Resource { /** * (Optional) Specifies whether the adjustment is an absolute number or a percentage of the current cap * acity. Valid values are `ChangeInCapacity`, `ExactCapacity`, and `PercentChangeInCapacity`. */ @core.attr(String) public adjustmentType?: string | core.StringOut; /** * The ARN assigned by AWS to the scaling policy. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Required) The name of the autoscaling group. */ @core.attr(String) public autoscalingGroupName!: string | core.StringOut; /** * (Optional) The amount of time, in seconds, after a scaling activity completes and before the next sc * aling activity can start. */ @core.attr(Number) public cooldown?: number | core.NumberOut; /** * (Optional) Indicates whether the scaling policy is enabled or disabled. Default: `true`. */ @core.attr(Boolean) public enabled?: boolean | core.BooleanOut; /** * (Optional) The estimated time, in seconds, until a newly launched instance will contribute CloudWatc * h metrics. Without a value, AWS will default to the group's specified cooldown period. */ @core.attr(Number) public estimatedInstanceWarmup?: number | core.NumberOut; /** * (Required) A short name for the metric used in predictive scaling policy. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The aggregation type for the policy's metrics. Valid values are "Minimum", "Maximum", and * "Average". Without a value, AWS will treat the aggregation type as "Average". */ @core.attr(String, { computed: true }) public metricAggregationType?: string | core.StringOut; /** * (Optional) Minimum value to scale by when `adjustment_type` is set to `PercentChangeInCapacity`. */ @core.attr(Number) public minAdjustmentMagnitude?: number | core.NumberOut; /** * (Required) The name of the policy. */ @core.attr(String) public name!: string | core.StringOut; /** * (Optional) The policy type, either "SimpleScaling", "StepScaling", "TargetTrackingScaling", or "Pred * ictiveScaling". If this value isn't provided, AWS will default to "SimpleScaling." */ @core.attr(String) public policyType?: string | core.StringOut; /** * (Optional) The predictive scaling policy configuration to use with Amazon EC2 Auto Scaling. */ @core.attr(PredictiveScalingConfiguration) public predictiveScalingConfiguration?: PredictiveScalingConfiguration; /** * (Optional) The number of instances by which to scale. `adjustment_type` determines the interpretatio * n of this number (e.g., as an absolute number or as a percentage of the existing Auto Scaling group * size). A positive increment adds to the current capacity and a negative value removes from the curre * nt capacity. */ @core.attr(Number) public scalingAdjustment?: number | core.NumberOut; /** * (Optional) A set of adjustments that manage */ @core.attr(StepAdjustment, { kind: "array" }) public stepAdjustment?: | core.Array | core.ArrayOut; /** * (Optional) A target tracking policy. These have the following structure: */ @core.attr(TargetTrackingConfiguration) public targetTrackingConfiguration?: TargetTrackingConfiguration; constructor(name: string, args?: PolicyArgs) { super(name, "aws_autoscaling_policy", args); } public override getNamespace(): string { return "aws_autoscaling"; } }