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

# Module `netapp_ontap.resources.ip_interface`

Copyright © 2026 NetApp Inc. All rights reserved.

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

## Overview

The following operations are supported:

- Creation: POST network/ip/interfaces
- Collection Get: GET network/ip/interfaces
- Instance Get: GET network/ip/interfaces/{uuid}
- Instance Patch: PATCH network/ip/interfaces/{uuid}
- Instance Delete: DELETE network/ip/interfaces/{uuid}

## Retrieving network interface information

The IP interfaces GET API retrieves and displays relevant information pertaining to the interfaces configured in the cluster. The response can contain a list of multiple interfaces or a specific interface. The fields returned in the response vary for different interfaces and configurations.

## Examples

### Retrieving all interfaces in the cluster

The following example shows the list of all interfaces configured in a cluster.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpInterface

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

Try it out

    [
        IpInterface(
            {
                "name": "user-cluster-01_mgmt1",
                "_links": {
                    "self": {
                        "href": "/api/network/ip/interfaces/14531286-59fc-11e8-ba55-005056b4340f"
                    }
                },
                "uuid": "14531286-59fc-11e8-ba55-005056b4340f",
            }
        ),
        IpInterface(
            {
                "name": "user-cluster-01_clus2",
                "_links": {
                    "self": {
                        "href": "/api/network/ip/interfaces/145318ba-59fc-11e8-ba55-005056b4340f"
                    }
                },
                "uuid": "145318ba-59fc-11e8-ba55-005056b4340f",
            }
        ),
        IpInterface(
            {
                "name": "user-cluster-01_clus1",
                "_links": {
                    "self": {
                        "href": "/api/network/ip/interfaces/14531e45-59fc-11e8-ba55-005056b4340f"
                    }
                },
                "uuid": "14531e45-59fc-11e8-ba55-005056b4340f",
            }
        ),
        IpInterface(
            {
                "name": "cluster_mgmt",
                "_links": {
                    "self": {
                        "href": "/api/network/ip/interfaces/245979de-59fc-11e8-ba55-005056b4340f"
                    }
                },
                "uuid": "245979de-59fc-11e8-ba55-005056b4340f",
            }
        ),
        IpInterface(
            {
                "name": "lif1",
                "_links": {
                    "self": {
                        "href": "/api/network/ip/interfaces/c670707c-5a11-11e8-8fcb-005056b4340f"
                    }
                },
                "uuid": "c670707c-5a11-11e8-8fcb-005056b4340f",
            }
        ),
    ]

### Retrieving a specific Cluster-scoped interface

The following example shows the response when a specific Cluster-scoped interface is requested. The system returns an error when there is no interface with the requested UUID. SVM information is not returned for Cluster-scoped interfaces.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpInterface(uuid="245979de-59fc-11e8-ba55-005056b4340f")
        resource.get()
        print(resource)

Try it out

    IpInterface(
        {
            "ip": {"netmask": "18", "family": "ipv4", "address": "10.63.41.6"},
            "name": "cluster_mgmt",
            "ipspace": {
                "_links": {
                    "self": {
                        "href": "/api/network/ipspaces/114ecfb5-59fc-11e8-ba55-005056b4340f"
                    }
                },
                "name": "Default",
                "uuid": "114ecfb5-59fc-11e8-ba55-005056b4340f",
            },
            "location": {
                "auto_revert": False,
                "failover": "broadcast_domain_only",
                "port": {
                    "name": "e0d",
                    "node": {"name": "user-cluster-01-a"},
                    "_links": {
                        "self": {
                            "href": "/api/network/ethernet/ports/c84d5337-1397-11e9-87c2-005056acfcbb"
                        }
                    },
                    "uuid": "c84d5337-1397-11e9-87c2-005056acfcbb",
                },
                "is_home": True,
                "node": {
                    "name": "user-cluster-01-a",
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/c1db2904-1396-11e9-bb7d-005056acfcbb"
                        }
                    },
                    "uuid": "c1db2904-1396-11e9-bb7d-005056acfcbb",
                },
                "home_port": {
                    "name": "e0d",
                    "node": {"name": "user-cluster-01-a"},
                    "_links": {
                        "self": {
                            "href": "/api/network/ethernet/ports/c84d5337-1397-11e9-87c2-005056acfcbb"
                        }
                    },
                    "uuid": "c84d5337-1397-11e9-87c2-005056acfcbb",
                },
                "home_node": {
                    "name": "user-cluster-01-a",
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/c1db2904-1396-11e9-bb7d-005056acfcbb"
                        }
                    },
                    "uuid": "c1db2904-1396-11e9-bb7d-005056acfcbb",
                },
            },
            "vip": False,
            "enabled": True,
            "_links": {
                "self": {
                    "href": "/api/network/ip/interfaces/245979de-59fc-11e8-ba55-005056b4340f"
                }
            },
            "services": ["management_core", "management_autosupport", "management_access"],
            "service_policy": {
                "name": "default-management",
                "uuid": "9e0f4151-141b-11e9-851e-005056ac1ce0",
            },
            "state": "up",
            "uuid": "245979de-59fc-11e8-ba55-005056b4340f",
            "scope": "cluster",
        }
    )

### Retrieving a specific SVM-scoped interface using a filter

The following example shows the response when a specific SVM-scoped interface is requested. The SVM object is only included for SVM-scoped interfaces.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpInterface

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

Try it out

    [
        IpInterface(
            {
                "ip": {"netmask": "24", "family": "ipv4", "address": "10.10.10.11"},
                "name": "lif1",
                "ipspace": {
                    "_links": {
                        "self": {
                            "href": "/api/network/ipspaces/114ecfb5-59fc-11e8-ba55-005056b4340f"
                        }
                    },
                    "name": "Default",
                    "uuid": "114ecfb5-59fc-11e8-ba55-005056b4340f",
                },
                "location": {
                    "auto_revert": False,
                    "failover": "broadcast_domain_only",
                    "port": {
                        "name": "e0d",
                        "node": {"name": "user-cluster-01-a"},
                        "_links": {
                            "self": {
                                "href": "/api/network/ethernet/ports/c84d5337-1397-11e9-87c2-005056acfcbb"
                            }
                        },
                        "uuid": "c84d5337-1397-11e9-87c2-005056acfcbb",
                    },
                    "is_home": True,
                    "node": {
                        "name": "user-cluster-01-a",
                        "_links": {
                            "self": {
                                "href": "/api/cluster/nodes/c1db2904-1396-11e9-bb7d-005056acfcbb"
                            }
                        },
                        "uuid": "c1db2904-1396-11e9-bb7d-005056acfcbb",
                    },
                    "home_port": {
                        "name": "e0d",
                        "node": {"name": "user-cluster-01-a"},
                        "_links": {
                            "self": {
                                "href": "/api/network/ethernet/ports/c84d5337-1397-11e9-87c2-005056acfcbb"
                            }
                        },
                        "uuid": "c84d5337-1397-11e9-87c2-005056acfcbb",
                    },
                    "home_node": {
                        "name": "user-cluster-01-a",
                        "_links": {
                            "self": {
                                "href": "/api/cluster/nodes/c1db2904-1396-11e9-bb7d-005056acfcbb"
                            }
                        },
                        "uuid": "c1db2904-1396-11e9-bb7d-005056acfcbb",
                    },
                },
                "vip": False,
                "enabled": True,
                "_links": {
                    "self": {
                        "href": "/api/network/ip/interfaces/c670707c-5a11-11e8-8fcb-005056b4340f"
                    }
                },
                "services": ["data_core", "data_nfs", "data_cifs", "data_flexcache"],
                "service_policy": {
                    "name": "default-data-files",
                    "uuid": "9e53525f-141b-11e9-851e-005056ac1ce0",
                },
                "state": "up",
                "uuid": "c670707c-5a11-11e8-8fcb-005056b4340f",
                "scope": "svm",
                "svm": {
                    "name": "user_vs0",
                    "_links": {
                        "self": {
                            "href": "/api/svm/svms/c2134665-5a11-11e8-8fcb-005056b4340f"
                        }
                    },
                    "uuid": "c2134665-5a11-11e8-8fcb-005056b4340f",
                },
            }
        )
    ]

### Retrieving specific fields and limiting the output using filters

The following example shows the response when a filter is applied (location.home_port.name=e0a) and only certain fields are requested. Filtered fields are in the output in addition to the default fields and requested fields.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(
            list(
                IpInterface.get_collection(
                    fields="location.home_node.name,service_policy.name,ip.address,enabled",
                    **{"location.home_port.name": "e0a"}
                )
            )
        )

Try it out

    [
        IpInterface(
            {
                "ip": {"address": "192.168.170.24"},
                "name": "user-cluster-01-a_clus1",
                "location": {
                    "home_port": {"name": "e0a"},
                    "home_node": {"name": "user-cluster-01-a"},
                },
                "enabled": True,
                "_links": {
                    "self": {
                        "href": "/api/network/ip/interfaces/1d1c9dc8-4f17-11e9-9553-005056ac918a"
                    }
                },
                "service_policy": {"name": "default-cluster"},
                "uuid": "1d1c9dc8-4f17-11e9-9553-005056ac918a",
            }
        ),
        IpInterface(
            {
                "ip": {"address": "192.168.170.22"},
                "name": "user-cluster-01-b_clus1",
                "location": {
                    "home_port": {"name": "e0a"},
                    "home_node": {"name": "user-cluster-01-b"},
                },
                "enabled": True,
                "_links": {
                    "self": {
                        "href": "/api/network/ip/interfaces/d07782c1-4f16-11e9-86e7-005056ace7ee"
                    }
                },
                "service_policy": {"name": "default-cluster"},
                "uuid": "d07782c1-4f16-11e9-86e7-005056ace7ee",
            }
        ),
    ]

## Creating IP interfaces

You can use the IP interfaces POST API to create IP interfaces as shown in the following examples.

## Examples

### Creating a Cluster-scoped IP interface using names

The following example shows the record returned after the creation of an IP interface on "e0d".

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpInterface()
        resource.name = "cluster_mgmt"
        resource.ip = {"address": "10.63.41.6", "netmask": "18"}
        resource.enabled = True
        resource.scope = "cluster"
        resource.ipspace = {"name": "Default"}
        resource.location = {
            "auto_revert": False,
            "failover": "broadcast_domain_only",
            "home_port": {"name": "e0d", "node": {"name": "user-cluster-01-a"}},
        }
        resource.service_policy = {"name": "default-management"}
        resource.post(hydrate=True)
        print(resource)

Try it out

    IpInterface(
        {
            "ip": {"netmask": "18", "address": "10.63.41.6"},
            "name": "cluster_mgmt",
            "ipspace": {"name": "Default"},
            "location": {
                "auto_revert": False,
                "failover": "broadcast_domain_only",
                "home_port": {"name": "e0d", "node": {"name": "user-cluster-01-a"}},
            },
            "enabled": True,
            "_links": {
                "self": {
                    "href": "/api/network/ip/interfaces/245979de-59fc-11e8-ba55-005056b4340f"
                }
            },
            "service_policy": {"name": "default-management"},
            "uuid": "245979de-59fc-11e8-ba55-005056b4340f",
            "scope": "cluster",
        }
    )

### Creating a SVM-scoped IP interface using a mix of parameter types

The following example shows the record returned after the creation of a IP interface by specifying a broadcast domain as the location.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpInterface()
        resource.name = "Data1"
        resource.ip = {"address": "10.234.101.116", "netmask": "255.255.240.0"}
        resource.enabled = True
        resource.scope = "svm"
        resource.svm = {"uuid": "137f3618-1e89-11e9-803e-005056a7646a"}
        resource.location = {"auto_revert": True, "broadcast_domain": {"name": "Default"}}
        resource.service_policy = {"name": "default-data-files"}
        resource.post(hydrate=True)
        print(resource)

Try it out

    IpInterface(
        {
            "ip": {"netmask": "20", "address": "10.234.101.116"},
            "name": "Data1",
            "location": {"auto_revert": True},
            "enabled": True,
            "_links": {
                "self": {
                    "href": "/api/network/ip/interfaces/80d271c9-1f43-11e9-803e-005056a7646a"
                }
            },
            "service_policy": {"name": "default-data-files"},
            "uuid": "80d271c9-1f43-11e9-803e-005056a7646a",
            "scope": "svm",
            "svm": {
                "name": "vs0",
                "_links": {
                    "self": {"href": "/api/svm/svms/137f3618-1e89-11e9-803e-005056a7646a"}
                },
                "uuid": "137f3618-1e89-11e9-803e-005056a7646a",
            },
        }
    )

### Creating a Cluster-scoped IP interface without specifying the scope parameter

The following example shows the record returned after creating an IP interface on "e0d" without specifying the scope parameter. The scope is "cluster" if an "svm" is not specified.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpInterface()
        resource.name = "cluster_mgmt"
        resource.ip = {"address": "10.63.41.6", "netmask": "18"}
        resource.enabled = True
        resource.ipspace = {"name": "Default"}
        resource.location = {
            "auto_revert": False,
            "home_port": {"name": "e0d", "node": {"name": "user-cluster-01-a"}},
        }
        resource.service_policy = {"name": "default-management"}
        resource.post(hydrate=True)
        print(resource)

Try it out

    IpInterface(
        {
            "ip": {"netmask": "18", "address": "10.63.41.6"},
            "name": "cluster_mgmt",
            "ipspace": {"name": "Default"},
            "location": {
                "auto_revert": False,
                "home_port": {"name": "e0d", "node": {"name": "user-cluster-01-a"}},
            },
            "enabled": True,
            "_links": {
                "self": {
                    "href": "/api/network/ip/interfaces/245979de-59fc-11e8-ba55-005056b4340f"
                }
            },
            "service_policy": {"name": "default-management"},
            "uuid": "245979de-59fc-11e8-ba55-005056b4340f",
            "scope": "cluster",
        }
    )

### Creating an SVM-scoped IP interface without specifying the scope parameter

The following example shows the record returned after creating an IP interface on "e0d" without specifying the scope parameter. The scope is "svm" if the "svm" field is specified.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpInterface()
        resource.name = "Data1"
        resource.ip = {"address": "10.234.101.116", "netmask": "255.255.240.0"}
        resource.enabled = True
        resource.svm = {"uuid": "137f3618-1e89-11e9-803e-005056a7646a"}
        resource.location = {"auto_revert": True, "broadcast_domain": {"name": "Default"}}
        resource.service_policy = {"name": "default-data-files"}
        resource.post(hydrate=True)
        print(resource)

Try it out

    IpInterface(
        {
            "ip": {"netmask": "20", "address": "10.234.101.116"},
            "name": "Data1",
            "location": {"auto_revert": True},
            "enabled": True,
            "_links": {
                "self": {
                    "href": "/api/network/ip/interfaces/80d271c9-1f43-11e9-803e-005056a7646a"
                }
            },
            "service_policy": {"name": "default-data-files"},
            "uuid": "80d271c9-1f43-11e9-803e-005056a7646a",
            "scope": "svm",
            "svm": {
                "name": "vs0",
                "_links": {
                    "self": {"href": "/api/svms/137f3618-1e89-11e9-803e-005056a7646a"}
                },
                "uuid": "137f3618-1e89-11e9-803e-005056a7646a",
            },
        }
    )

### Creating an SVM-scoped IP interface using a subnet

The following example shows the record returned after the creation of a IP interface by allocating an IP address from a subnet.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpInterface()
        resource.name = "Data1"
        resource.subnet = {"name": "Subnet10"}
        resource.enabled = True
        resource.scope = "svm"
        resource.svm = {"uuid": "137f3618-1e89-11e9-803e-005056a7646a"}
        resource.location = {"auto_revert": True, "broadcast_domain": {"name": "Default"}}
        resource.service_policy = {"name": "default-data-files"}
        resource.post(hydrate=True)
        print(resource)

Try it out

    IpInterface(
        {
            "name": "Data1",
            "subnet": {"name": "testSubnet"},
            "location": {"auto_revert": True},
            "enabled": True,
            "_links": {
                "self": {
                    "href": "/api/network/ip/interfaces/80d271c9-1f43-11e9-803e-005056a7646a"
                }
            },
            "service_policy": {"name": "default-data-files"},
            "uuid": "80d271c9-1f43-11e9-803e-005056a7646a",
            "scope": "svm",
            "svm": {
                "name": "vs0",
                "_links": {
                    "self": {"href": "/api/svm/svms/137f3618-1e89-11e9-803e-005056a7646a"}
                },
                "uuid": "137f3618-1e89-11e9-803e-005056a7646a",
            },
        }
    )

## Updating IP interfaces

You can use the IP interfaces PATCH API to update the attributes of an IP interface.

## Examples

### Updating the auto revert flag of an IP interface

The following example shows how the PATCH request changes the auto revert flag to 'false'.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpInterface(uuid="80d271c9-1f43-11e9-803e-005056a7646a")
        resource.location = {"auto_revert": "false"}
        resource.patch()

### Updating the service policy of an IP interface

The following example shows how the PATCH request changes the service policy to 'default-management'.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpInterface(uuid="80d271c9-1f43-11e9-803e-005056a7646a")
        resource.service_policy = {"name": "default-management"}
        resource.patch()

## Deleting IP interfaces

You can use the IP interfaces DELETE API to delete an IP interface in the cluster.

## Example

### Deleting an IP Interface

The following DELETE request deletes a network IP interface.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpInterface(uuid="80d271c9-1f43-11e9-803e-005056a7646a")
        resource.delete()

## Classes

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

  Allows interaction with IpInterface 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 IpInterface 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('IpInterface')] = 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 an IP interface.

    ### Related ONTAP commands

    - `network interface delete`

    ### Learn more

    - `DOC /network/ip/interfaces`

    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 IpInterface resources that match the provided query

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

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

    ## Args

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

    ## Returns

    A list of `Resource` objects

    ## Raises

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

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

    Retrieves the details of all IP interfaces.

    ### Related ONTAP Commands

    - `network interface show`

    ### Learn more

    - `DOC /network/ip/interfaces`

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

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

    ## Args

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

    ## Returns

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

    ## Raises

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

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

    Retrieves the details of all IP interfaces.

    ### Related ONTAP Commands

    - `network interface show`

    ### Learn more

    - `DOC /network/ip/interfaces`

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

    Updates an IP interface.

    ### Related ONTAP commands

    - `network interface migrate`
    - `network interface modify`
    - `network interface rename`
    - `network interface revert`

    ### Learn more

    - `DOC /network/ip/interfaces`

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

    Creates a new Cluster-scoped or SVM-scoped interface.

    ### Required properties

    - `name` - Name of the interface to create.
    - `ip` or `subnet`
    - `ip.address` - IP address for the interface.
    - `ip.netmask` - IP subnet of the interface.
    - `subnet.uuid` or `subnet.name`
    - `ipspace.name` or `ipspace.uuid`
    - Required for Cluster-scoped interfaces.
    - Optional for SVM-scoped interfaces.
    - `svm.name` or `svm.uuid`
    - Required for an SVM-scoped interface.
    - Invalid for a Cluster-scoped interface.
    - If a LIF in the subnet of the specified IP address does not already exist, a location.home_port, a location.home_node, or a location.broadcast_domain needs to be provided.

    ### Recommended property values

    - `service_policy`
    - `for SVM scoped interfaces`
      - default-data-files for interfaces carrying file-oriented NAS data traffic
      - default-data-blocks for interfaces carrying block-oriented SAN data traffic
      - default-data-iscsi for interfaces carrying iSCSI data traffic
      - default-management for interfaces carrying SVM management requests
    - `for Cluster scoped interfaces`
      - default-intercluster for interfaces carrying cluster peering traffic
      - default-management for interfaces carrying system management requests
      - default-route-announce for interfaces carrying BGP peer connections

    ### Default property values

    If not specified in POST, the following default property values are assigned: * `scope` * svm if svm parameter is specified. * cluster if svm parameter is not specified * `enabled` - true * `location.auto_revert` - true * `service_policy` * Unified ONTAP: default-data-files if scope is `svm` * ASA r2: default-data-blocks if scope is `svm` * default-management if scope is `cluster` and IPspace is not `Cluster` * default-cluster if scope is `cluster` and IPspace is `Cluster` * `failover` - Selects the least restrictive failover policy supported by all the services in the service policy. * `ddns_enabled` * true if the interface supports data_nfs or data_cifs services * false otherwise * `fail_if_subnet_conflicts` - true

    ### Related ONTAP commands

    - `network interface create`

    ### Learn more

    - `DOC /network/ip/interfaces`

    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 an IP interface.

    ### Related ONTAP commands

    - `network interface delete`

    ### Learn more

    - `DOC /network/ip/interfaces`

    Send a deletion request to the host for this object.

    ## Args

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

    ## Returns

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

    ## Raises

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

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

    Retrieves details for a specific IP interface.

    ### Related ONTAP commands

    - `network interface show`

    ### Learn more

    - `DOC /network/ip/interfaces`

    Fetch the details of the object from the host.

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

    ## Returns

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

    ## Raises

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

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

    Updates an IP interface.

    ### Related ONTAP commands

    - `network interface migrate`
    - `network interface modify`
    - `network interface rename`
    - `network interface revert`

    ### Learn more

    - `DOC /network/ip/interfaces`

    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 new Cluster-scoped or SVM-scoped interface.

    ### Required properties

    - `name` - Name of the interface to create.
    - `ip` or `subnet`
    - `ip.address` - IP address for the interface.
    - `ip.netmask` - IP subnet of the interface.
    - `subnet.uuid` or `subnet.name`
    - `ipspace.name` or `ipspace.uuid`
    - Required for Cluster-scoped interfaces.
    - Optional for SVM-scoped interfaces.
    - `svm.name` or `svm.uuid`
    - Required for an SVM-scoped interface.
    - Invalid for a Cluster-scoped interface.
    - If a LIF in the subnet of the specified IP address does not already exist, a location.home_port, a location.home_node, or a location.broadcast_domain needs to be provided.

    ### Recommended property values

    - `service_policy`
    - `for SVM scoped interfaces`
      - default-data-files for interfaces carrying file-oriented NAS data traffic
      - default-data-blocks for interfaces carrying block-oriented SAN data traffic
      - default-data-iscsi for interfaces carrying iSCSI data traffic
      - default-management for interfaces carrying SVM management requests
    - `for Cluster scoped interfaces`
      - default-intercluster for interfaces carrying cluster peering traffic
      - default-management for interfaces carrying system management requests
      - default-route-announce for interfaces carrying BGP peer connections

    ### Default property values

    If not specified in POST, the following default property values are assigned: * `scope` * svm if svm parameter is specified. * cluster if svm parameter is not specified * `enabled` - true * `location.auto_revert` - true * `service_policy` * Unified ONTAP: default-data-files if scope is `svm` * ASA r2: default-data-blocks if scope is `svm` * default-management if scope is `cluster` and IPspace is not `Cluster` * default-cluster if scope is `cluster` and IPspace is `Cluster` * `failover` - Selects the least restrictive failover policy supported by all the services in the service policy. * `ddns_enabled` * true if the interface supports data_nfs or data_cifs services * false otherwise * `fail_if_subnet_conflicts` - true

    ### Related ONTAP commands

    - `network interface create`

    ### Learn more

    - `DOC /network/ip/interfaces`

    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 IpInterfaceSchema (*, 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 IpInterface object

  ### Ancestors

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

  ### Class variables

  `ddns_enabled: bool GET POST PATCH`

    Indicates whether or not dynamic DNS updates are enabled. Defaults to true if the interface supports "data_nfs" or "data_cifs" services, otherwise false.

  `dns_zone: str GET POST PATCH`

    Fully qualified DNS zone name

    Example: storage.company.com

  `enabled: bool GET POST PATCH`

    The administrative state of the interface.

  `fail_if_subnet_conflicts: bool POST PATCH`

    This command fails if the specified IP address falls within the address range of a named subnet. Set this value to false to use the specified IP address and to assign the subnet owning that address to the interface.

  `ip: IpInfo GET POST PATCH`

    IP information

  `ipspace: Ipspace GET POST`

    The ipspace field of the ip_interface.

  `links: SelfLink GET`

    The links field of the ip_interface.

  `location: IpInterfaceLocation GET POST PATCH`

    Current or home location can be modified. Specifying a port implies a node. Specifying a node allows an appropriate port to be automatically selected. Ports are not valid and not shown for VIP interfaces. For POST, broadcast_domain can be specified alone or with home_node. For PATCH, set is_home to true to revert a LIF back to its home port.

  `metric: InterfaceMetricsData GET`

    Throughput performance for the interfaces.

  `name: str GET POST PATCH`

    Interface name

    Example: dataLif1

  `probe_port: Size GET POST`

    Probe port for Cloud load balancer

    Example: 64001

  `rdma_protocols: List[str] GET POST PATCH`

    Supported RDMA offload protocols

  `scope: str GET POST`

    Set to "svm" for interfaces owned by an SVM. Otherwise, set to "cluster".

    Valid choices:

    - svm
    - cluster
  `service_policy: IpServicePolicy GET POST PATCH`

    The service_policy field of the ip_interface.

  `services: List[str] GET`

    The services associated with the interface.

  `state: str GET`

    The operational state of the interface.

    Valid choices:

    - up
    - down
  `statistics: InterfaceStatistics GET`

    These are the total throughput raw performance data for the interface.

  `subnet: IpSubnet GET POST PATCH`

    Use this field to allocate an interface address from a subnet. If needed, a default route is created for this subnet.

  `svm: Svm GET POST`

    The svm field of the ip_interface.

  `uuid: str GET`

    The UUID that uniquely identifies the interface.

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

  `vip: bool GET POST`

    True for a VIP interface, whose location is announced via BGP.