amazonka-ec2-1.3.7: Amazon Elastic Compute Cloud SDK.

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

Network.AWS.EC2.ModifyInstancePlacement

Contents

Description

Set the instance affinity value for a specific stopped instance and modify the instance tenancy setting.

Instance affinity is disabled by default. When instance affinity is host and it is not associated with a specific Dedicated host, the next time it is launched it will automatically be associated with the host it lands on. This relationship will persist if the instance is stopped/started, or rebooted.

You can modify the host ID associated with a stopped instance. If a stopped instance has a new host ID association, the instance will target that host when restarted.

You can modify the tenancy of a stopped instance with a tenancy of host or dedicated.

Affinity, hostID, and tenancy are not required parameters, but at least one of them must be specified in the request. Affinity and tenancy can be modified in the same request, but tenancy can only be modified on instances that are stopped.

See: AWS API Reference for ModifyInstancePlacement.

Synopsis

Creating a Request

modifyInstancePlacement Source

Creates a value of ModifyInstancePlacement with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Request Lenses

mipAffinity :: Lens' ModifyInstancePlacement (Maybe Affinity) Source

The new affinity setting for the instance.

mipHostId :: Lens' ModifyInstancePlacement (Maybe Text) Source

The ID of the Dedicated host that the instance will have affinity with.

mipTenancy :: Lens' ModifyInstancePlacement (Maybe HostTenancy) Source

The tenancy of the instance that you are modifying.

mipInstanceId :: Lens' ModifyInstancePlacement Text Source

The ID of the instance that you are modifying.

Destructuring the Response

modifyInstancePlacementResponse Source

Creates a value of ModifyInstancePlacementResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Response Lenses

miprsReturn :: Lens' ModifyInstancePlacementResponse (Maybe Bool) Source

Is true if the request succeeds, and an error otherwise.