create_snapshots
¶
create_snapshots(
*,
config_overrides: Optional[EC2ClientConfig] = None,
description: Optional[String] = None,
instance_specification: Optional[InstanceSpecification] = None,
outpost_arn: Optional[String] = None,
tag_specifications: Optional[TagSpecificationList] = None,
dry_run: Optional[Boolean] = None,
copy_tags_from_source: Optional[CopyTagsFromSource] = None,
location: Optional[SnapshotLocationEnum] = None,
) -> CreateSnapshotsResult
Creates crash-consistent snapshots of multiple EBS volumes attached to an Amazon EC2 instance. Volumes are chosen by specifying an instance. Each volume attached to the specified instance will produce one snapshot that is crash-consistent across the instance. You can include all of the volumes currently attached to the instance, or you can exclude the root volume or specific data (non-root) volumes from the multi-volume snapshot set.
The location of the source instance determines where you can create the snapshots.
-
If the source instance is in a Region, you must create the snapshots in the same Region as the instance.
-
If the source instance is in a Local Zone, you can create the snapshots in the same Local Zone or in its parent Amazon Web Services Region.
-
If the source instance is on an Outpost, you can create the snapshots on the same Outpost or in its parent Amazon Web Services Region.
Parameters:
-
description(Optional[String], default:None) –A description propagated to every snapshot specified by the instance.
-
instance_specification(Optional[InstanceSpecification], default:None) –The instance to specify which volumes should be included in the snapshots.
-
outpost_arn(Optional[String], default:None) –Only supported for instances on Outposts. If the source instance is not on an Outpost, omit this parameter.
-
To create the snapshots on the same Outpost as the source instance, specify the ARN of that Outpost. The snapshots must be created on the same Outpost as the instance.
-
To create the snapshots in the parent Region of the Outpost, omit this parameter.
For more information, see Create local snapshots from volumes on an Outpost in the Amazon EBS User Guide.
-
-
tag_specifications(Optional[TagSpecificationList], default:None) –Tags to apply to every snapshot specified by the instance.
-
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. -
copy_tags_from_source(Optional[CopyTagsFromSource], default:None) –Copies the tags from the specified volume to corresponding snapshot.
-
location(Optional[SnapshotLocationEnum], default:None) –Only supported for instances in Local Zones. If the source instance is not in a Local Zone, omit this parameter.
-
To create local snapshots in the same Local Zone as the source instance, specify
local. -
To create regional snapshots in the parent Region of the Local Zone, specify
regionalor omit this parameter.
Default value:
regional -
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 | |