applicationautoscaling

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2019 License: Apache-2.0 Imports: 7 Imported by: 57

Documentation

Overview

Package applicationautoscaling provides the client and types for making API requests to Application Auto Scaling.

With Application Auto Scaling, you can configure automatic scaling for the following resources:

  • Amazon ECS services

  • Amazon EC2 Spot Fleet requests

  • Amazon EMR clusters

  • Amazon AppStream 2.0 fleets

  • Amazon DynamoDB tables and global secondary indexes throughput capacity

  • Amazon Aurora Replicas

  • Amazon SageMaker endpoint variants

  • Custom resources provided by your own applications or services

API Summary

The Application Auto Scaling service API includes three key sets of actions:

  • Register and manage scalable targets - Register AWS or custom resources as scalable targets (a resource that Application Auto Scaling can scale), set minimum and maximum capacity limits, and retrieve information on existing scalable targets.

  • Configure and manage automatic scaling - Define scaling policies to dynamically scale your resources in response to CloudWatch alarms, schedule one-time or recurring scaling actions, and retrieve your recent scaling activity history.

  • Suspend and resume scaling - Temporarily suspend and later resume automatic scaling by calling the RegisterScalableTarget action for any Application Auto Scaling scalable target. You can suspend and resume, individually or in combination, scale-out activities triggered by a scaling policy, scale-in activities triggered by a scaling policy, and scheduled scaling.

To learn more about Application Auto Scaling, including information about granting IAM users required permissions for Application Auto Scaling actions, see the Application Auto Scaling User Guide (https://docs.aws.amazon.com/autoscaling/application/userguide/what-is-application-auto-scaling.html).

See https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06 for more information on this service.

See applicationautoscaling package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/applicationautoscaling/

Using the Client

To use Application Auto Scaling with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the Application Auto Scaling client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/applicationautoscaling/#New

Index

Examples

Constants

View Source
const (
	ServiceName = "Application Auto Scaling" // Service's name
	ServiceID   = "ApplicationAutoScaling"   // Service's identifier
	EndpointsID = "application-autoscaling"  // Service's Endpoint identifier
)
View Source
const (

	// ErrCodeConcurrentUpdateException for service response error code
	// "ConcurrentUpdateException".
	//
	// Concurrent updates caused an exception, for example, if you request an update
	// to an Application Auto Scaling resource that already has a pending update.
	ErrCodeConcurrentUpdateException = "ConcurrentUpdateException"

	// ErrCodeFailedResourceAccessException for service response error code
	// "FailedResourceAccessException".
	//
	// Failed access to resources caused an exception. This exception is thrown
	// when Application Auto Scaling is unable to retrieve the alarms associated
	// with a scaling policy due to a client error, for example, if the role ARN
	// specified for a scalable target does not have permission to call the CloudWatch
	// DescribeAlarms (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html)
	// on your behalf.
	ErrCodeFailedResourceAccessException = "FailedResourceAccessException"

	// ErrCodeInternalServiceException for service response error code
	// "InternalServiceException".
	//
	// The service encountered an internal error.
	ErrCodeInternalServiceException = "InternalServiceException"

	// ErrCodeInvalidNextTokenException for service response error code
	// "InvalidNextTokenException".
	//
	// The next token supplied was invalid.
	ErrCodeInvalidNextTokenException = "InvalidNextTokenException"

	// ErrCodeLimitExceededException for service response error code
	// "LimitExceededException".
	//
	// A per-account resource limit is exceeded. For more information, see Application
	// Auto Scaling Limits (https://docs.aws.amazon.com/ApplicationAutoScaling/latest/userguide/application-auto-scaling-limits.html).
	ErrCodeLimitExceededException = "LimitExceededException"

	// ErrCodeObjectNotFoundException for service response error code
	// "ObjectNotFoundException".
	//
	// The specified object could not be found. For any operation that depends on
	// the existence of a scalable target, this exception is thrown if the scalable
	// target with the specified service namespace, resource ID, and scalable dimension
	// does not exist. For any operation that deletes or deregisters a resource,
	// this exception is thrown if the resource cannot be found.
	ErrCodeObjectNotFoundException = "ObjectNotFoundException"

	// ErrCodeValidationException for service response error code
	// "ValidationException".
	//
	// An exception was thrown for a validation issue. Review the available parameters
	// for the API request.
	ErrCodeValidationException = "ValidationException"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdjustmentType

type AdjustmentType string
const (
	AdjustmentTypeChangeInCapacity        AdjustmentType = "ChangeInCapacity"
	AdjustmentTypePercentChangeInCapacity AdjustmentType = "PercentChangeInCapacity"
	AdjustmentTypeExactCapacity           AdjustmentType = "ExactCapacity"
)

Enum values for AdjustmentType

func (AdjustmentType) MarshalValue added in v0.3.0

func (enum AdjustmentType) MarshalValue() (string, error)

func (AdjustmentType) MarshalValueBuf added in v0.3.0

func (enum AdjustmentType) MarshalValueBuf(b []byte) ([]byte, error)

type Alarm

type Alarm struct {

	// The Amazon Resource Name (ARN) of the alarm.
	//
	// AlarmARN is a required field
	AlarmARN *string `type:"string" required:"true"`

	// The name of the alarm.
	//
	// AlarmName is a required field
	AlarmName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Represents a CloudWatch alarm associated with a scaling policy.

func (Alarm) String

func (s Alarm) String() string

String returns the string representation

type Client added in v0.9.0

type Client struct {
	*aws.Client
}

Client provides the API operation methods for making requests to Application Auto Scaling. See this package's package overview docs for details on the service.

The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(config aws.Config) *Client

New creates a new instance of the client from the provided Config.

Example:

// Create a client from just a config.
svc := applicationautoscaling.New(myConfig)

func (*Client) DeleteScalingPolicyRequest added in v0.9.0

func (c *Client) DeleteScalingPolicyRequest(input *DeleteScalingPolicyInput) DeleteScalingPolicyRequest

DeleteScalingPolicyRequest returns a request value for making API operation for Application Auto Scaling.

Deletes the specified scaling policy for an Application Auto Scaling scalable target.

Deleting a step scaling policy deletes the underlying alarm action, but does not delete the CloudWatch alarm associated with the scaling policy, even if it no longer has an associated action.

For more information, see Delete a Step Scaling Policy (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html#delete-step-scaling-policy) and Delete a Target Tracking Scaling Policy (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html#delete-target-tracking-policy) in the Application Auto Scaling User Guide.

To create a scaling policy or update an existing one, see PutScalingPolicy.

// Example sending a request using DeleteScalingPolicyRequest.
req := client.DeleteScalingPolicyRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScalingPolicy

Example (Shared00)

To delete a scaling policy

This example deletes a scaling policy for the Amazon ECS service called web-app, which is running in the default cluster.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/applicationautoscaling"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := applicationautoscaling.New(cfg)
	input := &applicationautoscaling.DeleteScalingPolicyInput{
		PolicyName:        aws.String("web-app-cpu-lt-25"),
		ResourceId:        aws.String("service/default/web-app"),
		ScalableDimension: applicationautoscaling.ScalableDimensionEcsServiceDesiredCount,
		ServiceNamespace:  applicationautoscaling.ServiceNamespaceEcs,
	}

	req := svc.DeleteScalingPolicyRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case applicationautoscaling.ErrCodeValidationException:
				fmt.Println(applicationautoscaling.ErrCodeValidationException, aerr.Error())
			case applicationautoscaling.ErrCodeObjectNotFoundException:
				fmt.Println(applicationautoscaling.ErrCodeObjectNotFoundException, aerr.Error())
			case applicationautoscaling.ErrCodeConcurrentUpdateException:
				fmt.Println(applicationautoscaling.ErrCodeConcurrentUpdateException, aerr.Error())
			case applicationautoscaling.ErrCodeInternalServiceException:
				fmt.Println(applicationautoscaling.ErrCodeInternalServiceException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DeleteScheduledActionRequest added in v0.9.0

func (c *Client) DeleteScheduledActionRequest(input *DeleteScheduledActionInput) DeleteScheduledActionRequest

DeleteScheduledActionRequest returns a request value for making API operation for Application Auto Scaling.

Deletes the specified scheduled action for an Application Auto Scaling scalable target.

For more information, see Delete a Scheduled Action (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scheduled-scaling.html#delete-scheduled-action) in the Application Auto Scaling User Guide.

// Example sending a request using DeleteScheduledActionRequest.
req := client.DeleteScheduledActionRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeleteScheduledAction

func (*Client) DeregisterScalableTargetRequest added in v0.9.0

func (c *Client) DeregisterScalableTargetRequest(input *DeregisterScalableTargetInput) DeregisterScalableTargetRequest

DeregisterScalableTargetRequest returns a request value for making API operation for Application Auto Scaling.

Deregisters an Application Auto Scaling scalable target.

Deregistering a scalable target deletes the scaling policies that are associated with it.

To create a scalable target or update an existing one, see RegisterScalableTarget.

// Example sending a request using DeregisterScalableTargetRequest.
req := client.DeregisterScalableTargetRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DeregisterScalableTarget

Example (Shared00)

To deregister a scalable target

This example deregisters a scalable target for an Amazon ECS service called web-app that is running in the default cluster.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/applicationautoscaling"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := applicationautoscaling.New(cfg)
	input := &applicationautoscaling.DeregisterScalableTargetInput{
		ResourceId:        aws.String("service/default/web-app"),
		ScalableDimension: applicationautoscaling.ScalableDimensionEcsServiceDesiredCount,
		ServiceNamespace:  applicationautoscaling.ServiceNamespaceEcs,
	}

	req := svc.DeregisterScalableTargetRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case applicationautoscaling.ErrCodeValidationException:
				fmt.Println(applicationautoscaling.ErrCodeValidationException, aerr.Error())
			case applicationautoscaling.ErrCodeObjectNotFoundException:
				fmt.Println(applicationautoscaling.ErrCodeObjectNotFoundException, aerr.Error())
			case applicationautoscaling.ErrCodeConcurrentUpdateException:
				fmt.Println(applicationautoscaling.ErrCodeConcurrentUpdateException, aerr.Error())
			case applicationautoscaling.ErrCodeInternalServiceException:
				fmt.Println(applicationautoscaling.ErrCodeInternalServiceException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeScalableTargetsRequest added in v0.9.0

func (c *Client) DescribeScalableTargetsRequest(input *DescribeScalableTargetsInput) DescribeScalableTargetsRequest

DescribeScalableTargetsRequest returns a request value for making API operation for Application Auto Scaling.

Gets information about the scalable targets in the specified namespace.

You can filter the results using ResourceIds and ScalableDimension.

To create a scalable target or update an existing one, see RegisterScalableTarget. If you are no longer using a scalable target, you can deregister it using DeregisterScalableTarget.

// Example sending a request using DescribeScalableTargetsRequest.
req := client.DescribeScalableTargetsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalableTargets

Example (Shared00)

To describe scalable targets

This example describes the scalable targets for the ecs service namespace.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/applicationautoscaling"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := applicationautoscaling.New(cfg)
	input := &applicationautoscaling.DescribeScalableTargetsInput{
		ServiceNamespace: applicationautoscaling.ServiceNamespaceEcs,
	}

	req := svc.DescribeScalableTargetsRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case applicationautoscaling.ErrCodeValidationException:
				fmt.Println(applicationautoscaling.ErrCodeValidationException, aerr.Error())
			case applicationautoscaling.ErrCodeInvalidNextTokenException:
				fmt.Println(applicationautoscaling.ErrCodeInvalidNextTokenException, aerr.Error())
			case applicationautoscaling.ErrCodeConcurrentUpdateException:
				fmt.Println(applicationautoscaling.ErrCodeConcurrentUpdateException, aerr.Error())
			case applicationautoscaling.ErrCodeInternalServiceException:
				fmt.Println(applicationautoscaling.ErrCodeInternalServiceException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeScalingActivitiesRequest added in v0.9.0

func (c *Client) DescribeScalingActivitiesRequest(input *DescribeScalingActivitiesInput) DescribeScalingActivitiesRequest

DescribeScalingActivitiesRequest returns a request value for making API operation for Application Auto Scaling.

Provides descriptive information about the scaling activities in the specified namespace from the previous six weeks.

You can filter the results using ResourceId and ScalableDimension.

Scaling activities are triggered by CloudWatch alarms that are associated with scaling policies. To view the scaling policies for a service namespace, see DescribeScalingPolicies. To create a scaling policy or update an existing one, see PutScalingPolicy.

// Example sending a request using DescribeScalingActivitiesRequest.
req := client.DescribeScalingActivitiesRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalingActivities

Example (Shared00)

To describe scaling activities for a scalable target

This example describes the scaling activities for an Amazon ECS service called web-app that is running in the default cluster.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/applicationautoscaling"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := applicationautoscaling.New(cfg)
	input := &applicationautoscaling.DescribeScalingActivitiesInput{
		ResourceId:        aws.String("service/default/web-app"),
		ScalableDimension: applicationautoscaling.ScalableDimensionEcsServiceDesiredCount,
		ServiceNamespace:  applicationautoscaling.ServiceNamespaceEcs,
	}

	req := svc.DescribeScalingActivitiesRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case applicationautoscaling.ErrCodeValidationException:
				fmt.Println(applicationautoscaling.ErrCodeValidationException, aerr.Error())
			case applicationautoscaling.ErrCodeInvalidNextTokenException:
				fmt.Println(applicationautoscaling.ErrCodeInvalidNextTokenException, aerr.Error())
			case applicationautoscaling.ErrCodeConcurrentUpdateException:
				fmt.Println(applicationautoscaling.ErrCodeConcurrentUpdateException, aerr.Error())
			case applicationautoscaling.ErrCodeInternalServiceException:
				fmt.Println(applicationautoscaling.ErrCodeInternalServiceException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeScalingPoliciesRequest added in v0.9.0

func (c *Client) DescribeScalingPoliciesRequest(input *DescribeScalingPoliciesInput) DescribeScalingPoliciesRequest

DescribeScalingPoliciesRequest returns a request value for making API operation for Application Auto Scaling.

Describes the Application Auto Scaling scaling policies for the specified service namespace.

You can filter the results using ResourceId, ScalableDimension, and PolicyNames.

To create a scaling policy or update an existing one, see PutScalingPolicy. If you are no longer using a scaling policy, you can delete it using DeleteScalingPolicy.

// Example sending a request using DescribeScalingPoliciesRequest.
req := client.DescribeScalingPoliciesRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalingPolicies

Example (Shared00)

To describe scaling policies

This example describes the scaling policies for the ecs service namespace.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/applicationautoscaling"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := applicationautoscaling.New(cfg)
	input := &applicationautoscaling.DescribeScalingPoliciesInput{
		ServiceNamespace: applicationautoscaling.ServiceNamespaceEcs,
	}

	req := svc.DescribeScalingPoliciesRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case applicationautoscaling.ErrCodeValidationException:
				fmt.Println(applicationautoscaling.ErrCodeValidationException, aerr.Error())
			case applicationautoscaling.ErrCodeFailedResourceAccessException:
				fmt.Println(applicationautoscaling.ErrCodeFailedResourceAccessException, aerr.Error())
			case applicationautoscaling.ErrCodeInvalidNextTokenException:
				fmt.Println(applicationautoscaling.ErrCodeInvalidNextTokenException, aerr.Error())
			case applicationautoscaling.ErrCodeConcurrentUpdateException:
				fmt.Println(applicationautoscaling.ErrCodeConcurrentUpdateException, aerr.Error())
			case applicationautoscaling.ErrCodeInternalServiceException:
				fmt.Println(applicationautoscaling.ErrCodeInternalServiceException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeScheduledActionsRequest added in v0.9.0

func (c *Client) DescribeScheduledActionsRequest(input *DescribeScheduledActionsInput) DescribeScheduledActionsRequest

DescribeScheduledActionsRequest returns a request value for making API operation for Application Auto Scaling.

Describes the Application Auto Scaling scheduled actions for the specified service namespace.

You can filter the results using the ResourceId, ScalableDimension, and ScheduledActionNames parameters.

To create a scheduled action or update an existing one, see PutScheduledAction. If you are no longer using a scheduled action, you can delete it using DeleteScheduledAction.

// Example sending a request using DescribeScheduledActionsRequest.
req := client.DescribeScheduledActionsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScheduledActions

func (*Client) PutScalingPolicyRequest added in v0.9.0

func (c *Client) PutScalingPolicyRequest(input *PutScalingPolicyInput) PutScalingPolicyRequest

PutScalingPolicyRequest returns a request value for making API operation for Application Auto Scaling.

Creates or updates a policy for an Application Auto Scaling scalable target.

Each scalable target is identified by a service namespace, resource ID, and scalable dimension. A scaling policy applies to the scalable target identified by those three attributes. You cannot create a scaling policy until you have registered the resource as a scalable target using RegisterScalableTarget.

To update a policy, specify its policy name and the parameters that you want to change. Any parameters that you don't specify are not changed by this update request.

You can view the scaling policies for a service namespace using DescribeScalingPolicies. If you are no longer using a scaling policy, you can delete it using DeleteScalingPolicy.

Multiple scaling policies can be in force at the same time for the same scalable target. You can have one or more target tracking scaling policies, one or more step scaling policies, or both. However, there is a chance that multiple policies could conflict, instructing the scalable target to scale out or in at the same time. Application Auto Scaling gives precedence to the policy that provides the largest capacity for both scale out and scale in. For example, if one policy increases capacity by 3, another policy increases capacity by 200 percent, and the current capacity is 10, Application Auto Scaling uses the policy with the highest calculated capacity (200% of 10 = 20) and scales out to 30.

Learn more about how to work with scaling policies in the Application Auto Scaling User Guide (https://docs.aws.amazon.com/autoscaling/application/userguide/what-is-application-auto-scaling.html).

// Example sending a request using PutScalingPolicyRequest.
req := client.PutScalingPolicyRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScalingPolicy

Example (Shared00)

To apply a target tracking scaling policy with a predefined metric specification

The following example applies a target tracking scaling policy with a predefined metric specification to an Amazon ECS service called web-app in the default cluster. The policy keeps the average CPU utilization of the service at 75 percent, with scale-out and scale-in cooldown periods of 60 seconds.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/applicationautoscaling"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := applicationautoscaling.New(cfg)
	input := &applicationautoscaling.PutScalingPolicyInput{
		PolicyName:        aws.String("cpu75-target-tracking-scaling-policy"),
		PolicyType:        applicationautoscaling.PolicyTypeTargetTrackingScaling,
		ResourceId:        aws.String("service/default/web-app"),
		ScalableDimension: applicationautoscaling.ScalableDimensionEcsServiceDesiredCount,
		ServiceNamespace:  applicationautoscaling.ServiceNamespaceEcs,
		TargetTrackingScalingPolicyConfiguration: &applicationautoscaling.TargetTrackingScalingPolicyConfiguration{
			PredefinedMetricSpecification: &applicationautoscaling.PredefinedMetricSpecification{
				PredefinedMetricType: applicationautoscaling.MetricTypeEcsserviceAverageCpuutilization,
			},
			ScaleInCooldown:  aws.Int64(60),
			ScaleOutCooldown: aws.Int64(60),
			TargetValue:      aws.Float64(75.000000),
		},
	}

	req := svc.PutScalingPolicyRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case applicationautoscaling.ErrCodeValidationException:
				fmt.Println(applicationautoscaling.ErrCodeValidationException, aerr.Error())
			case applicationautoscaling.ErrCodeLimitExceededException:
				fmt.Println(applicationautoscaling.ErrCodeLimitExceededException, aerr.Error())
			case applicationautoscaling.ErrCodeObjectNotFoundException:
				fmt.Println(applicationautoscaling.ErrCodeObjectNotFoundException, aerr.Error())
			case applicationautoscaling.ErrCodeConcurrentUpdateException:
				fmt.Println(applicationautoscaling.ErrCodeConcurrentUpdateException, aerr.Error())
			case applicationautoscaling.ErrCodeFailedResourceAccessException:
				fmt.Println(applicationautoscaling.ErrCodeFailedResourceAccessException, aerr.Error())
			case applicationautoscaling.ErrCodeInternalServiceException:
				fmt.Println(applicationautoscaling.ErrCodeInternalServiceException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To apply a target tracking scaling policy with a customized metric specification

The following example applies a target tracking scaling policy with a customized metric specification to an Amazon ECS service called web-app in the default cluster. The policy keeps the average utilization of the service at 75 percent, with scale-out and scale-in cooldown periods of 60 seconds.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/applicationautoscaling"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := applicationautoscaling.New(cfg)
	input := &applicationautoscaling.PutScalingPolicyInput{
		PolicyName:        aws.String("cms75-target-tracking-scaling-policy"),
		PolicyType:        applicationautoscaling.PolicyTypeTargetTrackingScaling,
		ResourceId:        aws.String("service/default/web-app"),
		ScalableDimension: applicationautoscaling.ScalableDimensionEcsServiceDesiredCount,
		ServiceNamespace:  applicationautoscaling.ServiceNamespaceEcs,
		TargetTrackingScalingPolicyConfiguration: &applicationautoscaling.TargetTrackingScalingPolicyConfiguration{
			CustomizedMetricSpecification: &applicationautoscaling.CustomizedMetricSpecification{
				Dimensions: []applicationautoscaling.MetricDimension{
					{
						Name:  aws.String("MyOptionalMetricDimensionName"),
						Value: aws.String("MyOptionalMetricDimensionValue"),
					},
				},
				MetricName: aws.String("MyUtilizationMetric"),
				Namespace:  aws.String("MyNamespace"),
				Statistic:  applicationautoscaling.MetricStatisticAverage,
				Unit:       aws.String("Percent"),
			},
			ScaleInCooldown:  aws.Int64(60),
			ScaleOutCooldown: aws.Int64(60),
			TargetValue:      aws.Float64(75.000000),
		},
	}

	req := svc.PutScalingPolicyRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case applicationautoscaling.ErrCodeValidationException:
				fmt.Println(applicationautoscaling.ErrCodeValidationException, aerr.Error())
			case applicationautoscaling.ErrCodeLimitExceededException:
				fmt.Println(applicationautoscaling.ErrCodeLimitExceededException, aerr.Error())
			case applicationautoscaling.ErrCodeObjectNotFoundException:
				fmt.Println(applicationautoscaling.ErrCodeObjectNotFoundException, aerr.Error())
			case applicationautoscaling.ErrCodeConcurrentUpdateException:
				fmt.Println(applicationautoscaling.ErrCodeConcurrentUpdateException, aerr.Error())
			case applicationautoscaling.ErrCodeFailedResourceAccessException:
				fmt.Println(applicationautoscaling.ErrCodeFailedResourceAccessException, aerr.Error())
			case applicationautoscaling.ErrCodeInternalServiceException:
				fmt.Println(applicationautoscaling.ErrCodeInternalServiceException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared02)

To apply a target tracking scaling policy for scale out only

The following example applies a target tracking scaling policy to an Amazon ECS service called web-app in the default cluster. The policy is used to scale out the ECS service when the RequestCountPerTarget metric from the Application Load Balancer exceeds the threshold.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/applicationautoscaling"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := applicationautoscaling.New(cfg)
	input := &applicationautoscaling.PutScalingPolicyInput{
		PolicyName:        aws.String("alb-scale-out-target-tracking-scaling-policy"),
		PolicyType:        applicationautoscaling.PolicyTypeTargetTrackingScaling,
		ResourceId:        aws.String("service/default/web-app"),
		ScalableDimension: applicationautoscaling.ScalableDimensionEcsServiceDesiredCount,
		ServiceNamespace:  applicationautoscaling.ServiceNamespaceEcs,
		TargetTrackingScalingPolicyConfiguration: &applicationautoscaling.TargetTrackingScalingPolicyConfiguration{
			DisableScaleIn: aws.Bool(true),
			PredefinedMetricSpecification: &applicationautoscaling.PredefinedMetricSpecification{
				PredefinedMetricType: applicationautoscaling.MetricTypeAlbrequestCountPerTarget,
				ResourceLabel:        aws.String("app/EC2Co-EcsEl-1TKLTMITMM0EO/f37c06a68c1748aa/targetgroup/EC2Co-Defau-LDNM7Q3ZH1ZN/6d4ea56ca2d6a18d"),
			},
			ScaleInCooldown:  aws.Int64(60),
			ScaleOutCooldown: aws.Int64(60),
			TargetValue:      aws.Float64(1000.000000),
		},
	}

	req := svc.PutScalingPolicyRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case applicationautoscaling.ErrCodeValidationException:
				fmt.Println(applicationautoscaling.ErrCodeValidationException, aerr.Error())
			case applicationautoscaling.ErrCodeLimitExceededException:
				fmt.Println(applicationautoscaling.ErrCodeLimitExceededException, aerr.Error())
			case applicationautoscaling.ErrCodeObjectNotFoundException:
				fmt.Println(applicationautoscaling.ErrCodeObjectNotFoundException, aerr.Error())
			case applicationautoscaling.ErrCodeConcurrentUpdateException:
				fmt.Println(applicationautoscaling.ErrCodeConcurrentUpdateException, aerr.Error())
			case applicationautoscaling.ErrCodeFailedResourceAccessException:
				fmt.Println(applicationautoscaling.ErrCodeFailedResourceAccessException, aerr.Error())
			case applicationautoscaling.ErrCodeInternalServiceException:
				fmt.Println(applicationautoscaling.ErrCodeInternalServiceException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared03)

To apply a step scaling policy to an Amazon ECS service

This example applies a step scaling policy to an Amazon ECS service called web-app in the default cluster. The policy increases the desired count of the service by 200%, with a cool down period of 60 seconds.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/applicationautoscaling"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := applicationautoscaling.New(cfg)
	input := &applicationautoscaling.PutScalingPolicyInput{
		PolicyName:        aws.String("web-app-cpu-gt-75"),
		PolicyType:        applicationautoscaling.PolicyTypeStepScaling,
		ResourceId:        aws.String("service/default/web-app"),
		ScalableDimension: applicationautoscaling.ScalableDimensionEcsServiceDesiredCount,
		ServiceNamespace:  applicationautoscaling.ServiceNamespaceEcs,
		StepScalingPolicyConfiguration: &applicationautoscaling.StepScalingPolicyConfiguration{
			AdjustmentType: applicationautoscaling.AdjustmentTypePercentChangeInCapacity,
			Cooldown:       aws.Int64(60),
			StepAdjustments: []applicationautoscaling.StepAdjustment{
				{
					MetricIntervalLowerBound: aws.Float64(0.000000),
					ScalingAdjustment:        aws.Int64(200),
				},
			},
		},
	}

	req := svc.PutScalingPolicyRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case applicationautoscaling.ErrCodeValidationException:
				fmt.Println(applicationautoscaling.ErrCodeValidationException, aerr.Error())
			case applicationautoscaling.ErrCodeLimitExceededException:
				fmt.Println(applicationautoscaling.ErrCodeLimitExceededException, aerr.Error())
			case applicationautoscaling.ErrCodeObjectNotFoundException:
				fmt.Println(applicationautoscaling.ErrCodeObjectNotFoundException, aerr.Error())
			case applicationautoscaling.ErrCodeConcurrentUpdateException:
				fmt.Println(applicationautoscaling.ErrCodeConcurrentUpdateException, aerr.Error())
			case applicationautoscaling.ErrCodeFailedResourceAccessException:
				fmt.Println(applicationautoscaling.ErrCodeFailedResourceAccessException, aerr.Error())
			case applicationautoscaling.ErrCodeInternalServiceException:
				fmt.Println(applicationautoscaling.ErrCodeInternalServiceException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared04)

To apply a step scaling policy to an Amazon EC2 Spot fleet

This example applies a step scaling policy to an Amazon EC2 Spot fleet. The policy increases the target capacity of the spot fleet by 200%, with a cool down period of 180 seconds.",

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/applicationautoscaling"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := applicationautoscaling.New(cfg)
	input := &applicationautoscaling.PutScalingPolicyInput{
		PolicyName:        aws.String("fleet-cpu-gt-75"),
		PolicyType:        applicationautoscaling.PolicyTypeStepScaling,
		ResourceId:        aws.String("spot-fleet-request/sfr-45e69d8a-be48-4539-bbf3-3464e99c50c3"),
		ScalableDimension: applicationautoscaling.ScalableDimensionEc2SpotFleetRequestTargetCapacity,
		ServiceNamespace:  applicationautoscaling.ServiceNamespaceEc2,
		StepScalingPolicyConfiguration: &applicationautoscaling.StepScalingPolicyConfiguration{
			AdjustmentType: applicationautoscaling.AdjustmentTypePercentChangeInCapacity,
			Cooldown:       aws.Int64(180),
			StepAdjustments: []applicationautoscaling.StepAdjustment{
				{
					MetricIntervalLowerBound: aws.Float64(0.000000),
					ScalingAdjustment:        aws.Int64(200),
				},
			},
		},
	}

	req := svc.PutScalingPolicyRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case applicationautoscaling.ErrCodeValidationException:
				fmt.Println(applicationautoscaling.ErrCodeValidationException, aerr.Error())
			case applicationautoscaling.ErrCodeLimitExceededException:
				fmt.Println(applicationautoscaling.ErrCodeLimitExceededException, aerr.Error())
			case applicationautoscaling.ErrCodeObjectNotFoundException:
				fmt.Println(applicationautoscaling.ErrCodeObjectNotFoundException, aerr.Error())
			case applicationautoscaling.ErrCodeConcurrentUpdateException:
				fmt.Println(applicationautoscaling.ErrCodeConcurrentUpdateException, aerr.Error())
			case applicationautoscaling.ErrCodeFailedResourceAccessException:
				fmt.Println(applicationautoscaling.ErrCodeFailedResourceAccessException, aerr.Error())
			case applicationautoscaling.ErrCodeInternalServiceException:
				fmt.Println(applicationautoscaling.ErrCodeInternalServiceException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) PutScheduledActionRequest added in v0.9.0

func (c *Client) PutScheduledActionRequest(input *PutScheduledActionInput) PutScheduledActionRequest

PutScheduledActionRequest returns a request value for making API operation for Application Auto Scaling.

Creates or updates a scheduled action for an Application Auto Scaling scalable target.

Each scalable target is identified by a service namespace, resource ID, and scalable dimension. A scheduled action applies to the scalable target identified by those three attributes. You cannot create a scheduled action until you have registered the resource as a scalable target using RegisterScalableTarget.

To update an action, specify its name and the parameters that you want to change. If you don't specify start and end times, the old values are deleted. Any other parameters that you don't specify are not changed by this update request.

You can view the scheduled actions using DescribeScheduledActions. If you are no longer using a scheduled action, you can delete it using DeleteScheduledAction.

Learn more about how to work with scheduled actions in the Application Auto Scaling User Guide (https://docs.aws.amazon.com/autoscaling/application/userguide/what-is-application-auto-scaling.html).

// Example sending a request using PutScheduledActionRequest.
req := client.PutScheduledActionRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/PutScheduledAction

func (*Client) RegisterScalableTargetRequest added in v0.9.0

func (c *Client) RegisterScalableTargetRequest(input *RegisterScalableTargetInput) RegisterScalableTargetRequest

RegisterScalableTargetRequest returns a request value for making API operation for Application Auto Scaling.

Registers or updates a scalable target. A scalable target is a resource that Application Auto Scaling can scale out and scale in. Scalable targets are uniquely identified by the combination of resource ID, scalable dimension, and namespace.

When you register a new scalable target, you must specify values for minimum and maximum capacity. Application Auto Scaling will not scale capacity to values that are outside of this range.

To update a scalable target, specify the parameter that you want to change as well as the following parameters that identify the scalable target: resource ID, scalable dimension, and namespace. Any parameters that you don't specify are not changed by this update request.

After you register a scalable target, you do not need to register it again to use other Application Auto Scaling operations. To see which resources have been registered, use DescribeScalableTargets. You can also view the scaling policies for a service namespace by using DescribeScalableTargets.

If you no longer need a scalable target, you can deregister it by using DeregisterScalableTarget.

// Example sending a request using RegisterScalableTargetRequest.
req := client.RegisterScalableTargetRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/RegisterScalableTarget

Example (Shared00)

To register an ECS service as a scalable target

This example registers a scalable target from an Amazon ECS service called web-app that is running on the default cluster, with a minimum desired count of 1 task and a maximum desired count of 10 tasks.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/applicationautoscaling"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := applicationautoscaling.New(cfg)
	input := &applicationautoscaling.RegisterScalableTargetInput{
		MaxCapacity:       aws.Int64(10),
		MinCapacity:       aws.Int64(1),
		ResourceId:        aws.String("service/default/web-app"),
		ScalableDimension: applicationautoscaling.ScalableDimensionEcsServiceDesiredCount,
		ServiceNamespace:  applicationautoscaling.ServiceNamespaceEcs,
	}

	req := svc.RegisterScalableTargetRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case applicationautoscaling.ErrCodeValidationException:
				fmt.Println(applicationautoscaling.ErrCodeValidationException, aerr.Error())
			case applicationautoscaling.ErrCodeLimitExceededException:
				fmt.Println(applicationautoscaling.ErrCodeLimitExceededException, aerr.Error())
			case applicationautoscaling.ErrCodeConcurrentUpdateException:
				fmt.Println(applicationautoscaling.ErrCodeConcurrentUpdateException, aerr.Error())
			case applicationautoscaling.ErrCodeInternalServiceException:
				fmt.Println(applicationautoscaling.ErrCodeInternalServiceException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To register an EC2 Spot fleet as a scalable target

This example registers a scalable target from an Amazon EC2 Spot fleet with a minimum target capacity of 1 and a maximum of 10.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/applicationautoscaling"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := applicationautoscaling.New(cfg)
	input := &applicationautoscaling.RegisterScalableTargetInput{
		MaxCapacity:       aws.Int64(10),
		MinCapacity:       aws.Int64(1),
		ResourceId:        aws.String("spot-fleet-request/sfr-45e69d8a-be48-4539-bbf3-3464e99c50c3"),
		ScalableDimension: applicationautoscaling.ScalableDimensionEc2SpotFleetRequestTargetCapacity,
		ServiceNamespace:  applicationautoscaling.ServiceNamespaceEc2,
	}

	req := svc.RegisterScalableTargetRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case applicationautoscaling.ErrCodeValidationException:
				fmt.Println(applicationautoscaling.ErrCodeValidationException, aerr.Error())
			case applicationautoscaling.ErrCodeLimitExceededException:
				fmt.Println(applicationautoscaling.ErrCodeLimitExceededException, aerr.Error())
			case applicationautoscaling.ErrCodeConcurrentUpdateException:
				fmt.Println(applicationautoscaling.ErrCodeConcurrentUpdateException, aerr.Error())
			case applicationautoscaling.ErrCodeInternalServiceException:
				fmt.Println(applicationautoscaling.ErrCodeInternalServiceException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

type CustomizedMetricSpecification

type CustomizedMetricSpecification struct {

	// The dimensions of the metric.
	//
	// Conditional: If you published your metric with dimensions, you must specify
	// the same dimensions in your scaling policy.
	Dimensions []MetricDimension `type:"list"`

	// The name of the metric.
	//
	// MetricName is a required field
	MetricName *string `type:"string" required:"true"`

	// The namespace of the metric.
	//
	// Namespace is a required field
	Namespace *string `type:"string" required:"true"`

	// The statistic of the metric.
	//
	// Statistic is a required field
	Statistic MetricStatistic `type:"string" required:"true" enum:"true"`

	// The unit of the metric.
	Unit *string `type:"string"`
	// contains filtered or unexported fields
}

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:

  • Add values for each required parameter from CloudWatch. You can use an existing metric, or a new metric that you create. To use your own metric, you must first publish the metric to CloudWatch. For more information, see Publish Custom Metrics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html) in the Amazon CloudWatch User Guide.

  • 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).

func (CustomizedMetricSpecification) String

String returns the string representation

func (*CustomizedMetricSpecification) Validate

func (s *CustomizedMetricSpecification) Validate() error

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

type DeleteScalingPolicyInput

type DeleteScalingPolicyInput struct {

	// The name of the scaling policy.
	//
	// PolicyName is a required field
	PolicyName *string `min:"1" type:"string" required:"true"`

	// The identifier of the resource associated with the scalable target. This
	// string consists of the resource type and unique identifier.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	//
	// ResourceId is a required field
	ResourceId *string `min:"1" type:"string" required:"true"`

	// The scalable dimension. This string consists of the service namespace, resource
	// type, and scaling property.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	//
	// ScalableDimension is a required field
	ScalableDimension ScalableDimension `type:"string" required:"true" enum:"true"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

func (DeleteScalingPolicyInput) String

func (s DeleteScalingPolicyInput) String() string

String returns the string representation

func (*DeleteScalingPolicyInput) Validate

func (s *DeleteScalingPolicyInput) Validate() error

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

type DeleteScalingPolicyOutput

type DeleteScalingPolicyOutput struct {
	// contains filtered or unexported fields
}

func (DeleteScalingPolicyOutput) String

func (s DeleteScalingPolicyOutput) String() string

String returns the string representation

type DeleteScalingPolicyRequest

type DeleteScalingPolicyRequest struct {
	*aws.Request
	Input *DeleteScalingPolicyInput
	Copy  func(*DeleteScalingPolicyInput) DeleteScalingPolicyRequest
}

DeleteScalingPolicyRequest is the request type for the DeleteScalingPolicy API operation.

func (DeleteScalingPolicyRequest) Send

Send marshals and sends the DeleteScalingPolicy API request.

type DeleteScalingPolicyResponse added in v0.9.0

type DeleteScalingPolicyResponse struct {
	*DeleteScalingPolicyOutput
	// contains filtered or unexported fields
}

DeleteScalingPolicyResponse is the response type for the DeleteScalingPolicy API operation.

func (*DeleteScalingPolicyResponse) SDKResponseMetdata added in v0.9.0

func (r *DeleteScalingPolicyResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeleteScalingPolicy request.

type DeleteScheduledActionInput added in v0.2.0

type DeleteScheduledActionInput struct {

	// The identifier of the resource associated with the scheduled action. This
	// string consists of the resource type and unique identifier.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	//
	// ResourceId is a required field
	ResourceId *string `min:"1" type:"string" required:"true"`

	// The scalable dimension. This string consists of the service namespace, resource
	// type, and scaling property.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	//
	// ScalableDimension is a required field
	ScalableDimension ScalableDimension `type:"string" required:"true" enum:"true"`

	// The name of the scheduled action.
	//
	// ScheduledActionName is a required field
	ScheduledActionName *string `min:"1" type:"string" required:"true"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

func (DeleteScheduledActionInput) String added in v0.2.0

String returns the string representation

func (*DeleteScheduledActionInput) Validate added in v0.2.0

func (s *DeleteScheduledActionInput) Validate() error

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

type DeleteScheduledActionOutput added in v0.2.0

type DeleteScheduledActionOutput struct {
	// contains filtered or unexported fields
}

func (DeleteScheduledActionOutput) String added in v0.2.0

String returns the string representation

type DeleteScheduledActionRequest added in v0.2.0

type DeleteScheduledActionRequest struct {
	*aws.Request
	Input *DeleteScheduledActionInput
	Copy  func(*DeleteScheduledActionInput) DeleteScheduledActionRequest
}

DeleteScheduledActionRequest is the request type for the DeleteScheduledAction API operation.

func (DeleteScheduledActionRequest) Send added in v0.2.0

Send marshals and sends the DeleteScheduledAction API request.

type DeleteScheduledActionResponse added in v0.9.0

type DeleteScheduledActionResponse struct {
	*DeleteScheduledActionOutput
	// contains filtered or unexported fields
}

DeleteScheduledActionResponse is the response type for the DeleteScheduledAction API operation.

func (*DeleteScheduledActionResponse) SDKResponseMetdata added in v0.9.0

func (r *DeleteScheduledActionResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeleteScheduledAction request.

type DeregisterScalableTargetInput

type DeregisterScalableTargetInput struct {

	// The identifier of the resource associated with the scalable target. This
	// string consists of the resource type and unique identifier.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	//
	// ResourceId is a required field
	ResourceId *string `min:"1" type:"string" required:"true"`

	// The scalable dimension associated with the scalable target. This string consists
	// of the service namespace, resource type, and scaling property.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	//
	// ScalableDimension is a required field
	ScalableDimension ScalableDimension `type:"string" required:"true" enum:"true"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

func (DeregisterScalableTargetInput) String

String returns the string representation

func (*DeregisterScalableTargetInput) Validate

func (s *DeregisterScalableTargetInput) Validate() error

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

type DeregisterScalableTargetOutput

type DeregisterScalableTargetOutput struct {
	// contains filtered or unexported fields
}

func (DeregisterScalableTargetOutput) String

String returns the string representation

type DeregisterScalableTargetRequest

type DeregisterScalableTargetRequest struct {
	*aws.Request
	Input *DeregisterScalableTargetInput
	Copy  func(*DeregisterScalableTargetInput) DeregisterScalableTargetRequest
}

DeregisterScalableTargetRequest is the request type for the DeregisterScalableTarget API operation.

func (DeregisterScalableTargetRequest) Send

Send marshals and sends the DeregisterScalableTarget API request.

type DeregisterScalableTargetResponse added in v0.9.0

type DeregisterScalableTargetResponse struct {
	*DeregisterScalableTargetOutput
	// contains filtered or unexported fields
}

DeregisterScalableTargetResponse is the response type for the DeregisterScalableTarget API operation.

func (*DeregisterScalableTargetResponse) SDKResponseMetdata added in v0.9.0

func (r *DeregisterScalableTargetResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeregisterScalableTarget request.

type DescribeScalableTargetsInput

type DescribeScalableTargetsInput struct {

	// The maximum number of scalable targets. This value can be between 1 and 50.
	// The default value is 50.
	//
	// If this parameter is used, the operation returns up to MaxResults results
	// at a time, along with a NextToken value. To get the next set of results,
	// include the NextToken value in a subsequent call. If this parameter is not
	// used, the operation returns up to 50 results and a NextToken value, if applicable.
	MaxResults *int64 `type:"integer"`

	// The token for the next set of results.
	NextToken *string `type:"string"`

	// The identifier of the resource associated with the scalable target. This
	// string consists of the resource type and unique identifier. If you specify
	// a scalable dimension, you must also specify a resource ID.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	ResourceIds []string `type:"list"`

	// The scalable dimension associated with the scalable target. This string consists
	// of the service namespace, resource type, and scaling property. If you specify
	// a scalable dimension, you must also specify a resource ID.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	ScalableDimension ScalableDimension `type:"string" enum:"true"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

func (DescribeScalableTargetsInput) String

String returns the string representation

func (*DescribeScalableTargetsInput) Validate

func (s *DescribeScalableTargetsInput) Validate() error

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

type DescribeScalableTargetsOutput

type DescribeScalableTargetsOutput struct {

	// The token required to get the next set of results. This value is null if
	// there are no more results to return.
	NextToken *string `type:"string"`

	// The scalable targets that match the request parameters.
	ScalableTargets []ScalableTarget `type:"list"`
	// contains filtered or unexported fields
}

func (DescribeScalableTargetsOutput) String

String returns the string representation

type DescribeScalableTargetsPaginator added in v0.9.0

type DescribeScalableTargetsPaginator struct {
	aws.Pager
}

DescribeScalableTargetsPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewDescribeScalableTargetsPaginator added in v0.9.0

func NewDescribeScalableTargetsPaginator(req DescribeScalableTargetsRequest) DescribeScalableTargetsPaginator

NewDescribeScalableTargetsRequestPaginator returns a paginator for DescribeScalableTargets. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.DescribeScalableTargetsRequest(input)
p := applicationautoscaling.NewDescribeScalableTargetsRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*DescribeScalableTargetsPaginator) CurrentPage added in v0.9.0

type DescribeScalableTargetsRequest

type DescribeScalableTargetsRequest struct {
	*aws.Request
	Input *DescribeScalableTargetsInput
	Copy  func(*DescribeScalableTargetsInput) DescribeScalableTargetsRequest
}

DescribeScalableTargetsRequest is the request type for the DescribeScalableTargets API operation.

func (DescribeScalableTargetsRequest) Send

Send marshals and sends the DescribeScalableTargets API request.

type DescribeScalableTargetsResponse added in v0.9.0

type DescribeScalableTargetsResponse struct {
	*DescribeScalableTargetsOutput
	// contains filtered or unexported fields
}

DescribeScalableTargetsResponse is the response type for the DescribeScalableTargets API operation.

func (*DescribeScalableTargetsResponse) SDKResponseMetdata added in v0.9.0

func (r *DescribeScalableTargetsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeScalableTargets request.

type DescribeScalingActivitiesInput

type DescribeScalingActivitiesInput struct {

	// The maximum number of scalable targets. This value can be between 1 and 50.
	// The default value is 50.
	//
	// If this parameter is used, the operation returns up to MaxResults results
	// at a time, along with a NextToken value. To get the next set of results,
	// include the NextToken value in a subsequent call. If this parameter is not
	// used, the operation returns up to 50 results and a NextToken value, if applicable.
	MaxResults *int64 `type:"integer"`

	// The token for the next set of results.
	NextToken *string `type:"string"`

	// The identifier of the resource associated with the scaling activity. This
	// string consists of the resource type and unique identifier. If you specify
	// a scalable dimension, you must also specify a resource ID.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	ResourceId *string `min:"1" type:"string"`

	// The scalable dimension. This string consists of the service namespace, resource
	// type, and scaling property. If you specify a scalable dimension, you must
	// also specify a resource ID.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	ScalableDimension ScalableDimension `type:"string" enum:"true"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

func (DescribeScalingActivitiesInput) String

String returns the string representation

func (*DescribeScalingActivitiesInput) Validate

func (s *DescribeScalingActivitiesInput) Validate() error

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

type DescribeScalingActivitiesOutput

type DescribeScalingActivitiesOutput struct {

	// The token required to get the next set of results. This value is null if
	// there are no more results to return.
	NextToken *string `type:"string"`

	// A list of scaling activity objects.
	ScalingActivities []ScalingActivity `type:"list"`
	// contains filtered or unexported fields
}

func (DescribeScalingActivitiesOutput) String

String returns the string representation

type DescribeScalingActivitiesPaginator added in v0.9.0

type DescribeScalingActivitiesPaginator struct {
	aws.Pager
}

DescribeScalingActivitiesPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewDescribeScalingActivitiesPaginator added in v0.9.0

func NewDescribeScalingActivitiesPaginator(req DescribeScalingActivitiesRequest) DescribeScalingActivitiesPaginator

NewDescribeScalingActivitiesRequestPaginator returns a paginator for DescribeScalingActivities. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.DescribeScalingActivitiesRequest(input)
p := applicationautoscaling.NewDescribeScalingActivitiesRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*DescribeScalingActivitiesPaginator) CurrentPage added in v0.9.0

type DescribeScalingActivitiesRequest

type DescribeScalingActivitiesRequest struct {
	*aws.Request
	Input *DescribeScalingActivitiesInput
	Copy  func(*DescribeScalingActivitiesInput) DescribeScalingActivitiesRequest
}

DescribeScalingActivitiesRequest is the request type for the DescribeScalingActivities API operation.

func (DescribeScalingActivitiesRequest) Send

Send marshals and sends the DescribeScalingActivities API request.

type DescribeScalingActivitiesResponse added in v0.9.0

type DescribeScalingActivitiesResponse struct {
	*DescribeScalingActivitiesOutput
	// contains filtered or unexported fields
}

DescribeScalingActivitiesResponse is the response type for the DescribeScalingActivities API operation.

func (*DescribeScalingActivitiesResponse) SDKResponseMetdata added in v0.9.0

func (r *DescribeScalingActivitiesResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeScalingActivities request.

type DescribeScalingPoliciesInput

type DescribeScalingPoliciesInput struct {

	// The maximum number of scalable targets. This value can be between 1 and 50.
	// The default value is 50.
	//
	// If this parameter is used, the operation returns up to MaxResults results
	// at a time, along with a NextToken value. To get the next set of results,
	// include the NextToken value in a subsequent call. If this parameter is not
	// used, the operation returns up to 50 results and a NextToken value, if applicable.
	MaxResults *int64 `type:"integer"`

	// The token for the next set of results.
	NextToken *string `type:"string"`

	// The names of the scaling policies to describe.
	PolicyNames []string `type:"list"`

	// The identifier of the resource associated with the scaling policy. This string
	// consists of the resource type and unique identifier. If you specify a scalable
	// dimension, you must also specify a resource ID.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	ResourceId *string `min:"1" type:"string"`

	// The scalable dimension. This string consists of the service namespace, resource
	// type, and scaling property. If you specify a scalable dimension, you must
	// also specify a resource ID.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	ScalableDimension ScalableDimension `type:"string" enum:"true"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

func (DescribeScalingPoliciesInput) String

String returns the string representation

func (*DescribeScalingPoliciesInput) Validate

func (s *DescribeScalingPoliciesInput) Validate() error

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

type DescribeScalingPoliciesOutput

type DescribeScalingPoliciesOutput struct {

	// The token required to get the next set of results. This value is null if
	// there are no more results to return.
	NextToken *string `type:"string"`

	// Information about the scaling policies.
	ScalingPolicies []ScalingPolicy `type:"list"`
	// contains filtered or unexported fields
}

func (DescribeScalingPoliciesOutput) String

String returns the string representation

type DescribeScalingPoliciesPaginator added in v0.9.0

type DescribeScalingPoliciesPaginator struct {
	aws.Pager
}

DescribeScalingPoliciesPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewDescribeScalingPoliciesPaginator added in v0.9.0

func NewDescribeScalingPoliciesPaginator(req DescribeScalingPoliciesRequest) DescribeScalingPoliciesPaginator

NewDescribeScalingPoliciesRequestPaginator returns a paginator for DescribeScalingPolicies. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.DescribeScalingPoliciesRequest(input)
p := applicationautoscaling.NewDescribeScalingPoliciesRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*DescribeScalingPoliciesPaginator) CurrentPage added in v0.9.0

type DescribeScalingPoliciesRequest

type DescribeScalingPoliciesRequest struct {
	*aws.Request
	Input *DescribeScalingPoliciesInput
	Copy  func(*DescribeScalingPoliciesInput) DescribeScalingPoliciesRequest
}

DescribeScalingPoliciesRequest is the request type for the DescribeScalingPolicies API operation.

func (DescribeScalingPoliciesRequest) Send

Send marshals and sends the DescribeScalingPolicies API request.

type DescribeScalingPoliciesResponse added in v0.9.0

type DescribeScalingPoliciesResponse struct {
	*DescribeScalingPoliciesOutput
	// contains filtered or unexported fields
}

DescribeScalingPoliciesResponse is the response type for the DescribeScalingPolicies API operation.

func (*DescribeScalingPoliciesResponse) SDKResponseMetdata added in v0.9.0

func (r *DescribeScalingPoliciesResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeScalingPolicies request.

type DescribeScheduledActionsInput added in v0.2.0

type DescribeScheduledActionsInput struct {

	// The maximum number of scheduled action results. This value can be between
	// 1 and 50. The default value is 50.
	//
	// If this parameter is used, the operation returns up to MaxResults results
	// at a time, along with a NextToken value. To get the next set of results,
	// include the NextToken value in a subsequent call. If this parameter is not
	// used, the operation returns up to 50 results and a NextToken value, if applicable.
	MaxResults *int64 `type:"integer"`

	// The token for the next set of results.
	NextToken *string `type:"string"`

	// The identifier of the resource associated with the scheduled action. This
	// string consists of the resource type and unique identifier. If you specify
	// a scalable dimension, you must also specify a resource ID.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	ResourceId *string `min:"1" type:"string"`

	// The scalable dimension. This string consists of the service namespace, resource
	// type, and scaling property. If you specify a scalable dimension, you must
	// also specify a resource ID.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	ScalableDimension ScalableDimension `type:"string" enum:"true"`

	// The names of the scheduled actions to describe.
	ScheduledActionNames []string `type:"list"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

func (DescribeScheduledActionsInput) String added in v0.2.0

String returns the string representation

func (*DescribeScheduledActionsInput) Validate added in v0.2.0

func (s *DescribeScheduledActionsInput) Validate() error

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

type DescribeScheduledActionsOutput added in v0.2.0

type DescribeScheduledActionsOutput struct {

	// The token required to get the next set of results. This value is null if
	// there are no more results to return.
	NextToken *string `type:"string"`

	// Information about the scheduled actions.
	ScheduledActions []ScheduledAction `type:"list"`
	// contains filtered or unexported fields
}

func (DescribeScheduledActionsOutput) String added in v0.2.0

String returns the string representation

type DescribeScheduledActionsPaginator added in v0.12.0

type DescribeScheduledActionsPaginator struct {
	aws.Pager
}

DescribeScheduledActionsPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewDescribeScheduledActionsPaginator added in v0.12.0

func NewDescribeScheduledActionsPaginator(req DescribeScheduledActionsRequest) DescribeScheduledActionsPaginator

NewDescribeScheduledActionsRequestPaginator returns a paginator for DescribeScheduledActions. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.DescribeScheduledActionsRequest(input)
p := applicationautoscaling.NewDescribeScheduledActionsRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*DescribeScheduledActionsPaginator) CurrentPage added in v0.12.0

type DescribeScheduledActionsRequest added in v0.2.0

type DescribeScheduledActionsRequest struct {
	*aws.Request
	Input *DescribeScheduledActionsInput
	Copy  func(*DescribeScheduledActionsInput) DescribeScheduledActionsRequest
}

DescribeScheduledActionsRequest is the request type for the DescribeScheduledActions API operation.

func (DescribeScheduledActionsRequest) Send added in v0.2.0

Send marshals and sends the DescribeScheduledActions API request.

type DescribeScheduledActionsResponse added in v0.9.0

type DescribeScheduledActionsResponse struct {
	*DescribeScheduledActionsOutput
	// contains filtered or unexported fields
}

DescribeScheduledActionsResponse is the response type for the DescribeScheduledActions API operation.

func (*DescribeScheduledActionsResponse) SDKResponseMetdata added in v0.9.0

func (r *DescribeScheduledActionsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeScheduledActions request.

type MetricAggregationType

type MetricAggregationType string
const (
	MetricAggregationTypeAverage MetricAggregationType = "Average"
	MetricAggregationTypeMinimum MetricAggregationType = "Minimum"
	MetricAggregationTypeMaximum MetricAggregationType = "Maximum"
)

Enum values for MetricAggregationType

func (MetricAggregationType) MarshalValue added in v0.3.0

func (enum MetricAggregationType) MarshalValue() (string, error)

func (MetricAggregationType) MarshalValueBuf added in v0.3.0

func (enum MetricAggregationType) MarshalValueBuf(b []byte) ([]byte, error)

type MetricDimension

type MetricDimension struct {

	// The name of the dimension.
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`

	// The value of the dimension.
	//
	// Value is a required field
	Value *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Describes the dimension names and values associated with a metric.

func (MetricDimension) String

func (s MetricDimension) String() string

String returns the string representation

func (*MetricDimension) Validate

func (s *MetricDimension) Validate() error

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

type MetricStatistic

type MetricStatistic string
const (
	MetricStatisticAverage     MetricStatistic = "Average"
	MetricStatisticMinimum     MetricStatistic = "Minimum"
	MetricStatisticMaximum     MetricStatistic = "Maximum"
	MetricStatisticSampleCount MetricStatistic = "SampleCount"
	MetricStatisticSum         MetricStatistic = "Sum"
)

Enum values for MetricStatistic

func (MetricStatistic) MarshalValue added in v0.3.0

func (enum MetricStatistic) MarshalValue() (string, error)

func (MetricStatistic) MarshalValueBuf added in v0.3.0

func (enum MetricStatistic) MarshalValueBuf(b []byte) ([]byte, error)

type MetricType

type MetricType string
const (
	MetricTypeDynamoDbreadCapacityUtilization          MetricType = "DynamoDBReadCapacityUtilization"
	MetricTypeDynamoDbwriteCapacityUtilization         MetricType = "DynamoDBWriteCapacityUtilization"
	MetricTypeAlbrequestCountPerTarget                 MetricType = "ALBRequestCountPerTarget"
	MetricTypeRdsreaderAverageCpuutilization           MetricType = "RDSReaderAverageCPUUtilization"
	MetricTypeRdsreaderAverageDatabaseConnections      MetricType = "RDSReaderAverageDatabaseConnections"
	MetricTypeEc2spotFleetRequestAverageCpuutilization MetricType = "EC2SpotFleetRequestAverageCPUUtilization"
	MetricTypeEc2spotFleetRequestAverageNetworkIn      MetricType = "EC2SpotFleetRequestAverageNetworkIn"
	MetricTypeEc2spotFleetRequestAverageNetworkOut     MetricType = "EC2SpotFleetRequestAverageNetworkOut"
	MetricTypeSageMakerVariantInvocationsPerInstance   MetricType = "SageMakerVariantInvocationsPerInstance"
	MetricTypeEcsserviceAverageCpuutilization          MetricType = "ECSServiceAverageCPUUtilization"
	MetricTypeEcsserviceAverageMemoryUtilization       MetricType = "ECSServiceAverageMemoryUtilization"
)

Enum values for MetricType

func (MetricType) MarshalValue added in v0.3.0

func (enum MetricType) MarshalValue() (string, error)

func (MetricType) MarshalValueBuf added in v0.3.0

func (enum MetricType) MarshalValueBuf(b []byte) ([]byte, error)

type PolicyType

type PolicyType string
const (
	PolicyTypeStepScaling           PolicyType = "StepScaling"
	PolicyTypeTargetTrackingScaling PolicyType = "TargetTrackingScaling"
)

Enum values for PolicyType

func (PolicyType) MarshalValue added in v0.3.0

func (enum PolicyType) MarshalValue() (string, error)

func (PolicyType) MarshalValueBuf added in v0.3.0

func (enum PolicyType) MarshalValueBuf(b []byte) ([]byte, error)

type PredefinedMetricSpecification

type PredefinedMetricSpecification struct {

	// The metric type. The ALBRequestCountPerTarget metric type applies only to
	// Spot Fleet requests and ECS services.
	//
	// PredefinedMetricType is a required field
	PredefinedMetricType MetricType `type:"string" required:"true" enum:"true"`

	// Identifies the resource associated with the metric type. You can't specify
	// a resource label unless the metric type is ALBRequestCountPerTarget and there
	// is a target group attached to the Spot Fleet request or ECS service.
	//
	// The format is app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>,
	// where:
	//
	//    * app/<load-balancer-name>/<load-balancer-id> is the final portion of
	//    the load balancer ARN
	//
	//    * targetgroup/<target-group-name>/<target-group-id> is the final portion
	//    of the target group ARN.
	ResourceLabel *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

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

func (PredefinedMetricSpecification) String

String returns the string representation

func (*PredefinedMetricSpecification) Validate

func (s *PredefinedMetricSpecification) Validate() error

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

type PutScalingPolicyInput

type PutScalingPolicyInput struct {

	// The name of the scaling policy.
	//
	// PolicyName is a required field
	PolicyName *string `min:"1" type:"string" required:"true"`

	// The policy type. This parameter is required if you are creating a scaling
	// policy.
	//
	// The following policy types are supported:
	//
	// TargetTrackingScaling—Not supported for Amazon EMR or AppStream
	//
	// StepScaling—Not supported for Amazon DynamoDB
	//
	// For more information, see Target Tracking Scaling Policies (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html)
	// and Step Scaling Policies (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html)
	// in the Application Auto Scaling User Guide.
	PolicyType PolicyType `type:"string" enum:"true"`

	// The identifier of the resource associated with the scaling policy. This string
	// consists of the resource type and unique identifier.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	//
	// ResourceId is a required field
	ResourceId *string `min:"1" type:"string" required:"true"`

	// The scalable dimension. This string consists of the service namespace, resource
	// type, and scaling property.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	//
	// ScalableDimension is a required field
	ScalableDimension ScalableDimension `type:"string" required:"true" enum:"true"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`

	// A step scaling policy.
	//
	// This parameter is required if you are creating a policy and the policy type
	// is StepScaling.
	StepScalingPolicyConfiguration *StepScalingPolicyConfiguration `type:"structure"`

	// A target tracking scaling policy. Includes support for predefined or customized
	// metrics.
	//
	// This parameter is required if you are creating a policy and the policy type
	// is TargetTrackingScaling.
	TargetTrackingScalingPolicyConfiguration *TargetTrackingScalingPolicyConfiguration `type:"structure"`
	// contains filtered or unexported fields
}

func (PutScalingPolicyInput) String

func (s PutScalingPolicyInput) String() string

String returns the string representation

func (*PutScalingPolicyInput) Validate

func (s *PutScalingPolicyInput) Validate() error

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

type PutScalingPolicyOutput

type PutScalingPolicyOutput struct {

	// The CloudWatch alarms created for the target tracking scaling policy.
	Alarms []Alarm `type:"list"`

	// The Amazon Resource Name (ARN) of the resulting scaling policy.
	//
	// PolicyARN is a required field
	PolicyARN *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (PutScalingPolicyOutput) String

func (s PutScalingPolicyOutput) String() string

String returns the string representation

type PutScalingPolicyRequest

type PutScalingPolicyRequest struct {
	*aws.Request
	Input *PutScalingPolicyInput
	Copy  func(*PutScalingPolicyInput) PutScalingPolicyRequest
}

PutScalingPolicyRequest is the request type for the PutScalingPolicy API operation.

func (PutScalingPolicyRequest) Send

Send marshals and sends the PutScalingPolicy API request.

type PutScalingPolicyResponse added in v0.9.0

type PutScalingPolicyResponse struct {
	*PutScalingPolicyOutput
	// contains filtered or unexported fields
}

PutScalingPolicyResponse is the response type for the PutScalingPolicy API operation.

func (*PutScalingPolicyResponse) SDKResponseMetdata added in v0.9.0

func (r *PutScalingPolicyResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the PutScalingPolicy request.

type PutScheduledActionInput added in v0.2.0

type PutScheduledActionInput struct {

	// The date and time for the scheduled action to end.
	EndTime *time.Time `type:"timestamp"`

	// The identifier of the resource associated with the scheduled action. This
	// string consists of the resource type and unique identifier.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	//
	// ResourceId is a required field
	ResourceId *string `min:"1" type:"string" required:"true"`

	// The scalable dimension. This string consists of the service namespace, resource
	// type, and scaling property.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	//
	// ScalableDimension is a required field
	ScalableDimension ScalableDimension `type:"string" required:"true" enum:"true"`

	// The new minimum and maximum capacity. You can set both values or just one.
	// During the scheduled time, if the current capacity is below the minimum capacity,
	// Application Auto Scaling scales out to the minimum capacity. If the current
	// capacity is above the maximum capacity, Application Auto Scaling scales in
	// to the maximum capacity.
	ScalableTargetAction *ScalableTargetAction `type:"structure"`

	// The schedule for this action. The following formats are supported:
	//
	//    * At expressions - "at(yyyy-mm-ddThh:mm:ss)"
	//
	//    * Rate expressions - "rate(value unit)"
	//
	//    * Cron expressions - "cron(fields)"
	//
	// At expressions are useful for one-time schedules. Specify the time, in UTC.
	//
	// For rate expressions, value is a positive integer and unit is minute | minutes
	// | hour | hours | day | days.
	//
	// For more information about cron expressions, see Cron Expressions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions)
	// in the Amazon CloudWatch Events User Guide.
	Schedule *string `min:"1" type:"string"`

	// The name of the scheduled action.
	//
	// ScheduledActionName is a required field
	ScheduledActionName *string `min:"1" type:"string" required:"true"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`

	// The date and time for the scheduled action to start.
	StartTime *time.Time `type:"timestamp"`
	// contains filtered or unexported fields
}

func (PutScheduledActionInput) String added in v0.2.0

func (s PutScheduledActionInput) String() string

String returns the string representation

func (*PutScheduledActionInput) Validate added in v0.2.0

func (s *PutScheduledActionInput) Validate() error

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

type PutScheduledActionOutput added in v0.2.0

type PutScheduledActionOutput struct {
	// contains filtered or unexported fields
}

func (PutScheduledActionOutput) String added in v0.2.0

func (s PutScheduledActionOutput) String() string

String returns the string representation

type PutScheduledActionRequest added in v0.2.0

type PutScheduledActionRequest struct {
	*aws.Request
	Input *PutScheduledActionInput
	Copy  func(*PutScheduledActionInput) PutScheduledActionRequest
}

PutScheduledActionRequest is the request type for the PutScheduledAction API operation.

func (PutScheduledActionRequest) Send added in v0.2.0

Send marshals and sends the PutScheduledAction API request.

type PutScheduledActionResponse added in v0.9.0

type PutScheduledActionResponse struct {
	*PutScheduledActionOutput
	// contains filtered or unexported fields
}

PutScheduledActionResponse is the response type for the PutScheduledAction API operation.

func (*PutScheduledActionResponse) SDKResponseMetdata added in v0.9.0

func (r *PutScheduledActionResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the PutScheduledAction request.

type RegisterScalableTargetInput

type RegisterScalableTargetInput struct {

	// The maximum value to scale to in response to a scale-out event. MaxCapacity
	// is required to register a scalable target.
	MaxCapacity *int64 `type:"integer"`

	// The minimum value to scale to in response to a scale-in event. MinCapacity
	// is required to register a scalable target.
	MinCapacity *int64 `type:"integer"`

	// The identifier of the resource that is associated with the scalable target.
	// This string consists of the resource type and unique identifier.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	//
	// ResourceId is a required field
	ResourceId *string `min:"1" type:"string" required:"true"`

	// Application Auto Scaling creates a service-linked role that grants it permissions
	// to modify the scalable target on your behalf. For more information, see Service-Linked
	// Roles for Application Auto Scaling (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-service-linked-roles.html).
	//
	// For Amazon EMR, this parameter is required, and it must specify the ARN of
	// an IAM role that allows Application Auto Scaling to modify the scalable target
	// on your behalf.
	RoleARN *string `min:"1" type:"string"`

	// The scalable dimension associated with the scalable target. This string consists
	// of the service namespace, resource type, and scaling property.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	//
	// ScalableDimension is a required field
	ScalableDimension ScalableDimension `type:"string" required:"true" enum:"true"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`

	// An embedded object that contains attributes and attribute values that are
	// used to suspend and resume automatic scaling. Setting the value of an attribute
	// to true suspends the specified scaling activities. Setting it to false (default)
	// resumes the specified scaling activities.
	//
	// Suspension Outcomes
	//
	//    * For DynamicScalingInSuspended, while a suspension is in effect, all
	//    scale-in activities that are triggered by a scaling policy are suspended.
	//
	//    * For DynamicScalingOutSuspended, while a suspension is in effect, all
	//    scale-out activities that are triggered by a scaling policy are suspended.
	//
	//    * For ScheduledScalingSuspended, while a suspension is in effect, all
	//    scaling activities that involve scheduled actions are suspended.
	//
	// For more information, see Suspend and Resume Application Auto Scaling (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-suspend-resume-scaling.html)
	// in the Application Auto Scaling User Guide.
	SuspendedState *SuspendedState `type:"structure"`
	// contains filtered or unexported fields
}

func (RegisterScalableTargetInput) String

String returns the string representation

func (*RegisterScalableTargetInput) Validate

func (s *RegisterScalableTargetInput) Validate() error

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

type RegisterScalableTargetOutput

type RegisterScalableTargetOutput struct {
	// contains filtered or unexported fields
}

func (RegisterScalableTargetOutput) String

String returns the string representation

type RegisterScalableTargetRequest

type RegisterScalableTargetRequest struct {
	*aws.Request
	Input *RegisterScalableTargetInput
	Copy  func(*RegisterScalableTargetInput) RegisterScalableTargetRequest
}

RegisterScalableTargetRequest is the request type for the RegisterScalableTarget API operation.

func (RegisterScalableTargetRequest) Send

Send marshals and sends the RegisterScalableTarget API request.

type RegisterScalableTargetResponse added in v0.9.0

type RegisterScalableTargetResponse struct {
	*RegisterScalableTargetOutput
	// contains filtered or unexported fields
}

RegisterScalableTargetResponse is the response type for the RegisterScalableTarget API operation.

func (*RegisterScalableTargetResponse) SDKResponseMetdata added in v0.9.0

func (r *RegisterScalableTargetResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the RegisterScalableTarget request.

type ScalableDimension

type ScalableDimension string
const (
	ScalableDimensionEcsServiceDesiredCount                     ScalableDimension = "ecs:service:DesiredCount"
	ScalableDimensionEc2SpotFleetRequestTargetCapacity          ScalableDimension = "ec2:spot-fleet-request:TargetCapacity"
	ScalableDimensionElasticmapreduceInstancegroupInstanceCount ScalableDimension = "elasticmapreduce:instancegroup:InstanceCount"
	ScalableDimensionAppstreamFleetDesiredCapacity              ScalableDimension = "appstream:fleet:DesiredCapacity"
	ScalableDimensionDynamodbTableReadCapacityUnits             ScalableDimension = "dynamodb:table:ReadCapacityUnits"
	ScalableDimensionDynamodbTableWriteCapacityUnits            ScalableDimension = "dynamodb:table:WriteCapacityUnits"
	ScalableDimensionDynamodbIndexReadCapacityUnits             ScalableDimension = "dynamodb:index:ReadCapacityUnits"
	ScalableDimensionDynamodbIndexWriteCapacityUnits            ScalableDimension = "dynamodb:index:WriteCapacityUnits"
	ScalableDimensionRdsClusterReadReplicaCount                 ScalableDimension = "rds:cluster:ReadReplicaCount"
	ScalableDimensionSagemakerVariantDesiredInstanceCount       ScalableDimension = "sagemaker:variant:DesiredInstanceCount"
	ScalableDimensionCustomResourceResourceTypeProperty         ScalableDimension = "custom-resource:ResourceType:Property"
)

Enum values for ScalableDimension

func (ScalableDimension) MarshalValue added in v0.3.0

func (enum ScalableDimension) MarshalValue() (string, error)

func (ScalableDimension) MarshalValueBuf added in v0.3.0

func (enum ScalableDimension) MarshalValueBuf(b []byte) ([]byte, error)

type ScalableTarget

type ScalableTarget struct {

	// The Unix timestamp for when the scalable target was created.
	//
	// CreationTime is a required field
	CreationTime *time.Time `type:"timestamp" required:"true"`

	// The maximum value to scale to in response to a scale-out event.
	//
	// MaxCapacity is a required field
	MaxCapacity *int64 `type:"integer" required:"true"`

	// The minimum value to scale to in response to a scale-in event.
	//
	// MinCapacity is a required field
	MinCapacity *int64 `type:"integer" required:"true"`

	// The identifier of the resource associated with the scalable target. This
	// string consists of the resource type and unique identifier.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	//
	// ResourceId is a required field
	ResourceId *string `min:"1" type:"string" required:"true"`

	// The ARN of an IAM role that allows Application Auto Scaling to modify the
	// scalable target on your behalf.
	//
	// RoleARN is a required field
	RoleARN *string `min:"1" type:"string" required:"true"`

	// The scalable dimension associated with the scalable target. This string consists
	// of the service namespace, resource type, and scaling property.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	//
	// ScalableDimension is a required field
	ScalableDimension ScalableDimension `type:"string" required:"true" enum:"true"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`

	// Specifies whether the scaling activities for a scalable target are in a suspended
	// state.
	SuspendedState *SuspendedState `type:"structure"`
	// contains filtered or unexported fields
}

Represents a scalable target.

func (ScalableTarget) String

func (s ScalableTarget) String() string

String returns the string representation

type ScalableTargetAction added in v0.2.0

type ScalableTargetAction struct {

	// The maximum capacity.
	MaxCapacity *int64 `type:"integer"`

	// The minimum capacity.
	MinCapacity *int64 `type:"integer"`
	// contains filtered or unexported fields
}

Represents the minimum and maximum capacity for a scheduled action.

func (ScalableTargetAction) String added in v0.2.0

func (s ScalableTargetAction) String() string

String returns the string representation

type ScalingActivity

type ScalingActivity struct {

	// The unique identifier of the scaling activity.
	//
	// ActivityId is a required field
	ActivityId *string `type:"string" required:"true"`

	// A simple description of what caused the scaling activity to happen.
	//
	// Cause is a required field
	Cause *string `type:"string" required:"true"`

	// A simple description of what action the scaling activity intends to accomplish.
	//
	// Description is a required field
	Description *string `type:"string" required:"true"`

	// The details about the scaling activity.
	Details *string `type:"string"`

	// The Unix timestamp for when the scaling activity ended.
	EndTime *time.Time `type:"timestamp"`

	// The identifier of the resource associated with the scaling activity. This
	// string consists of the resource type and unique identifier.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	//
	// ResourceId is a required field
	ResourceId *string `min:"1" type:"string" required:"true"`

	// The scalable dimension. This string consists of the service namespace, resource
	// type, and scaling property.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	//
	// ScalableDimension is a required field
	ScalableDimension ScalableDimension `type:"string" required:"true" enum:"true"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`

	// The Unix timestamp for when the scaling activity began.
	//
	// StartTime is a required field
	StartTime *time.Time `type:"timestamp" required:"true"`

	// Indicates the status of the scaling activity.
	//
	// StatusCode is a required field
	StatusCode ScalingActivityStatusCode `type:"string" required:"true" enum:"true"`

	// A simple message about the current status of the scaling activity.
	StatusMessage *string `type:"string"`
	// contains filtered or unexported fields
}

Represents a scaling activity.

func (ScalingActivity) String

func (s ScalingActivity) String() string

String returns the string representation

type ScalingActivityStatusCode

type ScalingActivityStatusCode string
const (
	ScalingActivityStatusCodePending     ScalingActivityStatusCode = "Pending"
	ScalingActivityStatusCodeInProgress  ScalingActivityStatusCode = "InProgress"
	ScalingActivityStatusCodeSuccessful  ScalingActivityStatusCode = "Successful"
	ScalingActivityStatusCodeOverridden  ScalingActivityStatusCode = "Overridden"
	ScalingActivityStatusCodeUnfulfilled ScalingActivityStatusCode = "Unfulfilled"
	ScalingActivityStatusCodeFailed      ScalingActivityStatusCode = "Failed"
)

Enum values for ScalingActivityStatusCode

func (ScalingActivityStatusCode) MarshalValue added in v0.3.0

func (enum ScalingActivityStatusCode) MarshalValue() (string, error)

func (ScalingActivityStatusCode) MarshalValueBuf added in v0.3.0

func (enum ScalingActivityStatusCode) MarshalValueBuf(b []byte) ([]byte, error)

type ScalingPolicy

type ScalingPolicy struct {

	// The CloudWatch alarms associated with the scaling policy.
	Alarms []Alarm `type:"list"`

	// The Unix timestamp for when the scaling policy was created.
	//
	// CreationTime is a required field
	CreationTime *time.Time `type:"timestamp" required:"true"`

	// The Amazon Resource Name (ARN) of the scaling policy.
	//
	// PolicyARN is a required field
	PolicyARN *string `min:"1" type:"string" required:"true"`

	// The name of the scaling policy.
	//
	// PolicyName is a required field
	PolicyName *string `min:"1" type:"string" required:"true"`

	// The scaling policy type.
	//
	// PolicyType is a required field
	PolicyType PolicyType `type:"string" required:"true" enum:"true"`

	// The identifier of the resource associated with the scaling policy. This string
	// consists of the resource type and unique identifier.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	//
	// ResourceId is a required field
	ResourceId *string `min:"1" type:"string" required:"true"`

	// The scalable dimension. This string consists of the service namespace, resource
	// type, and scaling property.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	//
	// ScalableDimension is a required field
	ScalableDimension ScalableDimension `type:"string" required:"true" enum:"true"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`

	// A step scaling policy.
	StepScalingPolicyConfiguration *StepScalingPolicyConfiguration `type:"structure"`

	// A target tracking scaling policy.
	TargetTrackingScalingPolicyConfiguration *TargetTrackingScalingPolicyConfiguration `type:"structure"`
	// contains filtered or unexported fields
}

Represents a scaling policy to use with Application Auto Scaling.

func (ScalingPolicy) String

func (s ScalingPolicy) String() string

String returns the string representation

type ScheduledAction added in v0.2.0

type ScheduledAction struct {

	// The date and time that the scheduled action was created.
	//
	// CreationTime is a required field
	CreationTime *time.Time `type:"timestamp" required:"true"`

	// The date and time that the action is scheduled to end.
	EndTime *time.Time `type:"timestamp"`

	// The identifier of the resource associated with the scaling policy. This string
	// consists of the resource type and unique identifier.
	//
	//    * ECS service - The resource type is service and the unique identifier
	//    is the cluster name and service name. Example: service/default/sample-webapp.
	//
	//    * Spot Fleet request - The resource type is spot-fleet-request and the
	//    unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE.
	//
	//    * EMR cluster - The resource type is instancegroup and the unique identifier
	//    is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
	//
	//    * AppStream 2.0 fleet - The resource type is fleet and the unique identifier
	//    is the fleet name. Example: fleet/sample-fleet.
	//
	//    * DynamoDB table - The resource type is table and the unique identifier
	//    is the resource ID. Example: table/my-table.
	//
	//    * DynamoDB global secondary index - The resource type is index and the
	//    unique identifier is the resource ID. Example: table/my-table/index/my-table-index.
	//
	//    * Aurora DB cluster - The resource type is cluster and the unique identifier
	//    is the cluster name. Example: cluster:my-db-cluster.
	//
	//    * Amazon SageMaker endpoint variants - The resource type is variant and
	//    the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
	//
	//    * Custom resources are not supported with a resource type. This parameter
	//    must specify the OutputValue from the CloudFormation template stack used
	//    to access the resources. The unique identifier is defined by the service
	//    provider. More information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource).
	//
	// ResourceId is a required field
	ResourceId *string `min:"1" type:"string" required:"true"`

	// The scalable dimension. This string consists of the service namespace, resource
	// type, and scaling property.
	//
	//    * ecs:service:DesiredCount - The desired task count of an ECS service.
	//
	//    * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot
	//    Fleet request.
	//
	//    * elasticmapreduce:instancegroup:InstanceCount - The instance count of
	//    an EMR Instance Group.
	//
	//    * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream
	//    2.0 fleet.
	//
	//    * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB table.
	//
	//    * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for
	//    a DynamoDB global secondary index.
	//
	//    * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for
	//    a DynamoDB global secondary index.
	//
	//    * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora
	//    DB cluster. Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible
	//    edition.
	//
	//    * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances
	//    for an Amazon SageMaker model endpoint variant.
	//
	//    * custom-resource:ResourceType:Property - The scalable dimension for a
	//    custom resource provided by your own application or service.
	ScalableDimension ScalableDimension `type:"string" enum:"true"`

	// The new minimum and maximum capacity. You can set both values or just one.
	// During the scheduled time, if the current capacity is below the minimum capacity,
	// Application Auto Scaling scales out to the minimum capacity. If the current
	// capacity is above the maximum capacity, Application Auto Scaling scales in
	// to the maximum capacity.
	ScalableTargetAction *ScalableTargetAction `type:"structure"`

	// The schedule for this action. The following formats are supported:
	//
	//    * At expressions - "at(yyyy-mm-ddThh:mm:ss)"
	//
	//    * Rate expressions - "rate(value unit)"
	//
	//    * Cron expressions - "cron(fields)"
	//
	// At expressions are useful for one-time schedules. Specify the time, in UTC.
	//
	// For rate expressions, value is a positive integer and unit is minute | minutes
	// | hour | hours | day | days.
	//
	// For more information about cron expressions, see Cron Expressions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions)
	// in the Amazon CloudWatch Events User Guide.
	//
	// Schedule is a required field
	Schedule *string `min:"1" type:"string" required:"true"`

	// The Amazon Resource Name (ARN) of the scheduled action.
	//
	// ScheduledActionARN is a required field
	ScheduledActionARN *string `min:"1" type:"string" required:"true"`

	// The name of the scheduled action.
	//
	// ScheduledActionName is a required field
	ScheduledActionName *string `min:"1" type:"string" required:"true"`

	// The namespace of the AWS service that provides the resource or custom-resource
	// for a resource provided by your own application or service. For more information,
	// see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces)
	// in the Amazon Web Services General Reference.
	//
	// ServiceNamespace is a required field
	ServiceNamespace ServiceNamespace `type:"string" required:"true" enum:"true"`

	// The date and time that the action is scheduled to begin.
	StartTime *time.Time `type:"timestamp"`
	// contains filtered or unexported fields
}

Represents a scheduled action.

func (ScheduledAction) String added in v0.2.0

func (s ScheduledAction) String() string

String returns the string representation

type ServiceNamespace

type ServiceNamespace string
const (
	ServiceNamespaceEcs              ServiceNamespace = "ecs"
	ServiceNamespaceElasticmapreduce ServiceNamespace = "elasticmapreduce"
	ServiceNamespaceEc2              ServiceNamespace = "ec2"
	ServiceNamespaceAppstream        ServiceNamespace = "appstream"
	ServiceNamespaceDynamodb         ServiceNamespace = "dynamodb"
	ServiceNamespaceRds              ServiceNamespace = "rds"
	ServiceNamespaceSagemaker        ServiceNamespace = "sagemaker"
	ServiceNamespaceCustomResource   ServiceNamespace = "custom-resource"
)

Enum values for ServiceNamespace

func (ServiceNamespace) MarshalValue added in v0.3.0

func (enum ServiceNamespace) MarshalValue() (string, error)

func (ServiceNamespace) MarshalValueBuf added in v0.3.0

func (enum ServiceNamespace) MarshalValueBuf(b []byte) ([]byte, error)

type StepAdjustment

type StepAdjustment struct {

	// The lower bound for the difference between the alarm threshold and the CloudWatch
	// metric. If the metric value is above the breach threshold, the lower bound
	// is inclusive (the metric must be greater than or equal to the threshold plus
	// the lower bound). Otherwise, it is exclusive (the metric must be greater
	// than the threshold plus the lower bound). A null value indicates negative
	// infinity.
	MetricIntervalLowerBound *float64 `type:"double"`

	// The upper bound for the difference between the alarm threshold and the CloudWatch
	// metric. If the metric value is above the breach threshold, the upper bound
	// is exclusive (the metric must be less than the threshold plus the upper bound).
	// Otherwise, it is inclusive (the metric must be less than or equal to the
	// threshold plus the upper bound). A null value indicates positive infinity.
	//
	// The upper bound must be greater than the lower bound.
	MetricIntervalUpperBound *float64 `type:"double"`

	// The amount by which to scale, based on the specified adjustment type. A positive
	// value adds to the current scalable dimension while a negative number removes
	// from the current scalable dimension.
	//
	// ScalingAdjustment is a required field
	ScalingAdjustment *int64 `type:"integer" required:"true"`
	// contains filtered or unexported fields
}

Represents a step adjustment for a StepScalingPolicyConfiguration. Describes an adjustment based on the difference between the value of the aggregated CloudWatch metric and the breach threshold that you've defined for the alarm.

For the following examples, suppose that you have an alarm with a breach threshold of 50:

  • To trigger the adjustment when the metric is greater than or equal to 50 and less than 60, specify a lower bound of 0 and an upper bound of 10.

  • To trigger the adjustment when the metric is greater than 40 and less than or equal to 50, specify a lower bound of -10 and an upper bound of 0.

There are a few rules for the step adjustments for your step policy:

  • The ranges of your step adjustments can't overlap or have a gap.

  • At most one step adjustment can have a null lower bound. If one step adjustment has a negative lower bound, then there must be a step adjustment with a null lower bound.

  • At most one step adjustment can have a null upper bound. If one step adjustment has a positive upper bound, then there must be a step adjustment with a null upper bound.

  • The upper and lower bound can't be null in the same step adjustment.

func (StepAdjustment) String

func (s StepAdjustment) String() string

String returns the string representation

func (*StepAdjustment) Validate

func (s *StepAdjustment) Validate() error

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

type StepScalingPolicyConfiguration

type StepScalingPolicyConfiguration struct {

	// Specifies whether the ScalingAdjustment value in a StepAdjustment is an absolute
	// number or a percentage of the current capacity.
	AdjustmentType AdjustmentType `type:"string" enum:"true"`

	// The amount of time, in seconds, after a scaling activity completes where
	// previous trigger-related scaling activities can influence future scaling
	// events.
	//
	// For scale-out policies, 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. For example,
	// an alarm triggers a step scaling policy to scale out an Amazon ECS service
	// by 2 tasks, the scaling activity completes successfully, and a cooldown period
	// of 5 minutes starts. During the cooldown period, if the alarm triggers the
	// same policy again but at a more aggressive step adjustment to scale out the
	// service by 3 tasks, the 2 tasks that were added in the previous scale-out
	// event are considered part of that capacity and only 1 additional task is
	// added to the desired count.
	//
	// For scale-in policies, 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.
	Cooldown *int64 `type:"integer"`

	// The aggregation type for the CloudWatch metrics. Valid values are Minimum,
	// Maximum, and Average. If the aggregation type is null, the value is treated
	// as Average.
	MetricAggregationType MetricAggregationType `type:"string" enum:"true"`

	// The minimum number to adjust your scalable dimension as a result of a scaling
	// activity. If the adjustment type is PercentChangeInCapacity, the scaling
	// policy changes the scalable dimension of the scalable target by this amount.
	//
	// For example, suppose that you create a step scaling policy to scale out an
	// Amazon ECS service by 25 percent and you specify a MinAdjustmentMagnitude
	// of 2. If the service has 4 tasks and the scaling policy is performed, 25
	// percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude
	// of 2, Application Auto Scaling scales out the service by 2 tasks.
	MinAdjustmentMagnitude *int64 `type:"integer"`

	// A set of adjustments that enable you to scale based on the size of the alarm
	// breach.
	StepAdjustments []StepAdjustment `type:"list"`
	// contains filtered or unexported fields
}

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

func (StepScalingPolicyConfiguration) String

String returns the string representation

func (*StepScalingPolicyConfiguration) Validate

func (s *StepScalingPolicyConfiguration) Validate() error

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

type SuspendedState added in v0.12.0

type SuspendedState struct {

	// Whether scale in by a target tracking scaling policy or a step scaling policy
	// is suspended. Set the value to true if you don't want Application Auto Scaling
	// to remove capacity when a scaling policy is triggered. The default is false.
	DynamicScalingInSuspended *bool `type:"boolean"`

	// Whether scale out by a target tracking scaling policy or a step scaling policy
	// is suspended. Set the value to true if you don't want Application Auto Scaling
	// to add capacity when a scaling policy is triggered. The default is false.
	DynamicScalingOutSuspended *bool `type:"boolean"`

	// Whether scheduled scaling is suspended. Set the value to true if you don't
	// want Application Auto Scaling to add or remove capacity by initiating scheduled
	// actions. The default is false.
	ScheduledScalingSuspended *bool `type:"boolean"`
	// contains filtered or unexported fields
}

Specifies whether the scaling activities for a scalable target are in a suspended state.

func (SuspendedState) String added in v0.12.0

func (s SuspendedState) String() string

String returns the string representation

type TargetTrackingScalingPolicyConfiguration

type TargetTrackingScalingPolicyConfiguration struct {

	// A customized metric. You can specify either a predefined metric or a customized
	// metric.
	CustomizedMetricSpecification *CustomizedMetricSpecification `type:"structure"`

	// 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.
	DisableScaleIn *bool `type:"boolean"`

	// A predefined metric. You can specify either a predefined metric or a customized
	// metric.
	PredefinedMetricSpecification *PredefinedMetricSpecification `type:"structure"`

	// 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.
	ScaleInCooldown *int64 `type:"integer"`

	// 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.
	ScaleOutCooldown *int64 `type:"integer"`

	// 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
	TargetValue *float64 `type:"double" required:"true"`
	// contains filtered or unexported fields
}

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

func (TargetTrackingScalingPolicyConfiguration) String

String returns the string representation

func (*TargetTrackingScalingPolicyConfiguration) Validate

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

Directories

Path Synopsis
Package applicationautoscalingiface provides an interface to enable mocking the Application Auto Scaling service client for testing your code.
Package applicationautoscalingiface provides an interface to enable mocking the Application Auto Scaling service client for testing your code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL