AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

TargetTrackingScalingPolicyConfiguration

import "github.com/aws/aws-sdk-go/service/applicationautoscaling"

type TargetTrackingScalingPolicyConfiguration struct { CustomizedMetricSpecification *CustomizedMetricSpecification `type:"structure"` DisableScaleIn *bool `type:"boolean"` PredefinedMetricSpecification *PredefinedMetricSpecification `type:"structure"` ScaleInCooldown *int64 `type:"integer"` ScaleOutCooldown *int64 `type:"integer"` TargetValue *float64 `type:"double" required:"true"` }

Represents a target tracking scaling policy configuration to use with Application Auto Scaling.

CustomizedMetricSpecification

Represents a CloudWatch metric of your choosing for a target tracking scaling policy to use with Application Auto Scaling.

To create your customized metric specification:

  • Choose a metric that changes proportionally with capacity. The value of the metric should increase or decrease in inverse proportion to the number of capacity units. That is, the value of the metric should decrease when capacity increases.

For more information about CloudWatch, see Amazon CloudWatch Concepts (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html).

DisableScaleIn

Type: *bool

Indicates whether scale in by the target tracking scaling policy is disabled. If the value is true, scale in is disabled and the target tracking scaling policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking scaling policy can remove capacity from the scalable resource. The default value is false.

PredefinedMetricSpecification

Represents a predefined metric for a target tracking scaling policy to use with Application Auto Scaling.

ScaleInCooldown

Type: *int64

The amount of time, in seconds, after a scale-in activity completes before another scale in activity can start.

The cooldown period is used to block subsequent scale-in requests until it has expired. The intention is to scale in conservatively to protect your application's availability. However, if another alarm triggers a scale-out policy during the cooldown period after a scale-in, Application Auto Scaling scales out your scalable target immediately.

ScaleOutCooldown

Type: *int64

The amount of time, in seconds, after a scale-out activity completes before another scale-out activity can start.

While the cooldown period is in effect, the capacity that has been added by the previous scale-out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. The intention is to continuously (but not excessively) scale out.

TargetValue

Type: *float64

The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).

TargetValue is a required field

Method

GoString

func (s TargetTrackingScalingPolicyConfiguration) GoString() string

GoString returns the string representation

SetCustomizedMetricSpecification

func (s *TargetTrackingScalingPolicyConfiguration) SetCustomizedMetricSpecification(v *CustomizedMetricSpecification) *TargetTrackingScalingPolicyConfiguration

SetCustomizedMetricSpecification sets the CustomizedMetricSpecification field's value.

SetDisableScaleIn

func (s *TargetTrackingScalingPolicyConfiguration) SetDisableScaleIn(v bool) *TargetTrackingScalingPolicyConfiguration

SetDisableScaleIn sets the DisableScaleIn field's value.

SetPredefinedMetricSpecification

func (s *TargetTrackingScalingPolicyConfiguration) SetPredefinedMetricSpecification(v *PredefinedMetricSpecification) *TargetTrackingScalingPolicyConfiguration

SetPredefinedMetricSpecification sets the PredefinedMetricSpecification field's value.

SetScaleInCooldown

func (s *TargetTrackingScalingPolicyConfiguration) SetScaleInCooldown(v int64) *TargetTrackingScalingPolicyConfiguration

SetScaleInCooldown sets the ScaleInCooldown field's value.

SetScaleOutCooldown

func (s *TargetTrackingScalingPolicyConfiguration) SetScaleOutCooldown(v int64) *TargetTrackingScalingPolicyConfiguration

SetScaleOutCooldown sets the ScaleOutCooldown field's value.

SetTargetValue

func (s *TargetTrackingScalingPolicyConfiguration) SetTargetValue(v float64) *TargetTrackingScalingPolicyConfiguration

SetTargetValue sets the TargetValue field's value.

String

func (s TargetTrackingScalingPolicyConfiguration) String() string

String returns the string representation

Validate

func (s *TargetTrackingScalingPolicyConfiguration) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: