create_snapshot
async
¶
create_snapshot(
*,
config_overrides: Optional[AsyncFSxClientConfig] = None,
client_request_token: Optional[ClientRequestToken] = None,
name: Optional[SnapshotName] = None,
volume_id: Optional[VolumeId] = None,
tags: Optional[Tags] = None,
ontap_configuration: Optional[CreateOntapSnapshotConfiguration] = None,
) -> CreateSnapshotResponse
Creates a snapshot of an existing Amazon FSx for OpenZFS or Amazon FSx for NetApp ONTAP volume. With snapshots, you can easily undo file changes and compare file versions by restoring the volume to a previous version.
If a snapshot with the specified client request token exists, and the parameters match, this operation returns the description of the existing snapshot. If a snapshot with the specified client request token exists, and the parameters don't match, this operation returns IncompatibleParameterError. If a snapshot with the specified client request token doesn't exist, CreateSnapshot does the following:
-
Creates a new snapshot with an assigned ID, and an initial lifecycle state of
CREATING. -
Returns the description of the snapshot.
By using the idempotent operation, you can retry a CreateSnapshot operation without the risk of creating an extra snapshot. This approach can be useful when an initial call fails in a way that makes it unclear whether a snapshot was created. If you use the same client request token and the initial call created a snapshot, the operation returns a successful result because all the parameters are the same.
The CreateSnapshot operation returns while the snapshot's lifecycle state is still CREATING. You can check the snapshot creation status by calling the DescribeSnapshots operation, which returns the snapshot state along with other information.
Parameters:
-
name(Optional[SnapshotName], default:None) –The name of the snapshot.
-
volume_id(Optional[VolumeId], default:None) –The ID of the volume that you are taking a snapshot of.
-
ontap_configuration(Optional[CreateOntapSnapshotConfiguration], default:None) –Specifies the configuration to use when creating the ONTAP snapshot.
Raises:
-
BadRequest–A generic error indicating a failure with a client request.
-
IncompatibleParameterError–The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.
-
InternalServerError–A generic error indicating a server-side failure.
-
ServiceLimitExceeded–An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting Amazon Web Services Support.
-
VolumeNotFound–No Amazon FSx volumes were found based upon the supplied parameters.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_fsx/_services/async_f_sx.py
1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 | |