« blib/lib/Paws/AutoScalingPlans/PredefinedScalingMetricSpecification.pm
↑ Summary
blib/lib/Paws/AutoScalingPlans/ScalingPlan.pm »
| 1 | # Generated by default/object.tt | ||
| 2 | package Paws::AutoScalingPlans::ScalingInstruction; | ||
| 3 | use Moose; | ||
| 4 | has CustomizedLoadMetricSpecification => (is => 'ro', isa => 'Paws::AutoScalingPlans::CustomizedLoadMetricSpecification'); | ||
| 5 | has DisableDynamicScaling => (is => 'ro', isa => 'Bool'); | ||
| 6 | has MaxCapacity => (is => 'ro', isa => 'Int', required => 1); | ||
| 7 | has MinCapacity => (is => 'ro', isa => 'Int', required => 1); | ||
| 8 | has PredefinedLoadMetricSpecification => (is => 'ro', isa => 'Paws::AutoScalingPlans::PredefinedLoadMetricSpecification'); | ||
| 9 | has PredictiveScalingMaxCapacityBehavior => (is => 'ro', isa => 'Str'); | ||
| 10 | has PredictiveScalingMaxCapacityBuffer => (is => 'ro', isa => 'Int'); | ||
| 11 | has PredictiveScalingMode => (is => 'ro', isa => 'Str'); | ||
| 12 | has ResourceId => (is => 'ro', isa => 'Str', required => 1); | ||
| 13 | has ScalableDimension => (is => 'ro', isa => 'Str', required => 1); | ||
| 14 | has ScalingPolicyUpdateBehavior => (is => 'ro', isa => 'Str'); | ||
| 15 | has ScheduledActionBufferTime => (is => 'ro', isa => 'Int'); | ||
| 16 | has ServiceNamespace => (is => 'ro', isa => 'Str', required => 1); | ||
| 17 | has TargetTrackingConfigurations => (is => 'ro', isa => 'ArrayRef[Paws::AutoScalingPlans::TargetTrackingConfiguration]', required => 1); | ||
| 18 | |||
| 19 | 1; | ||
| 20 | |||
| 21 | ### main pod documentation begin ### | ||
| 22 | |||
| 23 | =head1 NAME | ||
| 24 | |||
| 25 | Paws::AutoScalingPlans::ScalingInstruction | ||
| 26 | |||
| 27 | =head1 USAGE | ||
| 28 | |||
| 29 | This class represents one of two things: | ||
| 30 | |||
| 31 | =head3 Arguments in a call to a service | ||
| 32 | |||
| 33 | Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. | ||
| 34 | Each attribute should be used as a named argument in the calls that expect this type of object. | ||
| 35 | |||
| 36 | As an example, if Att1 is expected to be a Paws::AutoScalingPlans::ScalingInstruction object: | ||
| 37 | |||
| 38 | $service_obj->Method(Att1 => { CustomizedLoadMetricSpecification => $value, ..., TargetTrackingConfigurations => $value }); | ||
| 39 | |||
| 40 | =head3 Results returned from an API call | ||
| 41 | |||
| 42 | Use accessors for each attribute. If Att1 is expected to be an Paws::AutoScalingPlans::ScalingInstruction object: | ||
| 43 | |||
| 44 | $result = $service_obj->Method(...); | ||
| 45 | $result->Att1->CustomizedLoadMetricSpecification | ||
| 46 | |||
| 47 | =head1 DESCRIPTION | ||
| 48 | |||
| 49 | Describes a scaling instruction for a scalable resource in a scaling | ||
| 50 | plan. Each scaling instruction applies to one resource. | ||
| 51 | |||
| 52 | AWS Auto Scaling creates target tracking scaling policies based on the | ||
| 53 | scaling instructions. Target tracking scaling policies adjust the | ||
| 54 | capacity of your scalable resource as required to maintain resource | ||
| 55 | utilization at the target value that you specified. | ||
| 56 | |||
| 57 | AWS Auto Scaling also configures predictive scaling for your Amazon EC2 | ||
| 58 | Auto Scaling groups using a subset of parameters, including the load | ||
| 59 | metric, the scaling metric, the target value for the scaling metric, | ||
| 60 | the predictive scaling mode (forecast and scale or forecast only), and | ||
| 61 | the desired behavior when the forecast capacity exceeds the maximum | ||
| 62 | capacity of the resource. With predictive scaling, AWS Auto Scaling | ||
| 63 | generates forecasts with traffic predictions for the two days ahead and | ||
| 64 | schedules scaling actions that proactively add and remove resource | ||
| 65 | capacity to match the forecast. | ||
| 66 | |||
| 67 | We recommend waiting a minimum of 24 hours after creating an Auto | ||
| 68 | Scaling group to configure predictive scaling. At minimum, there must | ||
| 69 | be 24 hours of historical data to generate a forecast. For more | ||
| 70 | information, see Best Practices for AWS Auto Scaling | ||
| 71 | (https://docs.aws.amazon.com/autoscaling/plans/userguide/gs-best-practices.html) | ||
| 72 | in the I<AWS Auto Scaling User Guide>. | ||
| 73 | |||
| 74 | =head1 ATTRIBUTES | ||
| 75 | |||
| 76 | |||
| 77 | =head2 CustomizedLoadMetricSpecification => L<Paws::AutoScalingPlans::CustomizedLoadMetricSpecification> | ||
| 78 | |||
| 79 | The customized load metric to use for predictive scaling. This | ||
| 80 | parameter or a B<PredefinedLoadMetricSpecification> is required when | ||
| 81 | configuring predictive scaling, and cannot be used otherwise. | ||
| 82 | |||
| 83 | |||
| 84 | =head2 DisableDynamicScaling => Bool | ||
| 85 | |||
| 86 | Controls whether dynamic scaling by AWS Auto Scaling is disabled. When | ||
| 87 | dynamic scaling is enabled, AWS Auto Scaling creates target tracking | ||
| 88 | scaling policies based on the specified target tracking configurations. | ||
| 89 | |||
| 90 | The default is enabled (C<false>). | ||
| 91 | |||
| 92 | |||
| 93 | =head2 B<REQUIRED> MaxCapacity => Int | ||
| 94 | |||
| 95 | The maximum capacity of the resource. The exception to this upper limit | ||
| 96 | is if you specify a non-default setting for | ||
| 97 | B<PredictiveScalingMaxCapacityBehavior>. | ||
| 98 | |||
| 99 | |||
| 100 | =head2 B<REQUIRED> MinCapacity => Int | ||
| 101 | |||
| 102 | The minimum capacity of the resource. | ||
| 103 | |||
| 104 | |||
| 105 | =head2 PredefinedLoadMetricSpecification => L<Paws::AutoScalingPlans::PredefinedLoadMetricSpecification> | ||
| 106 | |||
| 107 | The predefined load metric to use for predictive scaling. This | ||
| 108 | parameter or a B<CustomizedLoadMetricSpecification> is required when | ||
| 109 | configuring predictive scaling, and cannot be used otherwise. | ||
| 110 | |||
| 111 | |||
| 112 | =head2 PredictiveScalingMaxCapacityBehavior => Str | ||
| 113 | |||
| 114 | Defines the behavior that should be applied if the forecast capacity | ||
| 115 | approaches or exceeds the maximum capacity specified for the resource. | ||
| 116 | The default value is C<SetForecastCapacityToMaxCapacity>. | ||
| 117 | |||
| 118 | The following are possible values: | ||
| 119 | |||
| 120 | =over | ||
| 121 | |||
| 122 | =item * | ||
| 123 | |||
| 124 | C<SetForecastCapacityToMaxCapacity> - AWS Auto Scaling cannot scale | ||
| 125 | resource capacity higher than the maximum capacity. The maximum | ||
| 126 | capacity is enforced as a hard limit. | ||
| 127 | |||
| 128 | =item * | ||
| 129 | |||
| 130 | C<SetMaxCapacityToForecastCapacity> - AWS Auto Scaling may scale | ||
| 131 | resource capacity higher than the maximum capacity to equal but not | ||
| 132 | exceed forecast capacity. | ||
| 133 | |||
| 134 | =item * | ||
| 135 | |||
| 136 | C<SetMaxCapacityAboveForecastCapacity> - AWS Auto Scaling may scale | ||
| 137 | resource capacity higher than the maximum capacity by a specified | ||
| 138 | buffer value. The intention is to give the target tracking scaling | ||
| 139 | policy extra capacity if unexpected traffic occurs. | ||
| 140 | |||
| 141 | =back | ||
| 142 | |||
| 143 | Only valid when configuring predictive scaling. | ||
| 144 | |||
| 145 | |||
| 146 | =head2 PredictiveScalingMaxCapacityBuffer => Int | ||
| 147 | |||
| 148 | The size of the capacity buffer to use when the forecast capacity is | ||
| 149 | close to or exceeds the maximum capacity. The value is specified as a | ||
| 150 | percentage relative to the forecast capacity. For example, if the | ||
| 151 | buffer is 10, this means a 10 percent buffer, such that if the forecast | ||
| 152 | capacity is 50, and the maximum capacity is 40, then the effective | ||
| 153 | maximum capacity is 55. | ||
| 154 | |||
| 155 | Only valid when configuring predictive scaling. Required if the | ||
| 156 | B<PredictiveScalingMaxCapacityBehavior> is set to | ||
| 157 | C<SetMaxCapacityAboveForecastCapacity>, and cannot be used otherwise. | ||
| 158 | |||
| 159 | The range is 1-100. | ||
| 160 | |||
| 161 | |||
| 162 | =head2 PredictiveScalingMode => Str | ||
| 163 | |||
| 164 | The predictive scaling mode. The default value is C<ForecastAndScale>. | ||
| 165 | Otherwise, AWS Auto Scaling forecasts capacity but does not create any | ||
| 166 | scheduled scaling actions based on the capacity forecast. | ||
| 167 | |||
| 168 | |||
| 169 | =head2 B<REQUIRED> ResourceId => Str | ||
| 170 | |||
| 171 | The ID of the resource. This string consists of the resource type and | ||
| 172 | unique identifier. | ||
| 173 | |||
| 174 | =over | ||
| 175 | |||
| 176 | =item * | ||
| 177 | |||
| 178 | Auto Scaling group - The resource type is C<autoScalingGroup> and the | ||
| 179 | unique identifier is the name of the Auto Scaling group. Example: | ||
| 180 | C<autoScalingGroup/my-asg>. | ||
| 181 | |||
| 182 | =item * | ||
| 183 | |||
| 184 | ECS service - The resource type is C<service> and the unique identifier | ||
| 185 | is the cluster name and service name. Example: | ||
| 186 | C<service/default/sample-webapp>. | ||
| 187 | |||
| 188 | =item * | ||
| 189 | |||
| 190 | Spot Fleet request - The resource type is C<spot-fleet-request> and the | ||
| 191 | unique identifier is the Spot Fleet request ID. Example: | ||
| 192 | C<spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE>. | ||
| 193 | |||
| 194 | =item * | ||
| 195 | |||
| 196 | DynamoDB table - The resource type is C<table> and the unique | ||
| 197 | identifier is the resource ID. Example: C<table/my-table>. | ||
| 198 | |||
| 199 | =item * | ||
| 200 | |||
| 201 | DynamoDB global secondary index - The resource type is C<index> and the | ||
| 202 | unique identifier is the resource ID. Example: | ||
| 203 | C<table/my-table/index/my-table-index>. | ||
| 204 | |||
| 205 | =item * | ||
| 206 | |||
| 207 | Aurora DB cluster - The resource type is C<cluster> and the unique | ||
| 208 | identifier is the cluster name. Example: C<cluster:my-db-cluster>. | ||
| 209 | |||
| 210 | =back | ||
| 211 | |||
| 212 | |||
| 213 | |||
| 214 | =head2 B<REQUIRED> ScalableDimension => Str | ||
| 215 | |||
| 216 | The scalable dimension associated with the resource. | ||
| 217 | |||
| 218 | =over | ||
| 219 | |||
| 220 | =item * | ||
| 221 | |||
| 222 | C<autoscaling:autoScalingGroup:DesiredCapacity> - The desired capacity | ||
| 223 | of an Auto Scaling group. | ||
| 224 | |||
| 225 | =item * | ||
| 226 | |||
| 227 | C<ecs:service:DesiredCount> - The desired task count of an ECS service. | ||
| 228 | |||
| 229 | =item * | ||
| 230 | |||
| 231 | C<ec2:spot-fleet-request:TargetCapacity> - The target capacity of a | ||
| 232 | Spot Fleet request. | ||
| 233 | |||
| 234 | =item * | ||
| 235 | |||
| 236 | C<dynamodb:table:ReadCapacityUnits> - The provisioned read capacity for | ||
| 237 | a DynamoDB table. | ||
| 238 | |||
| 239 | =item * | ||
| 240 | |||
| 241 | C<dynamodb:table:WriteCapacityUnits> - The provisioned write capacity | ||
| 242 | for a DynamoDB table. | ||
| 243 | |||
| 244 | =item * | ||
| 245 | |||
| 246 | C<dynamodb:index:ReadCapacityUnits> - The provisioned read capacity for | ||
| 247 | a DynamoDB global secondary index. | ||
| 248 | |||
| 249 | =item * | ||
| 250 | |||
| 251 | C<dynamodb:index:WriteCapacityUnits> - The provisioned write capacity | ||
| 252 | for a DynamoDB global secondary index. | ||
| 253 | |||
| 254 | =item * | ||
| 255 | |||
| 256 | C<rds:cluster:ReadReplicaCount> - The count of Aurora Replicas in an | ||
| 257 | Aurora DB cluster. Available for Aurora MySQL-compatible edition and | ||
| 258 | Aurora PostgreSQL-compatible edition. | ||
| 259 | |||
| 260 | =back | ||
| 261 | |||
| 262 | |||
| 263 | |||
| 264 | =head2 ScalingPolicyUpdateBehavior => Str | ||
| 265 | |||
| 266 | Controls whether a resource's externally created scaling policies are | ||
| 267 | kept or replaced. | ||
| 268 | |||
| 269 | The default value is C<KeepExternalPolicies>. If the parameter is set | ||
| 270 | to C<ReplaceExternalPolicies>, any scaling policies that are external | ||
| 271 | to AWS Auto Scaling are deleted and new target tracking scaling | ||
| 272 | policies created. | ||
| 273 | |||
| 274 | Only valid when configuring dynamic scaling. | ||
| 275 | |||
| 276 | Condition: The number of existing policies to be replaced must be less | ||
| 277 | than or equal to 50. If there are more than 50 policies to be replaced, | ||
| 278 | AWS Auto Scaling keeps all existing policies and does not create new | ||
| 279 | ones. | ||
| 280 | |||
| 281 | |||
| 282 | =head2 ScheduledActionBufferTime => Int | ||
| 283 | |||
| 284 | The amount of time, in seconds, to buffer the run time of scheduled | ||
| 285 | scaling actions when scaling out. For example, if the forecast says to | ||
| 286 | add capacity at 10:00 AM, and the buffer time is 5 minutes, then the | ||
| 287 | run time of the corresponding scheduled scaling action will be 9:55 AM. | ||
| 288 | The intention is to give resources time to be provisioned. For example, | ||
| 289 | it can take a few minutes to launch an EC2 instance. The actual amount | ||
| 290 | of time required depends on several factors, such as the size of the | ||
| 291 | instance and whether there are startup scripts to complete. | ||
| 292 | |||
| 293 | The value must be less than the forecast interval duration of 3600 | ||
| 294 | seconds (60 minutes). The default is 300 seconds. | ||
| 295 | |||
| 296 | Only valid when configuring predictive scaling. | ||
| 297 | |||
| 298 | |||
| 299 | =head2 B<REQUIRED> ServiceNamespace => Str | ||
| 300 | |||
| 301 | The namespace of the AWS service. | ||
| 302 | |||
| 303 | |||
| 304 | =head2 B<REQUIRED> TargetTrackingConfigurations => ArrayRef[L<Paws::AutoScalingPlans::TargetTrackingConfiguration>] | ||
| 305 | |||
| 306 | The target tracking configurations (up to 10). Each of these structures | ||
| 307 | must specify a unique scaling metric and a target value for the metric. | ||
| 308 | |||
| 309 | |||
| 310 | |||
| 311 | =head1 SEE ALSO | ||
| 312 | |||
| 313 | This class forms part of L<Paws>, describing an object used in L<Paws::AutoScalingPlans> | ||
| 314 | |||
| 315 | =head1 BUGS and CONTRIBUTIONS | ||
| 316 | |||
| 317 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 318 | |||
| 319 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 320 | |||
| 321 | =cut | ||
| 322 |