There are more AWS SDK examples available in the AWS Doc SDK Examples
Actions for Auto Scaling using AWS SDKs
The following code examples demonstrate how to perform individual Auto Scaling actions with AWS SDKs. Each example includes a link to GitHub, where you can find instructions for setting up and running the code.
These excerpts call the Auto Scaling API and are code excerpts from larger programs that must be run in context. You can see actions in context in Scenarios for Auto Scaling using AWS SDKs .
The following examples include only the most commonly used actions. For a complete list, see the Amazon EC2 Auto Scaling API Reference.
Examples
- AttachInstances
- AttachLoadBalancerTargetGroups
- AttachLoadBalancers
- CompleteLifecycleAction
- CreateAutoScalingGroup
- CreateLaunchConfiguration
- CreateOrUpdateTags
- DeleteAutoScalingGroup
- DeleteLaunchConfiguration
- DeleteLifecycleHook
- DeleteNotificationConfiguration
- DeletePolicy
- DeleteScheduledAction
- DeleteTags
- DescribeAccountLimits
- DescribeAdjustmentTypes
- DescribeAutoScalingGroups
- DescribeAutoScalingInstances
- DescribeAutoScalingNotificationTypes
- DescribeLaunchConfigurations
- DescribeLifecycleHookTypes
- DescribeLifecycleHooks
- DescribeLoadBalancers
- DescribeMetricCollectionTypes
- DescribeNotificationConfigurations
- DescribePolicies
- DescribeScalingActivities
- DescribeScalingProcessTypes
- DescribeScheduledActions
- DescribeTags
- DescribeTerminationPolicyTypes
- DetachInstances
- DetachLoadBalancers
- DisableMetricsCollection
- EnableMetricsCollection
- EnterStandby
- ExecutePolicy
- ExitStandby
- PutLifecycleHook
- PutNotificationConfiguration
- PutScalingPolicy
- PutScheduledUpdateGroupAction
- RecordLifecycleActionHeartbeat
- ResumeProcesses
- SetDesiredCapacity
- SetInstanceHealth
- SetInstanceProtection
- SuspendProcesses
- TerminateInstanceInAutoScalingGroup
- UpdateAutoScalingGroup