Client library for AWS Auto Scaling Plans
npm install --save @datafire/amazonaws_autoscaling_plans
let amazonaws_autoscaling_plans = require('@datafire/amazonaws_autoscaling_plans').create({
accessKeyId: "",
secretAccessKey: "",
region: ""
});
.then(data => {
console.log(data);
});
AWS Auto Scaling
Use AWS Auto Scaling to quickly discover all the scalable AWS resources for your application and configure dynamic scaling and predictive scaling for your resources using scaling plans. Use this service in conjunction with the Amazon EC2 Auto Scaling, Application Auto Scaling, Amazon CloudWatch, and AWS CloudFormation services.
Currently, predictive scaling is only available for Amazon EC2 Auto Scaling groups.
For more information about AWS Auto Scaling, including information about granting IAM users required permissions for AWS Auto Scaling actions, see the AWS Auto Scaling User Guide.
amazonaws_autoscaling_plans.CreateScalingPlan({
"ScalingPlanName": null,
"ApplicationSource": null,
"ScalingInstructions": null
}, context)
- input
object
- ApplicationSource required
- CloudFormationStackARN
- TagFilters
- items TagFilter
- ScalingInstructions required
- items ScalingInstruction
- ScalingPlanName required
- ApplicationSource required
- output CreateScalingPlanResponse
amazonaws_autoscaling_plans.DeleteScalingPlan({
"ScalingPlanName": null,
"ScalingPlanVersion": null
}, context)
- input
object
- ScalingPlanName required
- ScalingPlanVersion required
- output DeleteScalingPlanResponse
amazonaws_autoscaling_plans.DescribeScalingPlanResources({
"ScalingPlanName": null,
"ScalingPlanVersion": null
}, context)
- input
object
- MaxResults
- NextToken
- ScalingPlanName required
- ScalingPlanVersion required
amazonaws_autoscaling_plans.DescribeScalingPlans({}, context)
- input
object
- ApplicationSources
- items ApplicationSource
- MaxResults
- NextToken
- ScalingPlanNames
- items ScalingPlanName
- ScalingPlanVersion
- ApplicationSources
- output DescribeScalingPlansResponse
amazonaws_autoscaling_plans.GetScalingPlanResourceForecastData({
"ScalingPlanName": null,
"ScalingPlanVersion": null,
"ServiceNamespace": null,
"ResourceId": null,
"ScalableDimension": null,
"ForecastDataType": null,
"StartTime": null,
"EndTime": null
}, context)
- input
object
- EndTime required
- ForecastDataType required
- ResourceId required
- ScalableDimension required
- ScalingPlanName required
- ScalingPlanVersion required
- ServiceNamespace required
- StartTime required
amazonaws_autoscaling_plans.UpdateScalingPlan({
"ScalingPlanName": null,
"ScalingPlanVersion": null
}, context)
- input
object
- ApplicationSource
- CloudFormationStackARN
- TagFilters
- items TagFilter
- ScalingInstructions
- items ScalingInstruction
- ScalingPlanName required
- ScalingPlanVersion required
- ApplicationSource
- output UpdateScalingPlanResponse
- ApplicationSource
object
: Represents an application source.- CloudFormationStackARN
- TagFilters
- items TagFilter
- ApplicationSources
array
- items ApplicationSource
- Cooldown
integer
- CreateScalingPlanRequest
object
- ApplicationSource required
- CloudFormationStackARN
- TagFilters
- items TagFilter
- ScalingInstructions required
- items ScalingInstruction
- ScalingPlanName required
- ApplicationSource required
- CreateScalingPlanResponse
object
- ScalingPlanVersion required
- CustomizedLoadMetricSpecification
object
:Represents a CloudWatch metric of your choosing that can be used for predictive scaling.
For predictive scaling to work with a customized load metric specification, AWS Auto Scaling needs access to the
Sum
andAverage
statistics that CloudWatch computes from metric data. Statistics are calculations used to aggregate data over specified time periods.When you choose a load metric, make sure that the required
Sum
andAverage
statistics for your metric are available in CloudWatch and that they provide relevant data for predictive scaling. TheSum
statistic must represent the total load on the resource, and theAverage
statistic must represent the average load per capacity unit of the resource. For example, there is a metric that counts the number of requests processed by your Auto Scaling group. If theSum
statistic represents the total request count processed by the group, then theAverage
statistic for the specified metric must represent the average request count processed by each instance of the group.For information about terminology, available metrics, or how to publish new metrics, see Amazon CloudWatch Concepts in the Amazon CloudWatch User Guide.
- Dimensions
- items MetricDimension
- MetricName required
- Namespace required
- Statistic required
- Unit
- Dimensions
- CustomizedScalingMetricSpecification
object
:Represents a CloudWatch metric of your choosing that can be used for dynamic scaling as part of a target tracking scaling policy.
To create your customized scaling metric specification:
-
Add values for each required parameter from CloudWatch. You can use an existing metric, or a new metric that you create. To use your own metric, you must first publish the metric to CloudWatch. For more information, see Publish Custom Metrics in the Amazon CloudWatch User Guide.
-
Choose a metric that changes proportionally with capacity. The value of the metric should increase or decrease in inverse proportion to the number of capacity units. That is, the value of the metric should decrease when capacity increases.
For more information about CloudWatch, see Amazon CloudWatch Concepts.
- Dimensions
- items MetricDimension
- MetricName required
- Namespace required
- Statistic required
- Unit
-
- Datapoint
object
: Represents a single value in the forecast data used for predictive scaling.- Timestamp
- Value
- Datapoints
array
- items Datapoint
- DeleteScalingPlanRequest
object
- ScalingPlanName required
- ScalingPlanVersion required
- DeleteScalingPlanResponse
object
- DescribeScalingPlanResourcesRequest
object
- MaxResults
- NextToken
- ScalingPlanName required
- ScalingPlanVersion required
- DescribeScalingPlanResourcesResponse
object
- NextToken
- ScalingPlanResources
- items ScalingPlanResource
- DescribeScalingPlansRequest
object
- ApplicationSources
- items ApplicationSource
- MaxResults
- NextToken
- ScalingPlanNames
- items ScalingPlanName
- ScalingPlanVersion
- ApplicationSources
- DescribeScalingPlansResponse
object
- NextToken
- ScalingPlans
- items ScalingPlan
- DisableDynamicScaling
boolean
- DisableScaleIn
boolean
- ForecastDataType
string
(values: CapacityForecast, LoadForecast, ScheduledActionMinCapacity, ScheduledActionMaxCapacity)
- GetScalingPlanResourceForecastDataRequest
object
- EndTime required
- ForecastDataType required
- ResourceId required
- ScalableDimension required
- ScalingPlanName required
- ScalingPlanVersion required
- ServiceNamespace required
- StartTime required
- GetScalingPlanResourceForecastDataResponse
object
- Datapoints required
- items Datapoint
- Datapoints required
- LoadMetricType
string
(values: ASGTotalCPUUtilization, ASGTotalNetworkIn, ASGTotalNetworkOut, ALBTargetGroupRequestCount)
- MaxResults
integer
- MetricDimension
object
: Represents a dimension for a customized metric.- Name required
- Value required
- MetricDimensionName
string
- MetricDimensionValue
string
- MetricDimensions
array
- items MetricDimension
- MetricName
string
- MetricNamespace
string
- MetricScale
number
- MetricStatistic
string
(values: Average, Minimum, Maximum, SampleCount, Sum)
- MetricUnit
string
- NextToken
string
- PolicyName
string
- PolicyType
string
(values: TargetTrackingScaling)
- PredefinedLoadMetricSpecification
object
: Represents a predefined metric that can be used for predictive scaling.- PredefinedLoadMetricType required
- ResourceLabel
- PredefinedScalingMetricSpecification
object
: Represents a predefined metric that can be used for dynamic scaling as part of a target tracking scaling policy.- PredefinedScalingMetricType required
- ResourceLabel
- PredictiveScalingMaxCapacityBehavior
string
(values: SetForecastCapacityToMaxCapacity, SetMaxCapacityToForecastCapacity, SetMaxCapacityAboveForecastCapacity)
- PredictiveScalingMode
string
(values: ForecastAndScale, ForecastOnly)
- ResourceCapacity
integer
- ResourceIdMaxLen1600
string
- ResourceLabel
string
- ScalableDimension
string
(values: autoscaling:autoScalingGroup:DesiredCapacity, ecs:service:DesiredCount, ec2:spot-fleet-request:TargetCapacity, rds:cluster:ReadReplicaCount, dynamodb:table:ReadCapacityUnits, dynamodb:table:WriteCapacityUnits, dynamodb:index:ReadCapacityUnits, dynamodb:index:WriteCapacityUnits)
- ScalingInstruction
object
:Describes a scaling instruction for a scalable resource.
The scaling instruction is used in combination with a scaling plan, which is a set of instructions for configuring dynamic scaling and predictive scaling for the scalable resources in your application. Each scaling instruction applies to one resource.
AWS Auto Scaling creates target tracking scaling policies based on the scaling instructions. Target tracking scaling policies adjust the capacity of your scalable resource as required to maintain resource utilization at the target value that you specified.
AWS Auto Scaling also configures predictive scaling for your Amazon EC2 Auto Scaling groups using a subset of parameters, including the load metric, the scaling metric, the target value for the scaling metric, the predictive scaling mode (forecast and scale or forecast only), and the desired behavior when the forecast capacity exceeds the maximum capacity of the resource. With predictive scaling, AWS Auto Scaling generates forecasts with traffic predictions for the two days ahead and schedules scaling actions that proactively add and remove resource capacity to match the forecast.
We recommend waiting a minimum of 24 hours after creating an Auto Scaling group to configure predictive scaling. At minimum, there must be 24 hours of historical data to generate a forecast.
For more information, see Getting Started with AWS Auto Scaling.
- CustomizedLoadMetricSpecification
- Dimensions
- items MetricDimension
- MetricName required
- Namespace required
- Statistic required
- Unit
- Dimensions
- DisableDynamicScaling
- MaxCapacity required
- MinCapacity required
- PredefinedLoadMetricSpecification
- PredefinedLoadMetricType required
- ResourceLabel
- PredictiveScalingMaxCapacityBehavior
- PredictiveScalingMaxCapacityBuffer
- PredictiveScalingMode
- ResourceId required
- ScalableDimension required
- ScalingPolicyUpdateBehavior
- ScheduledActionBufferTime
- ServiceNamespace required
- TargetTrackingConfigurations required
- CustomizedLoadMetricSpecification
- ScalingInstructions
array
- items ScalingInstruction
- ScalingMetricType
string
(values: ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, DynamoDBReadCapacityUtilization, DynamoDBWriteCapacityUtilization, ECSServiceAverageCPUUtilization, ECSServiceAverageMemoryUtilization, ALBRequestCountPerTarget, RDSReaderAverageCPUUtilization, RDSReaderAverageDatabaseConnections, EC2SpotFleetRequestAverageCPUUtilization, EC2SpotFleetRequestAverageNetworkIn, EC2SpotFleetRequestAverageNetworkOut)
- ScalingPlan
object
: Represents a scaling plan.- ApplicationSource required
- CloudFormationStackARN
- TagFilters
- items TagFilter
- CreationTime
- ScalingInstructions required
- items ScalingInstruction
- ScalingPlanName required
- ScalingPlanVersion required
- StatusCode required
- StatusMessage
- StatusStartTime
- ApplicationSource required
- ScalingPlanName
string
- ScalingPlanNames
array
- items ScalingPlanName
- ScalingPlanResource
object
: Represents a scalable resource.- ResourceId required
- ScalableDimension required
- ScalingPlanName required
- ScalingPlanVersion required
- ScalingPolicies
- items ScalingPolicy
- ScalingStatusCode required
- ScalingStatusMessage
- ServiceNamespace required
- ScalingPlanResources
array
- items ScalingPlanResource
- ScalingPlanStatusCode
string
(values: Active, ActiveWithProblems, CreationInProgress, CreationFailed, DeletionInProgress, DeletionFailed, UpdateInProgress, UpdateFailed)
- ScalingPlanVersion
integer
- ScalingPlans
array
- items ScalingPlan
- ScalingPolicies
array
- items ScalingPolicy
- ScalingPolicy
object
: Represents a scaling policy.- PolicyName required
- PolicyType required
- TargetTrackingConfiguration
- CustomizedScalingMetricSpecification
- Dimensions
- items MetricDimension
- MetricName required
- Namespace required
- Statistic required
- Unit
- Dimensions
- DisableScaleIn
- EstimatedInstanceWarmup
- PredefinedScalingMetricSpecification
- PredefinedScalingMetricType required
- ResourceLabel
- ScaleInCooldown
- ScaleOutCooldown
- TargetValue required
- CustomizedScalingMetricSpecification
- ScalingPolicyUpdateBehavior
string
(values: KeepExternalPolicies, ReplaceExternalPolicies)
- ScalingStatusCode
string
(values: Inactive, PartiallyActive, Active)
- ScheduledActionBufferTime
integer
- ServiceNamespace
string
(values: autoscaling, ecs, ec2, rds, dynamodb)
- TagFilter
object
: Represents a tag.- Key
- Values
- items XmlStringMaxLen256
- TagFilters
array
- items TagFilter
- TagValues
array
- items XmlStringMaxLen256
- TargetTrackingConfiguration
object
: Describes a target tracking configuration to use with AWS Auto Scaling. Used with ScalingInstruction and ScalingPolicy.- CustomizedScalingMetricSpecification
- Dimensions
- items MetricDimension
- MetricName required
- Namespace required
- Statistic required
- Unit
- Dimensions
- DisableScaleIn
- EstimatedInstanceWarmup
- PredefinedScalingMetricSpecification
- PredefinedScalingMetricType required
- ResourceLabel
- ScaleInCooldown
- ScaleOutCooldown
- TargetValue required
- CustomizedScalingMetricSpecification
- TargetTrackingConfigurations
array
- TimestampType
string
- UpdateScalingPlanRequest
object
- ApplicationSource
- CloudFormationStackARN
- TagFilters
- items TagFilter
- ScalingInstructions
- items ScalingInstruction
- ScalingPlanName required
- ScalingPlanVersion required
- ApplicationSource
- UpdateScalingPlanResponse
object
- XmlString
string
- XmlStringMaxLen128
string
- XmlStringMaxLen256
string