create_snapshot_policy
async
¶
create_snapshot_policy(
*,
config_overrides: Optional[AsyncFSxClientConfig] = None,
client_request_token: Optional[ClientRequestToken] = None,
file_system_id: Optional[FileSystemId] = None,
storage_virtual_machine_id: Optional[StorageVirtualMachineId] = None,
name: Optional[SnapshotPolicyName] = None,
enabled: Optional[Flag] = None,
schedules: Optional[SnapshotPolicyScheduleList] = None,
tags: Optional[Tags] = None,
) -> CreateSnapshotPolicyResponse
Creates a snapshot policy for an Amazon FSx for NetApp ONTAP file system or storage virtual machine (SVM). A snapshot policy defines the schedules on which ONTAP automatically creates snapshots of the volumes that use the policy, and the maximum number of snapshots to retain for each schedule.
The CreateSnapshotPolicy operation returns while the snapshot policy's lifecycle state is still CREATING. You can check the snapshot policy creation status by calling the DescribeSnapshotPolicies operation.
Parameters:
-
file_system_id(Optional[FileSystemId], default:None) –Specifies the ID of the Amazon FSx for NetApp ONTAP file system on which to create the snapshot policy. You must specify either a
FileSystemIdor aStorageVirtualMachineId, but not both. -
storage_virtual_machine_id(Optional[StorageVirtualMachineId], default:None) –Specifies the ID of the SVM on which to create the snapshot policy. You must specify either a
FileSystemIdor aStorageVirtualMachineId, but not both. -
name(Optional[SnapshotPolicyName], default:None) –Specifies the name of the snapshot policy.
-
enabled(Optional[Flag], default:None) –Specifies whether the snapshot policy is enabled. This value defaults to
true. -
schedules(Optional[SnapshotPolicyScheduleList], default:None) –Specifies the schedules on which ONTAP creates snapshots for the snapshot policy.
Raises:
-
BadRequest–A generic error indicating a failure with a client request.
-
FileSystemNotFound–No Amazon FSx file systems were found based upon supplied parameters.
-
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.
-
StorageVirtualMachineNotFound–No FSx for ONTAP SVMs 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
1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 | |