/* eslint-disable */ /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * The AWS::AutoScaling::ScalingPolicy resource specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can scale the number of instances available for your application. */ export interface AwsAutoscalingScalingpolicy { /** * The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average. Valid only if the policy type is StepScaling. */ MetricAggregationType?: string; PolicyName?: string; /** * One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling */ PolicyType?: string; PredictiveScalingConfiguration?: PredictiveScalingConfiguration; /** * The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a positive value. Required if the policy type is SimpleScaling. (Not used with any other policy type.) */ ScalingAdjustment?: number; /** * The duration of the policy's cooldown period, in seconds. When a cooldown period is specified here, it overrides the default cooldown period defined for the Auto Scaling group. */ Cooldown?: string; /** * A set of adjustments that enable you to scale based on the size of the alarm breach. Required if the policy type is StepScaling. (Not used with any other policy type.) */ StepAdjustments?: StepAdjustment[]; /** * The name of the Auto Scaling group. */ AutoScalingGroupName: string; /** * The minimum value to scale by when the adjustment type is PercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances. */ MinAdjustmentMagnitude?: number; TargetTrackingConfiguration?: TargetTrackingConfiguration; /** * The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. If not provided, the default is to use the value from the default cooldown period for the Auto Scaling group. Valid only if the policy type is TargetTrackingScaling or StepScaling. */ EstimatedInstanceWarmup?: number; /** * Specifies how the scaling adjustment is interpreted. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity. */ AdjustmentType?: string; /** * The ARN of the AutoScaling scaling policy */ Arn?: string; } /** * A predictive scaling policy. Includes support for predefined metrics only. */ export interface PredictiveScalingConfiguration { MetricSpecifications: PredictiveScalingMetricSpecification[]; MaxCapacityBreachBehavior?: string; MaxCapacityBuffer?: number; SchedulingBufferTime?: number; Mode?: string; } export interface PredictiveScalingMetricSpecification { CustomizedCapacityMetricSpecification?: PredictiveScalingCustomizedCapacityMetric; CustomizedLoadMetricSpecification?: PredictiveScalingCustomizedLoadMetric; CustomizedScalingMetricSpecification?: PredictiveScalingCustomizedScalingMetric; PredefinedLoadMetricSpecification?: PredictiveScalingPredefinedLoadMetric; TargetValue: number; PredefinedScalingMetricSpecification?: PredictiveScalingPredefinedScalingMetric; PredefinedMetricPairSpecification?: PredictiveScalingPredefinedMetricPair; } export interface PredictiveScalingCustomizedCapacityMetric { MetricDataQueries: MetricDataQuery[]; } export interface MetricDataQuery { Label?: string; MetricStat?: MetricStat; Id: string; ReturnData?: boolean; Expression?: string; } export interface MetricStat { Metric: Metric; Stat: string; Unit?: string; } export interface Metric { MetricName: string; Dimensions?: MetricDimension[]; Namespace: string; } export interface MetricDimension { Value: string; Name: string; } export interface PredictiveScalingCustomizedLoadMetric { MetricDataQueries: MetricDataQuery[]; } export interface PredictiveScalingCustomizedScalingMetric { MetricDataQueries: MetricDataQuery[]; } export interface PredictiveScalingPredefinedLoadMetric { ResourceLabel?: string; PredefinedMetricType: string; } export interface PredictiveScalingPredefinedScalingMetric { ResourceLabel?: string; PredefinedMetricType: string; } export interface PredictiveScalingPredefinedMetricPair { ResourceLabel?: string; PredefinedMetricType: string; } export interface StepAdjustment { MetricIntervalUpperBound?: number; MetricIntervalLowerBound?: number; ScalingAdjustment: number; } /** * A target tracking scaling policy. Includes support for predefined or customized metrics. */ export interface TargetTrackingConfiguration { CustomizedMetricSpecification?: CustomizedMetricSpecification; TargetValue: number; DisableScaleIn?: boolean; PredefinedMetricSpecification?: PredefinedMetricSpecification; } export interface CustomizedMetricSpecification { MetricName: string; Dimensions?: MetricDimension[]; Statistic: string; Unit?: string; Namespace: string; } export interface PredefinedMetricSpecification { ResourceLabel?: string; PredefinedMetricType: string; }