create_restore_image_task
async
¶
create_restore_image_task(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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/async_ec2.py
11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 | |