create_restore_image_task¶
Operation¶
create_restore_image_task
async
¶
create_restore_image_task(input: CreateRestoreImageTaskInput, plugins: list[Plugin] | None = None) -> CreateRestoreImageTaskOutput
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 S3 in the Amazon EC2 User Guide.
For more information, see Store and restore an AMI using S3 in the Amazon EC2 User Guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
CreateRestoreImageTaskInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
CreateRestoreImageTaskOutput
|
An instance of |
Input¶
CreateRestoreImageTaskInput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateRestoreImageTaskInput structure.
Attributes¶
bucket
class-attribute
instance-attribute
¶
bucket: str | None = ...
The name of the Amazon S3 bucket that contains the stored AMI object.
dry_run
class-attribute
instance-attribute
¶
dry_run: bool | None = ...
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
class-attribute
instance-attribute
¶
name: str | None = ...
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.
object_key
class-attribute
instance-attribute
¶
object_key: str | None = ...
The name of the stored AMI object in the bucket.
tag_specifications
class-attribute
instance-attribute
¶
tag_specifications: list[TagSpecification] | None = ...
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
ResourceTypemust beimage. -
To tag the snapshots, the value for
ResourceTypemust besnapshot. The same tag is applied to all of the snapshots that are created.
Output¶
CreateRestoreImageTaskOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateRestoreImageTaskOutput structure.