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.ModifyInstanceAttribute

Contents

Description

Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.

Note: Using this action to change the security groups associated with an elastic network interface (ENI) attached to an instance in a VPC can result in an error if the instance has more than one ENI. To change the security groups associated with an ENI attached to an instance that has multiple ENIs, we recommend that you use the ModifyNetworkInterfaceAttribute action.

To modify some attributes, the instance must be stopped. For more information, see Modifying Attributes of a Stopped Instance in the Amazon Elastic Compute Cloud User Guide .

Synopsis

Creating a Request

modifyInstanceAttribute Source #

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

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

  • mGroups - [EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.
  • mAttribute - The name of the attribute.
  • mEnaSupport - Set to true to enable enhanced networking with ENA for the instance. This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.
  • mSourceDestCheck - Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means that checking is disabled. This value must be false for a NAT instance to perform NAT.
  • mDisableAPITermination - If the value is true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot Instances.
  • mKernel - Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB .
  • mRAMDisk - Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB .
  • mValue - A new value for the attribute. Use only with the kernel , ramdisk , userData , disableApiTermination , or instanceInitiatedShutdownBehavior attribute.
  • mInstanceType - Changes the instance type to the specified value. For more information, see Instance Types . If the instance type is not valid, the error returned is InvalidInstanceAttributeValue .
  • mSRIOVNetSupport - Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance. There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time. This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.
  • mEBSOptimized - Specifies whether the instance is optimized for Amazon EBS IO. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS IO performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
  • mUserData - Changes the instance's user data to the specified value. If you are using an AWS SDK or command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text.
  • mInstanceInitiatedShutdownBehavior - Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
  • mBlockDeviceMappings - Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination , the default is true and the volume is deleted when the instance is terminated. To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide .
  • mDryRun - Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • mInstanceId - The ID of the instance.

data ModifyInstanceAttribute Source #

Contains the parameters for ModifyInstanceAttribute.

See: modifyInstanceAttribute smart constructor.

Instances
Eq ModifyInstanceAttribute Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

Data ModifyInstanceAttribute Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

Methods

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

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

toConstr :: ModifyInstanceAttribute -> Constr #

dataTypeOf :: ModifyInstanceAttribute -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ModifyInstanceAttribute Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

Show ModifyInstanceAttribute Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

Generic ModifyInstanceAttribute Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

Associated Types

type Rep ModifyInstanceAttribute :: Type -> Type #

Hashable ModifyInstanceAttribute Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

AWSRequest ModifyInstanceAttribute Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

Associated Types

type Rs ModifyInstanceAttribute :: Type #

ToHeaders ModifyInstanceAttribute Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

ToPath ModifyInstanceAttribute Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

ToQuery ModifyInstanceAttribute Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

NFData ModifyInstanceAttribute Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

Methods

rnf :: ModifyInstanceAttribute -> () #

type Rep ModifyInstanceAttribute Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

type Rep ModifyInstanceAttribute = D1 (MetaData "ModifyInstanceAttribute" "Network.AWS.EC2.ModifyInstanceAttribute" "amazonka-ec2-1.6.1-GgG1M0FWcBrE5I5IM2QktE" False) (C1 (MetaCons "ModifyInstanceAttribute'" PrefixI True) ((((S1 (MetaSel (Just "_mGroups") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 (MetaSel (Just "_mAttribute") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe InstanceAttributeName))) :*: (S1 (MetaSel (Just "_mEnaSupport") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe AttributeBooleanValue)) :*: S1 (MetaSel (Just "_mSourceDestCheck") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe AttributeBooleanValue)))) :*: ((S1 (MetaSel (Just "_mDisableAPITermination") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe AttributeBooleanValue)) :*: S1 (MetaSel (Just "_mKernel") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe AttributeValue))) :*: (S1 (MetaSel (Just "_mRAMDisk") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe AttributeValue)) :*: S1 (MetaSel (Just "_mValue") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))) :*: (((S1 (MetaSel (Just "_mInstanceType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe AttributeValue)) :*: S1 (MetaSel (Just "_mSRIOVNetSupport") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe AttributeValue))) :*: (S1 (MetaSel (Just "_mEBSOptimized") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe AttributeBooleanValue)) :*: S1 (MetaSel (Just "_mUserData") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe BlobAttributeValue)))) :*: ((S1 (MetaSel (Just "_mInstanceInitiatedShutdownBehavior") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe AttributeValue)) :*: S1 (MetaSel (Just "_mBlockDeviceMappings") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [InstanceBlockDeviceMappingSpecification]))) :*: (S1 (MetaSel (Just "_mDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 (MetaSel (Just "_mInstanceId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))))
type Rs ModifyInstanceAttribute Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

Request Lenses

mGroups :: Lens' ModifyInstanceAttribute [Text] Source #

EC2-VPC
Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

mEnaSupport :: Lens' ModifyInstanceAttribute (Maybe AttributeBooleanValue) Source #

Set to true to enable enhanced networking with ENA for the instance. This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

mSourceDestCheck :: Lens' ModifyInstanceAttribute (Maybe AttributeBooleanValue) Source #

Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means that checking is disabled. This value must be false for a NAT instance to perform NAT.

mDisableAPITermination :: Lens' ModifyInstanceAttribute (Maybe AttributeBooleanValue) Source #

If the value is true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot Instances.

mKernel :: Lens' ModifyInstanceAttribute (Maybe AttributeValue) Source #

Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB .

mRAMDisk :: Lens' ModifyInstanceAttribute (Maybe AttributeValue) Source #

Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB .

mValue :: Lens' ModifyInstanceAttribute (Maybe Text) Source #

A new value for the attribute. Use only with the kernel , ramdisk , userData , disableApiTermination , or instanceInitiatedShutdownBehavior attribute.

mInstanceType :: Lens' ModifyInstanceAttribute (Maybe AttributeValue) Source #

Changes the instance type to the specified value. For more information, see Instance Types . If the instance type is not valid, the error returned is InvalidInstanceAttributeValue .

mSRIOVNetSupport :: Lens' ModifyInstanceAttribute (Maybe AttributeValue) Source #

Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance. There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time. This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

mEBSOptimized :: Lens' ModifyInstanceAttribute (Maybe AttributeBooleanValue) Source #

Specifies whether the instance is optimized for Amazon EBS IO. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS IO performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

mUserData :: Lens' ModifyInstanceAttribute (Maybe BlobAttributeValue) Source #

Changes the instance's user data to the specified value. If you are using an AWS SDK or command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text.

mInstanceInitiatedShutdownBehavior :: Lens' ModifyInstanceAttribute (Maybe AttributeValue) Source #

Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

mBlockDeviceMappings :: Lens' ModifyInstanceAttribute [InstanceBlockDeviceMappingSpecification] Source #

Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination , the default is true and the volume is deleted when the instance is terminated. To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide .

mDryRun :: Lens' ModifyInstanceAttribute (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

Destructuring the Response

modifyInstanceAttributeResponse :: ModifyInstanceAttributeResponse Source #

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

data ModifyInstanceAttributeResponse Source #

See: modifyInstanceAttributeResponse smart constructor.

Instances
Eq ModifyInstanceAttributeResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

Data ModifyInstanceAttributeResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

Methods

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

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

toConstr :: ModifyInstanceAttributeResponse -> Constr #

dataTypeOf :: ModifyInstanceAttributeResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ModifyInstanceAttributeResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

Show ModifyInstanceAttributeResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

Generic ModifyInstanceAttributeResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

Associated Types

type Rep ModifyInstanceAttributeResponse :: Type -> Type #

NFData ModifyInstanceAttributeResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

type Rep ModifyInstanceAttributeResponse Source # 
Instance details

Defined in Network.AWS.EC2.ModifyInstanceAttribute

type Rep ModifyInstanceAttributeResponse = D1 (MetaData "ModifyInstanceAttributeResponse" "Network.AWS.EC2.ModifyInstanceAttribute" "amazonka-ec2-1.6.1-GgG1M0FWcBrE5I5IM2QktE" False) (C1 (MetaCons "ModifyInstanceAttributeResponse'" PrefixI False) (U1 :: Type -> Type))