libZSservicesZSamazonka-autoscalingZSamazonka-autoscaling
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.AutoScaling.StartInstanceRefresh

Description

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

Creating a Request

data StartInstanceRefresh Source #

See: newStartInstanceRefresh smart constructor.

Constructors

StartInstanceRefresh' 

Fields

  • preferences :: Maybe RefreshPreferences

    Set of preferences associated with the instance refresh request. If not provided, the default values are used.

  • strategy :: Maybe RefreshStrategy

    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.

  • desiredConfiguration :: Maybe 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.

  • autoScalingGroupName :: Text

    The name of the Auto Scaling group.

Instances

Instances details
Eq StartInstanceRefresh Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

Read StartInstanceRefresh Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

Show StartInstanceRefresh Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

Generic StartInstanceRefresh Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

Associated Types

type Rep StartInstanceRefresh :: Type -> Type #

NFData StartInstanceRefresh Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

Methods

rnf :: StartInstanceRefresh -> () #

Hashable StartInstanceRefresh Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

AWSRequest StartInstanceRefresh Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

Associated Types

type AWSResponse StartInstanceRefresh #

ToHeaders StartInstanceRefresh Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

ToPath StartInstanceRefresh Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

ToQuery StartInstanceRefresh Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

type Rep StartInstanceRefresh Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

type Rep StartInstanceRefresh = D1 ('MetaData "StartInstanceRefresh" "Amazonka.AutoScaling.StartInstanceRefresh" "libZSservicesZSamazonka-autoscalingZSamazonka-autoscaling" 'False) (C1 ('MetaCons "StartInstanceRefresh'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "preferences") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RefreshPreferences)) :*: S1 ('MetaSel ('Just "strategy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RefreshStrategy))) :*: (S1 ('MetaSel ('Just "desiredConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DesiredConfiguration)) :*: S1 ('MetaSel ('Just "autoScalingGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse StartInstanceRefresh Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

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.

Destructuring the Response

data StartInstanceRefreshResponse Source #

See: newStartInstanceRefreshResponse smart constructor.

Constructors

StartInstanceRefreshResponse' 

Fields

Instances

Instances details
Eq StartInstanceRefreshResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

Read StartInstanceRefreshResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

Show StartInstanceRefreshResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

Generic StartInstanceRefreshResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

Associated Types

type Rep StartInstanceRefreshResponse :: Type -> Type #

NFData StartInstanceRefreshResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

type Rep StartInstanceRefreshResponse Source # 
Instance details

Defined in Amazonka.AutoScaling.StartInstanceRefresh

type Rep StartInstanceRefreshResponse = D1 ('MetaData "StartInstanceRefreshResponse" "Amazonka.AutoScaling.StartInstanceRefresh" "libZSservicesZSamazonka-autoscalingZSamazonka-autoscaling" 'False) (C1 ('MetaCons "StartInstanceRefreshResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "instanceRefreshId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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.