amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.CreateReplaceRootVolumeTask

Description

Replaces the EBS-backed root volume for a running instance with a new volume that is restored to the original root volume's launch state, that is restored to a specific snapshot taken from the original root volume, or that is restored from an AMI that has the same key characteristics as that of the instance.

For more information, see Replace a root volume in the Amazon Elastic Compute Cloud User Guide.

Synopsis

Creating a Request

data CreateReplaceRootVolumeTask Source #

See: newCreateReplaceRootVolumeTask smart constructor.

Constructors

CreateReplaceRootVolumeTask' 

Fields

  • clientToken :: Maybe Text

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency. For more information, see Ensuring idempotency.

  • deleteReplacedRootVolume :: Maybe Bool

    Indicates whether to automatically delete the original root volume after the root volume replacement task completes. To delete the original root volume, specify true. If you choose to keep the original root volume after the replacement task completes, you must manually delete it when you no longer need it.

  • dryRun :: Maybe Bool

    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.

  • imageId :: Maybe Text

    The ID of the AMI to use to restore the root volume. The specified AMI must have the same product code, billing information, architecture type, and virtualization type as that of the instance.

    If you want to restore the replacement volume from a specific snapshot, or if you want to restore it to its launch state, omit this parameter.

  • snapshotId :: Maybe Text

    The ID of the snapshot from which to restore the replacement root volume. The specified snapshot must be a snapshot that you previously created from the original root volume.

    If you want to restore the replacement root volume to the initial launch state, or if you want to restore the replacement root volume from an AMI, omit this parameter.

  • tagSpecifications :: Maybe [TagSpecification]

    The tags to apply to the root volume replacement task.

  • instanceId :: Text

    The ID of the instance for which to replace the root volume.

Instances

Instances details
ToHeaders CreateReplaceRootVolumeTask Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

ToPath CreateReplaceRootVolumeTask Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

ToQuery CreateReplaceRootVolumeTask Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

AWSRequest CreateReplaceRootVolumeTask Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

Generic CreateReplaceRootVolumeTask Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

Associated Types

type Rep CreateReplaceRootVolumeTask :: Type -> Type #

Read CreateReplaceRootVolumeTask Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

Show CreateReplaceRootVolumeTask Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

NFData CreateReplaceRootVolumeTask Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

Eq CreateReplaceRootVolumeTask Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

Hashable CreateReplaceRootVolumeTask Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

type AWSResponse CreateReplaceRootVolumeTask Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

type Rep CreateReplaceRootVolumeTask Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

type Rep CreateReplaceRootVolumeTask = D1 ('MetaData "CreateReplaceRootVolumeTask" "Amazonka.EC2.CreateReplaceRootVolumeTask" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "CreateReplaceRootVolumeTask'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "deleteReplacedRootVolume") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "imageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "snapshotId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "tagSpecifications") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TagSpecification])) :*: S1 ('MetaSel ('Just "instanceId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newCreateReplaceRootVolumeTask Source #

Create a value of CreateReplaceRootVolumeTask 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:

CreateReplaceRootVolumeTask, createReplaceRootVolumeTask_clientToken - Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency. For more information, see Ensuring idempotency.

CreateReplaceRootVolumeTask, createReplaceRootVolumeTask_deleteReplacedRootVolume - Indicates whether to automatically delete the original root volume after the root volume replacement task completes. To delete the original root volume, specify true. If you choose to keep the original root volume after the replacement task completes, you must manually delete it when you no longer need it.

$sel:dryRun:CreateReplaceRootVolumeTask', createReplaceRootVolumeTask_dryRun - 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.

CreateReplaceRootVolumeTask, createReplaceRootVolumeTask_imageId - The ID of the AMI to use to restore the root volume. The specified AMI must have the same product code, billing information, architecture type, and virtualization type as that of the instance.

If you want to restore the replacement volume from a specific snapshot, or if you want to restore it to its launch state, omit this parameter.

CreateReplaceRootVolumeTask, createReplaceRootVolumeTask_snapshotId - The ID of the snapshot from which to restore the replacement root volume. The specified snapshot must be a snapshot that you previously created from the original root volume.

If you want to restore the replacement root volume to the initial launch state, or if you want to restore the replacement root volume from an AMI, omit this parameter.

CreateReplaceRootVolumeTask, createReplaceRootVolumeTask_tagSpecifications - The tags to apply to the root volume replacement task.

CreateReplaceRootVolumeTask, createReplaceRootVolumeTask_instanceId - The ID of the instance for which to replace the root volume.

Request Lenses

createReplaceRootVolumeTask_clientToken :: Lens' CreateReplaceRootVolumeTask (Maybe Text) Source #

Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency. For more information, see Ensuring idempotency.

createReplaceRootVolumeTask_deleteReplacedRootVolume :: Lens' CreateReplaceRootVolumeTask (Maybe Bool) Source #

Indicates whether to automatically delete the original root volume after the root volume replacement task completes. To delete the original root volume, specify true. If you choose to keep the original root volume after the replacement task completes, you must manually delete it when you no longer need it.

createReplaceRootVolumeTask_dryRun :: Lens' CreateReplaceRootVolumeTask (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.

createReplaceRootVolumeTask_imageId :: Lens' CreateReplaceRootVolumeTask (Maybe Text) Source #

The ID of the AMI to use to restore the root volume. The specified AMI must have the same product code, billing information, architecture type, and virtualization type as that of the instance.

If you want to restore the replacement volume from a specific snapshot, or if you want to restore it to its launch state, omit this parameter.

createReplaceRootVolumeTask_snapshotId :: Lens' CreateReplaceRootVolumeTask (Maybe Text) Source #

The ID of the snapshot from which to restore the replacement root volume. The specified snapshot must be a snapshot that you previously created from the original root volume.

If you want to restore the replacement root volume to the initial launch state, or if you want to restore the replacement root volume from an AMI, omit this parameter.

createReplaceRootVolumeTask_instanceId :: Lens' CreateReplaceRootVolumeTask Text Source #

The ID of the instance for which to replace the root volume.

Destructuring the Response

data CreateReplaceRootVolumeTaskResponse Source #

Constructors

CreateReplaceRootVolumeTaskResponse' 

Fields

Instances

Instances details
Generic CreateReplaceRootVolumeTaskResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

Read CreateReplaceRootVolumeTaskResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

Show CreateReplaceRootVolumeTaskResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

NFData CreateReplaceRootVolumeTaskResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

Eq CreateReplaceRootVolumeTaskResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

type Rep CreateReplaceRootVolumeTaskResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateReplaceRootVolumeTask

type Rep CreateReplaceRootVolumeTaskResponse = D1 ('MetaData "CreateReplaceRootVolumeTaskResponse" "Amazonka.EC2.CreateReplaceRootVolumeTask" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "CreateReplaceRootVolumeTaskResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "replaceRootVolumeTask") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ReplaceRootVolumeTask)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateReplaceRootVolumeTaskResponse Source #

Create a value of CreateReplaceRootVolumeTaskResponse 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:replaceRootVolumeTask:CreateReplaceRootVolumeTaskResponse', createReplaceRootVolumeTaskResponse_replaceRootVolumeTask - Information about the root volume replacement task.

$sel:httpStatus:CreateReplaceRootVolumeTaskResponse', createReplaceRootVolumeTaskResponse_httpStatus - The response's http status code.

Response Lenses