create_snapmirror_policy
¶
create_snapmirror_policy(
*,
config_overrides: Optional[FSxClientConfig] = None,
client_request_token: Optional[ClientRequestToken] = None,
file_system_id: Optional[FileSystemId] = None,
storage_virtual_machine_id: Optional[StorageVirtualMachineId] = None,
name: Optional[SnapmirrorPolicyName] = None,
snapshot_copy_mode: Optional[SnapmirrorPolicySnapshotCopyMode] = None,
retention_rules: Optional[SnapmirrorPolicyRetentionRules] = None,
transfer_schedule: Optional[SnapmirrorTransferScheduleName] = None,
network_compression_enabled: Optional[Flag] = None,
throttle_in_kbps: Optional[ThrottleInKbps] = None,
tags: Optional[Tags] = None,
) -> CreateSnapmirrorPolicyResponse
Creates a SnapMirror policy for an Amazon FSx for NetApp ONTAP file system or storage virtual machine (SVM). A SnapMirror policy defines how the SnapMirror relationships that use the policy replicate data, including which snapshots to transfer, the maximum number of snapshots to retain on the destination volume, and when to transfer data.
The CreateSnapmirrorPolicy operation returns while the SnapMirror policy's lifecycle state is still CREATING. You can check the SnapMirror policy creation status by calling the DescribeSnapmirrorPolicies 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 SnapMirror 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 SnapMirror policy. You must specify either a
FileSystemIdor aStorageVirtualMachineId, but not both. -
name(Optional[SnapmirrorPolicyName], default:None) –Specifies the name of the SnapMirror policy.
-
snapshot_copy_mode(Optional[SnapmirrorPolicySnapshotCopyMode], default:None) –Specifies which snapshots SnapMirror transfers to the destination volume:
-
COPY_ALL_SOURCE_SNAPSHOTS– SnapMirror copies all snapshots of the source volume to the destination volume on a transfer. You can't specifyRetentionRulesalong with this property. -
COPY_LATEST_SOURCE_SNAPSHOT– SnapMirror copies the latest snapshot of the source volume to the destination volume on a transfer. You can't specifyRetentionRulesalong with this property. -
NO_CREATE_SNAPSHOT_ON_SOURCE– SnapMirror doesn't create a snapshot on the source volume at beginning of an update or resync operation. You must specifyRetentionRulesalong with this property.
If you don't specify a
SnapshotCopyMode, SnapMirror creates a new snapshot of the source volume and copies it, along with any snapshots that matchRetentionRules, to the destination volume on a transfer.RetentionRulesis optional. -
-
retention_rules(Optional[SnapmirrorPolicyRetentionRules], default:None) –Specifies the rules that determine which snapshots SnapMirror retains on the destination volume, based on their SnapMirror labels.
-
transfer_schedule(Optional[SnapmirrorTransferScheduleName], default:None) –Specifies the name of the ONTAP schedule that determines when SnapMirror transfers data.
-
network_compression_enabled(Optional[Flag], default:None) –Specifies whether SnapMirror compresses data when it transfers the data over the network. This value defaults to
false. -
throttle_in_kbps(Optional[ThrottleInKbps], default:None) –Specifies the maximum bandwidth, in kilobytes per second (KBps), that SnapMirror uses to transfer data. A value of
0means that the bandwidth is unlimited.
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/f_sx.py
1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 | |