create_snapshots
async
¶
create_snapshots(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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/async_ec2.py
12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 | |