lib/aws-sdk-autoscaling/client.rb in aws-sdk-autoscaling-1.38.1 vs lib/aws-sdk-autoscaling/client.rb in aws-sdk-autoscaling-1.39.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
# WARNING ABOUT GENERATED CODE
#
# This file is generated. See the contributing guide for more information:
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
#
@@ -560,10 +562,47 @@
def batch_put_scheduled_update_group_action(params = {}, options = {})
req = build_request(:batch_put_scheduled_update_group_action, params)
req.send_request(options)
end
+ # 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][1].
+ #
+ #
+ #
+ # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html
+ #
+ # @option params [required, String] :auto_scaling_group_name
+ # The name of the Auto Scaling group.
+ #
+ # @return [Types::CancelInstanceRefreshAnswer] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
+ #
+ # * {Types::CancelInstanceRefreshAnswer#instance_refresh_id #instance_refresh_id} => String
+ #
+ # @example Request syntax with placeholder values
+ #
+ # resp = client.cancel_instance_refresh({
+ # auto_scaling_group_name: "XmlStringMaxLen255", # required
+ # })
+ #
+ # @example Response structure
+ #
+ # resp.instance_refresh_id #=> String
+ #
+ # @see http://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CancelInstanceRefresh AWS API Documentation
+ #
+ # @overload cancel_instance_refresh(params = {})
+ # @param [Hash] params ({})
+ def cancel_instance_refresh(params = {}, options = {})
+ req = build_request(:cancel_instance_refresh, params)
+ req.send_request(options)
+ end
+
# 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:
@@ -2145,10 +2184,81 @@
def describe_auto_scaling_notification_types(params = {}, options = {})
req = build_request(:describe_auto_scaling_notification_types, params)
req.send_request(options)
end
+ # 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.
+ #
+ # @option params [required, String] :auto_scaling_group_name
+ # The name of the Auto Scaling group.
+ #
+ # @option params [Array<String>] :instance_refresh_ids
+ # One or more instance refresh IDs.
+ #
+ # @option params [String] :next_token
+ # The token for the next set of items to return. (You received this
+ # token from a previous call.)
+ #
+ # @option params [Integer] :max_records
+ # The maximum number of items to return with this call. The default
+ # value is `50` and the maximum value is `100`.
+ #
+ # @return [Types::DescribeInstanceRefreshesAnswer] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
+ #
+ # * {Types::DescribeInstanceRefreshesAnswer#instance_refreshes #instance_refreshes} => Array<Types::InstanceRefresh>
+ # * {Types::DescribeInstanceRefreshesAnswer#next_token #next_token} => String
+ #
+ # @example Request syntax with placeholder values
+ #
+ # resp = client.describe_instance_refreshes({
+ # auto_scaling_group_name: "XmlStringMaxLen255", # required
+ # instance_refresh_ids: ["XmlStringMaxLen255"],
+ # next_token: "XmlString",
+ # max_records: 1,
+ # })
+ #
+ # @example Response structure
+ #
+ # resp.instance_refreshes #=> Array
+ # resp.instance_refreshes[0].instance_refresh_id #=> String
+ # resp.instance_refreshes[0].auto_scaling_group_name #=> String
+ # resp.instance_refreshes[0].status #=> String, one of "Pending", "InProgress", "Successful", "Failed", "Cancelling", "Cancelled"
+ # resp.instance_refreshes[0].status_reason #=> String
+ # resp.instance_refreshes[0].start_time #=> Time
+ # resp.instance_refreshes[0].end_time #=> Time
+ # resp.instance_refreshes[0].percentage_complete #=> Integer
+ # resp.instance_refreshes[0].instances_to_update #=> Integer
+ # resp.next_token #=> String
+ #
+ # @see http://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeInstanceRefreshes AWS API Documentation
+ #
+ # @overload describe_instance_refreshes(params = {})
+ # @param [Hash] params ({})
+ def describe_instance_refreshes(params = {}, options = {})
+ req = build_request(:describe_instance_refreshes, params)
+ req.send_request(options)
+ end
+
# Describes one or more launch configurations.
#
# @option params [Array<String>] :launch_configuration_names
# The launch configuration names. If you omit this parameter, all launch
# configurations are described.
@@ -4326,28 +4436,31 @@
#
# @option params [required, String] :auto_scaling_group_name
# The name of the Auto Scaling group.
#
# @option params [Array<String>] :scaling_processes
- # One or more of the following processes. If you omit this parameter,
- # all processes are specified.
+ # One or more of the following processes:
#
# * `Launch`
#
# * `Terminate`
#
- # * `HealthCheck`
+ # * `AddToLoadBalancer`
#
- # * `ReplaceUnhealthy`
+ # * `AlarmNotification`
#
# * `AZRebalance`
#
- # * `AlarmNotification`
+ # * `HealthCheck`
#
+ # * `InstanceRefresh`
+ #
+ # * `ReplaceUnhealthy`
+ #
# * `ScheduledActions`
#
- # * `AddToLoadBalancer`
+ # If you omit this parameter, all processes are specified.
#
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
#
#
# @example Example: To resume Auto Scaling processes
@@ -4559,10 +4672,73 @@
def set_instance_protection(params = {}, options = {})
req = build_request(:set_instance_protection, params)
req.send_request(options)
end
+ # 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 active instance refresh operation, use the
+ # CancelInstanceRefresh API.
+ #
+ # For more information, see [Replacing Auto Scaling Instances Based on
+ # an Instance Refresh][1].
+ #
+ #
+ #
+ # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html
+ #
+ # @option params [required, String] :auto_scaling_group_name
+ # The name of the Auto Scaling group.
+ #
+ # @option params [String] :strategy
+ # 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.
+ #
+ # @option params [Types::RefreshPreferences] :preferences
+ # Set of preferences associated with the instance refresh request.
+ #
+ # @return [Types::StartInstanceRefreshAnswer] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
+ #
+ # * {Types::StartInstanceRefreshAnswer#instance_refresh_id #instance_refresh_id} => String
+ #
+ # @example Request syntax with placeholder values
+ #
+ # resp = client.start_instance_refresh({
+ # auto_scaling_group_name: "XmlStringMaxLen255", # required
+ # strategy: "Rolling", # accepts Rolling
+ # preferences: {
+ # min_healthy_percentage: 1,
+ # instance_warmup: 1,
+ # },
+ # })
+ #
+ # @example Response structure
+ #
+ # resp.instance_refresh_id #=> String
+ #
+ # @see http://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/StartInstanceRefresh AWS API Documentation
+ #
+ # @overload start_instance_refresh(params = {})
+ # @param [Hash] params ({})
+ def start_instance_refresh(params = {}, options = {})
+ req = build_request(:start_instance_refresh, params)
+ req.send_request(options)
+ end
+
# 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
@@ -4578,28 +4754,31 @@
#
# @option params [required, String] :auto_scaling_group_name
# The name of the Auto Scaling group.
#
# @option params [Array<String>] :scaling_processes
- # One or more of the following processes. If you omit this parameter,
- # all processes are specified.
+ # One or more of the following processes:
#
# * `Launch`
#
# * `Terminate`
#
- # * `HealthCheck`
+ # * `AddToLoadBalancer`
#
- # * `ReplaceUnhealthy`
+ # * `AlarmNotification`
#
# * `AZRebalance`
#
- # * `AlarmNotification`
+ # * `HealthCheck`
#
+ # * `InstanceRefresh`
+ #
+ # * `ReplaceUnhealthy`
+ #
# * `ScheduledActions`
#
- # * `AddToLoadBalancer`
+ # If you omit this parameter, all processes are specified.
#
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
#
#
# @example Example: To suspend Auto Scaling processes
@@ -5018,10 +5197,10 @@
operation: config.api.operation(operation_name),
client: self,
params: params,
config: config)
context[:gem_name] = 'aws-sdk-autoscaling'
- context[:gem_version] = '1.38.1'
+ context[:gem_version] = '1.39.0'
Seahorse::Client::Request.new(handlers, context)
end
# Polls an API operation until a resource enters a desired state.
#