create_restore_image_task
¶
create_restore_image_task(
*,
config_overrides: Optional[EC2ClientConfig] = None,
bucket: Optional[String] = None,
object_key: Optional[String] = None,
name: Optional[ImageNameRequest] = None,
tag_specifications: Optional[TagSpecificationList] = None,
dry_run: Optional[Boolean] = None,
) -> CreateRestoreImageTaskResult
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:
-
bucket(Optional[String], default:None) –The name of the Amazon S3 bucket that contains the stored AMI object.
-
object_key(Optional[String], default:None) –The name of the stored AMI object in the bucket.
-
name(Optional[ImageNameRequest], default: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.
-
tag_specifications(Optional[TagSpecificationList], default: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.
-
-
dry_run(Optional[Boolean], default: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 isUnauthorizedOperation.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 | |