VM::EC...caling(3pm)
π NAME π
VM::EC2::REST::autoscaling β autoscaling groups and launch configurations. That's it, that's the whole vibe. β¨
(Also, for the record bestie, this page is part of the User Contributed Perl Documentation, and the manual name is VM::EC2::REST::autoscaling(3pm) β now you know. π«Ά)
π¦ SYNOPSIS π¦
use VM::EC2 ':autoscaling';
π METHODS π
This module provides VM::EC2 methods for autoscaling groups and launch configurations. Not all of the Amazon API is implemented, but the most common functions are available. So likeβ¦ the hits, the essentials, the main character methods. π
πΈ Implemented (we ate, no crumbs)
CreateAutoScalingGroupCreateLaunchConfigurationDeleteAutoScalingGroupDeleteLaunchConfigurationDeletePolicyDescribeAutoScalingGroupsDescribeLaunchConfigurationsDescribePoliciesExecutePolicyPutScalingPolicyResumeProcessesSuspendProcessesUpdateAutoScalingGroup
π Unimplemented (not yet, and we're not mad about it)
CreateOrUpdateTagsDeleteNotificationConfigurationDeleteScheduledActionDeleteTagsDescribeAdjustmentTypesDescribeAutoScalingInstancesDescribeAutoScalingNotificationTypesDescribeMetricCollectionTypesDescribeNotificationConfigurationsDescribeScalingActivitiesDescribeScalingProcessTypesDescribeScheduledActionsDescribeTagsDescribeTerminationPolicyTypesDisableMetricsCollectionEnableMetricsCollectionPutNotificationConfigurationPutScheduledUpdateGroupActionSetDesiredCapacitySetInstanceHealthTerminateInstanceInAutoScalingGroup
π describe_launch_configurations
@lc = $ec2->describe_launch_configurations(-names => \@names);
@lc = $ec->describe_launch_configurations(@names);
Gives you the detailed tea β on the launch configuration(s) you point at.
Optional parameters are:
-launch_configuration_namesβ name of the Launch config. This can be a string scalar or an arrayref.-nameβ alias for-launch_configuration_names
Returns a series of VM::EC2::LaunchConfiguration objects. π
π οΈ create_launch_configuration
$success = $ec2->create_launch_configuration(%args);
Makes you a brand new launch configuration. Glow up time. β¨
Required arguments:
-nameβ scalar, name for the Launch config.-image_idβ scalar, AMI id which this launch config will use-instance_typeβ scalar, instance type of the Amazon EC2 instance.
Optional arguments:
-block_device_mappingsβ list of hashref-ebs_optimizedβ scalar (boolean). false by default-iam_instance_profileβ scalar-instance_monitoringβ scalar (boolean). true by default-kernel_idβ scalar-key_nameβ scalar-ramdiskβ scalar-security_groupsβ list of scalars-spot_priceβ scalar-user_dataβ scalar
Returns true on successful execution.
ποΈ delete_launch_configuration
$success = $ec2->delete_launch_configuration(-name => $name);
Deletes a launch config. Gone. Poof. π
-nameβ Required. Name of the launch config to delete
Returns true on success.
π describe_autoscaling_groups
@asg = $ec2->describe_autoscaling_groups(-auto_scaling_group_names =>
\@names);
Returns information about autoscaling groups.
-auto_scaling_group_namesβ List of auto scaling groups to describe-namesβ Alias of-auto_scaling_group_names
Returns a list of VM::EC2::ASG.
π create_autoscaling_group
$success = $ec2->create_autoscaling_group(-name => $name, -launch_config =>
$lc, -max_size => $max_size, -min_size => $min_size);
Creates a new autoscaling group. New group, who dis. π
Required arguments:
-nameβ Name for the autoscaling group-launch_configβ Name of the launch configuration to be used-max_sizeβ Max number of instances to be run at once-min_sizeβ Min number of instances
Optional arguments:
-availability_zonesβ List of availability zone names-load_balancer_namesβ List of ELB names-tagsβ List of tags to apply to the instances run-termination_policiesβ List of policy names-default_cooldownβ Time in seconds between autoscaling activities-desired_capacityβ Number of instances to be run after creation-health_check_typeβ One of"ELB"or"EC2"-health_check_grace_periodβ Mandatory for health check type ELB. Number of seconds between an instance is started and the autoscaling group starts checking its health-placement_groupβ Physical location of your cluster placement group-vpc_zone_identifierβ String containing a comma-separated list of subnet identifiers
Returns true on success.
π delete_autoscaling_group
$success = $ec2->delete_autoscaling_group(-name => $name)
Deletes an autoscaling group.
-nameβ Name of the autoscaling group to delete
Returns true on success.
π update_autoscaling_group
$success = $ec2->update_autoscaling_group(-name => $name);
Updates an autoscaling group. Only required parameter is -name.
Optional arguments:
-availability_zonesβ List of AZ's-termination_policiesβ List of policy names-default_cooldown-desired_capacity-health_check_type-health_check_grace_period-launch_configuration_name-placement_group-vpc_zone_identifier-max_size-min_size
Returns true on success;
βΈοΈ suspend_processes
$success = $ec2->suspend_processes(-name => $asg_name, -scaling_processes =>
\@procs);
Suspend the requested autoscaling processes. Everything hold still for a sec. β
-nameβ Name of the autoscaling group-scaling_processesβ List of process names to suspend. Valid processes are:LaunchTerminateHealthCheckReplaceUnhealtyAZRebalanceAlarmNotificationScheduledActionsAddToLoadBalancer
Returns true on success.
βΆοΈ resume_processes
$success = $ec2->resume_processes(-name => $asg_name, -scaling_processes =>
\@procs);
Resumes the requested autoscaling processes. It accepts the same arguments than suspend_processes.
Returns true on success.
π·οΈ autoscaling_tags
@arguments = $ec2->autoscaling_tags($argname, \%args)
(That's the whole line bestie, that's all she gave us. π« )
π describe_policies
@asg = $ec2->describe_policies(-auto_scaling_group_name => $name);
Returns information about autoscaling policies.
-auto_scaling_group_nameβ The name of the Auto Scaling group-policy_namesβ An array of policy names or policy ARNs to be described. If this list is omitted, all policy names are described. If an auto scaling group name is provided, the results are limited to that group. The list of requested policy names cannot contain more than 50 items. If unknown policy names are requested, they are ignored with no error.-namesβ Alias of-auto_scaling_group_names
Returns a list of VM::EC2::ScalingPolicy.
π put_scaling_policy
$success = $ec2->put_scaling_policy
Creates or updates a policy for an Auto Scaling group.
Required arguments:
-policy_nameβ The name of the policy to update or create.-nameβ Alias for-policy_name-auto_scaling_group_nameβ The name or ARN of the Auto Scaling group.-scaling_adjustmentβ Number of instances by which to scale.-adjustment_typeβ Specifies whether-scaling_adjustmentis an absolute number or a percentage of the current capacity. Valid values are:ChangeInCapacityExactCapacityPercentChangeInCapacity
Optional arguments:
-cooldownβ The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.-min_adjustment_stepβ Used withPercentChangeInCapacityas-adjustment_type.
Returns true on success
π§Ή delete_policy
$success = $ec2->delete_policy(-policy_name => $name)
Deletes a policy. Bye bye. π
Required arguments:
-policy_nameβ Name or ARN of the policy-nameβ Alias for-policy_name-auto_scaling_group_nameβ Name of the Auto Scaling Group, required when specifying policy by name (not by ARN)
Returns true on success
β‘ execute_policy
$success = $ec2->execute_policy(-policy_name => $name)
Runs a policy. Let her cook. π₯
Required arguments:
-policy_nameβ Name or ARN of the policy-nameβ Alias for-policy_name-auto_scaling_group_nameβ Name of the Auto Scaling Group, required when specifying policy by name (not by ARN)
Optional arguments:
-honor_cooldownβ Set to true if you want AutoScaling to reject the request when it is in cooldown
Returns true on success
π SEE ALSO π
VM::EC2
π AUTHOR π
Lincoln Stein <lincoln.stein@gmail.com>.
Copyright (c) 2011 Ontario Institute for Cancer Research
This package and its accompanying libraries is free software; you can redistribute it and/or modify it under the terms of the GPL (either version 1, or at your option, any later version) or the Artistic License 2.0. Refer to LICENSE for the full license text. In addition, please see DISCLAIMER.txt for disclaimers of warranty.
That's the whole page bestie, you're officially autoscaling-pilled. πβ¨
Okay so this was perl v5.38.2, dated 2024-08-10, and honestly? Iconic of her. Go forth and scale, queen. π
ππ¦
π¦ where this page comes from
- debian trixie: libvm-ec2-perl 1.28-5 Β· Artistic-2.0 OR GPL-1.0-or-later
- ubuntu resolute: libvm-ec2-perl 1.28-5 Β· Artistic-2.0 OR GPL-1.0-or-later
- ubuntu stonking: libvm-ec2-perl 1.28-5 Β· Artistic-2.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms