Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data CreateRestoreImageTask = CreateRestoreImageTask' {}
- newCreateRestoreImageTask :: Text -> Text -> CreateRestoreImageTask
- createRestoreImageTask_dryRun :: Lens' CreateRestoreImageTask (Maybe Bool)
- createRestoreImageTask_name :: Lens' CreateRestoreImageTask (Maybe Text)
- createRestoreImageTask_tagSpecifications :: Lens' CreateRestoreImageTask (Maybe [TagSpecification])
- createRestoreImageTask_bucket :: Lens' CreateRestoreImageTask Text
- createRestoreImageTask_objectKey :: Lens' CreateRestoreImageTask Text
- data CreateRestoreImageTaskResponse = CreateRestoreImageTaskResponse' {
- imageId :: Maybe Text
- httpStatus :: Int
- newCreateRestoreImageTaskResponse :: Int -> CreateRestoreImageTaskResponse
- createRestoreImageTaskResponse_imageId :: Lens' CreateRestoreImageTaskResponse (Maybe Text)
- createRestoreImageTaskResponse_httpStatus :: Lens' CreateRestoreImageTaskResponse Int
Creating a Request
data CreateRestoreImageTask Source #
See: newCreateRestoreImageTask
smart constructor.
CreateRestoreImageTask' | |
|
Instances
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 beimage
. - To tag the snapshots, the value for
ResourceType
must besnapshot
. 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 beimage
. - To tag the snapshots, the value for
ResourceType
must besnapshot
. 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.
CreateRestoreImageTaskResponse' | |
|
Instances
Generic CreateRestoreImageTaskResponse Source # | |
Read CreateRestoreImageTaskResponse Source # | |
Show CreateRestoreImageTaskResponse Source # | |
Defined in Amazonka.EC2.CreateRestoreImageTask | |
NFData CreateRestoreImageTaskResponse Source # | |
Defined in Amazonka.EC2.CreateRestoreImageTask rnf :: CreateRestoreImageTaskResponse -> () # | |
Eq CreateRestoreImageTaskResponse Source # | |
type Rep CreateRestoreImageTaskResponse Source # | |
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
createRestoreImageTaskResponse_imageId :: Lens' CreateRestoreImageTaskResponse (Maybe Text) Source #
The AMI ID.
createRestoreImageTaskResponse_httpStatus :: Lens' CreateRestoreImageTaskResponse Int Source #
The response's http status code.