Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Starts a new instance refresh operation. An instance refresh performs a rolling replacement of all or some instances in an Auto Scaling group. Each instance is terminated first and then replaced, which temporarily reduces the capacity available within your Auto Scaling group.
This operation is part of the instance refresh feature in Amazon EC2 Auto Scaling, which helps you update instances in your Auto Scaling group. This feature is helpful, for example, when you have a new AMI or a new user data script. You just need to create a new launch template that specifies the new AMI or user data script. Then start an instance refresh to immediately begin the process of updating instances in the group.
If the call succeeds, it 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.
Synopsis
- data StartInstanceRefresh = StartInstanceRefresh' {}
- newStartInstanceRefresh :: Text -> StartInstanceRefresh
- startInstanceRefresh_preferences :: Lens' StartInstanceRefresh (Maybe RefreshPreferences)
- startInstanceRefresh_strategy :: Lens' StartInstanceRefresh (Maybe RefreshStrategy)
- startInstanceRefresh_desiredConfiguration :: Lens' StartInstanceRefresh (Maybe DesiredConfiguration)
- startInstanceRefresh_autoScalingGroupName :: Lens' StartInstanceRefresh Text
- data StartInstanceRefreshResponse = StartInstanceRefreshResponse' {}
- newStartInstanceRefreshResponse :: Int -> StartInstanceRefreshResponse
- startInstanceRefreshResponse_instanceRefreshId :: Lens' StartInstanceRefreshResponse (Maybe Text)
- startInstanceRefreshResponse_httpStatus :: Lens' StartInstanceRefreshResponse Int
Creating a Request
data StartInstanceRefresh Source #
See: newStartInstanceRefresh
smart constructor.
StartInstanceRefresh' | |
|
Instances
newStartInstanceRefresh Source #
Create a value of StartInstanceRefresh
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:preferences:StartInstanceRefresh'
, startInstanceRefresh_preferences
- Set of preferences associated with the instance refresh request. If not
provided, the default values are used.
$sel:strategy:StartInstanceRefresh'
, startInstanceRefresh_strategy
- The strategy to use for the instance refresh. The only valid value is
Rolling
.
A rolling update helps you update your instances gradually. 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 are replaced are not rolled back to their previous configuration.
$sel:desiredConfiguration:StartInstanceRefresh'
, startInstanceRefresh_desiredConfiguration
- The desired configuration. For example, the desired configuration can
specify a new launch template or a new version of the current launch
template.
Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling group to reflect the new desired configuration.
When you specify a new launch template or a new version of the current
launch template for your desired configuration, consider enabling the
SkipMatching
property in preferences. If it's enabled, Amazon EC2
Auto Scaling skips replacing instances that already use the specified
launch template and version. This can help you reduce the number of
replacements that are required to apply updates.
$sel:autoScalingGroupName:StartInstanceRefresh'
, startInstanceRefresh_autoScalingGroupName
- The name of the Auto Scaling group.
Request Lenses
startInstanceRefresh_preferences :: Lens' StartInstanceRefresh (Maybe RefreshPreferences) Source #
Set of preferences associated with the instance refresh request. If not provided, the default values are used.
startInstanceRefresh_strategy :: Lens' StartInstanceRefresh (Maybe RefreshStrategy) Source #
The strategy to use for the instance refresh. The only valid value is
Rolling
.
A rolling update helps you update your instances gradually. 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 are replaced are not rolled back to their previous configuration.
startInstanceRefresh_desiredConfiguration :: Lens' StartInstanceRefresh (Maybe DesiredConfiguration) Source #
The desired configuration. For example, the desired configuration can specify a new launch template or a new version of the current launch template.
Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling group to reflect the new desired configuration.
When you specify a new launch template or a new version of the current
launch template for your desired configuration, consider enabling the
SkipMatching
property in preferences. If it's enabled, Amazon EC2
Auto Scaling skips replacing instances that already use the specified
launch template and version. This can help you reduce the number of
replacements that are required to apply updates.
startInstanceRefresh_autoScalingGroupName :: Lens' StartInstanceRefresh Text Source #
The name of the Auto Scaling group.
Destructuring the Response
data StartInstanceRefreshResponse Source #
See: newStartInstanceRefreshResponse
smart constructor.
StartInstanceRefreshResponse' | |
|
Instances
newStartInstanceRefreshResponse Source #
Create a value of StartInstanceRefreshResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:instanceRefreshId:StartInstanceRefreshResponse'
, startInstanceRefreshResponse_instanceRefreshId
- A unique ID for tracking the progress of the request.
$sel:httpStatus:StartInstanceRefreshResponse'
, startInstanceRefreshResponse_httpStatus
- The response's http status code.
Response Lenses
startInstanceRefreshResponse_instanceRefreshId :: Lens' StartInstanceRefreshResponse (Maybe Text) Source #
A unique ID for tracking the progress of the request.
startInstanceRefreshResponse_httpStatus :: Lens' StartInstanceRefreshResponse Int Source #
The response's http status code.