Skip to contents

Amazon EC2 Auto Scaling

The describe_auto_scaling_groups API operation might be throttled when retrieving details for an Auto Scaling group that contains many instances. By default, this operation returns details for all instances in the group. To help prevent throttling, you can set the IncludeInstances parameter to false to exclude instance details from the response.

Amazon EC2 Auto Scaling is designed to automatically launch and terminate EC2 instances based on user-defined scaling policies, scheduled actions, and health checks.

For more information, see the Amazon EC2 Auto Scaling User Guide and the Amazon EC2 Auto Scaling API Reference.

Usage

autoscaling(
  config = list(),
  credentials = list(),
  endpoint = NULL,
  region = NULL
)

Arguments

config

Optional configuration of credentials, endpoint, and/or region.

  • credentials:

    • creds:

      • access_key_id: AWS access key ID

      • secret_access_key: AWS secret access key

      • session_token: AWS temporary session token

    • profile: The name of a profile to use. If not given, then the default profile is used.

    • anonymous: Set anonymous credentials.

  • endpoint: The complete URL to use for the constructed client.

  • region: The AWS Region used in instantiating the client.

  • close_connection: Immediately close all HTTP connections.

  • timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.

  • s3_force_path_style: Set this to true to force the request to use path-style addressing, i.e. http://s3.amazonaws.com/BUCKET/KEY.

  • sts_regional_endpoint: Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

credentials

Optional credentials shorthand for the config parameter

  • creds:

    • access_key_id: AWS access key ID

    • secret_access_key: AWS secret access key

    • session_token: AWS temporary session token

  • profile: The name of a profile to use. If not given, then the default profile is used.

  • anonymous: Set anonymous credentials.

endpoint

Optional shorthand for complete URL to use for the constructed client.

region

Optional shorthand for AWS Region used in instantiating the client.

Value

A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.

Service syntax

svc <- autoscaling(
  config = list(
    credentials = list(
      creds = list(
        access_key_id = "string",
        secret_access_key = "string",
        session_token = "string"
      ),
      profile = "string",
      anonymous = "logical"
    ),
    endpoint = "string",
    region = "string",
    close_connection = "logical",
    timeout = "numeric",
    s3_force_path_style = "logical",
    sts_regional_endpoint = "string"
  ),
  credentials = list(
    creds = list(
      access_key_id = "string",
      secret_access_key = "string",
      session_token = "string"
    ),
    profile = "string",
    anonymous = "logical"
  ),
  endpoint = "string",
  region = "string"
)

Operations

attach_instancesAttaches one or more EC2 instances to the specified Auto Scaling group
attach_load_balancersThis API operation is superseded by AttachTrafficSources, which can attach multiple traffic sources types
attach_load_balancer_target_groupsThis API operation is superseded by AttachTrafficSources, which can attach multiple traffic sources types
attach_traffic_sourcesAttaches one or more traffic sources to the specified Auto Scaling group
batch_delete_scheduled_actionDeletes one or more scheduled actions for the specified Auto Scaling group
batch_put_scheduled_update_group_actionCreates or updates one or more scheduled scaling actions for an Auto Scaling group
cancel_instance_refreshCancels an instance refresh or rollback that is in progress
complete_lifecycle_actionCompletes the lifecycle action for the specified token or instance with the specified result
create_auto_scaling_groupWe strongly recommend using a launch template when calling this operation to ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2
create_launch_configurationCreates a launch configuration
create_or_update_tagsCreates or updates tags for the specified Auto Scaling group
delete_auto_scaling_groupDeletes the specified Auto Scaling group
delete_launch_configurationDeletes the specified launch configuration
delete_lifecycle_hookDeletes the specified lifecycle hook
delete_notification_configurationDeletes the specified notification
delete_policyDeletes the specified scaling policy
delete_scheduled_actionDeletes the specified scheduled action
delete_tagsDeletes the specified tags
delete_warm_poolDeletes the warm pool for the specified Auto Scaling group
describe_account_limitsDescribes the current Amazon EC2 Auto Scaling resource quotas for your account
describe_adjustment_typesDescribes the available adjustment types for step scaling and simple scaling policies
describe_auto_scaling_groupsGets information about the Auto Scaling groups in the account and Region
describe_auto_scaling_instancesGets information about the Auto Scaling instances in the account and Region
describe_auto_scaling_notification_typesDescribes the notification types that are supported by Amazon EC2 Auto Scaling
describe_instance_refreshesGets information about the instance refreshes for the specified Auto Scaling group from the previous six weeks
describe_launch_configurationsGets information about the launch configurations in the account and Region
describe_lifecycle_hooksGets information about the lifecycle hooks for the specified Auto Scaling group
describe_lifecycle_hook_typesDescribes the available types of lifecycle hooks
describe_load_balancersThis API operation is superseded by DescribeTrafficSources, which can describe multiple traffic sources types
describe_load_balancer_target_groupsThis API operation is superseded by DescribeTrafficSources, which can describe multiple traffic sources types
describe_metric_collection_typesDescribes the available CloudWatch metrics for Amazon EC2 Auto Scaling
describe_notification_configurationsGets information about the Amazon SNS notifications that are configured for one or more Auto Scaling groups
describe_policiesGets information about the scaling policies in the account and Region
describe_scaling_activitiesGets information about the scaling activities in the account and Region
describe_scaling_process_typesDescribes the scaling process types for use with the ResumeProcesses and SuspendProcesses APIs
describe_scheduled_actionsGets information about the scheduled actions that haven't run or that have not reached their end time
describe_tagsDescribes the specified tags
describe_termination_policy_typesDescribes the termination policies supported by Amazon EC2 Auto Scaling
describe_traffic_sourcesGets information about the traffic sources for the specified Auto Scaling group
describe_warm_poolGets information about a warm pool and its instances
detach_instancesRemoves one or more instances from the specified Auto Scaling group
detach_load_balancersThis API operation is superseded by DetachTrafficSources, which can detach multiple traffic sources types
detach_load_balancer_target_groupsThis API operation is superseded by DetachTrafficSources, which can detach multiple traffic sources types
detach_traffic_sourcesDetaches one or more traffic sources from the specified Auto Scaling group
disable_metrics_collectionDisables group metrics collection for the specified Auto Scaling group
enable_metrics_collectionEnables group metrics collection for the specified Auto Scaling group
enter_standbyMoves the specified instances into the standby state
execute_policyExecutes the specified policy
exit_standbyMoves the specified instances out of the standby state
get_predictive_scaling_forecastRetrieves the forecast data for a predictive scaling policy
launch_instancesLaunches a specified number of instances in an Auto Scaling group
put_lifecycle_hookCreates or updates a lifecycle hook for the specified Auto Scaling group
put_notification_configurationConfigures an Auto Scaling group to send notifications when specified events take place
put_scaling_policyCreates or updates a scaling policy for an Auto Scaling group
put_scheduled_update_group_actionCreates or updates a scheduled scaling action for an Auto Scaling group
put_warm_poolCreates or updates a warm pool for the specified Auto Scaling group
record_lifecycle_action_heartbeatRecords a heartbeat for the lifecycle action associated with the specified token or instance
resume_processesResumes the specified suspended auto scaling processes, or all suspended process, for the specified Auto Scaling group
rollback_instance_refreshCancels an instance refresh that is in progress and rolls back any changes that it made
set_desired_capacitySets the size of the specified Auto Scaling group
set_instance_healthSets the health status of the specified instance
set_instance_protectionUpdates the instance protection settings of the specified instances
start_instance_refreshStarts an instance refresh
suspend_processesSuspends the specified auto scaling processes, or all processes, for the specified Auto Scaling group
terminate_instance_in_auto_scaling_groupTerminates the specified instance and optionally adjusts the desired group size
update_auto_scaling_groupWe strongly recommend that all Auto Scaling groups use launch templates to ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2

Examples

if (FALSE) { # \dontrun{
svc <- autoscaling()
# This example attaches the specified instance to the specified Auto
# Scaling group.
svc$attach_instances(
  AutoScalingGroupName = "my-auto-scaling-group",
  InstanceIds = list(
    "i-93633f9b"
  )
)
} # }