scaling_plans
Creates, updates, deletes, gets or lists a scaling_plans resource.
Overview
| Name | scaling_plans |
| Type | Resource |
| Id | aws.autoscaling_plans.scaling_plans |
Fields
The following fields are returned by SELECT queries:
- describe_scaling_plans
| Name | Datatype | Description |
|---|---|---|
application_source | object | Represents an application source. |
creation_time | string (date-time) | The Unix time stamp when the scaling plan was created. |
scaling_instructions | array | The scaling instructions. |
scaling_plan_name | string | The name of the scaling plan. (pattern: <code>[\p{Print}&&[^|:/]]+</code>) |
scaling_plan_version | integer (int64) | The version number of the scaling plan. |
status_code | string | The status of the scaling plan. Active - The scaling plan is active. ActiveWithProblems - The scaling plan is active, but the scaling configuration for one or more resources could not be applied. CreationInProgress - The scaling plan is being created. CreationFailed - The scaling plan could not be created. DeletionInProgress - The scaling plan is being deleted. DeletionFailed - The scaling plan could not be deleted. UpdateInProgress - The scaling plan is being updated. UpdateFailed - The scaling plan could not be updated. (Active, ActiveWithProblems, CreationInProgress, CreationFailed, DeletionInProgress, DeletionFailed, UpdateInProgress, UpdateFailed) |
status_message | string | A simple message about the current status of the scaling plan. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
status_start_time | string (date-time) | The Unix time stamp when the scaling plan entered the current status. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_scaling_plans | select | region | Describes one or more of your scaling plans. | |
create_scaling_plan | insert | region, ScalingPlanName, ApplicationSource, ScalingInstructions | Creates a scaling plan. | |
update_scaling_plan | update | region, ScalingPlanName, ScalingPlanVersion | Updates the specified scaling plan. You cannot update a scaling plan if it is in the process of being created, updated, or deleted. | |
delete_scaling_plan | delete | region | Deletes the specified scaling plan. Deleting a scaling plan deletes the underlying ScalingInstruction for all of the scalable resources that are covered by the plan. If the plan has launched resources or has scaling activities in progress, you must delete those resources separately. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_scaling_plans
Describes one or more of your scaling plans.
SELECT
application_source,
creation_time,
scaling_instructions,
scaling_plan_name,
scaling_plan_version,
status_code,
status_message,
status_start_time
FROM aws.autoscaling_plans.scaling_plans
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_scaling_plan
- Manifest
Creates a scaling plan.
INSERT INTO aws.autoscaling_plans.scaling_plans (
ScalingPlanName,
ApplicationSource,
ScalingInstructions,
region
)
SELECT
'{{ ScalingPlanName }}' /* required */,
'{{ ApplicationSource }}' /* required */,
'{{ ScalingInstructions }}' /* required */,
'{{ region }}'
RETURNING
scaling_plan_version
;
# Description fields are for documentation purposes
- name: scaling_plans
props:
- name: region
value: "{{ region }}"
description: Required parameter for the scaling_plans resource.
- name: ScalingPlanName
value: "{{ ScalingPlanName }}"
description: |
The name of the scaling plan. Names cannot contain vertical bars, colons, or forward slashes.
- name: ApplicationSource
description: |
A CloudFormation stack or set of tags. You can create one scaling plan per application source. For more information, see ApplicationSource in the AWS Auto Scaling API Reference.
value:
CloudFormationStackARN: "{{ CloudFormationStackARN }}"
TagFilters:
- Key: "{{ Key }}"
Values: "{{ Values }}"
- name: ScalingInstructions
description: |
The scaling instructions. For more information, see ScalingInstruction in the AWS Auto Scaling API Reference.
value:
- ServiceNamespace: "{{ ServiceNamespace }}"
ResourceId: "{{ ResourceId }}"
ScalableDimension: "{{ ScalableDimension }}"
MinCapacity: {{ MinCapacity }}
MaxCapacity: {{ MaxCapacity }}
TargetTrackingConfigurations: "{{ TargetTrackingConfigurations }}"
PredefinedLoadMetricSpecification:
PredefinedLoadMetricType: "{{ PredefinedLoadMetricType }}"
ResourceLabel: "{{ ResourceLabel }}"
CustomizedLoadMetricSpecification:
MetricName: "{{ MetricName }}"
Namespace: "{{ Namespace }}"
Dimensions:
- Name: "{{ Name }}"
Value: "{{ Value }}"
Statistic: "{{ Statistic }}"
Unit: "{{ Unit }}"
ScheduledActionBufferTime: {{ ScheduledActionBufferTime }}
PredictiveScalingMaxCapacityBehavior: "{{ PredictiveScalingMaxCapacityBehavior }}"
PredictiveScalingMaxCapacityBuffer: {{ PredictiveScalingMaxCapacityBuffer }}
PredictiveScalingMode: "{{ PredictiveScalingMode }}"
ScalingPolicyUpdateBehavior: "{{ ScalingPolicyUpdateBehavior }}"
DisableDynamicScaling: {{ DisableDynamicScaling }}
UPDATE examples
- update_scaling_plan
Updates the specified scaling plan. You cannot update a scaling plan if it is in the process of being created, updated, or deleted.
UPDATE aws.autoscaling_plans.scaling_plans
SET
ScalingPlanName = '{{ ScalingPlanName }}',
ScalingPlanVersion = {{ ScalingPlanVersion }},
ApplicationSource = '{{ ApplicationSource }}',
ScalingInstructions = '{{ ScalingInstructions }}'
WHERE
region = '{{ region }}' --required
AND ScalingPlanName = '{{ ScalingPlanName }}' --required
AND ScalingPlanVersion = '{{ ScalingPlanVersion }}' --required;
DELETE examples
- delete_scaling_plan
Deletes the specified scaling plan. Deleting a scaling plan deletes the underlying ScalingInstruction for all of the scalable resources that are covered by the plan. If the plan has launched resources or has scaling activities in progress, you must delete those resources separately.
DELETE FROM aws.autoscaling_plans.scaling_plans
WHERE region = '{{ region }}' --required
;