netapp_ontap.resources.storage_unit_snapshot API documentation
Description: Copyright &copy; 2026 NetApp Inc. All rights reserved …

# Module `netapp_ontap.resources.storage_unit_snapshot`

Copyright © 2026 NetApp Inc. All rights reserved.

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

## Overview

A storage unit snapshot is the view of the storage unit as it exists at the time when the snapshot is created.
In ONTAP, different types of storage unit snapshots are supported, such as scheduled snapshots, user requested snapshots, SnapMirror snapshots, and so on.
ONTAP storage unit snapshot APIs allow you to create, modify, delete and retrieve snapshots. Scheduled snapshots may be operated on, but snapshot schedules are not supported from these APIs.

## Examples

### Creating a snapshot

The POST operation is used to create a snapshot with the specified attributes.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnitSnapshot

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = StorageUnitSnapshot("9034e72c-1d07-11ef-bd09-005056bbbc7b")
        resource.name = "snapshot_copy"
        resource.post(hydrate=True)
        print(resource)

Try it out

    StorageUnitSnapshot({"name": "snapshot_copy"})

### Retrieving snapshot attributes

The GET operation is used to retrieve snapshot attributes.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnitSnapshot

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(
            list(StorageUnitSnapshot.get_collection("9034e72c-1d07-11ef-bd09-005056bbbc7b"))
        )

Try it out

    [
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/f712e3ff-d958-47ba-89eb-d2a46bad7bd7"
                    }
                },
                "name": "weekly.2024-06-02_0015",
                "uuid": "f712e3ff-d958-47ba-89eb-d2a46bad7bd7",
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/fd8b5ed5-fd24-45c6-bf96-996ab36bbb24"
                    }
                },
                "name": "daily.2024-06-04_0010",
                "uuid": "fd8b5ed5-fd24-45c6-bf96-996ab36bbb24",
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/e9f28652-9460-4eef-a8fd-fa0b0bfa97f3"
                    }
                },
                "name": "daily.2024-06-05_0010",
                "uuid": "e9f28652-9460-4eef-a8fd-fa0b0bfa97f3",
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/c5620133-52d0-4821-8805-15bfcd1a7b1e"
                    }
                },
                "name": "hourly.2024-06-05_0405",
                "uuid": "c5620133-52d0-4821-8805-15bfcd1a7b1e",
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/4a83e47a-b865-416e-885e-d159e91e943b"
                    }
                },
                "name": "hourly.2024-06-05_0505",
                "uuid": "4a83e47a-b865-416e-885e-d159e91e943b",
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/7dca6423-4fce-47ba-a4dc-b69e32bb30f4"
                    }
                },
                "name": "hourly.2024-06-05_0605",
                "uuid": "7dca6423-4fce-47ba-a4dc-b69e32bb30f4",
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/0bd1ca63-dbf8-41c3-a7ef-2023f28e622b"
                    }
                },
                "name": "hourly.2024-06-05_0705",
                "uuid": "0bd1ca63-dbf8-41c3-a7ef-2023f28e622b",
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/71bdab1e-22b3-4b2f-9b2c-0d2072ab321a"
                    }
                },
                "name": "hourly.2024-06-05_0805",
                "uuid": "71bdab1e-22b3-4b2f-9b2c-0d2072ab321a",
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/1341b465-e582-4b30-aa87-d4642fe9db51"
                    }
                },
                "name": "hourly.2024-06-05_0905",
                "uuid": "1341b465-e582-4b30-aa87-d4642fe9db51",
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/cb8b57a1-2342-11ef-97b9-005056bbbc7b"
                    }
                },
                "name": "snap1",
                "uuid": "cb8b57a1-2342-11ef-97b9-005056bbbc7b",
            }
        ),
    ]

### Retrieving snapshot advanced attributes

A collection GET request is used to calculate the amount of snapshot reclaimable space. When the advanced privilege field 'reclaimable space' is requested, the API returns the amount of reclaimable space for the queried list of snapshots.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnitSnapshot

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(
            list(
                StorageUnitSnapshot.get_collection(
                    "9034e72c-1d07-11ef-bd09-005056bbbc7b",
                    fields="reclaimable_space",
                    name="hourly.2024-06-05_0705|hourly.2024-06-05_0805|hourly.2024-06-05_0905",
                )
            )
        )

Try it out

    [
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/0bd1ca63-dbf8-41c3-a7ef-2023f28e622b"
                    }
                },
                "name": "hourly.2024-06-05_0705",
                "uuid": "0bd1ca63-dbf8-41c3-a7ef-2023f28e622b",
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/71bdab1e-22b3-4b2f-9b2c-0d2072ab321a"
                    }
                },
                "name": "hourly.2024-06-05_0805",
                "uuid": "71bdab1e-22b3-4b2f-9b2c-0d2072ab321a",
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/1341b465-e582-4b30-aa87-d4642fe9db51"
                    }
                },
                "name": "hourly.2024-06-05_0905",
                "uuid": "1341b465-e582-4b30-aa87-d4642fe9db51",
            }
        ),
    ]

### Retrieving snapshot advanced attributes

A collection GET request is used to calculate the delta between two snapshots. When the advanced privilege field 'delta' is requested, the API returns the delta between the queried snapshots.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnitSnapshot

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(
            list(
                StorageUnitSnapshot.get_collection(
                    "9034e72c-1d07-11ef-bd09-005056bbbc7b",
                    fields="delta",
                    name="hourly.2024-06-05_0705|hourly.2024-06-05_0805|hourly.2024-06-05_0905",
                )
            )
        )

Try it out

    [
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/0bd1ca63-dbf8-41c3-a7ef-2023f28e622b"
                    }
                },
                "name": "hourly.2024-06-05_0705",
                "uuid": "0bd1ca63-dbf8-41c3-a7ef-2023f28e622b",
                "delta": {"time_elapsed": "PT4H12M47S", "size_consumed": 1642496},
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/71bdab1e-22b3-4b2f-9b2c-0d2072ab321a"
                    }
                },
                "name": "hourly.2024-06-05_0805",
                "uuid": "71bdab1e-22b3-4b2f-9b2c-0d2072ab321a",
                "delta": {"time_elapsed": "PT3H12M47S", "size_consumed": 1331200},
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/1341b465-e582-4b30-aa87-d4642fe9db51"
                    }
                },
                "name": "hourly.2024-06-05_0905",
                "uuid": "1341b465-e582-4b30-aa87-d4642fe9db51",
                "delta": {"time_elapsed": "PT2H12M47S", "size_consumed": 1052672},
            }
        ),
    ]

### Retrieving the attributes of a specific snapshot

The GET operation is used to retrieve the attributes of a specific snapshot.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnitSnapshot

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = StorageUnitSnapshot(
            "9034e72c-1d07-11ef-bd09-005056bbbc7b",
            uuid="402b6c73-73a0-4e89-a58a-75ee0ab3e8c0",
        )
        resource.get()
        print(resource)

Try it out

    StorageUnitSnapshot(
        {
            "snapmirror_label": "weekly",
            "_links": {
                "self": {
                    "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/f712e3ff-d958-47ba-89eb-d2a46bad7bd7"
                }
            },
            "svm": {
                "name": "svm1",
                "_links": {
                    "self": {"href": "/api/svm/svms/7cb65b79-1a0f-11ef-bd09-005056bbbc7b"}
                },
                "uuid": "7cb65b79-1a0f-11ef-bd09-005056bbbc7b",
            },
            "name": "weekly.2024-06-02_0015",
            "uuid": "f712e3ff-d958-47ba-89eb-d2a46bad7bd7",
            "size": 720896,
            "storage_unit": {
                "name": "lun1",
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b"
                    }
                },
                "uuid": "9034e72c-1d07-11ef-bd09-005056bbbc7b",
            },
            "version_uuid": "f712e3ff-d958-47ba-89eb-d2a46bad7bd7",
            "create_time": "2024-06-02T00:15:00-04:00",
            "logical_size": 11259904,
        }
    )

### Retrieving the advanced attributes of a specific snapshot

In this example, the `fields` query parameter is used to request all fields, including advanced fields, that would not otherwise be returned by default for the snapshot.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnitSnapshot

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = StorageUnitSnapshot(
            "0353dc05-405f-11e9-acb6-005056bbc848",
            uuid="402b6c73-73a0-4e89-a58a-75ee0ab3e8c0",
        )
        resource.get(fields="**")
        print(resource)

Try it out

    StorageUnitSnapshot(
        {
            "snapmirror_label": "weekly",
            "_links": {
                "self": {
                    "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/f712e3ff-d958-47ba-89eb-d2a46bad7bd7?fields=**"
                }
            },
            "svm": {
                "name": "svm1",
                "_links": {
                    "self": {"href": "/api/svm/svms/7cb65b79-1a0f-11ef-bd09-005056bbbc7b"}
                },
                "uuid": "7cb65b79-1a0f-11ef-bd09-005056bbbc7b",
            },
            "name": "weekly.2024-06-02_0015",
            "uuid": "f712e3ff-d958-47ba-89eb-d2a46bad7bd7",
            "size": 720896,
            "delta": {"time_elapsed": "P3DT11H16M8S", "size_consumed": 3395584},
            "storage_unit": {
                "name": "lun1",
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b"
                    }
                },
                "uuid": "9034e72c-1d07-11ef-bd09-005056bbbc7b",
            },
            "version_uuid": "f712e3ff-d958-47ba-89eb-d2a46bad7bd7",
            "create_time": "2024-06-02T00:15:00-04:00",
            "logical_size": 11259904,
            "reclaimable_space": 503808,
        }
    )

### Retrieving bulk snapshots

The bulk GET operation is used to retrieve snapshot attributes across all storage units.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnitSnapshot

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(list(StorageUnitSnapshot.get_collection("*")))

Try it out

    [
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/3d9c001f-227e-11ef-97b9-005056bbbc7b/snapshots/387d7ec5-1c56-4cbc-b50e-07ea67396712"
                    }
                },
                "name": "daily.2024-06-05_0010",
                "uuid": "387d7ec5-1c56-4cbc-b50e-07ea67396712",
                "storage_unit": {
                    "name": "ns1",
                    "_links": {
                        "self": {
                            "href": "/api/storage/storage-units/3d9c001f-227e-11ef-97b9-005056bbbc7b"
                        }
                    },
                    "uuid": "3d9c001f-227e-11ef-97b9-005056bbbc7b",
                },
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/3d9c001f-227e-11ef-97b9-005056bbbc7b/snapshots/44bfa234-c978-423c-a0d5-14fe5427e7ab"
                    }
                },
                "name": "hourly.2024-06-05_0805",
                "uuid": "44bfa234-c978-423c-a0d5-14fe5427e7ab",
                "storage_unit": {
                    "name": "ns1",
                    "_links": {
                        "self": {
                            "href": "/api/storage/storage-units/3d9c001f-227e-11ef-97b9-005056bbbc7b"
                        }
                    },
                    "uuid": "3d9c001f-227e-11ef-97b9-005056bbbc7b",
                },
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/e9f28652-9460-4eef-a8fd-fa0b0bfa97f3"
                    }
                },
                "name": "daily.2024-06-05_0010",
                "uuid": "e9f28652-9460-4eef-a8fd-fa0b0bfa97f3",
                "storage_unit": {
                    "name": "lun1",
                    "_links": {
                        "self": {
                            "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b"
                        }
                    },
                    "uuid": "9034e72c-1d07-11ef-bd09-005056bbbc7b",
                },
            }
        ),
        StorageUnitSnapshot(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b/snapshots/71bdab1e-22b3-4b2f-9b2c-0d2072ab321a"
                    }
                },
                "name": "hourly.2024-06-05_0805",
                "uuid": "71bdab1e-22b3-4b2f-9b2c-0d2072ab321a",
                "storage_unit": {
                    "name": "lun1",
                    "_links": {
                        "self": {
                            "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b"
                        }
                    },
                    "uuid": "9034e72c-1d07-11ef-bd09-005056bbbc7b",
                },
            }
        ),
    ]

### Updating a snapshot

The PATCH operation is used to update the specific attributes of a snapshot.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnitSnapshot

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = StorageUnitSnapshot(
            "9034e72c-1d07-11ef-bd09-005056bbbc7b",
            uuid="71bdab1e-22b3-4b2f-9b2c-0d2072ab321a",
        )
        resource.name = "snapshot_copy_new"
        resource.patch()

### Updating bulk snapshots

The bulk PATCH operation is used to update the specific attributes of snapshots across storage units in a single request. The storage unit and snapshot must be identified using their UUIDs.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnitSnapshot

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = StorageUnitSnapshot("*")
        resource.records = [
            {
                "storage_unit": {"uuid": "eaebc659-237b-11ef-a1bc-005056bbf4ce"},
                "svm": {"uuid": "97930c7c-2376-11ef-a1bc-005056bbf4ce"},
                "uuid": "d68eaa29-1d9d-4f6c-8069-c472dd6cc5f1",
                "comment": "new comment on lun1",
            },
            {
                "storage_unit": {"uuid": "d8ddfae9-240b-11ef-a1bc-005056bbf4ce"},
                "svm": {"uuid": "97930c7c-2376-11ef-a1bc-005056bbf4ce"},
                "uuid": "d4c1112f-1bca-4893-b21f-f1b3ef61049c",
                "comment": "new comment on ns1",
            },
        ]
        resource.patch()

### Deleting a snapshot

The DELETE operation is used to delete a snapshot.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnitSnapshot

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = StorageUnitSnapshot(
            "9034e72c-1d07-11ef-bd09-005056bbbc7b",
            uuid="ef73b086-2430-4b8b-b1a8-2d9b6f1bf48e",
        )
        resource.delete()

### Deleting bulk snapshots

The bulk DELETE operation is used to delete a snapshots across storage units in a single request.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnitSnapshot

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = StorageUnitSnapshot("*")
        resource.delete(
            body={
                "records": [
                    {
                        "storage_unit": {"uuid": "d8ddfae9-240b-11ef-a1bc-005056bbf4ce"},
                        "uuid": "d4c1112f-1bca-4893-b21f-f1b3ef61049c",
                    },
                    {
                        "storage_unit": {"uuid": "eaebc659-237b-11ef-a1bc-005056bbf4ce"},
                        "uuid": "d68eaa29-1d9d-4f6c-8069-c472dd6cc5f1",
                    },
                ]
            }
        )

## Classes

`class StorageUnitSnapshot (*args, **kwargs)`

  The snapshot object represents a point in time snapshot of a storage unit.

  Initialize the instance of the resource.

  Any keyword arguments are set on the instance as properties. For example, if the class was named 'MyResource', then this statement would be true:

      MyResource(name='foo').name == 'foo'

  ## Args

  `*args`
    Each positional argument represents a parent key as used in the URL of the object. That is, each value will be used to fill in a segment of the URL which refers to some parent object. The order of these arguments must match the order they are specified in the URL, from left to right.
  `**kwargs`
    each entry will have its key set as an attribute name on the instance and its value will be the value of that attribute.

  ### Ancestors

  - Resource

  ### Static methods

  `def count_collection (*args, connection: HostConnection = None, **kwargs) -> int`

    Returns a count of all StorageUnitSnapshot resources that match the provided query

    This calls GET on the object to determine the number of records. It is more efficient than calling get_collection() because it will not construct any objects. Query parameters can be passed in as kwargs to determine a count of objects that match some filtered criteria.

    ## Args

    `*args`
      Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to get the count of bars for a particular foo, the foo.name value should be passed.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host. These query parameters can affect the count. A return_records query param will be ignored.

    ## Returns

    On success, returns an integer count of the objects of this type. On failure, returns -1.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400, or if there is no connection available to use either passed in or on the library.

  `def delete_collection (*args, records: Iterable[ForwardRef('StorageUnitSnapshot')] = None, body: Union[Resource, dict] = None, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> NetAppResponse`

    Deletes a storage unit snapshot.

    ### Learn more

    - `DOC /storage/storage-units/{storage_unit.uuid}/snapshots`

    Delete all objects in a collection which match the given query.

    All records on the host which match the query will be deleted.

    ## Args

    `*args`
      Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to delete the collection of bars for a particular foo, the foo.name value should be passed.
    `records`
      Can be provided in place of a query. If so, this list of objects will be deleted from the host.
    `body`
      The body of the delete request. This could be a Resource instance or a dictionary object.
    `poll`
      If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
    `poll_interval`
      If the operation returns a job, this specifies how often to query the job for updates.
    `poll_timeout`
      If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host. Only resources matching this query will be deleted.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  `def fast_get_collection (*args, connection: HostConnection = None, max_records: int = None, **kwargs) -> Iterable[RawResource]`

    Returns a list of RawResources that represent StorageUnitSnapshot resources that match the provided query

    Fetch a list of all objects of this type from the host.

        This is a lazy fetch, making API calls only as necessary when the result
        of this call is iterated over. For instance, if max_records is set to 5,
        then iterating over the collection causes an API call to be sent to the
        server once for every 5 records. If the client stops iterating before
        getting to the 6th record, then no additional API calls are made.

    ## Args

    `*args`
      Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to get the collection of bars for a particular foo, the foo.name value should be passed.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `max_records`
      The maximum number of records to return per call
    `raw`
      return a list of `netapp_ontap.resource.RawResource` objects that require to be promoted before any RESTful operations can be used on them. Setting this argument to True makes get_collection substantially quicker when many records are returned from the server.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host.

    ## Returns

    A list of `Resource` objects

    ## Raises

    `NetAppRestError`: If there is no connection available to use either passed in or on the library. This would be not be raised when get_collection() is called, but rather when the result is iterated.

  `def find (*args, connection: HostConnection = None, **kwargs) -> Resource`

    Retrieves the collection of volume snapshots.

    ### Expensive properties

    There is an added computational cost to retrieving the amount of reclaimable space for snapshots, as the calculation is done on demand based on the list of snapshots provided. * `reclaimable_space` * `delta`

    ### Learn more

    - `DOC /storage/storage-units/{storage_unit.uuid}/snapshots`

    Find an instance of an object on the host given a query.

    The host will be queried with the provided key/value pairs to find a matching resource. If 0 are found, None will be returned. If more than 1 is found, an error will be raised or returned. If there is exactly 1 matching record, then it will be returned.

    ## Args

    `*args`
      Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to find a bar for a particular foo, the foo.name value should be passed.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host.

    ## Returns

    A `Resource` object containing the details of the object or None if no matches were found.

    ## Raises

    `NetAppRestError`: If the API call returned more than 1 matching resource.

  `def get_collection (*args, connection: HostConnection = None, max_records: int = None, **kwargs) -> Iterable[Resource]`

    Retrieves the collection of volume snapshots.

    ### Expensive properties

    There is an added computational cost to retrieving the amount of reclaimable space for snapshots, as the calculation is done on demand based on the list of snapshots provided. * `reclaimable_space` * `delta`

    ### Learn more

    - `DOC /storage/storage-units/{storage_unit.uuid}/snapshots`

    Fetch a list of all objects of this type from the host.

        This is a lazy fetch, making API calls only as necessary when the result
        of this call is iterated over. For instance, if max_records is set to 5,
        then iterating over the collection causes an API call to be sent to the
        server once for every 5 records. If the client stops iterating before
        getting to the 6th record, then no additional API calls are made.

    ## Args

    `*args`
      Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to get the collection of bars for a particular foo, the foo.name value should be passed.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `max_records`
      The maximum number of records to return per call
    `raw`
      return a list of `netapp_ontap.resource.RawResource` objects that require to be promoted before any RESTful operations can be used on them. Setting this argument to True makes get_collection substantially quicker when many records are returned from the server.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host.

    ## Returns

    A list of `Resource` objects

    ## Raises

    `NetAppRestError`: If there is no connection available to use either passed in or on the library. This would be not be raised when get_collection() is called, but rather when the result is iterated.

  `def patch_collection (body: dict, *args, records: Iterable[ForwardRef('StorageUnitSnapshot')] = None, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> NetAppResponse`

    Updates a storage unit snapshot.

    ### Learn more

    - `DOC /storage/storage-units/{storage_unit.uuid}/snapshots`

    Patch all objects in a collection which match the given query.

    All records on the host which match the query will be patched with the provided body.

    ## Args

    `body`
      A dictionary of name/value pairs to set on all matching members of the collection. The body argument will be ignored if records is provided.
    `*args`
      Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to patch the collection of bars for a particular foo, the foo.name value should be passed.
    `records`
      Can be provided in place of a query. If so, this list of objects will be patched on the host.
    `poll`
      If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
    `poll_interval`
      If the operation returns a job, this specifies how often to query the job for updates.
    `poll_timeout`
      If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host. Only resources matching this query will be patched.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  `def post_collection (records: Iterable[ForwardRef('StorageUnitSnapshot')], *args, hydrate: bool = False, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> Union[List[StorageUnitSnapshot], NetAppResponse]`

    Creates a storage unit snapshot.

    ### Required properties

    - `name` - Name of the snapshot to be created.

    ### Recommended optional properties

    - `comment` - Comment associated with the snapshot.
    - `expiry_time` - Snapshots with an expiry time set are not allowed to be deleted until the retention time is reached.
    - `snapmirror_label` - Label for SnapMirror operations.
    - `snaplock_expiry_time` - Expiry time for snapshot locking enabled volumes.

    ### Learn more

    - `DOC /storage/storage-units/{storage_unit.uuid}/snapshots`

    Send this collection of objects to the host as a creation request.

    ## Args

    `records`
      A list of `Resource` objects to send to the server to be created.
    `*args`
      Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to create a bar for a particular foo, the foo.name value should be passed.
    `hydrate`
      If set to True, after the response is received from the call, a a GET call will be made to refresh all fields of each object. When hydrate is set to True, poll must also be set to True.
    `poll`
      If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
    `poll_interval`
      If the operation returns a job, this specifies how often to query the job for updates.
    `poll_timeout`
      If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host. Only resources matching this query will be patched.

    ## Returns

    A list of `Resource` objects matching the provided type which have been created by the host and returned. This is not the same list that was provided, so to continue using the object, you should save this list. If poll is set to False, then a `NetAppResponse` object is returned instead.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  ### Methods

  `def delete (self, body: Union[Resource, dict] = None, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, **kwargs) -> NetAppResponse`

    Deletes a storage unit snapshot.

    ### Learn more

    - `DOC /storage/storage-units/{storage_unit.uuid}/snapshots`

    Send a deletion request to the host for this object.

    ## Args

    `body`
      The body of the delete request. This could be a Resource instance or a dictionary object.
    `poll`
      If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
    `poll_interval`
      If the operation returns a job, this specifies how often to query the job for updates.
    `poll_timeout`
      If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  `def get (self, **kwargs) -> NetAppResponse`

    Retrieves details of a specific storage unit snapshot.

    ### Learn more

    - `DOC /storage/storage-units/{storage_unit.uuid}/snapshots`

    Fetch the details of the object from the host.

    Requires the keys to be set (if any). After returning, new or changed properties from the host will be set on the instance.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400 or if not all of the keys required are present and config.STRICT_GET has been set to True.

  `def patch (self, hydrate: bool = False, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, **kwargs) -> NetAppResponse`

    Updates a storage unit snapshot.

    ### Learn more

    - `DOC /storage/storage-units/{storage_unit.uuid}/snapshots`

    Send the difference in the object's state to the host as a modification request.

    Calculates the difference in the object's state since the last time we interacted with the host and sends this in the request body.

    ## Args

    `hydrate`
      If set to True, after the response is received from the call, a a GET call will be made to refresh all fields of the object.
    `poll`
      If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
    `poll_interval`
      If the operation returns a job, this specifies how often to query the job for updates.
    `poll_timeout`
      If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `**kwargs`
      Any key/value pairs passed will normally be sent as query parameters to the host. If any of these pairs are parameters that are sent as formdata then only parameters of that type will be accepted and all others will be discarded.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  `def post (self, hydrate: bool = False, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, **kwargs) -> NetAppResponse`

    Creates a storage unit snapshot.

    ### Required properties

    - `name` - Name of the snapshot to be created.

    ### Recommended optional properties

    - `comment` - Comment associated with the snapshot.
    - `expiry_time` - Snapshots with an expiry time set are not allowed to be deleted until the retention time is reached.
    - `snapmirror_label` - Label for SnapMirror operations.
    - `snaplock_expiry_time` - Expiry time for snapshot locking enabled volumes.

    ### Learn more

    - `DOC /storage/storage-units/{storage_unit.uuid}/snapshots`

    Send this object to the host as a creation request.

    ## Args

    `hydrate`
      If set to True, after the response is received from the call, a a GET call will be made to refresh all fields of the object.
    `poll`
      If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
    `poll_interval`
      If the operation returns a job, this specifies how often to query the job for updates.
    `poll_timeout`
      If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `**kwargs`
      Any key/value pairs passed will normally be sent as query parameters to the host. If any of these pairs are parameters that are sent as formdata then only parameters of that type will be accepted and all others will be discarded.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  ### Inherited members

  - `Resource`:
    - `from_dict`
    - `get_collection_url`
    - `get_connection`
    - `instance_location`
    - `path_keys`
    - `poll`
    - `set_connection`
    - `to_dict`
    - `validate_schema`
`class StorageUnitSnapshotSchema (*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool | None = None, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet | None = None, unknown: str | None = None)`

  The fields of the StorageUnitSnapshot object

  ### Ancestors

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

  ### Class variables

  `comment: str GET POST PATCH`

    A comment associated with the snapshot. Valid in POST and PATCH.

  `create_time: ImpreciseDateTime GET`

    Creation time of the snapshot. It is the storage unit access time when the snapshot was created.

    Example: 2019-02-04T19:00:00.000+0000

  `delta: SnapshotDelta GET`

    Reports the amount of space consumed between two WAFL file systems, in bytes. The two WAFL file systems should be specified in a comma-separated format using the "name" parameter. To determine the space consumed between a snapshot and the Active File System, only the snapshot name needs to be mentioned.

  `expiry_time: ImpreciseDateTime GET POST PATCH`

    The expiry time for the snapshot. Snapshots with an expiry time set are not allowed to be deleted until the retention time is reached.

    Example: 2019-02-04T19:00:00.000+0000

  `links: SelfLink GET`

    The links field of the storage_unit_snapshot.

  `logical_size: Size GET`

    Size of the logical used file system at the time the snapshot is captured.

    Example: 1228800

  `name: str GET POST PATCH`

    The name of the snapshot. Snapshot names cannot begin or end with whitespace. Valid in POST and PATCH.

    Example: this_snapshot

  `owners: List[str] GET`

    The owners field of the storage_unit_snapshot.

  `reclaimable_space: Size GET`

    Space reclaimed when the snapshot is deleted, in bytes.

  `size: Size GET`

    Size of the active file system at the time the snapshot is captured. The actual size of the snapshot also includes those blocks trapped by other snapshots. On a snapshot deletion, the `size` amount of blocks is the maximum number of blocks available. On a snapshot restore, the "AFS used size" value will match the snapshot `size` value.

    Example: 122880

  `snaplock: StorageUnitSnapshotSnaplock GET POST PATCH`

    The snaplock field of the storage_unit_snapshot.

  `snapmirror_label: str GET POST PATCH`

    Label for SnapMirror operations. Valid in POST and PATCH.

  `state: str GET`

    State of the FlexGroup volume snapshot. A recently created snapshot can be in the `unknown` state while the system is calculating the state. At all other times, a snapshot is valid.

    Valid choices:

    - valid
    - unknown
  `storage_unit: StorageUnit GET POST PATCH`

    The storage_unit field of the storage_unit_snapshot.

  `svm: Svm GET POST PATCH`

    The svm field of the storage_unit_snapshot.

  `uuid: str GET`

    The UUID of the snapshot in the storage unit that uniquely identifies the snapshot in that storage unit.

    Example: 1cd8a442-86d1-11e0-ae1c-123478563412

  `version_uuid: str GET`

    The 128 bit identifier that uniquely identifies a snapshot and its logical data layout.