Documentation ¶
Overview ¶
Package autoscaling provides the API client, operations, and parameter types for Auto Scaling.
Amazon EC2 Auto Scaling Amazon EC2 Auto Scaling is designed to automatically launch or terminate EC2 instances based on user-defined scaling policies, scheduled actions, and health checks. Use this service with AWS Auto Scaling, Amazon CloudWatch, and Elastic Load Balancing. For more information, including information about granting IAM users required permissions for Amazon EC2 Auto Scaling actions, see the Amazon EC2 Auto Scaling User Guide (https://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html).
Index ¶
- Constants
- func NewDefaultEndpointResolver() *internalendpoints.Resolver
- type AttachInstancesInput
- type AttachInstancesOutput
- type AttachLoadBalancerTargetGroupsInput
- type AttachLoadBalancerTargetGroupsOutput
- type AttachLoadBalancersInput
- type AttachLoadBalancersOutput
- type BatchDeleteScheduledActionInput
- type BatchDeleteScheduledActionOutput
- type BatchPutScheduledUpdateGroupActionInput
- type BatchPutScheduledUpdateGroupActionOutput
- type CancelInstanceRefreshInput
- type CancelInstanceRefreshOutput
- type Client
- func (c *Client) AttachInstances(ctx context.Context, params *AttachInstancesInput, optFns ...func(*Options)) (*AttachInstancesOutput, error)
- func (c *Client) AttachLoadBalancerTargetGroups(ctx context.Context, params *AttachLoadBalancerTargetGroupsInput, ...) (*AttachLoadBalancerTargetGroupsOutput, error)
- func (c *Client) AttachLoadBalancers(ctx context.Context, params *AttachLoadBalancersInput, ...) (*AttachLoadBalancersOutput, error)
- func (c *Client) BatchDeleteScheduledAction(ctx context.Context, params *BatchDeleteScheduledActionInput, ...) (*BatchDeleteScheduledActionOutput, error)
- func (c *Client) BatchPutScheduledUpdateGroupAction(ctx context.Context, params *BatchPutScheduledUpdateGroupActionInput, ...) (*BatchPutScheduledUpdateGroupActionOutput, error)
- func (c *Client) CancelInstanceRefresh(ctx context.Context, params *CancelInstanceRefreshInput, ...) (*CancelInstanceRefreshOutput, error)
- func (c *Client) CompleteLifecycleAction(ctx context.Context, params *CompleteLifecycleActionInput, ...) (*CompleteLifecycleActionOutput, error)
- func (c *Client) CreateAutoScalingGroup(ctx context.Context, params *CreateAutoScalingGroupInput, ...) (*CreateAutoScalingGroupOutput, error)
- func (c *Client) CreateLaunchConfiguration(ctx context.Context, params *CreateLaunchConfigurationInput, ...) (*CreateLaunchConfigurationOutput, error)
- func (c *Client) CreateOrUpdateTags(ctx context.Context, params *CreateOrUpdateTagsInput, optFns ...func(*Options)) (*CreateOrUpdateTagsOutput, error)
- func (c *Client) DeleteAutoScalingGroup(ctx context.Context, params *DeleteAutoScalingGroupInput, ...) (*DeleteAutoScalingGroupOutput, error)
- func (c *Client) DeleteLaunchConfiguration(ctx context.Context, params *DeleteLaunchConfigurationInput, ...) (*DeleteLaunchConfigurationOutput, error)
- func (c *Client) DeleteLifecycleHook(ctx context.Context, params *DeleteLifecycleHookInput, ...) (*DeleteLifecycleHookOutput, error)
- func (c *Client) DeleteNotificationConfiguration(ctx context.Context, params *DeleteNotificationConfigurationInput, ...) (*DeleteNotificationConfigurationOutput, error)
- func (c *Client) DeletePolicy(ctx context.Context, params *DeletePolicyInput, optFns ...func(*Options)) (*DeletePolicyOutput, error)
- func (c *Client) DeleteScheduledAction(ctx context.Context, params *DeleteScheduledActionInput, ...) (*DeleteScheduledActionOutput, error)
- func (c *Client) DeleteTags(ctx context.Context, params *DeleteTagsInput, optFns ...func(*Options)) (*DeleteTagsOutput, error)
- func (c *Client) DescribeAccountLimits(ctx context.Context, params *DescribeAccountLimitsInput, ...) (*DescribeAccountLimitsOutput, error)
- func (c *Client) DescribeAdjustmentTypes(ctx context.Context, params *DescribeAdjustmentTypesInput, ...) (*DescribeAdjustmentTypesOutput, error)
- func (c *Client) DescribeAutoScalingGroups(ctx context.Context, params *DescribeAutoScalingGroupsInput, ...) (*DescribeAutoScalingGroupsOutput, error)
- func (c *Client) DescribeAutoScalingInstances(ctx context.Context, params *DescribeAutoScalingInstancesInput, ...) (*DescribeAutoScalingInstancesOutput, error)
- func (c *Client) DescribeAutoScalingNotificationTypes(ctx context.Context, params *DescribeAutoScalingNotificationTypesInput, ...) (*DescribeAutoScalingNotificationTypesOutput, error)
- func (c *Client) DescribeInstanceRefreshes(ctx context.Context, params *DescribeInstanceRefreshesInput, ...) (*DescribeInstanceRefreshesOutput, error)
- func (c *Client) DescribeLaunchConfigurations(ctx context.Context, params *DescribeLaunchConfigurationsInput, ...) (*DescribeLaunchConfigurationsOutput, error)
- func (c *Client) DescribeLifecycleHookTypes(ctx context.Context, params *DescribeLifecycleHookTypesInput, ...) (*DescribeLifecycleHookTypesOutput, error)
- func (c *Client) DescribeLifecycleHooks(ctx context.Context, params *DescribeLifecycleHooksInput, ...) (*DescribeLifecycleHooksOutput, error)
- func (c *Client) DescribeLoadBalancerTargetGroups(ctx context.Context, params *DescribeLoadBalancerTargetGroupsInput, ...) (*DescribeLoadBalancerTargetGroupsOutput, error)
- func (c *Client) DescribeLoadBalancers(ctx context.Context, params *DescribeLoadBalancersInput, ...) (*DescribeLoadBalancersOutput, error)
- func (c *Client) DescribeMetricCollectionTypes(ctx context.Context, params *DescribeMetricCollectionTypesInput, ...) (*DescribeMetricCollectionTypesOutput, error)
- func (c *Client) DescribeNotificationConfigurations(ctx context.Context, params *DescribeNotificationConfigurationsInput, ...) (*DescribeNotificationConfigurationsOutput, error)
- func (c *Client) DescribePolicies(ctx context.Context, params *DescribePoliciesInput, optFns ...func(*Options)) (*DescribePoliciesOutput, error)
- func (c *Client) DescribeScalingActivities(ctx context.Context, params *DescribeScalingActivitiesInput, ...) (*DescribeScalingActivitiesOutput, error)
- func (c *Client) DescribeScalingProcessTypes(ctx context.Context, params *DescribeScalingProcessTypesInput, ...) (*DescribeScalingProcessTypesOutput, error)
- func (c *Client) DescribeScheduledActions(ctx context.Context, params *DescribeScheduledActionsInput, ...) (*DescribeScheduledActionsOutput, error)
- func (c *Client) DescribeTags(ctx context.Context, params *DescribeTagsInput, optFns ...func(*Options)) (*DescribeTagsOutput, error)
- func (c *Client) DescribeTerminationPolicyTypes(ctx context.Context, params *DescribeTerminationPolicyTypesInput, ...) (*DescribeTerminationPolicyTypesOutput, error)
- func (c *Client) DetachInstances(ctx context.Context, params *DetachInstancesInput, optFns ...func(*Options)) (*DetachInstancesOutput, error)
- func (c *Client) DetachLoadBalancerTargetGroups(ctx context.Context, params *DetachLoadBalancerTargetGroupsInput, ...) (*DetachLoadBalancerTargetGroupsOutput, error)
- func (c *Client) DetachLoadBalancers(ctx context.Context, params *DetachLoadBalancersInput, ...) (*DetachLoadBalancersOutput, error)
- func (c *Client) DisableMetricsCollection(ctx context.Context, params *DisableMetricsCollectionInput, ...) (*DisableMetricsCollectionOutput, error)
- func (c *Client) EnableMetricsCollection(ctx context.Context, params *EnableMetricsCollectionInput, ...) (*EnableMetricsCollectionOutput, error)
- func (c *Client) EnterStandby(ctx context.Context, params *EnterStandbyInput, optFns ...func(*Options)) (*EnterStandbyOutput, error)
- func (c *Client) ExecutePolicy(ctx context.Context, params *ExecutePolicyInput, optFns ...func(*Options)) (*ExecutePolicyOutput, error)
- func (c *Client) ExitStandby(ctx context.Context, params *ExitStandbyInput, optFns ...func(*Options)) (*ExitStandbyOutput, error)
- func (c *Client) PutLifecycleHook(ctx context.Context, params *PutLifecycleHookInput, optFns ...func(*Options)) (*PutLifecycleHookOutput, error)
- func (c *Client) PutNotificationConfiguration(ctx context.Context, params *PutNotificationConfigurationInput, ...) (*PutNotificationConfigurationOutput, error)
- func (c *Client) PutScalingPolicy(ctx context.Context, params *PutScalingPolicyInput, optFns ...func(*Options)) (*PutScalingPolicyOutput, error)
- func (c *Client) PutScheduledUpdateGroupAction(ctx context.Context, params *PutScheduledUpdateGroupActionInput, ...) (*PutScheduledUpdateGroupActionOutput, error)
- func (c *Client) RecordLifecycleActionHeartbeat(ctx context.Context, params *RecordLifecycleActionHeartbeatInput, ...) (*RecordLifecycleActionHeartbeatOutput, error)
- func (c *Client) ResumeProcesses(ctx context.Context, params *ResumeProcessesInput, optFns ...func(*Options)) (*ResumeProcessesOutput, error)
- func (c *Client) SetDesiredCapacity(ctx context.Context, params *SetDesiredCapacityInput, optFns ...func(*Options)) (*SetDesiredCapacityOutput, error)
- func (c *Client) SetInstanceHealth(ctx context.Context, params *SetInstanceHealthInput, optFns ...func(*Options)) (*SetInstanceHealthOutput, error)
- func (c *Client) SetInstanceProtection(ctx context.Context, params *SetInstanceProtectionInput, ...) (*SetInstanceProtectionOutput, error)
- func (c *Client) StartInstanceRefresh(ctx context.Context, params *StartInstanceRefreshInput, ...) (*StartInstanceRefreshOutput, error)
- func (c *Client) SuspendProcesses(ctx context.Context, params *SuspendProcessesInput, optFns ...func(*Options)) (*SuspendProcessesOutput, error)
- func (c *Client) TerminateInstanceInAutoScalingGroup(ctx context.Context, params *TerminateInstanceInAutoScalingGroupInput, ...) (*TerminateInstanceInAutoScalingGroupOutput, error)
- func (c *Client) UpdateAutoScalingGroup(ctx context.Context, params *UpdateAutoScalingGroupInput, ...) (*UpdateAutoScalingGroupOutput, error)
- type CompleteLifecycleActionInput
- type CompleteLifecycleActionOutput
- type CreateAutoScalingGroupInput
- type CreateAutoScalingGroupOutput
- type CreateLaunchConfigurationInput
- type CreateLaunchConfigurationOutput
- type CreateOrUpdateTagsInput
- type CreateOrUpdateTagsOutput
- type DeleteAutoScalingGroupInput
- type DeleteAutoScalingGroupOutput
- type DeleteLaunchConfigurationInput
- type DeleteLaunchConfigurationOutput
- type DeleteLifecycleHookInput
- type DeleteLifecycleHookOutput
- type DeleteNotificationConfigurationInput
- type DeleteNotificationConfigurationOutput
- type DeletePolicyInput
- type DeletePolicyOutput
- type DeleteScheduledActionInput
- type DeleteScheduledActionOutput
- type DeleteTagsInput
- type DeleteTagsOutput
- type DescribeAccountLimitsInput
- type DescribeAccountLimitsOutput
- type DescribeAdjustmentTypesInput
- type DescribeAdjustmentTypesOutput
- type DescribeAutoScalingGroupsInput
- type DescribeAutoScalingGroupsOutput
- type DescribeAutoScalingInstancesInput
- type DescribeAutoScalingInstancesOutput
- type DescribeAutoScalingNotificationTypesInput
- type DescribeAutoScalingNotificationTypesOutput
- type DescribeInstanceRefreshesInput
- type DescribeInstanceRefreshesOutput
- type DescribeLaunchConfigurationsInput
- type DescribeLaunchConfigurationsOutput
- type DescribeLifecycleHookTypesInput
- type DescribeLifecycleHookTypesOutput
- type DescribeLifecycleHooksInput
- type DescribeLifecycleHooksOutput
- type DescribeLoadBalancerTargetGroupsInput
- type DescribeLoadBalancerTargetGroupsOutput
- type DescribeLoadBalancersInput
- type DescribeLoadBalancersOutput
- type DescribeMetricCollectionTypesInput
- type DescribeMetricCollectionTypesOutput
- type DescribeNotificationConfigurationsInput
- type DescribeNotificationConfigurationsOutput
- type DescribePoliciesInput
- type DescribePoliciesOutput
- type DescribeScalingActivitiesInput
- type DescribeScalingActivitiesOutput
- type DescribeScalingProcessTypesInput
- type DescribeScalingProcessTypesOutput
- type DescribeScheduledActionsInput
- type DescribeScheduledActionsOutput
- type DescribeTagsInput
- type DescribeTagsOutput
- type DescribeTerminationPolicyTypesInput
- type DescribeTerminationPolicyTypesOutput
- type DetachInstancesInput
- type DetachInstancesOutput
- type DetachLoadBalancerTargetGroupsInput
- type DetachLoadBalancerTargetGroupsOutput
- type DetachLoadBalancersInput
- type DetachLoadBalancersOutput
- type DisableMetricsCollectionInput
- type DisableMetricsCollectionOutput
- type EnableMetricsCollectionInput
- type EnableMetricsCollectionOutput
- type EndpointResolver
- type EndpointResolverFunc
- type EndpointResolverOptions
- type EnterStandbyInput
- type EnterStandbyOutput
- type ExecutePolicyInput
- type ExecutePolicyOutput
- type ExitStandbyInput
- type ExitStandbyOutput
- type HTTPClient
- type HTTPSignerV4
- type Options
- type PutLifecycleHookInput
- type PutLifecycleHookOutput
- type PutNotificationConfigurationInput
- type PutNotificationConfigurationOutput
- type PutScalingPolicyInput
- type PutScalingPolicyOutput
- type PutScheduledUpdateGroupActionInput
- type PutScheduledUpdateGroupActionOutput
- type RecordLifecycleActionHeartbeatInput
- type RecordLifecycleActionHeartbeatOutput
- type ResolveEndpoint
- type ResumeProcessesInput
- type ResumeProcessesOutput
- type SetDesiredCapacityInput
- type SetDesiredCapacityOutput
- type SetInstanceHealthInput
- type SetInstanceHealthOutput
- type SetInstanceProtectionInput
- type SetInstanceProtectionOutput
- type StartInstanceRefreshInput
- type StartInstanceRefreshOutput
- type SuspendProcessesInput
- type SuspendProcessesOutput
- type TerminateInstanceInAutoScalingGroupInput
- type TerminateInstanceInAutoScalingGroupOutput
- type UpdateAutoScalingGroupInput
- type UpdateAutoScalingGroupOutput
Constants ¶
const ServiceAPIVersion = "2011-01-01"
const ServiceID = "Auto Scaling"
Variables ¶
This section is empty.
Functions ¶
func NewDefaultEndpointResolver ¶
func NewDefaultEndpointResolver() *internalendpoints.Resolver
NewDefaultEndpointResolver constructs a new service endpoint resolver
Types ¶
type AttachInstancesInput ¶
type AttachInstancesOutput ¶
type AttachInstancesOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type AttachLoadBalancerTargetGroupsInput ¶
type AttachLoadBalancerTargetGroupsInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // The Amazon Resource Names (ARN) of the target groups. You can specify up to 10 // target groups. // // This member is required. TargetGroupARNs []*string }
type AttachLoadBalancerTargetGroupsOutput ¶
type AttachLoadBalancerTargetGroupsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type AttachLoadBalancersOutput ¶
type AttachLoadBalancersOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type BatchDeleteScheduledActionOutput ¶
type BatchDeleteScheduledActionOutput struct { // The names of the scheduled actions that could not be deleted, including an error // message. FailedScheduledActions []*types.FailedScheduledUpdateGroupActionRequest // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type BatchPutScheduledUpdateGroupActionInput ¶
type BatchPutScheduledUpdateGroupActionInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // One or more scheduled actions. The maximum number allowed is 50. // // This member is required. ScheduledUpdateGroupActions []*types.ScheduledUpdateGroupActionRequest }
type BatchPutScheduledUpdateGroupActionOutput ¶
type BatchPutScheduledUpdateGroupActionOutput struct { // The names of the scheduled actions that could not be created or updated, // including an error message. FailedScheduledUpdateGroupActions []*types.FailedScheduledUpdateGroupActionRequest // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type CancelInstanceRefreshInput ¶
type CancelInstanceRefreshInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string }
type CancelInstanceRefreshOutput ¶
type CancelInstanceRefreshOutput struct { // The instance refresh ID. InstanceRefreshId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides the API client to make operations call for Auto Scaling.
func New ¶
New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.
func NewFromConfig ¶
NewFromConfig returns a new client from the provided config.
func (*Client) AttachInstances ¶
func (c *Client) AttachInstances(ctx context.Context, params *AttachInstancesInput, optFns ...func(*Options)) (*AttachInstancesOutput, error)
Attaches one or more EC2 instances to the specified Auto Scaling group. When you attach instances, Amazon EC2 Auto Scaling increases the desired capacity of the group by the number of instances being attached. If the number of instances being attached plus the desired capacity of the group exceeds the maximum size of the group, the operation fails. If there is a Classic Load Balancer attached to your Auto Scaling group, the instances are also registered with the load balancer. If there are target groups attached to your Auto Scaling group, the instances are also registered with the target groups. For more information, see Attach EC2 Instances to Your Auto Scaling Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-instance-asg.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) AttachLoadBalancerTargetGroups ¶
func (c *Client) AttachLoadBalancerTargetGroups(ctx context.Context, params *AttachLoadBalancerTargetGroupsInput, optFns ...func(*Options)) (*AttachLoadBalancerTargetGroupsOutput, error)
Attaches one or more target groups to the specified Auto Scaling group. To describe the target groups for an Auto Scaling group, call the DescribeLoadBalancerTargetGroups API. To detach the target group from the Auto Scaling group, call the DetachLoadBalancerTargetGroups API. With Application Load Balancers and Network Load Balancers, instances are registered as targets with a target group. With Classic Load Balancers, instances are registered with the load balancer. For more information, see Attaching a Load Balancer to Your Auto Scaling Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) AttachLoadBalancers ¶
func (c *Client) AttachLoadBalancers(ctx context.Context, params *AttachLoadBalancersInput, optFns ...func(*Options)) (*AttachLoadBalancersOutput, error)
To attach an Application Load Balancer or a Network Load Balancer, use the AttachLoadBalancerTargetGroups API operation instead. Attaches one or more Classic Load Balancers to the specified Auto Scaling group. Amazon EC2 Auto Scaling registers the running instances with these Classic Load Balancers. To describe the load balancers for an Auto Scaling group, call the DescribeLoadBalancers API. To detach the load balancer from the Auto Scaling group, call the DetachLoadBalancers API. For more information, see Attaching a Load Balancer to Your Auto Scaling Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) BatchDeleteScheduledAction ¶
func (c *Client) BatchDeleteScheduledAction(ctx context.Context, params *BatchDeleteScheduledActionInput, optFns ...func(*Options)) (*BatchDeleteScheduledActionOutput, error)
Deletes one or more scheduled actions for the specified Auto Scaling group.
func (*Client) BatchPutScheduledUpdateGroupAction ¶
func (c *Client) BatchPutScheduledUpdateGroupAction(ctx context.Context, params *BatchPutScheduledUpdateGroupActionInput, optFns ...func(*Options)) (*BatchPutScheduledUpdateGroupActionOutput, error)
Creates or updates one or more scheduled scaling actions for an Auto Scaling group. If you leave a parameter unspecified when updating a scheduled scaling action, the corresponding value remains unchanged.
func (*Client) CancelInstanceRefresh ¶
func (c *Client) CancelInstanceRefresh(ctx context.Context, params *CancelInstanceRefreshInput, optFns ...func(*Options)) (*CancelInstanceRefreshOutput, error)
Cancels an instance refresh operation in progress. Cancellation does not roll back any replacements that have already been completed, but it prevents new replacements from being started. For more information, see Replacing Auto Scaling Instances Based on an Instance Refresh (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html).
func (*Client) CompleteLifecycleAction ¶
func (c *Client) CompleteLifecycleAction(ctx context.Context, params *CompleteLifecycleActionInput, optFns ...func(*Options)) (*CompleteLifecycleActionOutput, error)
Completes the lifecycle action for the specified token or instance with the specified result. This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:
* (Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates instances.
* (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish lifecycle notifications to the target.
* Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.
* If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state.
* If you finish before the timeout period ends, complete the lifecycle action.
For more information, see Amazon EC2 Auto Scaling Lifecycle Hooks (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) CreateAutoScalingGroup ¶
func (c *Client) CreateAutoScalingGroup(ctx context.Context, params *CreateAutoScalingGroupInput, optFns ...func(*Options)) (*CreateAutoScalingGroupOutput, error)
Creates an Auto Scaling group with the specified name and attributes. If you exceed your maximum limit of Auto Scaling groups, the call fails. To query this limit, call the DescribeAccountLimits API. For information about updating this limit, see Amazon EC2 Auto Scaling Service Quotas (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html) in the Amazon EC2 Auto Scaling User Guide. For introductory exercises for creating an Auto Scaling group, see Getting Started with Amazon EC2 Auto Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/GettingStartedTutorial.html) and Tutorial: Set Up a Scaled and Load-Balanced Application (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-register-lbs-with-asg.html) in the Amazon EC2 Auto Scaling User Guide. For more information, see Auto Scaling Groups (https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroup.html) in the Amazon EC2 Auto Scaling User Guide. Every Auto Scaling group has three size parameters (DesiredCapacity, MaxSize, and MinSize). Usually, you set these sizes based on a specific number of instances. However, if you configure a mixed instances policy that defines weights for the instance types, you must specify these sizes with the same units that you use for weighting instances.
func (*Client) CreateLaunchConfiguration ¶
func (c *Client) CreateLaunchConfiguration(ctx context.Context, params *CreateLaunchConfigurationInput, optFns ...func(*Options)) (*CreateLaunchConfigurationOutput, error)
Creates a launch configuration. If you exceed your maximum limit of launch configurations, the call fails. To query this limit, call the DescribeAccountLimits API. For information about updating this limit, see Amazon EC2 Auto Scaling Service Quotas (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html) in the Amazon EC2 Auto Scaling User Guide. For more information, see Launch Configurations (https://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchConfiguration.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) CreateOrUpdateTags ¶
func (c *Client) CreateOrUpdateTags(ctx context.Context, params *CreateOrUpdateTagsInput, optFns ...func(*Options)) (*CreateOrUpdateTagsOutput, error)
Creates or updates tags for the specified Auto Scaling group. When you specify a tag with a key that already exists, the operation overwrites the previous tag definition, and you do not get an error message. For more information, see Tagging Auto Scaling Groups and Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) DeleteAutoScalingGroup ¶
func (c *Client) DeleteAutoScalingGroup(ctx context.Context, params *DeleteAutoScalingGroupInput, optFns ...func(*Options)) (*DeleteAutoScalingGroupOutput, error)
Deletes the specified Auto Scaling group. If the group has instances or scaling activities in progress, you must specify the option to force the deletion in order for it to succeed. If the group has policies, deleting the group deletes the policies, the underlying alarm actions, and any alarm that no longer has an associated action. To remove instances from the Auto Scaling group before deleting it, call the DetachInstances API with the list of instances and the option to decrement the desired capacity. This ensures that Amazon EC2 Auto Scaling does not launch replacement instances. To terminate all instances before deleting the Auto Scaling group, call the UpdateAutoScalingGroup API and set the minimum size and desired capacity of the Auto Scaling group to zero.
func (*Client) DeleteLaunchConfiguration ¶
func (c *Client) DeleteLaunchConfiguration(ctx context.Context, params *DeleteLaunchConfigurationInput, optFns ...func(*Options)) (*DeleteLaunchConfigurationOutput, error)
Deletes the specified launch configuration. The launch configuration must not be attached to an Auto Scaling group. When this call completes, the launch configuration is no longer available for use.
func (*Client) DeleteLifecycleHook ¶
func (c *Client) DeleteLifecycleHook(ctx context.Context, params *DeleteLifecycleHookInput, optFns ...func(*Options)) (*DeleteLifecycleHookOutput, error)
Deletes the specified lifecycle hook. If there are any outstanding lifecycle actions, they are completed first (ABANDON for launching instances, CONTINUE for terminating instances).
func (*Client) DeleteNotificationConfiguration ¶
func (c *Client) DeleteNotificationConfiguration(ctx context.Context, params *DeleteNotificationConfigurationInput, optFns ...func(*Options)) (*DeleteNotificationConfigurationOutput, error)
Deletes the specified notification.
func (*Client) DeletePolicy ¶
func (c *Client) DeletePolicy(ctx context.Context, params *DeletePolicyInput, optFns ...func(*Options)) (*DeletePolicyOutput, error)
Deletes the specified scaling policy. Deleting either a step scaling policy or a simple scaling policy deletes the underlying alarm action, but does not delete the alarm, even if it no longer has an associated action. For more information, see Deleting a Scaling Policy (https://docs.aws.amazon.com/autoscaling/ec2/userguide/deleting-scaling-policy.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) DeleteScheduledAction ¶
func (c *Client) DeleteScheduledAction(ctx context.Context, params *DeleteScheduledActionInput, optFns ...func(*Options)) (*DeleteScheduledActionOutput, error)
Deletes the specified scheduled action.
func (*Client) DeleteTags ¶
func (c *Client) DeleteTags(ctx context.Context, params *DeleteTagsInput, optFns ...func(*Options)) (*DeleteTagsOutput, error)
Deletes the specified tags.
func (*Client) DescribeAccountLimits ¶
func (c *Client) DescribeAccountLimits(ctx context.Context, params *DescribeAccountLimitsInput, optFns ...func(*Options)) (*DescribeAccountLimitsOutput, error)
Describes the current Amazon EC2 Auto Scaling resource quotas for your AWS account. For information about requesting an increase, see Amazon EC2 Auto Scaling Service Quotas (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) DescribeAdjustmentTypes ¶
func (c *Client) DescribeAdjustmentTypes(ctx context.Context, params *DescribeAdjustmentTypesInput, optFns ...func(*Options)) (*DescribeAdjustmentTypesOutput, error)
Describes the available adjustment types for Amazon EC2 Auto Scaling scaling policies. These settings apply to step scaling policies and simple scaling policies; they do not apply to target tracking scaling policies. The following adjustment types are supported:
* ChangeInCapacity
* ExactCapacity
* PercentChangeInCapacity
func (*Client) DescribeAutoScalingGroups ¶
func (c *Client) DescribeAutoScalingGroups(ctx context.Context, params *DescribeAutoScalingGroupsInput, optFns ...func(*Options)) (*DescribeAutoScalingGroupsOutput, error)
Describes one or more Auto Scaling groups.
func (*Client) DescribeAutoScalingInstances ¶
func (c *Client) DescribeAutoScalingInstances(ctx context.Context, params *DescribeAutoScalingInstancesInput, optFns ...func(*Options)) (*DescribeAutoScalingInstancesOutput, error)
Describes one or more Auto Scaling instances.
func (*Client) DescribeAutoScalingNotificationTypes ¶
func (c *Client) DescribeAutoScalingNotificationTypes(ctx context.Context, params *DescribeAutoScalingNotificationTypesInput, optFns ...func(*Options)) (*DescribeAutoScalingNotificationTypesOutput, error)
Describes the notification types that are supported by Amazon EC2 Auto Scaling.
func (*Client) DescribeInstanceRefreshes ¶
func (c *Client) DescribeInstanceRefreshes(ctx context.Context, params *DescribeInstanceRefreshesInput, optFns ...func(*Options)) (*DescribeInstanceRefreshesOutput, error)
Describes one or more instance refreshes. You can determine the status of a request by looking at the Status parameter. The following are the possible statuses:
* Pending - The request was created, but the operation has not started.
* InProgress - The operation is in progress.
* Successful - The operation completed successfully.
* Failed - The operation failed to complete. You can troubleshoot using the status reason and the scaling activities.
* Cancelling - An ongoing operation is being cancelled. Cancellation does not roll back any replacements that have already been completed, but it prevents new replacements from being started.
* Cancelled - The operation is cancelled.
For more information, see Replacing Auto Scaling Instances Based on an Instance Refresh (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html).
func (*Client) DescribeLaunchConfigurations ¶
func (c *Client) DescribeLaunchConfigurations(ctx context.Context, params *DescribeLaunchConfigurationsInput, optFns ...func(*Options)) (*DescribeLaunchConfigurationsOutput, error)
Describes one or more launch configurations.
func (*Client) DescribeLifecycleHookTypes ¶
func (c *Client) DescribeLifecycleHookTypes(ctx context.Context, params *DescribeLifecycleHookTypesInput, optFns ...func(*Options)) (*DescribeLifecycleHookTypesOutput, error)
Describes the available types of lifecycle hooks. The following hook types are supported:
* autoscaling:EC2_INSTANCE_LAUNCHING
* autoscaling:EC2_INSTANCE_TERMINATING
func (*Client) DescribeLifecycleHooks ¶
func (c *Client) DescribeLifecycleHooks(ctx context.Context, params *DescribeLifecycleHooksInput, optFns ...func(*Options)) (*DescribeLifecycleHooksOutput, error)
Describes the lifecycle hooks for the specified Auto Scaling group.
func (*Client) DescribeLoadBalancerTargetGroups ¶
func (c *Client) DescribeLoadBalancerTargetGroups(ctx context.Context, params *DescribeLoadBalancerTargetGroupsInput, optFns ...func(*Options)) (*DescribeLoadBalancerTargetGroupsOutput, error)
Describes the target groups for the specified Auto Scaling group.
func (*Client) DescribeLoadBalancers ¶
func (c *Client) DescribeLoadBalancers(ctx context.Context, params *DescribeLoadBalancersInput, optFns ...func(*Options)) (*DescribeLoadBalancersOutput, error)
Describes the load balancers for the specified Auto Scaling group. This operation describes only Classic Load Balancers. If you have Application Load Balancers or Network Load Balancers, use the DescribeLoadBalancerTargetGroups API instead.
func (*Client) DescribeMetricCollectionTypes ¶
func (c *Client) DescribeMetricCollectionTypes(ctx context.Context, params *DescribeMetricCollectionTypesInput, optFns ...func(*Options)) (*DescribeMetricCollectionTypesOutput, error)
Describes the available CloudWatch metrics for Amazon EC2 Auto Scaling. The GroupStandbyInstances metric is not returned by default. You must explicitly request this metric when calling the EnableMetricsCollection API.
func (*Client) DescribeNotificationConfigurations ¶
func (c *Client) DescribeNotificationConfigurations(ctx context.Context, params *DescribeNotificationConfigurationsInput, optFns ...func(*Options)) (*DescribeNotificationConfigurationsOutput, error)
Describes the notification actions associated with the specified Auto Scaling group.
func (*Client) DescribePolicies ¶
func (c *Client) DescribePolicies(ctx context.Context, params *DescribePoliciesInput, optFns ...func(*Options)) (*DescribePoliciesOutput, error)
Describes the policies for the specified Auto Scaling group.
func (*Client) DescribeScalingActivities ¶
func (c *Client) DescribeScalingActivities(ctx context.Context, params *DescribeScalingActivitiesInput, optFns ...func(*Options)) (*DescribeScalingActivitiesOutput, error)
Describes one or more scaling activities for the specified Auto Scaling group.
func (*Client) DescribeScalingProcessTypes ¶
func (c *Client) DescribeScalingProcessTypes(ctx context.Context, params *DescribeScalingProcessTypesInput, optFns ...func(*Options)) (*DescribeScalingProcessTypesOutput, error)
Describes the scaling process types for use with the ResumeProcesses and SuspendProcesses APIs.
func (*Client) DescribeScheduledActions ¶
func (c *Client) DescribeScheduledActions(ctx context.Context, params *DescribeScheduledActionsInput, optFns ...func(*Options)) (*DescribeScheduledActionsOutput, error)
Describes the actions scheduled for your Auto Scaling group that haven't run or that have not reached their end time. To describe the actions that have already run, call the DescribeScalingActivities API.
func (*Client) DescribeTags ¶
func (c *Client) DescribeTags(ctx context.Context, params *DescribeTagsInput, optFns ...func(*Options)) (*DescribeTagsOutput, error)
Describes the specified tags. You can use filters to limit the results. For example, you can query for the tags for a specific Auto Scaling group. You can specify multiple values for a filter. A tag must match at least one of the specified values for it to be included in the results. You can also specify multiple filters. The result includes information for a particular tag only if it matches all the filters. If there's no match, no special message is returned. For more information, see Tagging Auto Scaling Groups and Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) DescribeTerminationPolicyTypes ¶
func (c *Client) DescribeTerminationPolicyTypes(ctx context.Context, params *DescribeTerminationPolicyTypesInput, optFns ...func(*Options)) (*DescribeTerminationPolicyTypesOutput, error)
Describes the termination policies supported by Amazon EC2 Auto Scaling. For more information, see Controlling Which Auto Scaling Instances Terminate During Scale In (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) DetachInstances ¶
func (c *Client) DetachInstances(ctx context.Context, params *DetachInstancesInput, optFns ...func(*Options)) (*DetachInstancesOutput, error)
Removes one or more instances from the specified Auto Scaling group. After the instances are detached, you can manage them independent of the Auto Scaling group. If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches instances to replace the ones that are detached. If there is a Classic Load Balancer attached to the Auto Scaling group, the instances are deregistered from the load balancer. If there are target groups attached to the Auto Scaling group, the instances are deregistered from the target groups. For more information, see Detach EC2 Instances from Your Auto Scaling Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/detach-instance-asg.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) DetachLoadBalancerTargetGroups ¶
func (c *Client) DetachLoadBalancerTargetGroups(ctx context.Context, params *DetachLoadBalancerTargetGroupsInput, optFns ...func(*Options)) (*DetachLoadBalancerTargetGroupsOutput, error)
Detaches one or more target groups from the specified Auto Scaling group.
func (*Client) DetachLoadBalancers ¶
func (c *Client) DetachLoadBalancers(ctx context.Context, params *DetachLoadBalancersInput, optFns ...func(*Options)) (*DetachLoadBalancersOutput, error)
Detaches one or more Classic Load Balancers from the specified Auto Scaling group. This operation detaches only Classic Load Balancers. If you have Application Load Balancers or Network Load Balancers, use the DetachLoadBalancerTargetGroups API instead. When you detach a load balancer, it enters the Removing state while deregistering the instances in the group. When all instances are deregistered, then you can no longer describe the load balancer using the DescribeLoadBalancers API call. The instances remain running.
func (*Client) DisableMetricsCollection ¶
func (c *Client) DisableMetricsCollection(ctx context.Context, params *DisableMetricsCollectionInput, optFns ...func(*Options)) (*DisableMetricsCollectionOutput, error)
Disables group metrics for the specified Auto Scaling group.
func (*Client) EnableMetricsCollection ¶
func (c *Client) EnableMetricsCollection(ctx context.Context, params *EnableMetricsCollectionInput, optFns ...func(*Options)) (*EnableMetricsCollectionOutput, error)
Enables group metrics for the specified Auto Scaling group. For more information, see Monitoring Your Auto Scaling Groups and Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-monitoring.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) EnterStandby ¶
func (c *Client) EnterStandby(ctx context.Context, params *EnterStandbyInput, optFns ...func(*Options)) (*EnterStandbyOutput, error)
Moves the specified instances into the standby state. If you choose to decrement the desired capacity of the Auto Scaling group, the instances can enter standby as long as the desired capacity of the Auto Scaling group after the instances are placed into standby is equal to or greater than the minimum capacity of the group. If you choose not to decrement the desired capacity of the Auto Scaling group, the Auto Scaling group launches new instances to replace the instances on standby. For more information, see Temporarily Removing Instances from Your Auto Scaling Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) ExecutePolicy ¶
func (c *Client) ExecutePolicy(ctx context.Context, params *ExecutePolicyInput, optFns ...func(*Options)) (*ExecutePolicyOutput, error)
Executes the specified policy. This can be useful for testing the design of your scaling policy.
func (*Client) ExitStandby ¶
func (c *Client) ExitStandby(ctx context.Context, params *ExitStandbyInput, optFns ...func(*Options)) (*ExitStandbyOutput, error)
Moves the specified instances out of the standby state. After you put the instances back in service, the desired capacity is incremented. For more information, see Temporarily Removing Instances from Your Auto Scaling Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) PutLifecycleHook ¶
func (c *Client) PutLifecycleHook(ctx context.Context, params *PutLifecycleHookInput, optFns ...func(*Options)) (*PutLifecycleHookOutput, error)
Creates or updates a lifecycle hook for the specified Auto Scaling group. A lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an instance when the instance launches (before it is put into service) or as the instance terminates (before it is fully terminated). This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:
* (Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates instances.
* (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish lifecycle notifications to the target.
* Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.
* If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state using the RecordLifecycleActionHeartbeat API call.
* If you finish before the timeout period ends, complete the lifecycle action using the CompleteLifecycleAction API call.
For more information, see Amazon EC2 Auto Scaling Lifecycle Hooks (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) in the Amazon EC2 Auto Scaling User Guide. If you exceed your maximum limit of lifecycle hooks, which by default is 50 per Auto Scaling group, the call fails. You can view the lifecycle hooks for an Auto Scaling group using the DescribeLifecycleHooks API call. If you are no longer using a lifecycle hook, you can delete it by calling the DeleteLifecycleHook API.
func (*Client) PutNotificationConfiguration ¶
func (c *Client) PutNotificationConfiguration(ctx context.Context, params *PutNotificationConfigurationInput, optFns ...func(*Options)) (*PutNotificationConfigurationOutput, error)
Configures an Auto Scaling group to send notifications when specified events take place. Subscribers to the specified topic can have messages delivered to an endpoint such as a web server or an email address. This configuration overwrites any existing configuration. For more information, see Getting Amazon SNS Notifications When Your Auto Scaling Group Scales (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ASGettingNotifications.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) PutScalingPolicy ¶
func (c *Client) PutScalingPolicy(ctx context.Context, params *PutScalingPolicyInput, optFns ...func(*Options)) (*PutScalingPolicyOutput, error)
Creates or updates a scaling policy for an Auto Scaling group. For more information about using scaling policies to scale your Auto Scaling group, see Target Tracking Scaling Policies (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html) and Step and Simple Scaling Policies (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) PutScheduledUpdateGroupAction ¶
func (c *Client) PutScheduledUpdateGroupAction(ctx context.Context, params *PutScheduledUpdateGroupActionInput, optFns ...func(*Options)) (*PutScheduledUpdateGroupActionOutput, error)
Creates or updates a scheduled scaling action for an Auto Scaling group. If you leave a parameter unspecified when updating a scheduled scaling action, the corresponding value remains unchanged. For more information, see Scheduled Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/schedule_time.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) RecordLifecycleActionHeartbeat ¶
func (c *Client) RecordLifecycleActionHeartbeat(ctx context.Context, params *RecordLifecycleActionHeartbeatInput, optFns ...func(*Options)) (*RecordLifecycleActionHeartbeatOutput, error)
Records a heartbeat for the lifecycle action associated with the specified token or instance. This extends the timeout by the length of time defined using the PutLifecycleHook API call. This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:
* (Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates instances.
* (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish lifecycle notifications to the target.
* Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.
* If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state.
* If you finish before the timeout period ends, complete the lifecycle action.
For more information, see Auto Scaling Lifecycle (https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) ResumeProcesses ¶
func (c *Client) ResumeProcesses(ctx context.Context, params *ResumeProcessesInput, optFns ...func(*Options)) (*ResumeProcessesOutput, error)
Resumes the specified suspended automatic scaling processes, or all suspended process, for the specified Auto Scaling group. For more information, see Suspending and Resuming Scaling Processes (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) SetDesiredCapacity ¶
func (c *Client) SetDesiredCapacity(ctx context.Context, params *SetDesiredCapacityInput, optFns ...func(*Options)) (*SetDesiredCapacityOutput, error)
Sets the size of the specified Auto Scaling group. If a scale-in activity occurs as a result of a new DesiredCapacity value that is lower than the current size of the group, the Auto Scaling group uses its termination policy to determine which instances to terminate. For more information, see Manual Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-manual-scaling.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) SetInstanceHealth ¶
func (c *Client) SetInstanceHealth(ctx context.Context, params *SetInstanceHealthInput, optFns ...func(*Options)) (*SetInstanceHealthOutput, error)
Sets the health status of the specified instance. For more information, see Health Checks for Auto Scaling Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) SetInstanceProtection ¶
func (c *Client) SetInstanceProtection(ctx context.Context, params *SetInstanceProtectionInput, optFns ...func(*Options)) (*SetInstanceProtectionOutput, error)
Updates the instance protection settings of the specified instances. For more information about preventing instances that are part of an Auto Scaling group from terminating on scale in, see Instance Protection (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) StartInstanceRefresh ¶
func (c *Client) StartInstanceRefresh(ctx context.Context, params *StartInstanceRefreshInput, optFns ...func(*Options)) (*StartInstanceRefreshOutput, error)
Starts a new instance refresh operation, which triggers a rolling replacement of all previously launched instances in the Auto Scaling group with a new group of instances. If successful, this call creates a new instance refresh request with a unique ID that you can use to track its progress. To query its status, call the DescribeInstanceRefreshes API. To describe the instance refreshes that have already run, call the DescribeInstanceRefreshes API. To cancel an instance refresh operation in progress, use the CancelInstanceRefresh API. For more information, see Replacing Auto Scaling Instances Based on an Instance Refresh (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html).
func (*Client) SuspendProcesses ¶
func (c *Client) SuspendProcesses(ctx context.Context, params *SuspendProcessesInput, optFns ...func(*Options)) (*SuspendProcessesOutput, error)
Suspends the specified automatic scaling processes, or all processes, for the specified Auto Scaling group. If you suspend either the Launch or Terminate process types, it can prevent other process types from functioning properly. For more information, see Suspending and Resuming Scaling Processes (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html) in the Amazon EC2 Auto Scaling User Guide. To resume processes that have been suspended, call the ResumeProcesses API.
func (*Client) TerminateInstanceInAutoScalingGroup ¶
func (c *Client) TerminateInstanceInAutoScalingGroup(ctx context.Context, params *TerminateInstanceInAutoScalingGroupInput, optFns ...func(*Options)) (*TerminateInstanceInAutoScalingGroupOutput, error)
Terminates the specified instance and optionally adjusts the desired group size. This call simply makes a termination request. The instance is not terminated immediately. When an instance is terminated, the instance status changes to terminated. You can't connect to or start an instance after you've terminated it. If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches instances to replace the ones that are terminated. By default, Amazon EC2 Auto Scaling balances instances across all Availability Zones. If you decrement the desired capacity, your Auto Scaling group can become unbalanced between Availability Zones. Amazon EC2 Auto Scaling tries to rebalance the group, and rebalancing might terminate instances in other zones. For more information, see Rebalancing Activities (https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-benefits.html#AutoScalingBehavior.InstanceUsage) in the Amazon EC2 Auto Scaling User Guide.
func (*Client) UpdateAutoScalingGroup ¶
func (c *Client) UpdateAutoScalingGroup(ctx context.Context, params *UpdateAutoScalingGroupInput, optFns ...func(*Options)) (*UpdateAutoScalingGroupOutput, error)
Updates the configuration for the specified Auto Scaling group. To update an Auto Scaling group, specify the name of the group and the parameter that you want to change. Any parameters that you don't specify are not changed by this update request. The new settings take effect on any scaling activities after this call returns. If you associate a new launch configuration or template with an Auto Scaling group, all new instances will get the updated configuration. Existing instances continue to run with the configuration that they were originally launched with. When you update a group to specify a mixed instances policy instead of a launch configuration or template, existing instances may be replaced to match the new purchasing options that you specified in the policy. For example, if the group currently has 100% On-Demand capacity and the policy specifies 50% Spot capacity, this means that half of your instances will be gradually terminated and relaunched as Spot Instances. When replacing instances, Amazon EC2 Auto Scaling launches new instances before terminating the old ones, so that updating your group does not compromise the performance or availability of your application. Note the following about changing DesiredCapacity, MaxSize, or MinSize:
* If a scale-in activity occurs as a result of a new DesiredCapacity value that is lower than the current size of the group, the Auto Scaling group uses its termination policy to determine which instances to terminate.
* If you specify a new value for MinSize without specifying a value for DesiredCapacity, and the new MinSize is larger than the current size of the group, this sets the group's DesiredCapacity to the new MinSize value.
* If you specify a new value for MaxSize without specifying a value for DesiredCapacity, and the new MaxSize is smaller than the current size of the group, this sets the group's DesiredCapacity to the new MaxSize value.
To see which parameters have been set, call the DescribeAutoScalingGroups API. To view the scaling policies for an Auto Scaling group, call the DescribePolicies API. If the group has scaling policies, you can update them by calling the PutScalingPolicy API.
type CompleteLifecycleActionInput ¶
type CompleteLifecycleActionInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // The action for the group to take. This parameter can be either CONTINUE or // ABANDON. // // This member is required. LifecycleActionResult *string // The name of the lifecycle hook. // // This member is required. LifecycleHookName *string // The ID of the instance. InstanceId *string // A universally unique identifier (UUID) that identifies a specific lifecycle // action associated with an instance. Amazon EC2 Auto Scaling sends this token to // the notification target you specified when you created the lifecycle hook. LifecycleActionToken *string }
type CompleteLifecycleActionOutput ¶
type CompleteLifecycleActionOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type CreateAutoScalingGroupInput ¶
type CreateAutoScalingGroupInput struct { // The name of the Auto Scaling group. This name must be unique per Region per // account. // // This member is required. AutoScalingGroupName *string // The maximum size of the group. With a mixed instances policy that uses instance // weighting, Amazon EC2 Auto Scaling may need to go above MaxSize to meet your // capacity requirements. In this event, Amazon EC2 Auto Scaling will never go // above MaxSize by more than your largest instance weight (weights that define how // many units each instance contributes to the desired capacity of the group). // // This member is required. MaxSize *int32 // The minimum size of the group. // // This member is required. MinSize *int32 // One or more Availability Zones for the group. This parameter is optional if you // specify one or more subnets for VPCZoneIdentifier. Conditional: If your account // supports EC2-Classic and VPC, this parameter is required to launch instances // into EC2-Classic. AvailabilityZones []*string // The amount of time, in seconds, after a scaling activity completes before // another scaling activity can start. The default value is 300. This setting // applies when using simple scaling policies, but not when using other scaling // policies or scheduled scaling. For more information, see Scaling Cooldowns for // Amazon EC2 Auto Scaling // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) in the // Amazon EC2 Auto Scaling User Guide. DefaultCooldown *int32 // The desired capacity is the initial capacity of the Auto Scaling group at the // time of its creation and the capacity it attempts to maintain. It can scale // beyond this capacity if you configure automatic scaling. This number must be // greater than or equal to the minimum size of the group and less than or equal to // the maximum size of the group. If you do not specify a desired capacity, the // default is the minimum size of the group. DesiredCapacity *int32 // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before // checking the health status of an EC2 instance that has come into service. During // this time, any health check failures for the instance are ignored. The default // value is 0. For more information, see Health Check Grace Period // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html#health-check-grace-period) // in the Amazon EC2 Auto Scaling User Guide. Required if you are adding an ELB // health check. HealthCheckGracePeriod *int32 // The service to use for the health checks. The valid values are EC2 and ELB. The // default value is EC2. If you configure an Auto Scaling group to use ELB health // checks, it considers the instance unhealthy if it fails either the EC2 status // checks or the load balancer health checks. For more information, see Health // Checks for Auto Scaling Instances // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) in the // Amazon EC2 Auto Scaling User Guide. HealthCheckType *string // The ID of the instance used to create a launch configuration for the group. To // get the instance ID, use the Amazon EC2 DescribeInstances // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html) // API operation. When you specify an ID of an instance, Amazon EC2 Auto Scaling // creates a new launch configuration and associates it with the group. This launch // configuration derives its attributes from the specified instance, except for the // block device mapping. You must specify one of the following parameters in your // request: LaunchConfigurationName, LaunchTemplate, InstanceId, or // MixedInstancesPolicy. InstanceId *string // The name of the launch configuration to use when an instance is launched. To get // the launch configuration name, use the DescribeLaunchConfigurations API // operation. New launch configurations can be created with the // CreateLaunchConfiguration API. You must specify one of the following parameters // in your request: LaunchConfigurationName, LaunchTemplate, InstanceId, or // MixedInstancesPolicy. LaunchConfigurationName *string // Parameters used to specify the launch template and version to use when an // instance is launched. For more information, see LaunchTemplateSpecification // (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_LaunchTemplateSpecification.html) // in the Amazon EC2 Auto Scaling API Reference. You can alternatively associate a // launch template to the Auto Scaling group by using the MixedInstancesPolicy // parameter. You must specify one of the following parameters in your request: // LaunchConfigurationName, LaunchTemplate, InstanceId, or MixedInstancesPolicy. LaunchTemplate *types.LaunchTemplateSpecification // One or more lifecycle hooks. LifecycleHookSpecificationList []*types.LifecycleHookSpecification // A list of Classic Load Balancers associated with this Auto Scaling group. For // Application Load Balancers and Network Load Balancers, specify a list of target // groups using the TargetGroupARNs property instead. For more information, see // Using a Load Balancer with an Auto Scaling Group // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html) // in the Amazon EC2 Auto Scaling User Guide. LoadBalancerNames []*string // The maximum amount of time, in seconds, that an instance can be in service. The // default is null. This parameter is optional, but if you specify a value for it, // you must specify a value of at least 604,800 seconds (7 days). To clear a // previously set value, specify a new value of 0. For more information, see // Replacing Auto Scaling Instances Based on Maximum Instance Lifetime // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-max-instance-lifetime.html) // in the Amazon EC2 Auto Scaling User Guide. Valid Range: Minimum value of 0. MaxInstanceLifetime *int32 // An embedded object that specifies a mixed instances policy. The required // parameters must be specified. If optional parameters are unspecified, their // default values are used. The policy includes parameters that not only define the // distribution of On-Demand Instances and Spot Instances, the maximum price to pay // for Spot Instances, and how the Auto Scaling group allocates instance types to // fulfill On-Demand and Spot capacity, but also the parameters that specify the // instance configuration information—the launch template and instance types. For // more information, see MixedInstancesPolicy // (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_MixedInstancesPolicy.html) // in the Amazon EC2 Auto Scaling API Reference and Auto Scaling Groups with // Multiple Instance Types and Purchase Options // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html) // in the Amazon EC2 Auto Scaling User Guide. You must specify one of the following // parameters in your request: LaunchConfigurationName, LaunchTemplate, InstanceId, // or MixedInstancesPolicy. MixedInstancesPolicy *types.MixedInstancesPolicy // Indicates whether newly launched instances are protected from termination by // Amazon EC2 Auto Scaling when scaling in. For more information about preventing // instances from terminating on scale in, see Instance Protection // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) // in the Amazon EC2 Auto Scaling User Guide. NewInstancesProtectedFromScaleIn *bool // The name of the placement group into which to launch your instances, if any. A // placement group is a logical grouping of instances within a single Availability // Zone. You cannot specify multiple Availability Zones and a placement group. For // more information, see Placement Groups // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) in // the Amazon EC2 User Guide for Linux Instances. PlacementGroup *string // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling // group uses to call other AWS services on your behalf. By default, Amazon EC2 // Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling, // which it creates if it does not exist. For more information, see Service-Linked // Roles // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html) // in the Amazon EC2 Auto Scaling User Guide. ServiceLinkedRoleARN *string // One or more tags. You can tag your Auto Scaling group and propagate the tags to // the Amazon EC2 instances it launches. Tags are not propagated to Amazon EBS // volumes. To add tags to Amazon EBS volumes, specify the tags in a launch // template but use caution. If the launch template specifies an instance tag with // a key that is also specified for the Auto Scaling group, Amazon EC2 Auto Scaling // overrides the value of that instance tag with the value specified by the Auto // Scaling group. For more information, see Tagging Auto Scaling Groups and // Instances // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html) // in the Amazon EC2 Auto Scaling User Guide. Tags []*types.Tag // The Amazon Resource Names (ARN) of the target groups to associate with the Auto // Scaling group. Instances are registered as targets in a target group, and // traffic is routed to the target group. For more information, see Using a Load // Balancer with an Auto Scaling Group // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html) // in the Amazon EC2 Auto Scaling User Guide. TargetGroupARNs []*string // One or more termination policies used to select the instance to terminate. These // policies are executed in the order that they are listed. For more information, // see Controlling Which Instances Auto Scaling Terminates During Scale In // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html) // in the Amazon EC2 Auto Scaling User Guide. TerminationPolicies []*string // A comma-separated list of subnet IDs for your virtual private cloud (VPC). If // you specify VPCZoneIdentifier with AvailabilityZones, the subnets that you // specify for this parameter must reside in those Availability Zones. Conditional: // If your account supports EC2-Classic and VPC, this parameter is required to // launch instances into a VPC. VPCZoneIdentifier *string }
type CreateAutoScalingGroupOutput ¶
type CreateAutoScalingGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type CreateLaunchConfigurationInput ¶
type CreateLaunchConfigurationInput struct { // The name of the launch configuration. This name must be unique per Region per // account. // // This member is required. LaunchConfigurationName *string // For Auto Scaling groups that are running in a virtual private cloud (VPC), // specifies whether to assign a public IP address to the group's instances. If you // specify true, each instance in the Auto Scaling group receives a unique public // IP address. For more information, see Launching Auto Scaling Instances in a VPC // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) in the // Amazon EC2 Auto Scaling User Guide. If you specify this parameter, you must // specify at least one subnet for VPCZoneIdentifier when you create your group. If // the instance is launched into a default subnet, the default is to assign a // public IP address, unless you disabled the option to assign a public IP address // on the subnet. If the instance is launched into a nondefault subnet, the default // is not to assign a public IP address, unless you enabled the option to assign a // public IP address on the subnet. AssociatePublicIpAddress *bool // A block device mapping, which specifies the block devices for the instance. You // can specify virtual devices and EBS volumes. For more information, see Block // Device Mapping // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html) // in the Amazon EC2 User Guide for Linux Instances. BlockDeviceMappings []*types.BlockDeviceMapping // The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. For // more information, see ClassicLink // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) in // the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic Instances // to a VPC // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink) // in the Amazon EC2 Auto Scaling User Guide. This parameter can only be used if // you are launching EC2-Classic instances. ClassicLinkVPCId *string // The IDs of one or more security groups for the specified ClassicLink-enabled // VPC. For more information, see ClassicLink // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) in // the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic Instances // to a VPC // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink) // in the Amazon EC2 Auto Scaling User Guide. If you specify the ClassicLinkVPCId // parameter, you must specify this parameter. ClassicLinkVPCSecurityGroups []*string // Specifies whether the launch configuration is optimized for EBS I/O (true) or // not (false). The optimization provides dedicated throughput to Amazon EBS and an // optimized configuration stack to provide optimal I/O performance. This // optimization is not available with all instance types. Additional fees are // incurred when you enable EBS optimization for an instance type that is not // EBS-optimized by default. For more information, see Amazon EBS-Optimized // Instances // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) in the // Amazon EC2 User Guide for Linux Instances. The default value is false. EbsOptimized *bool // The name or the Amazon Resource Name (ARN) of the instance profile associated // with the IAM role for the instance. The instance profile contains the IAM role. // For more information, see IAM Role for Applications That Run on Amazon EC2 // Instances // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html) in the // Amazon EC2 Auto Scaling User Guide. IamInstanceProfile *string // The ID of the Amazon Machine Image (AMI) that was assigned during registration. // For more information, see Finding an AMI // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html) in the // Amazon EC2 User Guide for Linux Instances. If you do not specify InstanceId, you // must specify ImageId. ImageId *string // The ID of the instance to use to create the launch configuration. The new launch // configuration derives attributes from the instance, except for the block device // mapping. To create a launch configuration with a block device mapping or // override any other instance attributes, specify them as part of the same // request. For more information, see Create a Launch Configuration Using an EC2 // Instance // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-lc-with-instanceID.html) // in the Amazon EC2 Auto Scaling User Guide. If you do not specify InstanceId, you // must specify both ImageId and InstanceType. InstanceId *string // Controls whether instances in this group are launched with detailed (true) or // basic (false) monitoring. The default value is true (enabled). When detailed // monitoring is enabled, Amazon CloudWatch generates metrics every minute and your // account is charged a fee. When you disable detailed monitoring, CloudWatch // generates metrics every 5 minutes. For more information, see Configure // Monitoring for Auto Scaling Instances // (https://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-monitoring.html#enable-as-instance-metrics) // in the Amazon EC2 Auto Scaling User Guide. InstanceMonitoring *types.InstanceMonitoring // Specifies the instance type of the EC2 instance. For information about available // instance types, see Available Instance Types // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes) // in the Amazon EC2 User Guide for Linux Instances. If you do not specify // InstanceId, you must specify InstanceType. InstanceType *string // The ID of the kernel associated with the AMI. KernelId *string // The name of the key pair. For more information, see Amazon EC2 Key Pairs // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) in the // Amazon EC2 User Guide for Linux Instances. KeyName *string // The metadata options for the instances. For more information, see Instance // Metadata and User Data // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) // in the Amazon EC2 User Guide for Linux Instances. MetadataOptions *types.InstanceMetadataOptions // The tenancy of the instance. An instance with dedicated tenancy runs on // isolated, single-tenant hardware and can only be launched into a VPC. To launch // dedicated instances into a shared tenancy VPC (a VPC with the instance placement // tenancy attribute set to default), you must set the value of this parameter to // dedicated. If you specify PlacementTenancy, you must specify at least one subnet // for VPCZoneIdentifier when you create your group. For more information, see // Instance Placement Tenancy // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-vpc-tenancy) // in the Amazon EC2 Auto Scaling User Guide. Valid Values: default | dedicated PlacementTenancy *string // The ID of the RAM disk to select. RamdiskId *string // A list that contains the security groups to assign to the instances in the Auto // Scaling group. [EC2-VPC] Specify the security group IDs. For more information, // see Security Groups for Your VPC // (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html) // in the Amazon Virtual Private Cloud User Guide. [EC2-Classic] Specify either the // security group names or the security group IDs. For more information, see Amazon // EC2 Security Groups // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html) // in the Amazon EC2 User Guide for Linux Instances. SecurityGroups []*string // The maximum hourly price to be paid for any Spot Instance launched to fulfill // the request. Spot Instances are launched when the price you specify exceeds the // current Spot price. For more information, see Launching Spot Instances in Your // Auto Scaling Group // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html) // in the Amazon EC2 Auto Scaling User Guide. When you change your maximum price by // creating a new launch configuration, running instances will continue to run as // long as the maximum price for those running instances is higher than the current // Spot price. SpotPrice *string // The Base64-encoded user data to make available to the launched EC2 instances. // For more information, see Instance Metadata and User Data // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) // in the Amazon EC2 User Guide for Linux Instances. UserData *string }
type CreateLaunchConfigurationOutput ¶
type CreateLaunchConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type CreateOrUpdateTagsInput ¶
type CreateOrUpdateTagsOutput ¶
type CreateOrUpdateTagsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DeleteAutoScalingGroupInput ¶
type DeleteAutoScalingGroupInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // Specifies that the group is to be deleted along with all instances associated // with the group, without waiting for all instances to be terminated. This // parameter also deletes any lifecycle actions associated with the group. ForceDelete *bool }
type DeleteAutoScalingGroupOutput ¶
type DeleteAutoScalingGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DeleteLaunchConfigurationInput ¶
type DeleteLaunchConfigurationInput struct { // The name of the launch configuration. // // This member is required. LaunchConfigurationName *string }
type DeleteLaunchConfigurationOutput ¶
type DeleteLaunchConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DeleteLifecycleHookOutput ¶
type DeleteLifecycleHookOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DeleteNotificationConfigurationOutput ¶
type DeleteNotificationConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DeletePolicyInput ¶
type DeletePolicyOutput ¶
type DeletePolicyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DeleteScheduledActionOutput ¶
type DeleteScheduledActionOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DeleteTagsInput ¶
type DeleteTagsOutput ¶
type DeleteTagsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeAccountLimitsInput ¶
type DescribeAccountLimitsInput struct { }
type DescribeAccountLimitsOutput ¶
type DescribeAccountLimitsOutput struct { // The maximum number of groups allowed for your AWS account. The default is 200 // groups per AWS Region. MaxNumberOfAutoScalingGroups *int32 // The maximum number of launch configurations allowed for your AWS account. The // default is 200 launch configurations per AWS Region. MaxNumberOfLaunchConfigurations *int32 // The current number of groups for your AWS account. NumberOfAutoScalingGroups *int32 // The current number of launch configurations for your AWS account. NumberOfLaunchConfigurations *int32 // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeAdjustmentTypesInput ¶
type DescribeAdjustmentTypesInput struct { }
type DescribeAdjustmentTypesOutput ¶
type DescribeAdjustmentTypesOutput struct { // The policy adjustment types. AdjustmentTypes []*types.AdjustmentType // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeAutoScalingGroupsInput ¶
type DescribeAutoScalingGroupsInput struct { // The names of the Auto Scaling groups. Each name can be a maximum of 1600 // characters. By default, you can only specify up to 50 names. You can optionally // increase this limit using the MaxRecords parameter. If you omit this parameter, // all Auto Scaling groups are described. AutoScalingGroupNames []*string // The maximum number of items to return with this call. The default value is 50 // and the maximum value is 100. MaxRecords *int32 // The token for the next set of items to return. (You received this token from a // previous call.) NextToken *string }
type DescribeAutoScalingGroupsOutput ¶
type DescribeAutoScalingGroupsOutput struct { // The groups. // // This member is required. AutoScalingGroups []*types.AutoScalingGroup // A string that indicates that the response contains more items than can be // returned in a single response. To receive additional items, specify this string // for the NextToken value when requesting the next set of items. This value is // null when there are no more items to return. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeAutoScalingInstancesInput ¶
type DescribeAutoScalingInstancesInput struct { // The IDs of the instances. You can specify up to MaxRecords IDs. If you omit this // parameter, all Auto Scaling instances are described. If you specify an ID that // does not exist, it is ignored with no error. InstanceIds []*string // The maximum number of items to return with this call. The default value is 50 // and the maximum value is 50. MaxRecords *int32 // The token for the next set of items to return. (You received this token from a // previous call.) NextToken *string }
type DescribeAutoScalingInstancesOutput ¶
type DescribeAutoScalingInstancesOutput struct { // The instances. AutoScalingInstances []*types.AutoScalingInstanceDetails // A string that indicates that the response contains more items than can be // returned in a single response. To receive additional items, specify this string // for the NextToken value when requesting the next set of items. This value is // null when there are no more items to return. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeAutoScalingNotificationTypesInput ¶
type DescribeAutoScalingNotificationTypesInput struct { }
type DescribeAutoScalingNotificationTypesOutput ¶
type DescribeAutoScalingNotificationTypesOutput struct { // The notification types. AutoScalingNotificationTypes []*string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeInstanceRefreshesInput ¶
type DescribeInstanceRefreshesInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // One or more instance refresh IDs. InstanceRefreshIds []*string // The maximum number of items to return with this call. The default value is 50 // and the maximum value is 100. MaxRecords *int32 // The token for the next set of items to return. (You received this token from a // previous call.) NextToken *string }
type DescribeInstanceRefreshesOutput ¶
type DescribeInstanceRefreshesOutput struct { // The instance refreshes for the specified group. InstanceRefreshes []*types.InstanceRefresh // A string that indicates that the response contains more items than can be // returned in a single response. To receive additional items, specify this string // for the NextToken value when requesting the next set of items. This value is // null when there are no more items to return. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeLaunchConfigurationsInput ¶
type DescribeLaunchConfigurationsInput struct { // The launch configuration names. If you omit this parameter, all launch // configurations are described. LaunchConfigurationNames []*string // The maximum number of items to return with this call. The default value is 50 // and the maximum value is 100. MaxRecords *int32 // The token for the next set of items to return. (You received this token from a // previous call.) NextToken *string }
type DescribeLaunchConfigurationsOutput ¶
type DescribeLaunchConfigurationsOutput struct { // The launch configurations. // // This member is required. LaunchConfigurations []*types.LaunchConfiguration // A string that indicates that the response contains more items than can be // returned in a single response. To receive additional items, specify this string // for the NextToken value when requesting the next set of items. This value is // null when there are no more items to return. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeLifecycleHookTypesInput ¶
type DescribeLifecycleHookTypesInput struct { }
type DescribeLifecycleHookTypesOutput ¶
type DescribeLifecycleHookTypesOutput struct { // The lifecycle hook types. LifecycleHookTypes []*string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeLifecycleHooksOutput ¶
type DescribeLifecycleHooksOutput struct { // The lifecycle hooks for the specified group. LifecycleHooks []*types.LifecycleHook // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeLoadBalancerTargetGroupsInput ¶
type DescribeLoadBalancerTargetGroupsInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // The maximum number of items to return with this call. The default value is 100 // and the maximum value is 100. MaxRecords *int32 // The token for the next set of items to return. (You received this token from a // previous call.) NextToken *string }
type DescribeLoadBalancerTargetGroupsOutput ¶
type DescribeLoadBalancerTargetGroupsOutput struct { // Information about the target groups. LoadBalancerTargetGroups []*types.LoadBalancerTargetGroupState // A string that indicates that the response contains more items than can be // returned in a single response. To receive additional items, specify this string // for the NextToken value when requesting the next set of items. This value is // null when there are no more items to return. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeLoadBalancersInput ¶
type DescribeLoadBalancersInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // The maximum number of items to return with this call. The default value is 100 // and the maximum value is 100. MaxRecords *int32 // The token for the next set of items to return. (You received this token from a // previous call.) NextToken *string }
type DescribeLoadBalancersOutput ¶
type DescribeLoadBalancersOutput struct { // The load balancers. LoadBalancers []*types.LoadBalancerState // A string that indicates that the response contains more items than can be // returned in a single response. To receive additional items, specify this string // for the NextToken value when requesting the next set of items. This value is // null when there are no more items to return. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeMetricCollectionTypesInput ¶
type DescribeMetricCollectionTypesInput struct { }
type DescribeMetricCollectionTypesOutput ¶
type DescribeMetricCollectionTypesOutput struct { // The granularities for the metrics. Granularities []*types.MetricGranularityType // One or more metrics. Metrics []*types.MetricCollectionType // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeNotificationConfigurationsInput ¶
type DescribeNotificationConfigurationsInput struct { // The name of the Auto Scaling group. AutoScalingGroupNames []*string // The maximum number of items to return with this call. The default value is 50 // and the maximum value is 100. MaxRecords *int32 // The token for the next set of items to return. (You received this token from a // previous call.) NextToken *string }
type DescribeNotificationConfigurationsOutput ¶
type DescribeNotificationConfigurationsOutput struct { // The notification configurations. // // This member is required. NotificationConfigurations []*types.NotificationConfiguration // A string that indicates that the response contains more items than can be // returned in a single response. To receive additional items, specify this string // for the NextToken value when requesting the next set of items. This value is // null when there are no more items to return. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribePoliciesInput ¶
type DescribePoliciesInput struct { // The name of the Auto Scaling group. AutoScalingGroupName *string // The maximum number of items to be returned with each call. The default value is // 50 and the maximum value is 100. MaxRecords *int32 // The token for the next set of items to return. (You received this token from a // previous call.) NextToken *string // The names of one or more policies. If you omit this parameter, all policies are // described. If a group name is provided, the results are limited to that group. // This list is limited to 50 items. If you specify an unknown policy name, it is // ignored with no error. PolicyNames []*string // One or more policy types. The valid values are SimpleScaling, StepScaling, and // TargetTrackingScaling. PolicyTypes []*string }
type DescribePoliciesOutput ¶
type DescribePoliciesOutput struct { // A string that indicates that the response contains more items than can be // returned in a single response. To receive additional items, specify this string // for the NextToken value when requesting the next set of items. This value is // null when there are no more items to return. NextToken *string // The scaling policies. ScalingPolicies []*types.ScalingPolicy // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeScalingActivitiesInput ¶
type DescribeScalingActivitiesInput struct { // The activity IDs of the desired scaling activities. You can specify up to 50 // IDs. If you omit this parameter, all activities for the past six weeks are // described. If unknown activities are requested, they are ignored with no error. // If you specify an Auto Scaling group, the results are limited to that group. ActivityIds []*string // The name of the Auto Scaling group. AutoScalingGroupName *string // The maximum number of items to return with this call. The default value is 100 // and the maximum value is 100. MaxRecords *int32 // The token for the next set of items to return. (You received this token from a // previous call.) NextToken *string }
type DescribeScalingActivitiesOutput ¶
type DescribeScalingActivitiesOutput struct { // The scaling activities. Activities are sorted by start time. Activities still in // progress are described first. // // This member is required. Activities []*types.Activity // A string that indicates that the response contains more items than can be // returned in a single response. To receive additional items, specify this string // for the NextToken value when requesting the next set of items. This value is // null when there are no more items to return. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeScalingProcessTypesInput ¶
type DescribeScalingProcessTypesInput struct { }
type DescribeScalingProcessTypesOutput ¶
type DescribeScalingProcessTypesOutput struct { // The names of the process types. Processes []*types.ProcessType // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeScheduledActionsInput ¶
type DescribeScheduledActionsInput struct { // The name of the Auto Scaling group. AutoScalingGroupName *string // The latest scheduled start time to return. If scheduled action names are // provided, this parameter is ignored. EndTime *time.Time // The maximum number of items to return with this call. The default value is 50 // and the maximum value is 100. MaxRecords *int32 // The token for the next set of items to return. (You received this token from a // previous call.) NextToken *string // The names of one or more scheduled actions. You can specify up to 50 actions. If // you omit this parameter, all scheduled actions are described. If you specify an // unknown scheduled action, it is ignored with no error. ScheduledActionNames []*string // The earliest scheduled start time to return. If scheduled action names are // provided, this parameter is ignored. StartTime *time.Time }
type DescribeScheduledActionsOutput ¶
type DescribeScheduledActionsOutput struct { // A string that indicates that the response contains more items than can be // returned in a single response. To receive additional items, specify this string // for the NextToken value when requesting the next set of items. This value is // null when there are no more items to return. NextToken *string // The scheduled actions. ScheduledUpdateGroupActions []*types.ScheduledUpdateGroupAction // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeTagsInput ¶
type DescribeTagsInput struct { // One or more filters to scope the tags to return. The maximum number of filters // per filter type (for example, auto-scaling-group) is 1000. Filters []*types.Filter // The maximum number of items to return with this call. The default value is 50 // and the maximum value is 100. MaxRecords *int32 // The token for the next set of items to return. (You received this token from a // previous call.) NextToken *string }
type DescribeTagsOutput ¶
type DescribeTagsOutput struct { // A string that indicates that the response contains more items than can be // returned in a single response. To receive additional items, specify this string // for the NextToken value when requesting the next set of items. This value is // null when there are no more items to return. NextToken *string // One or more tags. Tags []*types.TagDescription // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DescribeTerminationPolicyTypesInput ¶
type DescribeTerminationPolicyTypesInput struct { }
type DescribeTerminationPolicyTypesOutput ¶
type DescribeTerminationPolicyTypesOutput struct { // The termination policies supported by Amazon EC2 Auto Scaling: OldestInstance, // OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, Default, // OldestLaunchTemplate, and AllocationStrategy. TerminationPolicyTypes []*string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DetachInstancesInput ¶
type DetachInstancesInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // Indicates whether the Auto Scaling group decrements the desired capacity value // by the number of instances detached. // // This member is required. ShouldDecrementDesiredCapacity *bool // The IDs of the instances. You can specify up to 20 instances. InstanceIds []*string }
type DetachInstancesOutput ¶
type DetachInstancesOutput struct { // The activities related to detaching the instances from the Auto Scaling group. Activities []*types.Activity // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DetachLoadBalancerTargetGroupsInput ¶
type DetachLoadBalancerTargetGroupsInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // The Amazon Resource Names (ARN) of the target groups. You can specify up to 10 // target groups. // // This member is required. TargetGroupARNs []*string }
type DetachLoadBalancerTargetGroupsOutput ¶
type DetachLoadBalancerTargetGroupsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DetachLoadBalancersOutput ¶
type DetachLoadBalancersOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DisableMetricsCollectionInput ¶
type DisableMetricsCollectionInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // Specifies one or more of the following metrics: // // * GroupMinSize // // * // GroupMaxSize // // * GroupDesiredCapacity // // * GroupInServiceInstances // // * // GroupPendingInstances // // * GroupStandbyInstances // // * GroupTerminatingInstances // // * // GroupTotalInstances // // * GroupInServiceCapacity // // * GroupPendingCapacity // // * // GroupStandbyCapacity // // * GroupTerminatingCapacity // // * GroupTotalCapacity // // If you // omit this parameter, all metrics are disabled. Metrics []*string }
type DisableMetricsCollectionOutput ¶
type DisableMetricsCollectionOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type EnableMetricsCollectionInput ¶
type EnableMetricsCollectionInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // The granularity to associate with the metrics to collect. The only valid value // is 1Minute. // // This member is required. Granularity *string // Specifies which group-level metrics to start collecting. You can specify one or // more of the following metrics: // // * GroupMinSize // // * GroupMaxSize // // * // GroupDesiredCapacity // // * GroupInServiceInstances // // * GroupPendingInstances // // * // GroupStandbyInstances // // * GroupTerminatingInstances // // * GroupTotalInstances // // The // instance weighting feature supports the following additional metrics: // // * // GroupInServiceCapacity // // * GroupPendingCapacity // // * GroupStandbyCapacity // // * // GroupTerminatingCapacity // // * GroupTotalCapacity // // If you omit this parameter, all // metrics are enabled. Metrics []*string }
type EnableMetricsCollectionOutput ¶
type EnableMetricsCollectionOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type EndpointResolver ¶
type EndpointResolver interface {
ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}
EndpointResolver interface for resolving service endpoints.
func WithEndpointResolver ¶
func WithEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver
WithEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided fallbackResolver for resolution. awsResolver and fallbackResolver must not be nil
type EndpointResolverFunc ¶
type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.
func (EndpointResolverFunc) ResolveEndpoint ¶
func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)
type EndpointResolverOptions ¶ added in v0.29.0
type EndpointResolverOptions = internalendpoints.Options
EndpointResolverOptions is the service endpoint resolver options
type EnterStandbyInput ¶
type EnterStandbyInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // Indicates whether to decrement the desired capacity of the Auto Scaling group by // the number of instances moved to Standby mode. // // This member is required. ShouldDecrementDesiredCapacity *bool // The IDs of the instances. You can specify up to 20 instances. InstanceIds []*string }
type EnterStandbyOutput ¶
type EnterStandbyOutput struct { // The activities related to moving instances into Standby mode. Activities []*types.Activity // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type ExecutePolicyInput ¶
type ExecutePolicyInput struct { // The name or ARN of the policy. // // This member is required. PolicyName *string // The name of the Auto Scaling group. AutoScalingGroupName *string // The breach threshold for the alarm. Required if the policy type is StepScaling // and not supported otherwise. BreachThreshold *float64 // Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to // complete before executing the policy. Valid only if the policy type is // SimpleScaling. For more information, see Scaling Cooldowns for Amazon EC2 Auto // Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) in // the Amazon EC2 Auto Scaling User Guide. HonorCooldown *bool // The metric value to compare to BreachThreshold. This enables you to execute a // policy of type StepScaling and determine which step adjustment to use. For // example, if the breach threshold is 50 and you want to use a step adjustment // with a lower bound of 0 and an upper bound of 10, you can set the metric value // to 59. If you specify a metric value that doesn't correspond to a step // adjustment for the policy, the call returns an error. Required if the policy // type is StepScaling and not supported otherwise. MetricValue *float64 }
type ExecutePolicyOutput ¶
type ExecutePolicyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type ExitStandbyInput ¶
type ExitStandbyOutput ¶
type ExitStandbyOutput struct { // The activities related to moving instances out of Standby mode. Activities []*types.Activity // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type HTTPSignerV4 ¶
type Options ¶
type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // The region to send requests to. (Required) Region string // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. Retryer retry.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient }
type PutLifecycleHookInput ¶
type PutLifecycleHookInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // The name of the lifecycle hook. // // This member is required. LifecycleHookName *string // Defines the action the Auto Scaling group should take when the lifecycle hook // timeout elapses or if an unexpected failure occurs. This parameter can be either // CONTINUE or ABANDON. The default value is ABANDON. DefaultResult *string // The maximum time, in seconds, that can elapse before the lifecycle hook times // out. The range is from 30 to 7200 seconds. The default value is 3600 seconds (1 // hour). If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the // action that you specified in the DefaultResult parameter. You can prevent the // lifecycle hook from timing out by calling the RecordLifecycleActionHeartbeat // API. HeartbeatTimeout *int32 // The instance state to which you want to attach the lifecycle hook. The valid // values are: // // * autoscaling:EC2_INSTANCE_LAUNCHING // // * // autoscaling:EC2_INSTANCE_TERMINATING // // Required for new lifecycle hooks, but // optional when updating existing hooks. LifecycleTransition *string // Additional information that you want to include any time Amazon EC2 Auto Scaling // sends a message to the notification target. NotificationMetadata *string // The ARN of the notification target that Amazon EC2 Auto Scaling uses to notify // you when an instance is in the transition state for the lifecycle hook. This // target can be either an SQS queue or an SNS topic. If you specify an empty // string, this overrides the current ARN. This operation uses the JSON format when // sending notifications to an Amazon SQS queue, and an email key-value pair format // when sending notifications to an Amazon SNS topic. When you specify a // notification target, Amazon EC2 Auto Scaling sends it a test message. Test // messages contain the following additional key-value pair: "Event": // "autoscaling:TEST_NOTIFICATION". NotificationTargetARN *string // The ARN of the IAM role that allows the Auto Scaling group to publish to the // specified notification target, for example, an Amazon SNS topic or an Amazon SQS // queue. Required for new lifecycle hooks, but optional when updating existing // hooks. RoleARN *string }
type PutLifecycleHookOutput ¶
type PutLifecycleHookOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type PutNotificationConfigurationInput ¶
type PutNotificationConfigurationInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // The type of event that causes the notification to be sent. To query the // notification types supported by Amazon EC2 Auto Scaling, call the // DescribeAutoScalingNotificationTypes API. // // This member is required. NotificationTypes []*string // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon // SNS) topic. // // This member is required. TopicARN *string }
type PutNotificationConfigurationOutput ¶
type PutNotificationConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type PutScalingPolicyInput ¶
type PutScalingPolicyInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // The name of the policy. // // This member is required. PolicyName *string // Specifies how the scaling adjustment is interpreted (for example, an absolute // number or a percentage). The valid values are ChangeInCapacity, ExactCapacity, // and PercentChangeInCapacity. Required if the policy type is StepScaling or // SimpleScaling. For more information, see Scaling Adjustment Types // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-adjustment) // in the Amazon EC2 Auto Scaling User Guide. AdjustmentType *string // The duration of the policy's cooldown period, in seconds. When a cooldown period // is specified here, it overrides the default cooldown period defined for the Auto // Scaling group. Valid only if the policy type is SimpleScaling. For more // information, see Scaling Cooldowns for Amazon EC2 Auto Scaling // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) in the // Amazon EC2 Auto Scaling User Guide. Cooldown *int32 // Indicates whether the scaling policy is enabled or disabled. The default is // enabled. For more information, see Disabling a Scaling Policy for an Auto // Scaling Group // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enable-disable-scaling-policy.html) // in the Amazon EC2 Auto Scaling User Guide. Enabled *bool // The estimated time, in seconds, until a newly launched instance can contribute // to the CloudWatch metrics. If not provided, the default is to use the value from // the default cooldown period for the Auto Scaling group. Valid only if the policy // type is TargetTrackingScaling or StepScaling. EstimatedInstanceWarmup *int32 // The aggregation type for the CloudWatch metrics. The valid values are Minimum, // Maximum, and Average. If the aggregation type is null, the value is treated as // Average. Valid only if the policy type is StepScaling. MetricAggregationType *string // The minimum value to scale by when the adjustment type is // PercentChangeInCapacity. For example, suppose that you create a step scaling // policy to scale out an Auto Scaling group by 25 percent and you specify a // MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy // is performed, 25 percent of 4 is 1. However, because you specified a // MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 // instances. Valid only if the policy type is StepScaling or SimpleScaling. For // more information, see Scaling Adjustment Types // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-adjustment) // in the Amazon EC2 Auto Scaling User Guide. Some Auto Scaling groups use instance // weights. In this case, set the MinAdjustmentMagnitude to a value that is at // least as large as your largest instance weight. MinAdjustmentMagnitude *int32 // Available for backward compatibility. Use MinAdjustmentMagnitude instead. MinAdjustmentStep *int32 // One of the following policy types: // // * TargetTrackingScaling // // * StepScaling // // * // SimpleScaling (default) PolicyType *string // The amount by which to scale, based on the specified adjustment type. A positive // value adds to the current capacity while a negative number removes from the // current capacity. For exact capacity, you must specify a positive value. // Required if the policy type is SimpleScaling. (Not used with any other policy // type.) ScalingAdjustment *int32 // A set of adjustments that enable you to scale based on the size of the alarm // breach. Required if the policy type is StepScaling. (Not used with any other // policy type.) StepAdjustments []*types.StepAdjustment // A target tracking scaling policy. Includes support for predefined or customized // metrics. The following predefined metrics are available: // // * // ASGAverageCPUUtilization // // * ASGAverageNetworkIn // // * ASGAverageNetworkOut // // * // ALBRequestCountPerTarget // // If you specify ALBRequestCountPerTarget for the // metric, you must specify the ResourceLabel parameter with the // PredefinedMetricSpecification. For more information, see // TargetTrackingConfiguration // (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_TargetTrackingConfiguration.html) // in the Amazon EC2 Auto Scaling API Reference. Required if the policy type is // TargetTrackingScaling. TargetTrackingConfiguration *types.TargetTrackingConfiguration }
type PutScalingPolicyOutput ¶
type PutScalingPolicyOutput struct { // The CloudWatch alarms created for the target tracking scaling policy. Alarms []*types.Alarm // The Amazon Resource Name (ARN) of the policy. PolicyARN *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
Contains the output of PutScalingPolicy.
type PutScheduledUpdateGroupActionInput ¶
type PutScheduledUpdateGroupActionInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // The name of this scaling action. // // This member is required. ScheduledActionName *string // The desired capacity is the initial capacity of the Auto Scaling group after the // scheduled action runs and the capacity it attempts to maintain. It can scale // beyond this capacity if you add more scaling conditions. DesiredCapacity *int32 // The date and time for the recurring schedule to end. Amazon EC2 Auto Scaling // does not perform the action after this time. EndTime *time.Time // The maximum size of the Auto Scaling group. MaxSize *int32 // The minimum size of the Auto Scaling group. MinSize *int32 // The recurring schedule for this action, in Unix cron syntax format. This format // consists of five fields separated by white spaces: [Minute] [Hour] // [Day_of_Month] [Month_of_Year] [Day_of_Week]. The value must be in quotes (for // example, "30 0 1 1,6,12 *"). For more information about this format, see Crontab // (http://crontab.org). When StartTime and EndTime are specified with Recurrence, // they form the boundaries of when the recurring action starts and stops. Recurrence *string // The date and time for this action to start, in YYYY-MM-DDThh:mm:ssZ format in // UTC/GMT only and in quotes (for example, "2019-06-01T00:00:00Z"). If you specify // Recurrence and StartTime, Amazon EC2 Auto Scaling performs the action at this // time, and then performs the action based on the specified recurrence. If you try // to schedule your action in the past, Amazon EC2 Auto Scaling returns an error // message. StartTime *time.Time // This parameter is no longer used. Time *time.Time }
type PutScheduledUpdateGroupActionOutput ¶
type PutScheduledUpdateGroupActionOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type RecordLifecycleActionHeartbeatInput ¶
type RecordLifecycleActionHeartbeatInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // The name of the lifecycle hook. // // This member is required. LifecycleHookName *string // The ID of the instance. InstanceId *string // A token that uniquely identifies a specific lifecycle action associated with an // instance. Amazon EC2 Auto Scaling sends this token to the notification target // that you specified when you created the lifecycle hook. LifecycleActionToken *string }
type RecordLifecycleActionHeartbeatOutput ¶
type RecordLifecycleActionHeartbeatOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type ResolveEndpoint ¶
type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions }
func (*ResolveEndpoint) HandleSerialize ¶
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, )
func (*ResolveEndpoint) ID ¶
func (*ResolveEndpoint) ID() string
type ResumeProcessesInput ¶
type ResumeProcessesInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // One or more of the following processes: // // * Launch // // * Terminate // // * // AddToLoadBalancer // // * AlarmNotification // // * AZRebalance // // * HealthCheck // // * // InstanceRefresh // // * ReplaceUnhealthy // // * ScheduledActions // // If you omit this // parameter, all processes are specified. ScalingProcesses []*string }
type ResumeProcessesOutput ¶
type ResumeProcessesOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type SetDesiredCapacityInput ¶
type SetDesiredCapacityInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // The desired capacity is the initial capacity of the Auto Scaling group after // this operation completes and the capacity it attempts to maintain. // // This member is required. DesiredCapacity *int32 // Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to // complete before initiating a scaling activity to set your Auto Scaling group to // its new capacity. By default, Amazon EC2 Auto Scaling does not honor the // cooldown period during manual scaling activities. HonorCooldown *bool }
type SetDesiredCapacityOutput ¶
type SetDesiredCapacityOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type SetInstanceHealthInput ¶
type SetInstanceHealthInput struct { // The health status of the instance. Set to Healthy to have the instance remain in // service. Set to Unhealthy to have the instance be out of service. Amazon EC2 // Auto Scaling terminates and replaces the unhealthy instance. // // This member is required. HealthStatus *string // The ID of the instance. // // This member is required. InstanceId *string // If the Auto Scaling group of the specified instance has a HealthCheckGracePeriod // specified for the group, by default, this call respects the grace period. Set // this to False, to have the call not respect the grace period associated with the // group. For more information about the health check grace period, see // CreateAutoScalingGroup // (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_CreateAutoScalingGroup.html) // in the Amazon EC2 Auto Scaling API Reference. ShouldRespectGracePeriod *bool }
type SetInstanceHealthOutput ¶
type SetInstanceHealthOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type SetInstanceProtectionInput ¶
type SetInstanceProtectionInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // One or more instance IDs. // // This member is required. InstanceIds []*string // Indicates whether the instance is protected from termination by Amazon EC2 Auto // Scaling when scaling in. // // This member is required. ProtectedFromScaleIn *bool }
type SetInstanceProtectionOutput ¶
type SetInstanceProtectionOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type StartInstanceRefreshInput ¶
type StartInstanceRefreshInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // Set of preferences associated with the instance refresh request. If not // provided, the default values are used. For MinHealthyPercentage, the default // value is 90. For InstanceWarmup, the default is to use the value specified for // the health check grace period for the Auto Scaling group. For more information, // see RefreshPreferences // (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_RefreshPreferences.html) // in the Amazon EC2 Auto Scaling API Reference. Preferences *types.RefreshPreferences // The strategy to use for the instance refresh. The only valid value is Rolling. A // rolling update is an update that is applied to all instances in an Auto Scaling // group until all instances have been updated. A rolling update can fail due to // failed health checks or if instances are on standby or are protected from scale // in. If the rolling update process fails, any instances that were already // replaced are not rolled back to their previous configuration. Strategy types.RefreshStrategy }
type StartInstanceRefreshOutput ¶
type StartInstanceRefreshOutput struct { // A unique ID for tracking the progress of the request. InstanceRefreshId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type SuspendProcessesInput ¶
type SuspendProcessesInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // One or more of the following processes: // // * Launch // // * Terminate // // * // AddToLoadBalancer // // * AlarmNotification // // * AZRebalance // // * HealthCheck // // * // InstanceRefresh // // * ReplaceUnhealthy // // * ScheduledActions // // If you omit this // parameter, all processes are specified. ScalingProcesses []*string }
type SuspendProcessesOutput ¶
type SuspendProcessesOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type TerminateInstanceInAutoScalingGroupInput ¶
type TerminateInstanceInAutoScalingGroupInput struct { // The ID of the instance. // // This member is required. InstanceId *string // Indicates whether terminating the instance also decrements the size of the Auto // Scaling group. // // This member is required. ShouldDecrementDesiredCapacity *bool }
type TerminateInstanceInAutoScalingGroupOutput ¶
type TerminateInstanceInAutoScalingGroupOutput struct { // A scaling activity. Activity *types.Activity // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type UpdateAutoScalingGroupInput ¶
type UpdateAutoScalingGroupInput struct { // The name of the Auto Scaling group. // // This member is required. AutoScalingGroupName *string // One or more Availability Zones for the group. AvailabilityZones []*string // The amount of time, in seconds, after a scaling activity completes before // another scaling activity can start. The default value is 300. This setting // applies when using simple scaling policies, but not when using other scaling // policies or scheduled scaling. For more information, see Scaling Cooldowns for // Amazon EC2 Auto Scaling // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) in the // Amazon EC2 Auto Scaling User Guide. DefaultCooldown *int32 // The desired capacity is the initial capacity of the Auto Scaling group after // this operation completes and the capacity it attempts to maintain. This number // must be greater than or equal to the minimum size of the group and less than or // equal to the maximum size of the group. DesiredCapacity *int32 // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before // checking the health status of an EC2 instance that has come into service. The // default value is 0. For more information, see Health Check Grace Period // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html#health-check-grace-period) // in the Amazon EC2 Auto Scaling User Guide. Required if you are adding an ELB // health check. HealthCheckGracePeriod *int32 // The service to use for the health checks. The valid values are EC2 and ELB. If // you configure an Auto Scaling group to use ELB health checks, it considers the // instance unhealthy if it fails either the EC2 status checks or the load balancer // health checks. HealthCheckType *string // The name of the launch configuration. If you specify LaunchConfigurationName in // your update request, you can't specify LaunchTemplate or MixedInstancesPolicy. LaunchConfigurationName *string // The launch template and version to use to specify the updates. If you specify // LaunchTemplate in your update request, you can't specify LaunchConfigurationName // or MixedInstancesPolicy. For more information, see LaunchTemplateSpecification // (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_LaunchTemplateSpecification.html) // in the Amazon EC2 Auto Scaling API Reference. LaunchTemplate *types.LaunchTemplateSpecification // The maximum amount of time, in seconds, that an instance can be in service. The // default is null. This parameter is optional, but if you specify a value for it, // you must specify a value of at least 604,800 seconds (7 days). To clear a // previously set value, specify a new value of 0. For more information, see // Replacing Auto Scaling Instances Based on Maximum Instance Lifetime // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-max-instance-lifetime.html) // in the Amazon EC2 Auto Scaling User Guide. Valid Range: Minimum value of 0. MaxInstanceLifetime *int32 // The maximum size of the Auto Scaling group. With a mixed instances policy that // uses instance weighting, Amazon EC2 Auto Scaling may need to go above MaxSize to // meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will // never go above MaxSize by more than your largest instance weight (weights that // define how many units each instance contributes to the desired capacity of the // group). MaxSize *int32 // The minimum size of the Auto Scaling group. MinSize *int32 // An embedded object that specifies a mixed instances policy. In your call to // UpdateAutoScalingGroup, you can make changes to the policy that is specified. // All optional parameters are left unchanged if not specified. For more // information, see MixedInstancesPolicy // (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_MixedInstancesPolicy.html) // in the Amazon EC2 Auto Scaling API Reference and Auto Scaling Groups with // Multiple Instance Types and Purchase Options // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html) // in the Amazon EC2 Auto Scaling User Guide. MixedInstancesPolicy *types.MixedInstancesPolicy // Indicates whether newly launched instances are protected from termination by // Amazon EC2 Auto Scaling when scaling in. For more information about preventing // instances from terminating on scale in, see Instance Protection // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) // in the Amazon EC2 Auto Scaling User Guide. NewInstancesProtectedFromScaleIn *bool // The name of the placement group into which to launch your instances, if any. A // placement group is a logical grouping of instances within a single Availability // Zone. You cannot specify multiple Availability Zones and a placement group. For // more information, see Placement Groups // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) in // the Amazon EC2 User Guide for Linux Instances. PlacementGroup *string // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling // group uses to call other AWS services on your behalf. For more information, see // Service-Linked Roles // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html) // in the Amazon EC2 Auto Scaling User Guide. ServiceLinkedRoleARN *string // A standalone termination policy or a list of termination policies used to select // the instance to terminate. The policies are executed in the order that they are // listed. For more information, see Controlling Which Instances Auto Scaling // Terminates During Scale In // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html) // in the Amazon EC2 Auto Scaling User Guide. TerminationPolicies []*string // A comma-separated list of subnet IDs for virtual private cloud (VPC). If you // specify VPCZoneIdentifier with AvailabilityZones, the subnets that you specify // for this parameter must reside in those Availability Zones. VPCZoneIdentifier *string }
type UpdateAutoScalingGroupOutput ¶
type UpdateAutoScalingGroupOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
Source Files ¶
- api_client.go
- api_op_AttachInstances.go
- api_op_AttachLoadBalancerTargetGroups.go
- api_op_AttachLoadBalancers.go
- api_op_BatchDeleteScheduledAction.go
- api_op_BatchPutScheduledUpdateGroupAction.go
- api_op_CancelInstanceRefresh.go
- api_op_CompleteLifecycleAction.go
- api_op_CreateAutoScalingGroup.go
- api_op_CreateLaunchConfiguration.go
- api_op_CreateOrUpdateTags.go
- api_op_DeleteAutoScalingGroup.go
- api_op_DeleteLaunchConfiguration.go
- api_op_DeleteLifecycleHook.go
- api_op_DeleteNotificationConfiguration.go
- api_op_DeletePolicy.go
- api_op_DeleteScheduledAction.go
- api_op_DeleteTags.go
- api_op_DescribeAccountLimits.go
- api_op_DescribeAdjustmentTypes.go
- api_op_DescribeAutoScalingGroups.go
- api_op_DescribeAutoScalingInstances.go
- api_op_DescribeAutoScalingNotificationTypes.go
- api_op_DescribeInstanceRefreshes.go
- api_op_DescribeLaunchConfigurations.go
- api_op_DescribeLifecycleHookTypes.go
- api_op_DescribeLifecycleHooks.go
- api_op_DescribeLoadBalancerTargetGroups.go
- api_op_DescribeLoadBalancers.go
- api_op_DescribeMetricCollectionTypes.go
- api_op_DescribeNotificationConfigurations.go
- api_op_DescribePolicies.go
- api_op_DescribeScalingActivities.go
- api_op_DescribeScalingProcessTypes.go
- api_op_DescribeScheduledActions.go
- api_op_DescribeTags.go
- api_op_DescribeTerminationPolicyTypes.go
- api_op_DetachInstances.go
- api_op_DetachLoadBalancerTargetGroups.go
- api_op_DetachLoadBalancers.go
- api_op_DisableMetricsCollection.go
- api_op_EnableMetricsCollection.go
- api_op_EnterStandby.go
- api_op_ExecutePolicy.go
- api_op_ExitStandby.go
- api_op_PutLifecycleHook.go
- api_op_PutNotificationConfiguration.go
- api_op_PutScalingPolicy.go
- api_op_PutScheduledUpdateGroupAction.go
- api_op_RecordLifecycleActionHeartbeat.go
- api_op_ResumeProcesses.go
- api_op_SetDesiredCapacity.go
- api_op_SetInstanceHealth.go
- api_op_SetInstanceProtection.go
- api_op_StartInstanceRefresh.go
- api_op_SuspendProcesses.go
- api_op_TerminateInstanceInAutoScalingGroup.go
- api_op_UpdateAutoScalingGroup.go
- deserializers.go
- doc.go
- endpoints.go
- serializers.go
- validators.go