# Module `netapp_ontap.resources.volume`

Copyright © 2023 NetApp Inc. All rights reserved.

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

## Overview

FlexVol volumes are logical containers used by ONTAP to serve data to clients. They contain file systems in a NAS environment and LUNs in a SAN environment.
A FlexGroup volume is a scale-out NAS container that provides high performance along with automatic load distribution and scalability. A FlexGroup volume contains several constituents that automatically and transparently share the traffic. FlexClone volumes are writable, point-in-time copies of a FlexVol volume. At this time, FlexClones of FlexGroups are not supported.
Volumes with SnapLock type Compliance or Enterprise, are referred to as SnapLock volumes. It is possible to create a SnapLock volume by specifying SnapLock parameters.
ONTAP storage APIs allow you to create, modify, and monitor volumes and aggregates.

## Storage efficiency

Storage efficiency is used to remove duplicate blocks in the data and to compress the data. Efficiency has deduplication, compression, cross volume deduplication, compaction, policy-name, enabled, application_io_size, compression_type and storage_efficiency_mode options. On All Flash systems, all efficiencies are enabled by default, on volume creation. Options such as "background/inline/both" are treated as both, which means both background and inline are enabled for any efficiency option. The option "none" disables both background and inline efficiency. Application-io-size and compression-type decides type of compression behavior in the system. Storage efficiency mode decides if the system is to run in default/efficient mode. Detailed information about each field is available under efficiency object for storage efficiency fields.
To enable any efficiency option on all-flash or FAS systems, background deduplication is always enabled.

## Quotas

Quotas provide a way to restrict or track the files and space usage by a user, group, or qtree. Quotas are enabled for a specific FlexVol or a FlexGroup volume.
The following APIs can be used to enable or disable and obtain quota state for a FlexVol or a FlexGroup volume:

- PATCH /api/storage/volumes/{uuid} -d '{"quota.enabled":"true"}'
- PATCH /api/storage/volumes/{uuid} -d '{"quota.enabled":"false"}'
- GET /api/storage/volumes/{uuid}/?fields=quota.state

## File System Analytics

File system analytics (FSA) provide a quick method for obtaining information summarizing properties of all files within any directory tree of a volume. For more information on FSA, see `DOC /storage/volumes{volume.uuid}/files/{path}`. Analytics can be enabled or disabled on individual volumes.
The following APIs can be used to enable or disable and obtain analytics state for a FlexVol volume or a FlexGroup volume:

- PATCH /api/storage/volumes/{uuid} -d '{"analytics.state":"on"}'
- PATCH /api/storage/volumes/{uuid} -d '{"analytics.state":"off"}'
- GET /api/storage/volumes/{uuid}/?fields=analytics
  If the `analytics.state` field is "initializing" or "initialization_paused" and is set to "off", the FSA initialization scan is cancelled. If FSA is turned on again, the initialization scan restarts.

## QoS

QoS policy and settings enforce Service Level Objectives (SLO) on a volume. SLO can be set by specifying qos.max_throughput_iops and/or qos.max_throughput_mbps or qos.min_throughput_iops and/or qos.min_throughput_mbps. Specifying min_throughput_iops or min_throughput_mbps is only supported on volumes hosted on a node that is flash optimized. A pre-created QoS policy can also be used by specifying qos.name or qos.uuid property.

## Performance monitoring

Performance of a volume can be monitored by the `metric.*` and `statistics.*` fields. These show the performance of the volume in terms of IOPS, latency and throughput. The `metric.*` fields denote an average whereas `statistics.*` fields denote a real-time monotonically increasing value aggregated across all nodes.

## Rebalancing

Non-disruptive capacity rebalancing of a FlexGroup volume is configured by the `rebalancing.*` fields. If not explicitly set, default values are provided. To initiate a capacity rebalancing operation, `rebalancing.state` is set to 'starting'. The `rebalancing.max_runtime` can be optionally set, which is the maximum length of time you want the capacity rebalancing to run for. You can stop capacity rebalancing by setting `rebalancing.state` to 'stopping'. You can also modify the configurations `rebalancing.max_runtime`, `rebalancing.max_threshold`, `rebalancing.min_threshold`, `rebalancing.max_file_moves`, `rebalancing.min_file_size`, and `rebalancing.exclude_snapshots`. When a new capacity rebalancing operation is started on a FlexGroup volume, it uses the current configuration values. Once the operation is started, changes to the configuration are not allowed, until the capacity rebalanding operations stops, either by exceeding their maximum runtime or by being stopped. To see runtime information about each constituent, for a running rebalancing operation, use the 'rebalancing.engine.*' fields.

## Volume APIs

The following APIs are used to perform operations related with FlexVol volumes and FlexGroup volumes:

- POST /api/storage/volumes
- GET /api/storage/volumes
- GET /api/storage/volumes/{uuid}
- PATCH /api/storage/volumes/{uuid}
- DELETE /api/storage/volumes/{uuid}

## Examples

### Creating a volume

The POST request is used to create a new volume and to specify its properties.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume()
        resource.name = "vol1"
        resource.aggregates = [{"name": "aggr1"}]
        resource.svm = {"name": "vs1"}
        resource.post(hydrate=True)
        print(resource)

Try it out

    Volume({"aggregates": [{"name": "aggr1"}], "svm": {"name": "vs1"}, "name": "vol1"})

### Creating a SnapLock volume and specifying its properties using POST

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume()
        resource.name = "vol1"
        resource.aggregates = [{"name": "aggr1"}]
        resource.svm = {"name": "vs1"}
        resource.snaplock = {"retention": {"default": "P20Y"}, "type": "compliance"}
        resource.post(hydrate=True)
        print(resource)

Try it out

    Volume(
        {
            "snaplock": {"type": "compliance", "retention": {"default": "P20Y"}},
            "aggregates": [{"name": "aggr1"}],
            "svm": {"name": "vs1"},
            "name": "vol1",
        }
    )

### Creating a FlexGroup volume and specifying its properties using POST

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume()
        resource.name = "vol1"
        resource.state = "online"
        resource.type = "RW"
        resource.aggregates = [{"name": "aggr1"}, {"name": "aggr2"}, {"name": "aggr3"}]
        resource.constituents_per_aggregate = "1"
        resource.svm = {"name": "vs1"}
        resource.size = "240MB"
        resource.encryption = {"enabled": "False"}
        resource.efficiency = {"compression": "both"}
        resource.autosize = {"maximum": "500MB", "minimum": "240MB"}
        resource.post(hydrate=True)
        print(resource)

Try it out

    Volume(
        {
            "state": "online",
            "aggregates": [{"name": "aggr1"}, {"name": "aggr2"}, {"name": "aggr3"}],
            "autosize": {"minimum": 251658240, "maximum": 524288000},
            "constituents_per_aggregate": 1,
            "efficiency": {"compression": "both"},
            "encryption": {"enabled": False},
            "size": 251658240,
            "svm": {"name": "vs1"},
            "type": "RW",
            "name": "vol1",
        }
    )

### Creating a FlexGroup volume and specifying its properties using POST when the Performance_NAS license is installed.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume()
        resource.name = "vol1"
        resource.state = "online"
        resource.type = "RW"
        resource.svm = {"name": "vs1"}
        resource.size = "240TB"
        resource.encryption = {"enabled": "False"}
        resource.efficiency = {"compression": "both"}
        resource.autosize = {"maximum": "500TB", "minimum": "240TB"}
        resource.post(hydrate=True)
        print(resource)

Try it out

    Volume(
        {
            "state": "online",
            "autosize": {"minimum": 263882790666240, "maximum": 549755813888000},
            "efficiency": {"compression": "both"},
            "encryption": {"enabled": False},
            "size": 263882790666240,
            "svm": {"name": "vs1"},
            "type": "RW",
            "name": "vol1",
        }
    )

### Creating a FlexClone and specifying its properties using POST

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume()
        resource.name = "vol1_clone"
        resource.clone = {"parent_volume": {"name": "vol1"}, "is_flexclone": "true"}
        resource.svm = {"name": "vs0"}
        resource.post(hydrate=True)
        print(resource)

Try it out

    Volume(
        {
            "clone": {"parent_volume": {"name": "vol1"}, "is_flexclone": True},
            "svm": {"name": "vs0"},
            "name": "vol1_clone",
        }
    )

## Volumes reported in the GET REST API

### The following types of volumes are reported:

- RW, DP and LS volumes
- FlexGroup volume
- FlexCache volume
- FlexClone volume
- FlexGroup constituent

### The following volumes are not reported:

- DEL and TMP type volume
- Node Root volume
- System Vserver volume
- FlexCache constituent

## Examples

### Retrieving the list of volumes

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

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

Try it out

    [
        Volume(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/volumes/2d1167cc-c3f2-495a-a23f-8f50b071b9b8"
                    }
                },
                "uuid": "2d1167cc-c3f2-495a-a23f-8f50b071b9b8",
                "name": "vsdata_root",
            }
        ),
        Volume(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/volumes/3969be7e-78b4-4b4c-82a4-fa86331f03df"
                    }
                },
                "uuid": "3969be7e-78b4-4b4c-82a4-fa86331f03df",
                "name": "vsfg_root",
            }
        ),
        Volume(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/volumes/59c03ac5-e708-4ce8-a676-278dc249fda2"
                    }
                },
                "uuid": "59c03ac5-e708-4ce8-a676-278dc249fda2",
                "name": "svm_root",
            }
        ),
        Volume(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/volumes/6802635b-8036-11e8-aae5-0050569503ac"
                    }
                },
                "uuid": "6802635b-8036-11e8-aae5-0050569503ac",
                "name": "fgvol",
            }
        ),
        Volume(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/volumes/d0c3359c-5448-4a9b-a077-e3295a7e9057"
                    }
                },
                "uuid": "d0c3359c-5448-4a9b-a077-e3295a7e9057",
                "name": "datavol",
            }
        ),
    ]

### Retrieving the attributes of a volume

The GET request is used to retrieve the attributes of a volume.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="d0c3359c-5448-4a9b-a077-e3295a7e9057")
        resource.get()
        print(resource)

Try it out

    Volume(
        {
            "state": "online",
            "snaplock": {
                "privileged_delete": "disabled",
                "autocommit_period": "none",
                "compliance_clock_time": "2019-05-24T10:59:00+05:30",
                "expiry_time": "2038-01-19T08:44:28+05:30",
                "type": "enterprise",
                "append_mode_enabled": False,
                "is_audit_log": False,
                "retention": {"default": "P0Y", "maximum": "P30Y", "minimum": "P0Y"},
                "litigation_count": 0,
            },
            "aggregates": [
                {
                    "_links": {"self": {"href": "/api/cluster/aggregates/data"}},
                    "name": "data",
                    "uuid": "aa742322-36bc-4d98-bbc4-0a827534c035",
                }
            ],
            "_links": {
                "self": {
                    "href": "/api/storage/volumes/d0c3359c-5448-4a9b-a077-e3295a7e9057"
                }
            },
            "language": "en_us",
            "statistics": {
                "cloud": {
                    "timestamp": "2019-04-09T05:50:42+00:00",
                    "iops_raw": {"other": 0, "total": 0, "read": 0, "write": 0},
                    "latency_raw": {"other": 0, "total": 0, "read": 0, "write": 0},
                    "status": "ok",
                },
                "timestamp": "2019-04-09T05:50:42+00:00",
                "flexcache_raw": {
                    "cache_miss_blocks": 0,
                    "client_requested_blocks": 0,
                    "timestamp": "2019-04-09T05:50:15+00:00",
                    "status": "ok",
                },
                "latency_raw": {"other": 38298, "total": 38298, "read": 0, "write": 0},
                "status": "ok",
                "iops_raw": {"other": 3, "total": 3, "read": 0, "write": 0},
                "throughput_raw": {"other": 0, "total": 0, "read": 0, "write": 0},
            },
            "snapshot_policy": {"name": "default"},
            "encryption": {"state": "none", "enabled": False, "type": "none", "key_id": ""},
            "create_time": "2018-07-05T14:56:44+05:30",
            "error_state": {"has_bad_blocks": False, "is_inconsistent": False},
            "uuid": "d0c3359c-5448-4a9b-a077-e3295a7e9057",
            "files": {"maximum": 566, "used": 96},
            "metric": {
                "cloud": {
                    "timestamp": "2019-04-09T05:50:15+00:00",
                    "status": "ok",
                    "iops": {"other": 0, "total": 0, "read": 0, "write": 0},
                    "duration": "PT15S",
                    "latency": {"other": 0, "total": 0, "read": 0, "write": 0},
                },
                "timestamp": "2019-04-09T05:50:15+00:00",
                "throughput": {"other": 0, "total": 0, "read": 0, "write": 0},
                "status": "ok",
                "flexcache": {
                    "timestamp": "2019-04-09T05:50:15+00:00",
                    "status": "ok",
                    "cache_miss_percent": 0,
                    "duration": "PT1D",
                    "bandwidth_savings": 0,
                },
                "iops": {"other": 0, "total": 0, "read": 0, "write": 0},
                "duration": "PT15S",
                "latency": {"other": 0, "total": 0, "read": 0, "write": 0},
            },
            "size": 20971520,
            "style": "flexvol",
            "comment": "This is a data volume",
            "qos": {
                "policy": {"name": "pg1", "uuid": "228454af-5a8b-11e9-bd5b-005056ac6f1f"}
            },
            "svm": {"uuid": "d61b69f5-7458-11e8-ad3f-0050569503ac", "name": "vsdata"},
            "nas": {
                "export_policy": {"id": 8589934593, "name": "default"},
                "unix_permissions": 4755,
                "security_style": "unix",
                "gid": 2468,
                "uid": 1357,
                "junction_parent": {
                    "_links": {
                        "self": {
                            "href": "/api/storage/volumes/a2564f80-25fb-41e8-9b49-44de2600991f"
                        }
                    },
                    "name": "vol1",
                    "uuid": "a2564f80-25fb-41e8-9b49-44de2600991f",
                },
            },
            "type": "rw",
            "anti_ransomware_state": "disabled",
            "name": "datavol",
        }
    )

### Retrieving the quota state of a FlexVol or a FlexGroup volume

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="cb20da45-4f6b-11e9-9a71-005056a7f717")
        resource.get(fields="quota.state")
        print(resource)

Try it out

    Volume(
        {
            "_links": {
                "self": {
                    "href": "/api/storage/volumes/cb20da45-4f6b-11e9-9a71-005056a7f717/"
                }
            },
            "uuid": "cb20da45-4f6b-11e9-9a71-005056a7f717",
            "quota": {"state": "on"},
            "name": "fv",
        }
    )

### Retrieving the constituents of a FlexGroup volume

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(
            list(
                Volume.get_collection(
                    is_constituent=True,
                    **{"flexgroup.uuid": "fd87d06f-8876-11ec-94a3-005056a7484f"}
                )
            )
        )

Try it out

    [
        Volume(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/volumes/fd877f7c-8876-11ec-94a3-005056a7484f?is_constituent=true"
                    }
                },
                "flexgroup": {"uuid": "fd87d06f-8876-11ec-94a3-005056a7484f"},
                "uuid": "fd877f7c-8876-11ec-94a3-005056a7484f",
                "name": "fg__0001",
            }
        ),
        Volume(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/volumes/fea631d6-8876-11ec-94a3-005056a7484f?is_constituent=true"
                    }
                },
                "flexgroup": {"uuid": "fd87d06f-8876-11ec-94a3-005056a7484f"},
                "uuid": "fea631d6-8876-11ec-94a3-005056a7484f",
                "name": "fg__0002",
            }
        ),
        Volume(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/volumes/ff38a34e-8876-11ec-94a3-005056a7484f?is_constituent=true"
                    }
                },
                "flexgroup": {"uuid": "fd87d06f-8876-11ec-94a3-005056a7484f"},
                "uuid": "ff38a34e-8876-11ec-94a3-005056a7484f",
                "name": "fg__0003",
            }
        ),
        Volume(
            {
                "_links": {
                    "self": {
                        "href": "/api/storage/volumes/ffdbbd1f-8876-11ec-94a3-005056a7484f?is_constituent=true"
                    }
                },
                "flexgroup": {"uuid": "fd87d06f-8876-11ec-94a3-005056a7484f"},
                "uuid": "ffdbbd1f-8876-11ec-94a3-005056a7484f",
                "name": "fg__0004",
            }
        ),
    ]

### Retrieving the efficiency attributes of volume

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="5f098ebc-32c8-11eb-8dde-005056ace228")
        resource.get(fields="efficiency")
        print(resource)

Try it out

    Volume(
        {
            "_links": {
                "self": {
                    "href": "/api/storage/volumes/5f098ebc-32c8-11eb-8dde-005056ace228"
                }
            },
            "efficiency": {
                "state": "enabled",
                "schedule": "sun-sat@0",
                "compaction": "none",
                "policy": {"name": "-"},
                "compression": "both",
                "progress": "Idle for 00:10:37",
                "cross_volume_dedupe": "none",
                "type": "regular",
                "last_op_state": "Success",
                "dedupe": "background",
                "last_op_size": 0,
            },
            "uuid": "5f098ebc-32c8-11eb-8dde-005056ace228",
            "name": "vol1",
        }
    )

## Updating the attributes of a volume

## Examples

### Updating the attributes of a volume

The PATCH request is used to update the attributes of a volume.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="d0c3359c-5448-4a9b-a077-e3295a7e9057")
        resource.size = 26214400
        resource.nas = {"security_style": "mixed"}
        resource.comment = "This is a data volume"
        resource.patch()

### Updating the attributes of a FlexClone using PATCH

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="d0c3359c-5448-4a9b-a077-e3295a7e9057")
        resource.clone = {"split_initiated": "true"}
        resource.patch()

### Stopping a volume clone split operation on a FlexClone using PATCH.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="d0c3359c-5448-4a9b-a077-e3295a7e9057")
        resource.clone = {"split_initiated": "false"}
        resource.patch()

### Enabling quotas for a FlexVol or a FlexGroup volume using PATCH

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="d0c3359c-5448-4a9b-a077-e3295a7e9057")
        resource.quota = {"enabled": "true"}
        resource.patch()

### Disabling quotas for a FlexVol or a FlexGroup volume using PATCH

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="d0c3359c-5448-4a9b-a077-e3295a7e9057")
        resource.quota = {"enabled": "false"}
        resource.patch()

### Starting non-disruptive volume capacity rebalancing for a FlexGroup volume using PATCH

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="d0c3359c-5448-4a9b-a077-e3295a7e9057")
        resource.rebalancing = {"state": "starting", "max_runtime": "PT6H"}
        resource.patch()

### Starting a scheduled non-disruptive volume capacity rebalancing for a FlexGroup volume using PATCH

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="d0c3359c-5448-4a9b-a077-e3295a7e9057")
        resource.rebalancing = {
            "state": "starting",
            "start_time": "2022-12-21T15:30:00-05:00",
        }
        resource.patch()

### Stopping non-disruptive volume capacity rebalancing OR scheduled rebalancing for a FlexGroup volume using PATCH. This works for scheduled or on-going rebalancing.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="d0c3359c-5448-4a9b-a077-e3295a7e9057")
        resource.rebalancing = {"state": "stopping"}
        resource.patch()

### Modifying non-disruptive volume capacity rebalancing configurations for a FlexGroup volume

The following example shows how to use a PATCH request to modify non-disruptive volume capacity rebalancing configurations for a FlexGroup volume:

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="d0c3359c-5448-4a9b-a077-e3295a7e9057")
        resource.rebalancing = {
            "start_time": "2023-03-18T15:30:00-05:00",
            "max_threshold": 20,
            "min_threshold": 5,
            "max_file_moves": 15,
            "min_file_size": "100MB",
            "exclude_snapshots": "false",
            "max_runtime": "PT6H",
        }
        resource.patch()

### Retrieving non-disruptive volume capacity rebalancing engine runtime information for a FlexGroup volume

The following example shows how to use a GET request to retrieve non-disruptive volume capacity rebalancing engine runtime information for a FlexGroup volume:

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(
            list(
                Volume.get_collection(
                    fields="rebalancing.engine",
                    is_contituent=True,
                    **{"flexgroup.uuid": "d0c3359c-5448-4a9b-a077-e3295a7e9057"}
                )
            )
        )

Try it out

    [
        Volume(
            {
                "rebalancing": {
                    "engine": {
                        "scanner": {
                            "blocks_scanned": 1542675000,
                            "blocks_skipped": {
                                "other": 187000,
                                "efficiency_percent": 366000,
                                "too_small": 8744000,
                                "metadata": 85673000,
                                "incompatible": 2287000,
                                "fast_truncate": 54000,
                                "remote_cache": 9914000,
                                "write_fenced": 19000,
                                "footprint_invalid": 98000,
                                "too_large": 865000,
                                "efficiency_blocks": 1472000,
                                "in_snapshot": 7749000,
                                "on_demand_destination": 66000,
                            },
                            "files_scanned": 3522915,
                            "files_skipped": {
                                "other": 336,
                                "efficiency_percent": 355,
                                "too_small": 3812,
                                "metadata": 85449,
                                "incompatible": 9377,
                                "fast_truncate": 22,
                                "remote_cache": 1912,
                                "write_fenced": 28,
                                "footprint_invalid": 12,
                                "too_large": 199,
                                "efficiency_blocks": 1823,
                                "in_snapshot": 77499,
                                "on_demand_destination": 87,
                            },
                        },
                        "movement": {
                            "last_error": {
                                "code": 60,
                                "destination": 1089,
                                "file_id": 88,
                                "time": "2022-02-15T09:09:27-05:00",
                            },
                            "most_recent_start_time": "2022-02-15T12:56:07-05:00",
                            "file_moves_started": 9833,
                        },
                    }
                },
                "_links": {
                    "self": {
                        "href": "/api/storage/volumes/2b32fdf1-b916-11ec-b103-005056a79638?is_constituent=true"
                    }
                },
                "flexgroup": {"uuid": "2b3323db-b916-11ec-b103-005056a79638"},
                "uuid": "2b32fdf1-b916-11ec-b103-005056a79638",
                "name": "fg__0001",
            }
        ),
        Volume(
            {
                "rebalancing": {
                    "engine": {
                        "scanner": {
                            "blocks_scanned": 1542675000,
                            "blocks_skipped": {
                                "other": 187000,
                                "efficiency_percent": 366000,
                                "too_small": 8744000,
                                "metadata": 85673000,
                                "incompatible": 2287000,
                                "fast_truncate": 54000,
                                "remote_cache": 9914000,
                                "write_fenced": 19000,
                                "footprint_invalid": 98000,
                                "too_large": 865000,
                                "efficiency_blocks": 1472000,
                                "in_snapshot": 7749000,
                                "on_demand_destination": 66000,
                            },
                            "files_scanned": 3522915,
                            "files_skipped": {
                                "other": 336,
                                "efficiency_percent": 355,
                                "too_small": 3812,
                                "metadata": 85449,
                                "incompatible": 9377,
                                "fast_truncate": 25,
                                "remote_cache": 1912,
                                "write_fenced": 28,
                                "footprint_invalid": 12,
                                "too_large": 188,
                                "efficiency_blocks": 1823,
                                "in_snapshot": 77499,
                                "on_demand_destination": 87,
                            },
                        },
                        "movement": {
                            "last_error": {
                                "code": 60,
                                "destination": 1089,
                                "file_id": 88,
                                "time": "2022-02-15T08:09:27-05:00",
                            },
                            "most_recent_start_time": "2022-02-15T12:56:07-05:00",
                            "file_moves_started": 9833,
                        },
                    }
                },
                "_links": {
                    "self": {
                        "href": "/api/storage/volumes/2cc5da55-b916-11ec-b103-005056a79638?is_constituent=true"
                    }
                },
                "flexgroup": {"uuid": "2b3323db-b916-11ec-b103-005056a79638"},
                "uuid": "2cc5da55-b916-11ec-b103-005056a79638",
                "name": "fg__0002",
            }
        ),
    ]

## Add tiering object tags for a FlexVol volume

The following example shows how to use a PATCH request to add tiering object tags for a FlexVol volume:

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="d0c3359c-5448-4a9b-a077-e3295a7e9057")
        resource.tiering.object_tags = ["key1=val1", "key2=val2"]
        resource.patch()

### Remove tiering object tags for a FlexVol using PATCH

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="d0c3359c-5448-4a9b-a077-e3295a7e9057")
        resource.tiering.object_tags = []
        resource.patch()

## Deleting a volume

## Example

### Deleting a volume

The DELETE request is used to delete a volume.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="{uuid}")
        resource.delete()

### Deleting a volume and bypassing the recovery queue

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Volume

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Volume(uuid="{uuid}")
        resource.delete(force=True)

## Classes

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

  Allows interaction with Volume objects on the host

  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 Volume 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('Volume')] = 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 volume. If the UUID belongs to a volume, all of its blocks are freed and returned to its containing aggregate. If a volume is online, it is offlined before deletion. If a volume is mounted, unmount the volume by specifying the nas.path as empty before deleting it using the DELETE operation.

    ### Optional parameters:

    - `force` - Bypasses the recovery-queue and completely removes the volume from the aggregate making it non-recoverable. By default, this flag is set to "false".

    ### Related ONTAP commands

    - `volume delete`
    - `volume clone delete`

    ### Learn more

    - `DOC /storage/volumes`

    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 Volume 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 volumes.

    ### 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. * `is_svm_root` * `aggressive_readahead_mode` * `analytics.*` * `anti_ransomware.*` * `application.*` * `encryption.*` * `queue_for_encryption` * `convert_unicode` * `clone.parent_snapshot.name` * `clone.parent_snapshot.uuid` * `clone.parent_svm.name` * `clone.parent_svm.uuid` * `clone.parent_volume.name` * `clone.parent_volume.uuid` * `clone.split_complete_percent` * `clone.split_estimate` * `clone.split_initiated` * `efficiency.*` * `error_state.*` * `files.*` * `max_dir_size` * `nas.export_policy.id` * `nas.gid` * `nas.path` * `nas.security_style` * `nas.uid` * `nas.unix_permissions` * `nas.junction_parent.name` * `nas.junction_parent.uuid` * `snaplock.*` * `restore_to.*` * `snapshot_policy.uuid` * `quota.*` * `qos.*` * `flexcache_endpoint_type` * `space.block_storage_inactive_user_data` * `space.capacity_tier_footprint` * `space.performance_tier_footprint` * `space.local_tier_footprint` * `space.footprint` * `space.over_provisioned` * `space.metadata` * `space.total_footprint` * `space.dedupe_metafiles_footprint` * `space.dedupe_metafiles_temporary_footprint` * `space.delayed_free_footprint` * `space.file_operation_metadata` * `space.snapmirror_destination_footprint` * `space.volume_guarantee_footprint` * `space.cross_volume_dedupe_metafiles_footprint` * `space.cross_volume_dedupe_metafiles_temporary_footprint` * `space.snapshot_reserve_unusable` * `space.snapshot_spill` * `space.user_data` * `space.logical_space.*` * `space.snapshot.*` * `space.used_by_afs` * `space.afs_total` * `space.available_percent` * `space.full_threshold_percent` * `space.nearly_full_threshold_percent` * `space.overwrite_reserve` * `space.overwrite_reserve_used` * `space.size_available_for_snapshots` * `space.percent_used` * `space.fractional_reserve` * `space.block_storage_inactive_user_data_percent` * `space.physical_used` * `space.physical_used_percent` * `space.expected_available` * `space.filesystem_size` * `space.filesystem_size_fixed` * `guarantee.*` * `autosize.*` * `movement.*` * `statistics.*` * `constituents.name` * `constituents.space.size` * `constituents.space.available` * `constituents.space.used` * `constituents.space.available_percent` * `constituents.space.used_percent` * `constituents.space.block_storage_inactive_user_data` * `constituents.space.capacity_tier_footprint` * `constituents.space.performance_tier_footprint` * `constituents.space.local_tier_footprint` * `constituents.space.footprint` * `constituents.space.over_provisioned` * `constituents.space.metadata` * `constituents.space.total_footprint` * `constituents.space.logical_space.reporting` * `constituents.space.logical_space.enforcement` * `constituents.space.logical_space.used_by_afs` * `constituents.space.logical_space.available` * `constituents.space.snapshot.used` * `constituents.space.snapshot.reserve_percent` * `constituents.space.snapshot.autodelete_enabled` * `constituents.space.large_size_enabled` * `constituents.space.max_size` * `constituents.aggregates.name` * `constituents.aggregates.uuid` * `constituents.movement.destination_aggregate.name` * `constituents.movement.destination_aggregate.uuid` * `constituents.movement.state` * `constituents.movement.percent_complete` * `constituents.movement.cutover_window` * `constituents.movement.tiering_policy` * `asynchronous_directory_delete.*` * `rebalancing.*` * `metric.*` * `cloud_write_enabled`

    ### Related ONTAP commands

    - `volume show`
    - `volume clone show`
    - `volume efficiency show`
    - `volume encryption show`
    - `volume flexcache show`
    - `volume flexgroup show`
    - `volume move show`
    - `volume quota show`
    - `volume show-space`
    - `volume snaplock show`
    - `volume rebalance show`
    - `security anti-ransomware volume show`
    - `security anti-ransomware volume space show`
    - `volume file async-delete client show`

    ### Learn more

    - `DOC /storage/volumes`

    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 volumes.

    ### 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. * `is_svm_root` * `aggressive_readahead_mode` * `analytics.*` * `anti_ransomware.*` * `application.*` * `encryption.*` * `queue_for_encryption` * `convert_unicode` * `clone.parent_snapshot.name` * `clone.parent_snapshot.uuid` * `clone.parent_svm.name` * `clone.parent_svm.uuid` * `clone.parent_volume.name` * `clone.parent_volume.uuid` * `clone.split_complete_percent` * `clone.split_estimate` * `clone.split_initiated` * `efficiency.*` * `error_state.*` * `files.*` * `max_dir_size` * `nas.export_policy.id` * `nas.gid` * `nas.path` * `nas.security_style` * `nas.uid` * `nas.unix_permissions` * `nas.junction_parent.name` * `nas.junction_parent.uuid` * `snaplock.*` * `restore_to.*` * `snapshot_policy.uuid` * `quota.*` * `qos.*` * `flexcache_endpoint_type` * `space.block_storage_inactive_user_data` * `space.capacity_tier_footprint` * `space.performance_tier_footprint` * `space.local_tier_footprint` * `space.footprint` * `space.over_provisioned` * `space.metadata` * `space.total_footprint` * `space.dedupe_metafiles_footprint` * `space.dedupe_metafiles_temporary_footprint` * `space.delayed_free_footprint` * `space.file_operation_metadata` * `space.snapmirror_destination_footprint` * `space.volume_guarantee_footprint` * `space.cross_volume_dedupe_metafiles_footprint` * `space.cross_volume_dedupe_metafiles_temporary_footprint` * `space.snapshot_reserve_unusable` * `space.snapshot_spill` * `space.user_data` * `space.logical_space.*` * `space.snapshot.*` * `space.used_by_afs` * `space.afs_total` * `space.available_percent` * `space.full_threshold_percent` * `space.nearly_full_threshold_percent` * `space.overwrite_reserve` * `space.overwrite_reserve_used` * `space.size_available_for_snapshots` * `space.percent_used` * `space.fractional_reserve` * `space.block_storage_inactive_user_data_percent` * `space.physical_used` * `space.physical_used_percent` * `space.expected_available` * `space.filesystem_size` * `space.filesystem_size_fixed` * `guarantee.*` * `autosize.*` * `movement.*` * `statistics.*` * `constituents.name` * `constituents.space.size` * `constituents.space.available` * `constituents.space.used` * `constituents.space.available_percent` * `constituents.space.used_percent` * `constituents.space.block_storage_inactive_user_data` * `constituents.space.capacity_tier_footprint` * `constituents.space.performance_tier_footprint` * `constituents.space.local_tier_footprint` * `constituents.space.footprint` * `constituents.space.over_provisioned` * `constituents.space.metadata` * `constituents.space.total_footprint` * `constituents.space.logical_space.reporting` * `constituents.space.logical_space.enforcement` * `constituents.space.logical_space.used_by_afs` * `constituents.space.logical_space.available` * `constituents.space.snapshot.used` * `constituents.space.snapshot.reserve_percent` * `constituents.space.snapshot.autodelete_enabled` * `constituents.space.large_size_enabled` * `constituents.space.max_size` * `constituents.aggregates.name` * `constituents.aggregates.uuid` * `constituents.movement.destination_aggregate.name` * `constituents.movement.destination_aggregate.uuid` * `constituents.movement.state` * `constituents.movement.percent_complete` * `constituents.movement.cutover_window` * `constituents.movement.tiering_policy` * `asynchronous_directory_delete.*` * `rebalancing.*` * `metric.*` * `cloud_write_enabled`

    ### Related ONTAP commands

    - `volume show`
    - `volume clone show`
    - `volume efficiency show`
    - `volume encryption show`
    - `volume flexcache show`
    - `volume flexgroup show`
    - `volume move show`
    - `volume quota show`
    - `volume show-space`
    - `volume snaplock show`
    - `volume rebalance show`
    - `security anti-ransomware volume show`
    - `security anti-ransomware volume space show`
    - `volume file async-delete client show`

    ### Learn more

    - `DOC /storage/volumes`

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

    Updates the attributes of a volume. For movement, use the "validate_only" field on the request to validate but not perform the operation. The PATCH API can be used to enable or disable quotas for a FlexVol or a FlexGroup volume. The PATCH API can also be used to start or stop non-disruptive volume capacity rebalancing for FlexGroup volumes in addition to modifying capacity rebalancing properties. An empty path in PATCH deactivates and unmounts the volume. Taking a volume offline removes its junction path.
    A PATCH request for volume encryption performs conversion/rekey operations asynchronously. You can retrieve the conversion/rekey progress details by calling a GET request on the corresponding volume endpoint.

    ### Optional properties

    - `queue_for_encryption` - Queue volumes for encryption when `encryption.enabled=true`. If this option is not provided or is false, conversion of volumes starts immediately. When there are volumes in the queue and less than four encryptions are running, volumes are encrypted in the order in which they are queued.
    - `encryption.action` - You can pause an ongoing rekey/conversion operation or resume a paused rekey/conversion operation using this field. The following actions are supported for this field: ‐ conversion_pause - Pause an encryption conversion operation currently in progress ‐ conversion_resume - Resume a paused encryption conversion operation ‐ rekey_pause - Pause an encryption rekey operation currently in progress ‐ rekey_resume - Resume a paused encryption rekey operation

    ### Related ONTAP commands

    - `volume unmount`
    - `volume mount`
    - `volume online`
    - `volume offline`
    - `volume modify`
    - `volume clone modify`
    - `volume efficiency modify`
    - `volume quota on`
    - `volume quota off`
    - `volume snaplock modify`
    - `volume encryption conversion start`
    - `volume encryption conversion pause`
    - `volume encryption conversion resume`
    - `volume encryption rekey start`
    - `volume encryption rekey pause`
    - `volume encryption rekey resume`
    - `volume rebalance start`
    - `volume rebalance stop`
    - `volume rebalance modify`
    - `security anti-ransomware volume enable`
    - `security anti-ransomware volume disable`
    - `security anti-ransomware volume dry-run`
    - `security anti-ransomware volume pause`
    - `security anti-ransomware volume resume`
    - `volume file async-delete client disable`
    - `volume file async-delete client enable`

    ### Learn more

    - `DOC /storage/volumes`

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

    Creates a volume on a specified SVM and storage aggregates.

    ### Required properties

    - `svm.uuid` or `svm.name` - Existing SVM in which to create the volume.
    - `name` - Name of the volume.
    - `aggregates.name` or `aggregates.uuid` - Existing aggregates in which to create the volume.

    ### Default property values

    - `state` - online
    - `size` - 20MB
    - `style` - flexvol
    - `type` - rw
    - `encryption.enabled` - false
    - `snapshot_policy.name` - default
    - `gaurantee.type` - volume
    - `anti_ransomware.state` - default

    ### Related ONTAP commands

    - `volume create`
    - `volume clone create`

    ### Learn more

    - `DOC /storage/volumes`

    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 volume. If the UUID belongs to a volume, all of its blocks are freed and returned to its containing aggregate. If a volume is online, it is offlined before deletion. If a volume is mounted, unmount the volume by specifying the nas.path as empty before deleting it using the DELETE operation.

    ### Optional parameters:

    - `force` - Bypasses the recovery-queue and completely removes the volume from the aggregate making it non-recoverable. By default, this flag is set to "false".

    ### Related ONTAP commands

    - `volume delete`
    - `volume clone delete`

    ### Learn more

    - `DOC /storage/volumes`

    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 a volume. The GET API can be used to retrieve the quota state for a FlexVol or a FlexGroup volume.

    ### 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. * `is_svm_root` * `analytics.*` * `anti_ransomware.*` * `application.*` * `encryption.*` * `convert_unicode` * `clone.parent_snapshot.name` * `clone.parent_snapshot.uuid` * `clone.parent_svm.name` * `clone.parent_svm.uuid` * `clone.parent_volume.name` * `clone.parent_volume.uuid` * `clone.split_complete_percent` * `clone.split_estimate` * `clone.split_initiated` * `efficiency.*` * `error_state.*` * `files.*` * `max_dir_size` * `nas.export_policy.id` * `nas.gid` * `nas.path` * `nas.security_style` * `nas.uid` * `nas.unix_permissions` * `nas.junction_parent.name` * `nas.junction_parent.uuid` * `snaplock.*` * `restore_to.*` * `snapshot_policy.uuid` * `quota.*` * `qos.*` * `flexcache_endpoint_type` * `space.block_storage_inactive_user_data` * `space.capacity_tier_footprint` * `space.performance_tier_footprint` * `space.local_tier_footprint` * `space.footprint` * `space.over_provisioned` * `space.metadata` * `space.total_footprint` * `space.dedupe_metafiles_footprint` * `space.dedupe_metafiles_temporary_footprint` * `space.delayed_free_footprint` * `space.file_operation_metadata` * `space.snapmirror_destination_footprint` * `space.volume_guarantee_footprint` * `space.cross_volume_dedupe_metafiles_footprint` * `space.cross_volume_dedupe_metafiles_temporary_footprint` * `space.auto_adaptive_compression_footprint_data_reduction` * `space.capacity_tier_footprint_data_reduction` * `space.compaction_footprint_data_reduction` * `space.effective_total_footprint` * `space.snapshot_reserve_unusable` * `space.snapshot_spill` * `space.user_data` * `space.logical_space.*` * `space.snapshot.*` * `space.used_by_afs` * `space.afs_total` * `space.available_percent` * `space.full_threshold_percent` * `space.nearly_full_threshold_percent` * `space.overwrite_reserve` * `space.overwrite_reserve_used` * `space.size_available_for_snapshots` * `space.percent_used` * `space.fractional_reserve` * `space.block_storage_inactive_user_data_percent` * `space.physical_used` * `space.physical_used_percent` * `space.expected_available` * `space.filesystem_size` * `space.filesystem_size_fixed` * `guarantee.*` * `autosize.*` * `movement.*` * `statistics.*` * `asynchronous_directory_delete.*` * `rebalancing.*` * `metric.*` * `cloud_write_enabled`

    ### Related ONTAP commands

    - `volume show`
    - `volume clone show`
    - `volume efficiency show`
    - `volume encryption show`
    - `volume flexcache show`
    - `volume flexgroup show`
    - `volume move show`
    - `volume quota show`
    - `volume show-space`
    - `volume snaplock show`
    - `volume rebalance show`
    - `security anti-ransomware volume show`
    - `security anti-ransomware volume attack generate-report`
    - `security anti-ransomware volume space show`
    - `volume file async-delete client show`

    ### Learn more

    - `DOC /storage/volumes`

    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

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

    Updates the attributes of a volume. For movement, use the "validate_only" field on the request to validate but not perform the operation. The PATCH API can be used to enable or disable quotas for a FlexVol or a FlexGroup volume. The PATCH API can also be used to start or stop non-disruptive volume capacity rebalancing for FlexGroup volumes in addition to modifying capacity rebalancing properties. An empty path in PATCH deactivates and unmounts the volume. Taking a volume offline removes its junction path.
    A PATCH request for volume encryption performs conversion/rekey operations asynchronously. You can retrieve the conversion/rekey progress details by calling a GET request on the corresponding volume endpoint.

    ### Optional properties

    - `queue_for_encryption` - Queue volumes for encryption when `encryption.enabled=true`. If this option is not provided or is false, conversion of volumes starts immediately. When there are volumes in the queue and less than four encryptions are running, volumes are encrypted in the order in which they are queued.
    - `encryption.action` - You can pause an ongoing rekey/conversion operation or resume a paused rekey/conversion operation using this field. The following actions are supported for this field: ‐ conversion_pause - Pause an encryption conversion operation currently in progress ‐ conversion_resume - Resume a paused encryption conversion operation ‐ rekey_pause - Pause an encryption rekey operation currently in progress ‐ rekey_resume - Resume a paused encryption rekey operation

    ### Related ONTAP commands

    - `volume unmount`
    - `volume mount`
    - `volume online`
    - `volume offline`
    - `volume modify`
    - `volume clone modify`
    - `volume efficiency modify`
    - `volume quota on`
    - `volume quota off`
    - `volume snaplock modify`
    - `volume encryption conversion start`
    - `volume encryption conversion pause`
    - `volume encryption conversion resume`
    - `volume encryption rekey start`
    - `volume encryption rekey pause`
    - `volume encryption rekey resume`
    - `volume rebalance start`
    - `volume rebalance stop`
    - `volume rebalance modify`
    - `security anti-ransomware volume enable`
    - `security anti-ransomware volume disable`
    - `security anti-ransomware volume dry-run`
    - `security anti-ransomware volume pause`
    - `security anti-ransomware volume resume`
    - `volume file async-delete client disable`
    - `volume file async-delete client enable`

    ### Learn more

    - `DOC /storage/volumes`

    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 volume on a specified SVM and storage aggregates.

    ### Required properties

    - `svm.uuid` or `svm.name` - Existing SVM in which to create the volume.
    - `name` - Name of the volume.
    - `aggregates.name` or `aggregates.uuid` - Existing aggregates in which to create the volume.

    ### Default property values

    - `state` - online
    - `size` - 20MB
    - `style` - flexvol
    - `type` - rw
    - `encryption.enabled` - false
    - `snapshot_policy.name` - default
    - `gaurantee.type` - volume
    - `anti_ransomware.state` - default

    ### Related ONTAP commands

    - `volume create`
    - `volume clone create`

    ### Learn more

    - `DOC /storage/volumes`

    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`
`class VolumeSchema (*, 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 Volume object

  ### Ancestors

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

  ### Class variables

  `access_time_enabled: bool GET PATCH`

    Indicates whether or not access time updates are enabled on the volume.

  `activity_tracking: VolumeActivityTracking GET POST PATCH`

    The activity_tracking field of the volume.

  `aggregates: List[SvmMigrationVolumePlacementAggregates] GET POST PATCH`

    Aggregate hosting the volume. Required on POST.

  `aggressive_readahead_mode: str GET POST PATCH`

    Specifies the aggressive readahead mode enabled on the volume. When set to "file_prefetch", on a file read, the system aggressively issues readaheads for all of the blocks in the file and retains those blocks in a cache for a finite period of time.

    Valid choices:

    - none
    - file_prefetch
  `analytics: VolumeAnalytics GET POST PATCH`

    The analytics field of the volume.

  `anti_ransomware: AntiRansomwareVolume GET POST PATCH`

    The anti_ransomware field of the volume.

  `anti_ransomware_state: str GET POST PATCH`

    The Anti-ransomware state of the volume. If no "anti_ransomware_state" property is specified, the volume inherits the value from its parent SVM's "anti_ransomware_default_volume_state" property. If this value is "disabled", Anti-ransomware is disabled on the volume. If this value is "enabled", Anti-ransomware is enabled on the volume and alerts are raised if any suspect is detected for those volumes. If this value is "dry_run", Anti-ransomware is enabled in the dry-run or learning mode on the volume. The "dry_run" state is same as the "enabled" state except that the analytics data is used here for learning. No alerts are raised for any detections or violations. If this value is "paused", Anti-ransomware is paused on the volume. Additionally, three more states are available, which are only valid for GET. If this value is "disable_in_progress", Anti-ransomware monitoring is being disabled and a cleanup operation is in effect. If this value is "enable_paused", Anti-ransomware is paused on the volume from its earlier enabled state. If this value is "dry_run_paused", Anti-ransomware monitoring is paused on the volume from its earlier dry_run state.

    Valid choices:

    - disabled
    - enabled
    - dry_run
    - paused
    - disable_in_progress
    - enable_paused
    - dry_run_paused
  `application: VolumeApplication GET POST PATCH`

    The application field of the volume.

  `asynchronous_directory_delete: VolumeAsynchronousDirectoryDelete GET POST PATCH`

    The asynchronous_directory_delete field of the volume.

  `autosize: VolumeAutosize GET POST PATCH`

    The autosize field of the volume.

  `clone: VolumeClone GET POST PATCH`

    The clone field of the volume.

  `cloud_retrieval_policy: str GET POST PATCH`

    This parameter specifies the cloud retrieval policy for the volume. This policy determines which tiered out blocks to retrieve from the capacity tier to the performance tier. The available cloud retrieval policies are "default" policy retrieves tiered data based on the underlying tiering policy. If the tiering policy is 'auto', tiered data is retrieved only for random client driven data reads. If the tiering policy is 'none' or 'snapshot_only', tiered data is retrieved for random and sequential client driven data reads. If the tiering policy is 'all', tiered data is not retrieved. "on_read" policy retrieves tiered data for all client driven data reads. "never" policy never retrieves tiered data. "promote" policy retrieves all eligible tiered data automatically during the next scheduled scan. It is only supported when the tiering policy is 'none' or 'snapshot_only'. If the tiering policy is 'snapshot_only', the only data brought back is the data in the AFS. Data that is only in a snapshot copy stays in the cloud and if tiering policy is 'none' then all data is retrieved.

    Valid choices:

    - default
    - on_read
    - never
    - promote
  `cloud_write_enabled: bool GET POST PATCH`

    Indicates whether or not cloud writes are enabled on the volume. NFS writes to this volume are sent to the cloud directly instead of the local performance tier. This feature is only available on volumes in FabricPools.

  `comment: str GET POST PATCH`

    A comment for the volume. Valid in POST or PATCH.

  `consistency_group: VolumeConsistencyGroup GET POST PATCH`

    The consistency_group field of the volume.

  `constituents: List[VolumeConstituents] GET POST PATCH`

    FlexGroup Constituents. FlexGroup Constituents can be retrieved more efficiently by specifying "is_constituent=true" or "is_constituent=true&flexgroup.uuid=" as query parameters.

  `constituents_per_aggregate: Size POST PATCH`

    Specifies the number of times to iterate over the aggregates listed with the "aggregates.name" or "aggregates.uuid" when creating or expanding a FlexGroup volume. If a volume is being created on a single aggregate, the system creates a flexible volume if the "constituents_per_aggregate" field is not specified, or a FlexGroup volume if it is specified. If a volume is being created on multiple aggregates, the system always creates a FlexGroup volume. If a volume is being created on multiple aggregates and the "constituents_per_aggregate" field is not specified, the default value of the "constituents_per_aggregate" field is 4. The root constituent of a FlexGroup volume is always placed on the first aggregate in the list, unless 'optimize_aggregates' is specified as 'true'. If the "aggregates.name" or "aggregates.uuid" is specified in a PATCH request to expand an existing FlexGroup volume, the default value of the "constituents_per_aggregate" field is 1. The volume expand operation is only supported on FlexGroup volumes.

  `convert_unicode: bool GET POST PATCH`

    Specifies whether directory Unicode format conversion is enabled when directories are accessed by NFS clients.

  `create_time: ImpreciseDateTime GET`

    Creation time of the volume. This field is generated when the volume is created.

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

  `efficiency: VolumeEfficiency GET POST PATCH`

    The efficiency field of the volume.

  `encryption: VolumeEncryption GET POST PATCH`

    The encryption field of the volume.

  `error_state: VolumeErrorState GET POST PATCH`

    The error_state field of the volume.

  `files: VolumeFiles GET POST PATCH`

    The files field of the volume.

  `flash_pool: VolumeFlashPool GET POST PATCH`

    The flash_pool field of the volume.

  `flexcache_endpoint_type: str GET`

    FlexCache endpoint type.
    none ‐ The volume is neither a FlexCache nor origin of any FlexCache.
    cache ‐ The volume is a FlexCache volume.
    origin ‐ The volume is origin of a FlexCache volume.

    Valid choices:

    - none
    - cache
    - origin
  `flexgroup: VolumeFlexgroup GET POST PATCH`

    The flexgroup field of the volume.

  `granular_data: bool GET POST PATCH`

    State of granular data on the volume. This setting is `true` by default when creating an AWS S3 FlexGroup volume via a POST request and `false` by default for creating any other type of FlexGroup volume via a POST request. On FlexVols, the setting is always `false`, as only FlexGroup volumes support this feature. Once enabled, this setting can only be disabled by restoring a Snapshot copy. Earlier versions of ONTAP (pre 9.11) are not compatible with this feature. Therefore, reverting to an earlier version of ONTAP is not possible unless this volume is deleted or restored to a Snapshot copy that was taken before the setting was enabled.

  `guarantee: VolumeGuarantee GET POST PATCH`

    The guarantee field of the volume.

  `is_object_store: bool GET`

    Specifies whether the volume is provisioned for an object store server.

  `is_svm_root: bool GET`

    Specifies whether the volume is a root volume of the SVM it belongs to.

  `language: str GET POST`

    Language encoding setting for volume. If no language is specified, the volume inherits its SVM language encoding setting.

    Valid choices:

    - ar
    - ar.utf_8
    - c
    - c.utf_8
    - cs
    - cs.utf_8
    - da
    - da.utf_8
    - de
    - de.utf_8
    - en
    - en.utf_8
    - en_us
    - en_us.utf_8
    - es
    - es.utf_8
    - fi
    - fi.utf_8
    - fr
    - fr.utf_8
    - he
    - he.utf_8
    - hr
    - hr.utf_8
    - hu
    - hu.utf_8
    - it
    - it.utf_8
    - ja
    - ja.utf_8
    - ja_jp.932
    - ja_jp.932.utf_8
    - ja_jp.pck
    - ja_jp.pck.utf_8
    - ja_jp.pck_v2
    - ja_jp.pck_v2.utf_8
    - ja_v1
    - ja_v1.utf_8
    - ko
    - ko.utf_8
    - nl
    - nl.utf_8
    - no
    - no.utf_8
    - pl
    - pl.utf_8
    - pt
    - pt.utf_8
    - ro
    - ro.utf_8
    - ru
    - ru.utf_8
    - sk
    - sk.utf_8
    - sl
    - sl.utf_8
    - sv
    - sv.utf_8
    - tr
    - tr.utf_8
    - utf8mb4
    - zh
    - zh.gbk
    - zh.gbk.utf_8
    - zh.utf_8
    - zh_tw
    - zh_tw.big5
    - zh_tw.big5.utf_8
    - zh_tw.utf_8
  `links: SelfLink GET`

    The links field of the volume.

  `max_dir_size: Size GET POST PATCH`

    Maximum directory size. This value sets maximum size, in bytes, to which a directory can grow. The default maximum directory size for FlexVol volumes is model-dependent, and optimized for the size of system memory. Before increasing the maximum directory size, involve technical support.

  `metric: VolumeMetrics GET`

    The metric field of the volume.

  `movement: VolumeMovement GET POST PATCH`

    The movement field of the volume.

  `msid: Size GET POST PATCH`

    The volume's Master Set ID.

  `name: str GET POST PATCH`

    Volume name. The name of volume must start with an alphabetic character (a to z or A to Z) or an underscore (_). The name must be 197 or fewer characters in length for FlexGroups, and 203 or fewer characters in length for all other types of volumes. Volume names must be unique within an SVM. Required on POST.

    Example: vol_cs_dept

  `nas: VolumeNas GET POST PATCH`

    The nas field of the volume.

  `optimize_aggregates: bool POST`

    Specifies whether to create the constituents of the FlexGroup volume on the aggegates specified in the order they are specified, or whether the system should optimize the ordering of the aggregates. If this value is 'true', the system optimizes the ordering of the aggregates specified. If this value is false, the order of the aggregates is unchanged. The default value is 'false'.

  `qos: VolumeQos GET POST PATCH`

    The qos field of the volume.

  `queue_for_encryption: bool GET PATCH`

    Specifies whether the volume is queued for encryption.

  `quota: VolumeQuota GET POST PATCH`

    The quota field of the volume.

  `rebalancing: VolumeRebalancing GET POST PATCH`

    The rebalancing field of the volume.

  `scheduled_snapshot_naming_scheme: str GET POST PATCH`

    Naming Scheme for automatic Snapshot copies:

    - create_time - Automatic Snapshot copies are saved as per the start of their current date and time.
    - ordinal - Latest automatic snapshot copy is saved as .0 and subsequent copies will follow the create_time naming convention.

    Valid choices:

    - create_time
    - ordinal
  `size: Size GET POST PATCH`

    Physical size of the volume, in bytes. The minimum size for a FlexVol volume is 20MB and the minimum size for a FlexGroup volume is 200MB per constituent. The recommended size for a FlexGroup volume is a minimum of 100GB per constituent. For all volumes, the default size is equal to the minimum size.

  `snaplock: VolumeSnaplock GET POST PATCH`

    The snaplock field of the volume.

  `snapmirror: VolumeSnapmirror GET POST PATCH`

    The snapmirror field of the volume.

  `snapshot_count: Size GET`

    Number of Snapshot copies in the volume.

  `snapshot_directory_access_enabled: bool GET POST PATCH`

    This field, if true, enables the visible ".snapshot" directory from the client. The ".snapshot" directory will be available in every directory on the volume.

  `snapshot_locking_enabled: bool GET POST PATCH`

    Specifies whether or not snapshot copy locking is enabled on the volume.

  `snapshot_policy: SnapshotPolicy GET POST PATCH`

    The snapshot_policy field of the volume.

  `space: VolumeSpace GET POST PATCH`

    The space field of the volume.

  `state: str GET POST PATCH`

    Volume state. Client access is supported only when volume is online and junctioned. Taking volume to offline or restricted state removes its junction path and blocks client access. When volume is in restricted state some operations like parity reconstruction and iron on commit are allowed. The 'mixed' state applies to FlexGroup volumes only and cannot be specified as a target state. An 'error' state implies that the volume is not in a state to serve data.

    Valid choices:

    - error
    - mixed
    - offline
    - online
    - restricted
  `statistics: VolumeStatistics GET`

    The statistics field of the volume.

  `status: List[str] GET`

    Describes the current status of a volume.

  `style: str GET POST PATCH`

    The style of the volume. If "style" is not specified, the volume type is determined based on the specified aggregates or license. Specifying a single aggregate, without "constituents_per_aggregate", creates a flexible volume. Specifying multiple aggregates, or a single aggregate with "constituents_per_aggregate", creates a FlexGroup volume. When the UDO License is installed, and no aggregates are specified, the system automatically provisions a FlexGroup volume on system selected aggregates. Specifying a volume "style" creates a volume of that type. For example, if the style is "flexvol", you must specify a single aggregate. If the style is "flexgroup", the system either uses the specified aggregates or automatically provisions aggregates if there are no specified aggregates. The style "flexgroup_constituent" is not supported when creating a volume.
    flexvol ‐ flexible volumes and FlexClone volumes
    flexgroup ‐ FlexGroup volumes
    flexgroup_constituent ‐ FlexGroup constituents.

    Valid choices:

    - flexvol
    - flexgroup
    - flexgroup_constituent
  `svm: Svm GET POST`

    The svm field of the volume.

  `tags: List[str] GET POST PATCH`

    Tags are an optional way to track the uses of a resource. Tag values must be formatted as key:value strings.

    Example: ["team:csi","environment:test"]

  `tiering: VolumeTiering GET POST PATCH`

    The tiering field of the volume.

  `type: str GET POST`

    Type of the volume.
    rw ‐ read-write volume.
    dp ‐ data-protection volume.
    ls ‐ load-sharing `dp` volume. Valid in GET.

    Valid choices:

    - rw
    - dp
    - ls
  `use_mirrored_aggregates: bool POST`

    Specifies whether mirrored aggregates are selected when provisioning a FlexGroup without specifying "aggregates.name" or "aggregates.uuid". Only mirrored aggregates are used if this parameter is set to 'true' and only unmirrored aggregates are used if this parameter is set to 'false'. Aggregate level mirroring for a FlexGroup can be changed by moving all of the constituents to the required aggregates. The default value is 'true' for a MetroCluster configuration and is 'false' for a non-MetroCluster configuration.

  `uuid: str GET`

    Unique identifier for the volume. This corresponds to the instance-uuid that is exposed in the CLI and ONTAPI. It does not change due to a volume move.

    Example: 028baa66-41bd-11e9-81d5-00a0986138f7

  `validate_only: bool GET POST PATCH`

    Validate the volume move or volume conversion operations and their parameters, without actually performing the operation.