You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::AutoScaling::Types::PutScalingPolicyType

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing PutScalingPolicyType as input to an Aws::Client method, you can use a vanilla Hash:

{
  auto_scaling_group_name: "ResourceName", # required
  policy_name: "XmlStringMaxLen255", # required
  policy_type: "XmlStringMaxLen64",
  adjustment_type: "XmlStringMaxLen255",
  min_adjustment_step: 1,
  min_adjustment_magnitude: 1,
  scaling_adjustment: 1,
  cooldown: 1,
  metric_aggregation_type: "XmlStringMaxLen32",
  step_adjustments: [
    {
      metric_interval_lower_bound: 1.0,
      metric_interval_upper_bound: 1.0,
      scaling_adjustment: 1, # required
    },
  ],
  estimated_instance_warmup: 1,
  target_tracking_configuration: {
    predefined_metric_specification: {
      predefined_metric_type: "ASGAverageCPUUtilization", # required, accepts ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, ALBRequestCountPerTarget
      resource_label: "XmlStringMaxLen1023",
    },
    customized_metric_specification: {
      metric_name: "MetricName", # required
      namespace: "MetricNamespace", # required
      dimensions: [
        {
          name: "MetricDimensionName", # required
          value: "MetricDimensionValue", # required
        },
      ],
      statistic: "Average", # required, accepts Average, Minimum, Maximum, SampleCount, Sum
      unit: "MetricUnit",
    },
    target_value: 1.0, # required
    disable_scale_in: false,
  },
}

Instance Attribute Summary collapse

Instance Attribute Details

#adjustment_typeString

The adjustment type. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

This parameter is supported if the policy type is SimpleScaling or StepScaling.

For more information, see Dynamic Scaling in the Auto Scaling User Guide.

Returns:

  • (String)

    The adjustment type.

#auto_scaling_group_nameString

The name of the Auto Scaling group.

Returns:

  • (String)

    The name of the Auto Scaling group.

#cooldownInteger

The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start. If this parameter is not specified, the default cooldown period for the group applies.

This parameter is supported if the policy type is SimpleScaling.

For more information, see Auto Scaling Cooldowns in the Auto Scaling User Guide.

Returns:

  • (Integer)

    The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.

#estimated_instance_warmupInteger

The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The default is to use the value specified for the default cooldown period for the group.

This parameter is supported if the policy type is StepScaling or TargetTrackingScaling.

Returns:

  • (Integer)

    The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.

#metric_aggregation_typeString

The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average.

This parameter is supported if the policy type is StepScaling.

Returns:

  • (String)

    The aggregation type for the CloudWatch metrics.

#min_adjustment_magnitudeInteger

The minimum number of instances to scale. If the value of AdjustmentType is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto Scaling group by at least this many instances. Otherwise, the error is ValidationError.

This parameter is supported if the policy type is SimpleScaling or StepScaling.

Returns:

  • (Integer)

    The minimum number of instances to scale.

#min_adjustment_stepInteger

Available for backward compatibility. Use MinAdjustmentMagnitude instead.

Returns:

  • (Integer)

    Available for backward compatibility.

#policy_nameString

The name of the policy.

Returns:

  • (String)

    The name of the policy.

#policy_typeString

The policy type. The valid values are SimpleScaling, StepScaling, and TargetTrackingScaling. If the policy type is null, the value is treated as SimpleScaling.

Returns:

  • (String)

    The policy type.

#scaling_adjustmentInteger

The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity.

This parameter is required if the policy type is SimpleScaling and not supported otherwise.

Returns:

  • (Integer)

    The amount by which to scale, based on the specified adjustment type.

#step_adjustmentsArray<Types::StepAdjustment>

A set of adjustments that enable you to scale based on the size of the alarm breach.

This parameter is required if the policy type is StepScaling and not supported otherwise.

Returns:

  • (Array<Types::StepAdjustment>)

    A set of adjustments that enable you to scale based on the size of the alarm breach.

#target_tracking_configurationTypes::TargetTrackingConfiguration

A target tracking policy.

This parameter is required if the policy type is TargetTrackingScaling and not supported otherwise.

Returns: