1VM::EC2::REST::autoscalUisnegr(3C)ontributed Perl DocumeVnMt:a:tEiCo2n::REST::autoscaling(3)
2
3
4

NAME VM::EC2::REST::autoscaling

SYNOPSIS

7        use VM::EC2 ':autoscaling';
8

METHODS

10       This module provides VM::EC2 methods for autoscaling groups and launch
11       configurations. Not all of the Amazon API is implemented, but the most
12       common functions are available.
13
14       Implemented:
15        CreateAutoScalingGroup
16        CreateLaunchConfiguration
17        DeleteAutoScalingGroup
18        DeleteLaunchConfiguration
19        DeletePolicy
20        DescribeAutoScalingGroups
21        DescribeLaunchConfigurations
22        DescribePolicies
23        ExecutePolicy
24        PutScalingPolicy
25        ResumeProcesses
26        SuspendProcesses
27        UpdateAutoScalingGroup
28
29       Unimplemented:
30        CreateOrUpdateTags
31        DeleteNotificationConfiguration
32        DeleteScheduledAction
33        DeleteTags
34        DescribeAdjustmentTypes
35        DescribeAutoScalingInstances
36        DescribeAutoScalingNotificationTypes
37        DescribeMetricCollectionTypes
38        DescribeNotificationConfigurations
39        DescribeScalingActivities
40        DescribeScalingProcessTypes
41        DescribeScheduledActions
42        DescribeTags
43        DescribeTerminationPolicyTypes
44        DisableMetricsCollection
45        EnableMetricsCollection
46        PutNotificationConfiguration
47        PutScheduledUpdateGroupAction
48        SetDesiredCapacity
49        SetInstanceHealth
50        TerminateInstanceInAutoScalingGroup
51
52   @lc = $ec2->describe_launch_configurations(-names => \@names);
53   @lc = $ec->describe_launch_configurations(@names);
54       Provides detailed information for the specified launch
55       configuration(s).
56
57       Optional parameters are:
58
59         -launch_configuration_names   Name of the Launch config.
60                                         This can be a string scalar or an arrayref.
61
62         -name  Alias for -launch_configuration_names
63
64       Returns a series of VM::EC2::LaunchConfiguration objects.
65
66   $success = $ec2->create_launch_configuration(%args);
67       Creates a new launch configuration.
68
69       Required arguments:
70
71         -name           -- scalar, name for the Launch config.
72         -image_id       -- scalar, AMI id which this launch config will use
73         -instance_type  -- scalar, instance type of the Amazon EC2 instance.
74
75       Optional arguments:
76
77         -block_device_mappings  -- list of hashref
78         -ebs_optimized          -- scalar (boolean). false by default
79         -iam_instance_profile   -- scalar
80         -instance_monitoring    -- scalar (boolean). true by default
81         -kernel_id              -- scalar
82         -key_name               -- scalar
83         -ramdisk                -- scalar
84         -security_groups        -- list of scalars
85         -spot_price             -- scalar
86         -user_data              -- scalar
87
88       Returns true on successful execution.
89
90   $success = $ec2->delete_launch_configuration(-name => $name);
91       Deletes a launch config.
92
93         -name     Required. Name of the launch config to delete
94
95       Returns true on success.
96
97   @asg = $ec2->describe_autoscaling_groups(-auto_scaling_group_names =>
98       \@names);
99       Returns information about autoscaling groups
100
101         -auto_scaling_group_names     List of auto scaling groups to describe
102         -names                        Alias of -auto_scaling_group_names
103
104       Returns a list of VM::EC2::ASG.
105
106   $success = $ec2->create_autoscaling_group(-name => $name, -launch_config =>
107       $lc, -max_size => $max_size, -min_size => $min_size);
108       Creates a new autoscaling group.
109
110       Required arguments:
111
112         -name             Name for the autoscaling group
113         -launch_config    Name of the launch configuration to be used
114         -max_size         Max number of instances to be run at once
115         -min_size         Min number of instances
116
117       Optional arguments:
118
119         -availability_zones   List of availability zone names
120         -load_balancer_names  List of ELB names
121         -tags                 List of tags to apply to the instances run
122         -termination_policies List of policy names
123         -default_cooldown     Time in seconds between autoscaling activities
124         -desired_capacity     Number of instances to be run after creation
125         -health_check_type    One of "ELB" or "EC2"
126         -health_check_grace_period    Mandatory for health check type ELB. Number of
127                                       seconds between an instance is started and the
128                                       autoscaling group starts checking its health
129         -placement_group      Physical location of your cluster placement group
130         -vpc_zone_identifier  Strinc containing a comma-separated list of subnet
131                               identifiers
132
133       Returns true on success.
134
135   $success = $ec2->delete_autoscaling_group(-name => $name)
136       Deletes an autoscaling group.
137
138         -name     Name of the autoscaling group to delete
139
140       Returns true on success.
141
142   $success = $ec2->update_autoscaling_group(-name => $name);
143       Updates an autoscaling group. Only required parameter is "-name"
144
145       Optional arguments:
146
147         -availability_zones       List of AZ's
148         -termination_policies     List of policy names
149         -default_cooldown
150         -desired_capacity
151         -health_check_type
152         -health_check_grace_period
153         -launch_configuration_name
154         -placement_group
155         -vpc_zone_identifier
156         -max_size
157         -min_size
158
159       Returns true on success;
160
161   $success = $ec2->suspend_processes(-name => $asg_name, -scaling_processes
162       => \@procs);
163       Suspend the requested autoscaling processes.
164
165         -name                 Name of the autoscaling group
166         -scaling_processes    List of process names to suspend. Valid processes are:
167               Launch
168               Terminate
169               HealthCheck
170               ReplaceUnhealty
171               AZRebalance
172               AlarmNotification
173               ScheduledActions
174               AddToLoadBalancer
175
176       Returns true on success.
177
178   $success = $ec2->resume_processes(-name => $asg_name, -scaling_processes =>
179       \@procs);
180       Resumes the requested autoscaling processes. It accepts the same
181       arguments than "suspend_processes".
182
183       Returns true on success.
184
185   @arguments = $ec2->autoscaling_tags($argname, \%args)
186   @asg = $ec2->describe_policies(-auto_scaling_group_name => $name);
187       Returns information about autoscaling policies
188
189         -auto_scaling_group_name      The name of the Auto Scaling group
190         -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.
191         -names                        Alias of -auto_scaling_group_names
192
193       Returns a list of VM::EC2::ScalingPolicy.
194
195   $success = $ec2->put_scaling_policy
196       Creates or updates a policy for an Auto Scaling group.
197
198       Required arguments:
199
200         -policy_name             The name of the policy to update or create.
201         -name                    Alias for -policy_name
202         -auto_scaling_group_name The name or ARN of the Auto Scaling group.
203         -scaling_adjustment      Number of instances by which to scale.
204         -adjustment_type         Specifies wheter -scaling_adjustment is an absolute
205                                  number or a percentage of the current capacity.
206                                  Valid values are:
207               ChangeInCapacity
208               ExactCapacity
209               PercentChangeInCapacity
210
211       Optional arguments:
212
213         -cooldown             The amount of time, in seconds, after a scaling
214                               activity completes and before the next scaling acitvity
215                               can start.
216         -min_adjustment_step  Used with PercentChangeInCapacity as -adjustment_type.
217
218       Returns true on success
219
220   $success = $ec2->delete_policy(-policy_name => $name)
221       Deletes a policy
222
223       Required arguments:
224
225         -policy_name                  Name or ARN of the policy
226         -name                         Alias for -policy_name
227         -auto_scaling_group_name      Name of the Auto Scaling Group, required when
228                                       specifying policy by name (not by ARN)
229
230       Returns true on success
231
232   $success = $ec2->execute_policy(-policy_name => $name)
233       Runs a policy
234
235       Required arguments:
236
237         -policy_name                  Name or ARN of the policy
238         -name                         Alias for -policy_name
239         -auto_scaling_group_name      Name of the Auto Scaling Group, required when
240                                       specifying policy by name (not by ARN)
241
242       Optional arguments:
243
244         -honor_cooldown               Set to true if you want AutoScaling to reject
245                                       the request when it is in cooldown
246
247       Returns true on success
248

SEE ALSO

250       VM::EC2
251

AUTHOR

253       Lincoln Stein <lincoln.stein@gmail.com>.
254
255       Copyright (c) 2011 Ontario Institute for Cancer Research
256
257       This package and its accompanying libraries is free software; you can
258       redistribute it and/or modify it under the terms of the GPL (either
259       version 1, or at your option, any later version) or the Artistic
260       License 2.0.  Refer to LICENSE for the full license text. In addition,
261       please see DISCLAIMER.txt for disclaimers of warranty.
262
263
264
265perl v5.32.1                      2021-01-27     VM::EC2::REST::autoscaling(3)
Impressum