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

# Module `netapp_ontap.resources.storage_unit`

Copyright © 2026 NetApp Inc. All rights reserved.

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

## Overview

Storage units is an aggregated view of LUNs and NVMe namespaces. See `/storage/luns` or `/storage/namespaces` to learn more about each storage unit type.
The storage unit REST API allows you to clone, restore, and discover storage units.

## Examples

### Retrieving storage units

This example retrieves summary information for all online storage units. The `status.state` query parameter is used to find the desired storage units.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnit

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(list(StorageUnit.get_collection(**{"status.state": "online"})))

Try it out

    [
        StorageUnit(
            {
                "name": "lun1",
                "status": {"state": "online"},
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/9034e72c-1d07-11ef-bd09-005056bbbc7b"
                    }
                },
                "uuid": "9034e72c-1d07-11ef-bd09-005056bbbc7b",
            }
        ),
        StorageUnit(
            {
                "name": "ns1",
                "status": {"state": "online"},
                "_links": {
                    "self": {
                        "href": "/api/storage/storage-units/3d9c001f-227e-11ef-97b9-005056bbbc7b"
                    }
                },
                "uuid": "3d9c001f-227e-11ef-97b9-005056bbbc7b",
            }
        ),
    ]

### Retrieving details for a specific storage unit

In this example, the `fields` query parameter is used to request all properties including advanced properties that would not otherwise be returned by default for the storage unit. The example storage unit was recently moved, therefore the `movement` properties are populated.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnit

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = StorageUnit(uuid="55150b5f-a365-11ef-be6a-005056a74d48")
        resource.get(fields="**")
        print(resource)

Try it out

    StorageUnit(
        {
            "serial_number": "wqUc6?XQp8Cn",
            "name": "lun1",
            "os_type": "linux",
            "status": {
                "container_state": "online",
                "mapped": False,
                "state": "online",
                "read_only": False,
            },
            "location": {
                "node": {
                    "name": "sti40-vsim-ucs507f",
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/a5fd8f06-a2c9-11ef-aec3-005056a7f0ed"
                        }
                    },
                    "uuid": "a5fd8f06-a2c9-11ef-aec3-005056a7f0ed",
                },
                "storage_availability_zone": {
                    "_links": {
                        "self": {
                            "href": "/api/storage/availability-zones/2b52fd40-a2ca-11ef-be6a-005056a74d48"
                        }
                    },
                    "name": "storage_availability_zone_0",
                    "uuid": "2b52fd40-a2ca-11ef-be6a-005056a74d48",
                },
                "volume": {
                    "name": "lun1",
                    "_links": {
                        "self": {
                            "href": "/api/storage/volumes/55cf6ff7-a365-11ef-be6a-005056a74d48"
                        }
                    },
                    "uuid": "55cf6ff7-a365-11ef-be6a-005056a74d48",
                },
            },
            "clone": {"is_flexclone": False},
            "movement": {
                "source": {
                    "storage_availability_zone": {
                        "_links": {
                            "self": {
                                "href": "/api/storage/availability-zones/c5a5d316-a2ca-11ef-a7d1-005056a77440"
                            }
                        },
                        "name": "storage_availability_zone_1",
                        "uuid": "c5a5d316-a2ca-11ef-a7d1-005056a77440",
                    }
                },
                "destination": {
                    "storage_availability_zone": {
                        "_links": {
                            "self": {
                                "href": "/api/storage/availability-zones/2b52fd40-a2ca-11ef-be6a-005056a74d48"
                            }
                        },
                        "name": "storage_availability_zone_0",
                        "uuid": "2b52fd40-a2ca-11ef-be6a-005056a74d48",
                    }
                },
                "percent_complete": 100,
                "state": "success",
                "start_time": "2024-11-18T20:39:38+00:00",
            },
            "enabled": True,
            "_links": {
                "self": {
                    "href": "/api/storage/storage-units/55150b5f-a365-11ef-be6a-005056a74d48?fields=**"
                }
            },
            "space": {
                "efficiency_ratio": 1.0,
                "used": 0,
                "size": 31457280,
                "physical_used": 40960,
                "physical_used_by_snapshots": 3407872,
            },
            "create_time": "2024-11-15T10:22:00-05:00",
            "type": "lun",
            "uuid": "55150b5f-a365-11ef-be6a-005056a74d48",
            "encryption": {"state": "unencrypted"},
            "class": "regular",
            "svm": {
                "name": "svm1",
                "_links": {
                    "self": {"href": "/api/svm/svms/8b8bb0c5-a2ca-11ef-be6a-005056a74d48"}
                },
                "uuid": "8b8bb0c5-a2ca-11ef-be6a-005056a74d48",
            },
        }
    )

### Restoring a storage unit from a snapshot

A snapshot restore operation is initiated by a PATCH request to `/storage/storage-units/{uuid}`. Set the query parameter `restore_to.snapshot.uuid` or `restore_to.snapshot.name` to identify the source snapshot to which to restore the storage unit in order to begin the operation. By default, snapshots created after the snapshot chosen as the restore point are deleted; the query parameter `restore_to.keep_snapshots` can be used to retain snapshots created after the snapshot chosen as the restore point. A partial restore from a snapshot is supported via the query parameters `restore_to.start_byte` and `restore_to.byte_count`.

#### This example restores the storage unit from snapshot `snap1` and deletes snapshots created after `snap1`.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnit

    with HostConnection("10.63.26.53", username="admin", password="password", verify=False):
        resource = StorageUnit(uuid="eaebc659-237b-11ef-a1bc-005056bbf4ce")
        resource.patch(
            hydrate=True, return_timeout=90, **{"restore_to.snapshot.name": "snap1"}
        )

#### This example restores the storage unit from snapshot `snap1` and retains snapshots created after `snap1`.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnit

    with HostConnection("10.63.26.53", username="admin", password="password", verify=False):
        resource = StorageUnit(uuid="eaebc659-237b-11ef-a1bc-005056bbf4ce")
        resource.patch(
            hydrate=True,
            return_timeout=90,
            **{"restore_to.snapshot.name": "snap1", "restore_to.keep_snapshots": "true"}
        )

#### This example restores the first 4096 bytes of the storage unit from snapshot `snap1` and retains snapshots created after `snap1`.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnit

    with HostConnection("10.63.26.53", username="admin", password="password", verify=False):
        resource = StorageUnit(uuid="eaebc659-237b-11ef-a1bc-005056bbf4ce")
        resource.patch(
            hydrate=True,
            return_timeout=90,
            **{
                "restore_to.snapshot.name": "snap1",
                "restore_to.keep_snapshots": "true",
                "restore_to.start_byte": "0",
                "restore_to.byte_count": "4096",
            }
        )

### Cloning storage units

A clone of a storage unit is an independent "copy" of the storage unit that shares unchanged data blocks with the original. As blocks of the source and the clone are modified, unique blocks are written for each. Storage unit clones can be created quickly and consume very little space initially. They can be created for the purpose of back-up, or to replicate data for multiple consumers.

### Creating a new storage unit clone

You create a new storage unit clone by POST request to `/storage/storage-units/`. Set `clone.source.storage_unit.uuid` or `clone.source.storage_unit.name` to identify the source storage unit from which the clone is created. The storage unit clone and its source must reside on the same SVM.
The source storage unit can reside in a snapshot, in which case the `clone.source.snapshot.name` property must be used to identify it.
By default, storage unit clones do not inherit the Quality of Service (QoS) policy of the source storage unit; a QoS policy should be set for the clone by setting the `qos_policy` property by PATCH request to `/storage/luns/` or `/storage/namespaces/`

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnit

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = StorageUnit()
        resource.clone = {
            "source": {"storage_unit": {"name": "lun1"}, "svm": {"name": "svm1"}}
        }
        resource.svm = {"name": "svm1"}
        resource.name = "lun1Clone1"
        resource.post(hydrate=True)
        print(resource)

Try it out

    StorageUnit(
        {
            "name": "lun1Clone1",
            "clone": {
                "source": {"storage_unit": {"name": "lun1"}, "svm": {"name": "svm1"}}
            },
            "svm": {"name": "svm1"},
        }
    )

### Splitting a storage unit clone

A clone split operation is initiated by a PATCH request to `/storage/storage-units/{uuid}`. Set the `clone.split_initiated` property to `true` to initiate the clone split operation. The clone split operation is asynchronous and might take some time to complete. The clone split operation is complete when the `clone.split_initiated` property is set to `false`.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnit

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = StorageUnit(uuid="9034e72c-1d07-11ef-bd09-005056bbbc7b")
        resource.clone = {"split_initiated": "true"}
        resource.patch()

## Moving storage units

A storage unit can be non-disruptively moved to a different storage availability zone in order to balance consumption of space and I/O resources between storage availability zones. Storage unit move operations can be started using the REST API and continue asynchronously until completion. The REST API can also be used to monitor the progress of an on-going storage unit move operation and pause and resume a storage unit move operation.

### Starting a storage unit move operation

To start a storage unit move operation, update one of the `location.data_availability_zone` properties of a storage unit to the destination storage availability zone.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnit

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = StorageUnit(uuid="55150b5f-a365-11ef-be6a-005056a74d48")
        resource.location = {
            "storage_availability_zone": {"name": "storage_availability_zone_0"}
        }
        resource.patch()

### Monitoring a storage unit move operation

Monitor the state of a storage unit move operation by retrieving the `movement` properties of the storage unit.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnit

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = StorageUnit(uuid="55150b5f-a365-11ef-be6a-005056a74d48")
        resource.get(fields="movement")
        print(resource)

Try it out

    StorageUnit(
        {
            "name": "lun1",
            "movement": {
                "source": {
                    "storage_availability_zone": {
                        "_links": {
                            "self": {
                                "href": "/api/storage/availability-zones/2b52fd40-a2ca-11ef-be6a-005056a74d48"
                            }
                        },
                        "name": "storage_availability_zone_0",
                        "uuid": "2b52fd40-a2ca-11ef-be6a-005056a74d48",
                    }
                },
                "destination": {
                    "storage_availability_zone": {
                        "_links": {
                            "self": {
                                "href": "/api/storage/availability-zones/c5a5d316-a2ca-11ef-a7d1-005056a77440"
                            }
                        },
                        "name": "storage_availability_zone_1",
                        "uuid": "c5a5d316-a2ca-11ef-a7d1-005056a77440",
                    }
                },
                "state": "replicating",
                "start_time": "2024-11-18T20:35:13+00:00",
            },
            "_links": {
                "self": {
                    "href": "/api/storage/storage-units/55150b5f-a365-11ef-be6a-005056a74d48"
                }
            },
            "uuid": "55150b5f-a365-11ef-be6a-005056a74d48",
        }
    )

### Pausing or resuming a storage unit move operation

To pause an on-going storage unit move operation, update the `movement.state` property of the storage unit to `paused`.
Similarly, to resume a paused storage unit move operation, update the `movement.state` property of the storage unit to `replicating`.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import StorageUnit

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = StorageUnit(uuid="55150b5f-a365-11ef-be6a-005056a74d48")
        resource.movement = {"state": "paused"}
        resource.patch()

## Classes

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

  A storage unit representing either a LUN or a namespace.

  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 StorageUnit 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 fast_get_collection (*args, connection: HostConnection = None, max_records: int = None, **kwargs) -> Iterable[RawResource]`

    Returns a list of RawResources that represent StorageUnit 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 storage units.

    ### Expensive properties

    There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the `fields` query parameter. See `Requesting specific fields` to learn more. * `clone.inherited_physical_used` * `clone.inherited_savings` * `clone.match_source_storage_tier` * `clone.source.snapshot.name` * `clone.source.snapshot.uuid` * `clone.split_complete_percent` * `clone.split_estimate` * `clone.split_initiated` * `maps.*` * `metric.*` * `movement.percent_complete` * `movement.start_time` * `movement.state` * `space.physical_used_by_snapshots` * `space.physical_used` * `space.snapshot.*` * `statistics.*`

    ### Learn more

    - `DOC /storage/storage-units`

    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 storage units.

    ### Expensive properties

    There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the `fields` query parameter. See `Requesting specific fields` to learn more. * `clone.inherited_physical_used` * `clone.inherited_savings` * `clone.match_source_storage_tier` * `clone.source.snapshot.name` * `clone.source.snapshot.uuid` * `clone.split_complete_percent` * `clone.split_estimate` * `clone.split_initiated` * `maps.*` * `metric.*` * `movement.percent_complete` * `movement.start_time` * `movement.state` * `space.physical_used_by_snapshots` * `space.physical_used` * `space.snapshot.*` * `statistics.*`

    ### Learn more

    - `DOC /storage/storage-units`

    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('StorageUnit')] = None, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> NetAppResponse`

    Modify an existing storage unit.
    Storage unit modification supports the following: * `restore_to` - Restores the storage unit to a prior snapshot. These properties are specified in the query. * `clone.split_initiated` - Initiates a clone split operation.

    ### Learn more

    - `DOC /storage/storage-units`

    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('StorageUnit')], *args, hydrate: bool = False, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> Union[List[StorageUnit], NetAppResponse]`

    Creates a storage unit.
    A storage unit can only be directly created as a clone of an existing storage unit. To create a new storage unit that is not a clone of another, use /api/storage/luns or /api/storage/namespaces.

    ### Required properties

    - `svm.uuid` or `svm.name` - Existing SVM in which to create the storage unit.
    - `name` - The name of the storage unit.
    - `clone` - Identifiers of the parent storage unit or storage unit snapshot from which to clone a new storage unit.

    ### Learn more

    - `DOC /storage/storage-units`

    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 get (self, **kwargs) -> NetAppResponse`

    Retrieves a storage unit's properties.

    ### Expensive properties

    There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the `fields` query parameter. See `Requesting specific fields` to learn more. * `clone.inherited_physical_used` * `clone.inherited_savings` * `clone.match_source_storage_tier` * `clone.source.snapshot.name` * `clone.source.snapshot.uuid` * `clone.split_complete_percent` * `clone.split_estimate` * `clone.split_initiated` * `maps.*` * `metric.*` * `movement.percent_complete` * `movement.start_time` * `movement.state` * `space.physical_used_by_snapshots` * `space.physical_used` * `space.snapshot.*` * `statistics.*`

    ### Learn more

    - `DOC /storage/storage-units`

    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`

    Modify an existing storage unit.
    Storage unit modification supports the following: * `restore_to` - Restores the storage unit to a prior snapshot. These properties are specified in the query. * `clone.split_initiated` - Initiates a clone split operation.

    ### Learn more

    - `DOC /storage/storage-units`

    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.
    A storage unit can only be directly created as a clone of an existing storage unit. To create a new storage unit that is not a clone of another, use /api/storage/luns or /api/storage/namespaces.

    ### Required properties

    - `svm.uuid` or `svm.name` - Existing SVM in which to create the storage unit.
    - `name` - The name of the storage unit.
    - `clone` - Identifiers of the parent storage unit or storage unit snapshot from which to clone a new storage unit.

    ### Learn more

    - `DOC /storage/storage-units`

    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 StorageUnitSchema (*, 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 StorageUnit object

  ### Ancestors

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

  ### Class variables

  `anti_ransomware: AntiRansomwareStorageUnit GET PATCH`

    The anti-ransomware properties of a storage unit.

  `class_: str GET`

    The class of LUN.

    Valid choices:

    - regular
    - vvol
  `clone: StorageUnitClone GET POST PATCH`

    The clone field of the storage_unit.

  `comment: str GET`

    A configurable comment available for use by the administrator.

  `consistency_group: StorageUnitConsistencyGroup GET`

    The storage unit's consistency group. This property is populated for storage units that are members of a consistency group.

  `create_time: ImpreciseDateTime GET`

    The time the storage unit was created.

    Example: 2018-06-04T19:00:00.000+0000

  `enabled: bool GET`

    The enabled state of the storage unit. Storage units can be disabled to prevent access to the storage unit. Certain error conditions also cause the storage unit to become disabled. If the storage unit is disabled, check the `status.state` property to determine if the storage unit is administratively disabled (offline) or has become disabled as a result of an error.
    A storage unit in an error condition can be brought online by setting the `enabled` property to true or brought administratively offline by setting the `enabled` property to false using /api/storage/luns or /api/storage/namespaces. Upon creation, a storage unit is enabled by default.

  `encryption: StorageUnitEncryption GET`

    The encryption field of the storage_unit.

  `links: SelfLink GET`

    The links field of the storage_unit.

  `location: StorageUnitLocation GET PATCH`

    The location field of the storage_unit.

  `maps: List[StorageUnitMaps] GET`

    Maps between the storage unit and host groups.

  `metric: PerformanceMetric GET`

    Performance numbers, such as IOPS latency and throughput.

  `movement: StorageUnitMovement GET PATCH`

    The properties of a storage unit move operation from one storage availability zone to another.

  `name: str GET POST`

    The name of the storage unit. The name must start with an alphabetic character (a to z or A to Z) or an underscore (_). The name must be 203 characters or less in length. Valid in POST.

    Example: lun1

  `os_type: str GET`

    The operating system type of the storage unit.

    Valid choices:

    - aix
    - hpux
    - hyper_v
    - linux
    - netware
    - openvms
    - solaris
    - solaris_efi
    - vmware
    - windows
    - windows_2008
    - windows_gpt
    - xen
  `qos_policy: StorageUnitQosPolicy GET`

    The QoS policy for the storage unit. Both traditional and adaptive QoS policies are supported.

  `serial_number: str GET`

    The LUN serial number. The serial number is generated by ONTAP when the LUN is created.

  `serial_number_hex: str GET`

    The LUN serial number encoded in hexadecimal format. The serial number is generated by ONTAP when the LUN is created.

  `space: StorageUnitSpace GET`

    The storage space related properties of the storage unit.

  `statistics: PerformanceMetricRaw GET`

    The statistics field of the storage_unit.

  `status: StorageUnitStatus GET`

    Status information about the storage unit.

  `svm: Svm GET POST`

    The svm field of the storage_unit.

  `type: str GET`

    The type of storage unit.

    Valid choices:

    - lun
    - namespace
  `uuid: str GET`

    The unique identifier of the storage unit. The UUID is generated by ONTAP when the storage unit is created. The storage unit UUID is the same as the LUN or namespace UUID.

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