# Module `netapp_ontap.models.snapmirror_policy_rule`

Copyright © 2023 NetApp Inc. All rights reserved.

This file has been automatically generated based on the ONTAP REST API documentation.

## Classes

`class SnapmirrorPolicyRuleSchema (*, only: Union[Sequence[str], Set[str]] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Dict = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: str = None)`

  The fields of the SnapmirrorPolicyRule object

  ### Ancestors

  - netapp_ontap.resource.ResourceSchema
  - marshmallow.schema.Schema
  - marshmallow.base.SchemaABC

  ### Class variables

  `count: Size GET POST PATCH`

    Number of Snapshot copies to be kept for retention. Maximum value will differ based on type of relationship and scaling factor.

    Example: 7

  `creation_schedule: Schedule GET POST PATCH`

    The creation_schedule field of the snapmirror_policy_rule.

  `label: str GET POST PATCH`

    Snapshot copy label

    Example: hourly

  `period: str GET POST PATCH`

    Specifies the duration for which the Snapshot copies are locked. The retention period value represents a duration and must be in the ISO-8601 duration format. Years, months, days, hours, minutes, and seconds are represented as "PY","PM","PD","PTH","PTM" and "PTS". Value "infinite" is also a valid input for Flexvol volumes and FlexGroup volumes. A duration which combines different periods is not supported, for example "P1Y10M" is not supported. The range of supported retention period values is between 1 second to infinite.

    Example: P30D

  `prefix: str GET POST PATCH`

    Specifies the prefix for the Snapshot copy name to be created as per the schedule. If no value is specified, then the label is used as the prefix.

  `preserve: bool GET POST PATCH`

    Specifies the behavior when the Snapshot copy retention count is reached on the SnapMirror destination for the rule. The default value is false, which means that the oldest Snapshot copy is deleted to make room for new ones but only if the number of Snapshot copies has exceeded the retention count specified in the 'count' property. When set to true and where the Snapshot copies have reached the retention count, an incremental SnapMirror transfer will fail or if the rule has a schedule, Snapshot copies will be no longer be created on the SnapMirror destination.

    Example: true

  `warn: Size GET POST PATCH`

    Specifies the warning threshold count for the rule. The default value is zero. When set to a value greater than zero, an event is generated after the number of Snapshot copies (for the particular rule) retained on a SnapMirror destination reaches the specified warning limit. The preserve property for the rule must be true in order to set the warn property to a value greater than zero.

    Example: 4