Skip to main content

scaling_plans

Creates, updates, deletes, gets or lists a scaling_plans resource.

Overview

Namescaling_plans
TypeResource
Idaws.autoscaling_plans.scaling_plans

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
application_sourceobjectRepresents an application source.
creation_timestring (date-time)The Unix time stamp when the scaling plan was created.
scaling_instructionsarrayThe scaling instructions.
scaling_plan_namestringThe name of the scaling plan. (pattern: <code>[\p{Print}&&[^|:/]]+</code>)
scaling_plan_versioninteger (int64)The version number of the scaling plan.
status_codestringThe 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_messagestringA 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_timestring (date-time)The Unix time stamp when the scaling plan entered the current status.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_scaling_plansselectregionDescribes one or more of your scaling plans.
create_scaling_planinsertregion, ScalingPlanName, ApplicationSource, ScalingInstructionsCreates a scaling plan.
update_scaling_planupdateregion, ScalingPlanName, ScalingPlanVersionUpdates the specified scaling plan. You cannot update a scaling plan if it is in the process of being created, updated, or deleted.
delete_scaling_plandeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

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
;

UPDATE examples

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

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
;