export_image
¶
export_image(
*,
config_overrides: Optional[EC2ClientConfig] = None,
client_token: Optional[String] = None,
description: Optional[String] = None,
disk_image_format: Optional[DiskImageFormat] = None,
dry_run: Optional[Boolean] = None,
image_id: Optional[ImageId] = None,
s3_export_location: Optional[ExportTaskS3LocationRequest] = None,
role_name: Optional[String] = None,
tag_specifications: Optional[TagSpecificationList] = None,
) -> ExportImageResult
Exports an Amazon Machine Image (AMI) to a VM file. For more information, see Exporting a VM directly from an Amazon Machine Image (AMI) in the VM Import/Export User Guide.
Parameters:
-
client_token(Optional[String], default:None) –Token to enable idempotency for export image requests.
-
description(Optional[String], default:None) –A description of the image being exported. The maximum length is 255 characters.
-
disk_image_format(Optional[DiskImageFormat], default:None) –The disk image format.
-
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. -
image_id(Optional[ImageId], default:None) –The ID of the image.
-
s3_export_location(Optional[ExportTaskS3LocationRequest], default:None) –The Amazon S3 bucket for the destination image. The destination bucket must exist.
-
role_name(Optional[String], default:None) –The name of the role that grants VM Import/Export permission to export images to your Amazon S3 bucket. If this parameter is not specified, the default role is named 'vmimport'.
-
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to apply to the export image task during creation.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
42211 42212 42213 42214 42215 42216 42217 42218 42219 42220 42221 42222 42223 42224 42225 42226 42227 42228 42229 42230 42231 42232 42233 42234 42235 42236 42237 42238 42239 42240 42241 42242 42243 42244 42245 42246 42247 42248 42249 42250 42251 42252 42253 42254 42255 42256 42257 42258 42259 42260 42261 42262 42263 42264 42265 42266 42267 42268 42269 42270 42271 42272 42273 42274 42275 42276 42277 42278 42279 42280 42281 42282 42283 42284 42285 42286 | |