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

Description

Starts a task that restores an AMI from an Amazon S3 object that was previously created by using CreateStoreImageTask.

To use this API, you must have the required permissions. For more information, see Permissions for storing and restoring AMIs using Amazon S3 in the Amazon EC2 User Guide.

For more information, see Store and restore an AMI using Amazon S3 in the Amazon EC2 User Guide.

Synopsis

Creating a Request

data CreateRestoreImageTask Source #

See: newCreateRestoreImageTask smart constructor.

Constructors

CreateRestoreImageTask' 

Fields

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

  • name :: Maybe Text

    The name for the restored AMI. The name must be unique for AMIs in the Region for this account. If you do not provide a name, the new AMI gets the same name as the original AMI.

  • tagSpecifications :: Maybe [TagSpecification]

    The tags to apply to the AMI and snapshots on restoration. You can tag the AMI, the snapshots, or both.

    • To tag the AMI, the value for ResourceType must be image.
    • To tag the snapshots, the value for ResourceType must be snapshot. The same tag is applied to all of the snapshots that are created.
  • bucket :: Text

    The name of the Amazon S3 bucket that contains the stored AMI object.

  • objectKey :: Text

    The name of the stored AMI object in the bucket.

Instances

Instances details
ToHeaders CreateRestoreImageTask Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

ToPath CreateRestoreImageTask Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

ToQuery CreateRestoreImageTask Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

AWSRequest CreateRestoreImageTask Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

Associated Types

type AWSResponse CreateRestoreImageTask #

Generic CreateRestoreImageTask Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

Associated Types

type Rep CreateRestoreImageTask :: Type -> Type #

Read CreateRestoreImageTask Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

Show CreateRestoreImageTask Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

NFData CreateRestoreImageTask Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

Methods

rnf :: CreateRestoreImageTask -> () #

Eq CreateRestoreImageTask Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

Hashable CreateRestoreImageTask Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

type AWSResponse CreateRestoreImageTask Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

type Rep CreateRestoreImageTask Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

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

newCreateRestoreImageTask Source #

Create a value of CreateRestoreImageTask 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:dryRun:CreateRestoreImageTask', createRestoreImageTask_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.

CreateRestoreImageTask, createRestoreImageTask_name - The name for the restored AMI. The name must be unique for AMIs in the Region for this account. If you do not provide a name, the new AMI gets the same name as the original AMI.

CreateRestoreImageTask, createRestoreImageTask_tagSpecifications - The tags to apply to the AMI and snapshots on restoration. You can tag the AMI, the snapshots, or both.

  • To tag the AMI, the value for ResourceType must be image.
  • To tag the snapshots, the value for ResourceType must be snapshot. The same tag is applied to all of the snapshots that are created.

CreateRestoreImageTask, createRestoreImageTask_bucket - The name of the Amazon S3 bucket that contains the stored AMI object.

$sel:objectKey:CreateRestoreImageTask', createRestoreImageTask_objectKey - The name of the stored AMI object in the bucket.

Request Lenses

createRestoreImageTask_dryRun :: Lens' CreateRestoreImageTask (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.

createRestoreImageTask_name :: Lens' CreateRestoreImageTask (Maybe Text) Source #

The name for the restored AMI. The name must be unique for AMIs in the Region for this account. If you do not provide a name, the new AMI gets the same name as the original AMI.

createRestoreImageTask_tagSpecifications :: Lens' CreateRestoreImageTask (Maybe [TagSpecification]) Source #

The tags to apply to the AMI and snapshots on restoration. You can tag the AMI, the snapshots, or both.

  • To tag the AMI, the value for ResourceType must be image.
  • To tag the snapshots, the value for ResourceType must be snapshot. The same tag is applied to all of the snapshots that are created.

createRestoreImageTask_bucket :: Lens' CreateRestoreImageTask Text Source #

The name of the Amazon S3 bucket that contains the stored AMI object.

createRestoreImageTask_objectKey :: Lens' CreateRestoreImageTask Text Source #

The name of the stored AMI object in the bucket.

Destructuring the Response

data CreateRestoreImageTaskResponse Source #

See: newCreateRestoreImageTaskResponse smart constructor.

Constructors

CreateRestoreImageTaskResponse' 

Fields

Instances

Instances details
Generic CreateRestoreImageTaskResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

Associated Types

type Rep CreateRestoreImageTaskResponse :: Type -> Type #

Read CreateRestoreImageTaskResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

Show CreateRestoreImageTaskResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

NFData CreateRestoreImageTaskResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

Eq CreateRestoreImageTaskResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

type Rep CreateRestoreImageTaskResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateRestoreImageTask

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

newCreateRestoreImageTaskResponse Source #

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

CreateRestoreImageTaskResponse, createRestoreImageTaskResponse_imageId - The AMI ID.

$sel:httpStatus:CreateRestoreImageTaskResponse', createRestoreImageTaskResponse_httpStatus - The response's http status code.

Response Lenses