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

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

Network.AWS.EC2.ModifyInstancePlacement

Contents

Description

Modifies the placement attributes for a specified instance. You can do the following:

  • Modify the affinity between an instance and a Dedicated Host . When affinity is set to host and the instance is not associated with a specific Dedicated Host, the next time the instance is launched, it is automatically associated with the host on which it lands. If the instance is restarted or rebooted, this relationship persists.
  • Change the Dedicated Host with which an instance is associated.
  • Change the instance tenancy of an instance from host to dedicated , or from dedicated to host .
  • Move an instance to or from a placement group .

At least one attribute for affinity, host ID, tenancy, or placement group name must be specified in the request. Affinity and tenancy can be modified in the same request.

To modify the host ID, tenancy, or placement group for an instance, the instance must be in the stopped state.

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:

  • mipAffinity - The affinity setting for the instance.
  • mipHostId - The ID of the Dedicated Host with which to associate the instance.
  • mipTenancy - The tenancy for the instance.
  • mipGroupName - The name of the placement group in which to place the instance. For spread placement groups, the instance must have a tenancy of default . For cluster placement groups, the instance must have a tenancy of default or dedicated . To remove an instance from a placement group, specify an empty string ("").
  • mipInstanceId - The ID of the instance that you are modifying.

data ModifyInstancePlacement Source #

Contains the parameters for ModifyInstancePlacement.

See: modifyInstancePlacement smart constructor.

Instances
Eq ModifyInstancePlacement Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

Data ModifyInstancePlacement Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModifyInstancePlacement -> c ModifyInstancePlacement #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModifyInstancePlacement #

toConstr :: ModifyInstancePlacement -> Constr #

dataTypeOf :: ModifyInstancePlacement -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ModifyInstancePlacement) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModifyInstancePlacement) #

gmapT :: (forall b. Data b => b -> b) -> ModifyInstancePlacement -> ModifyInstancePlacement #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModifyInstancePlacement -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModifyInstancePlacement -> r #

gmapQ :: (forall d. Data d => d -> u) -> ModifyInstancePlacement -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ModifyInstancePlacement -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModifyInstancePlacement -> m ModifyInstancePlacement #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModifyInstancePlacement -> m ModifyInstancePlacement #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModifyInstancePlacement -> m ModifyInstancePlacement #

Read ModifyInstancePlacement Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

Show ModifyInstancePlacement Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

Generic ModifyInstancePlacement Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

Associated Types

type Rep ModifyInstancePlacement :: Type -> Type #

Hashable ModifyInstancePlacement Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

AWSRequest ModifyInstancePlacement Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

Associated Types

type Rs ModifyInstancePlacement :: Type #

ToHeaders ModifyInstancePlacement Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

ToPath ModifyInstancePlacement Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

ToQuery ModifyInstancePlacement Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

NFData ModifyInstancePlacement Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

Methods

rnf :: ModifyInstancePlacement -> () #

type Rep ModifyInstancePlacement Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

type Rep ModifyInstancePlacement = D1 (MetaData "ModifyInstancePlacement" "Network.AWS.EC2.ModifyInstancePlacement" "amazonka-ec2-1.6.1-GgG1M0FWcBrE5I5IM2QktE" False) (C1 (MetaCons "ModifyInstancePlacement'" PrefixI True) ((S1 (MetaSel (Just "_mipAffinity") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Affinity)) :*: S1 (MetaSel (Just "_mipHostId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_mipTenancy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe HostTenancy)) :*: (S1 (MetaSel (Just "_mipGroupName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_mipInstanceId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs ModifyInstancePlacement Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

Request Lenses

mipAffinity :: Lens' ModifyInstancePlacement (Maybe Affinity) Source #

The affinity setting for the instance.

mipHostId :: Lens' ModifyInstancePlacement (Maybe Text) Source #

The ID of the Dedicated Host with which to associate the instance.

mipGroupName :: Lens' ModifyInstancePlacement (Maybe Text) Source #

The name of the placement group in which to place the instance. For spread placement groups, the instance must have a tenancy of default . For cluster placement groups, the instance must have a tenancy of default or dedicated . To remove an instance from a placement group, specify an empty string ("").

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:

data ModifyInstancePlacementResponse Source #

Contains the output of ModifyInstancePlacement.

See: modifyInstancePlacementResponse smart constructor.

Instances
Eq ModifyInstancePlacementResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

Data ModifyInstancePlacementResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModifyInstancePlacementResponse -> c ModifyInstancePlacementResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModifyInstancePlacementResponse #

toConstr :: ModifyInstancePlacementResponse -> Constr #

dataTypeOf :: ModifyInstancePlacementResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ModifyInstancePlacementResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModifyInstancePlacementResponse) #

gmapT :: (forall b. Data b => b -> b) -> ModifyInstancePlacementResponse -> ModifyInstancePlacementResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModifyInstancePlacementResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModifyInstancePlacementResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> ModifyInstancePlacementResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ModifyInstancePlacementResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModifyInstancePlacementResponse -> m ModifyInstancePlacementResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModifyInstancePlacementResponse -> m ModifyInstancePlacementResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModifyInstancePlacementResponse -> m ModifyInstancePlacementResponse #

Read ModifyInstancePlacementResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

Show ModifyInstancePlacementResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

Generic ModifyInstancePlacementResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

Associated Types

type Rep ModifyInstancePlacementResponse :: Type -> Type #

NFData ModifyInstancePlacementResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

type Rep ModifyInstancePlacementResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstancePlacement

type Rep ModifyInstancePlacementResponse = D1 (MetaData "ModifyInstancePlacementResponse" "Network.AWS.EC2.ModifyInstancePlacement" "amazonka-ec2-1.6.1-GgG1M0FWcBrE5I5IM2QktE" False) (C1 (MetaCons "ModifyInstancePlacementResponse'" PrefixI True) (S1 (MetaSel (Just "_miprsReturn") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 (MetaSel (Just "_miprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))

Response Lenses

miprsReturn :: Lens' ModifyInstancePlacementResponse (Maybe Bool) Source #

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