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

# Module `netapp_ontap.resources.ip_service_policy`

Copyright © 2020 NetApp Inc. All rights reserved.

## Overview

Service policies are named groupings that define what services are supported by an IP interface. The following operations are supported:

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

## Examples

### Retrieving all service policies in the cluster

The following output shows the collection of all service policies configured in a 2-node cluster. By default (without 'field=*' parameter), only the UUID and name fields are shown for each entry.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpServicePolicy

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

Try it out

    [
        IpServicePolicy(
            {
                "uuid": "e4e2f193-c1a3-11e8-bb9d-005056bb88c8",
                "_links": {
                    "self": {
                        "href": "/api/network/ip/service-policies/e4e2f193-c1a3-11e8-bb9d-005056bb88c8"
                    }
                },
                "name": "net-intercluster",
            }
        ),
        IpServicePolicy(
            {
                "uuid": "e4e3f6da-c1a3-11e8-bb9d-005056bb88c8",
                "_links": {
                    "self": {
                        "href": "/api/network/ip/service-policies/e4e3f6da-c1a3-11e8-bb9d-005056bb88c8"
                    }
                },
                "name": "net-route-announce",
            }
        ),
        IpServicePolicy(
            {
                "uuid": "e5111111-c1a3-11e8-bb9d-005056bb88c8",
                "_links": {
                    "self": {
                        "href": "/api/network/ip/service-policies/e5111111-c1a3-11e8-bb9d-005056bb88c8"
                    }
                },
                "name": "vserver-route-announce",
            }
        ),
        IpServicePolicy(
            {
                "uuid": "e6111111-c1a3-11e8-bb9d-005056bb88c8",
                "_links": {
                    "self": {
                        "href": "/api/network/ip/service-policies/e6111111-c1a3-11e8-bb9d-005056bb88c8"
                    }
                },
                "name": "data-route-announce",
            }
        ),
    ]

### Retrieving a specific service policy (scope=svm)

The following output displays the response when a specific "svm" scoped service policy is requested. Among other parameters, the response contains the svm parameters associated with the service policy. The system returns an error when there is no service policy with the requested UUID.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpServicePolicy

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpServicePolicy(uuid="dad323ff-4ce0-11e9-9372-005056bb91a8")
        resource.get(fields="*")
        print(resource)

Try it out

    IpServicePolicy(
        {
            "ipspace": {
                "uuid": "45ec2dee-4ce0-11e9-9372-005056bb91a8",
                "_links": {
                    "self": {
                        "href": "/api/network/ipspaces/45ec2dee-4ce0-11e9-9372-005056bb91a8"
                    }
                },
                "name": "Default",
            },
            "uuid": "dad323ff-4ce0-11e9-9372-005056bb91a8",
            "scope": "svm",
            "_links": {
                "self": {
                    "href": "/api/network/ip/service-policies/dad323ff-4ce0-11e9-9372-005056bb91a8"
                }
            },
            "svm": {
                "name": "vs0",
                "uuid": "d9060680-4ce0-11e9-9372-005056bb91a8",
                "_links": {
                    "self": {"href": "/api/svm/svms/d9060680-4ce0-11e9-9372-005056bb91a8"}
                },
            },
            "services": ["data_core", "data_nfs", "data_cifs", "data_flexcache"],
            "name": "default-data-files",
        }
    )

### Retrieving a specific service policy (scope=svm) when requesting commonly used fields

The following output displays the response when commonly used fields are requested for a specific "svm" scoped service policy. Among other parameters, the response contains the svm parameters associated with the service policy. The system returns an error when there is no service policy with the requested UUID.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpServicePolicy

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpServicePolicy(uuid="e0889ce6-1e6a-11e9-89d6-005056bbdc04")
        resource.get(fields="name,scope,svm.name,ipspace.name")
        print(resource)

Try it out

    IpServicePolicy(
        {
            "ipspace": {"name": "Default"},
            "uuid": "e0889ce6-1e6a-11e9-89d6-005056bbdc04",
            "scope": "svm",
            "_links": {
                "self": {
                    "href": "/api/network/ip/service-policies/e0889ce6-1e6a-11e9-89d6-005056bbdc04"
                }
            },
            "svm": {"name": "vs0"},
            "name": "test_policy",
        }
    )

### Retrieving a specific service policy (scope=cluster)

The following output displays the response when a specific cluster-scoped service policy is requested. The SVM object is not included for cluster-scoped service policies. A service policy with a scope of "cluster" is associated with an IPspace. The system returns an error when there is no service policy with the requested UUID.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpServicePolicy

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpServicePolicy(uuid="4c6b72b9-0f6c-11e9-875d-005056bb21b8")
        resource.get(fields="*")
        print(resource)

Try it out

    IpServicePolicy(
        {
            "ipspace": {
                "uuid": "4051f13e-0f6c-11e9-875d-005056bb21b8",
                "_links": {
                    "self": {
                        "href": "/api/network/ipspaces/4051f13e-0f6c-11e9-875d-005056bb21b8"
                    }
                },
                "name": "Default",
            },
            "uuid": "4c6b72b9-0f6c-11e9-875d-005056bb21b8",
            "scope": "cluster",
            "_links": {
                "self": {
                    "href": "/api/network/ip/service-policies/4c6b72b9-0f6c-11e9-875d-005056bb21b8"
                }
            },
            "services": ["intercluster_core"],
            "name": "net-intercluster",
        }
    )

### Retrieving a specific service policy (scope=cluster) when requesting commonly used fields

The following output displays the response when commonly used fields are requested for a specific "cluster" scoped service policy. The SVM object is not included for cluster-scoped service policies. A service policy with a scope of "cluster" is associated with an IPspace. The system returns an error when there is no service policy with the requested UUID.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpServicePolicy

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpServicePolicy(uuid="4c6b72b9-0f6c-11e9-875d-005056bb21b8")
        resource.get(fields="name,scope,ipspace.name")
        print(resource)

Try it out

    IpServicePolicy(
        {
            "ipspace": {"name": "Default"},
            "uuid": "4c6b72b9-0f6c-11e9-875d-005056bb21b8",
            "scope": "cluster",
            "_links": {
                "self": {
                    "href": "/api/network/ip/service-policies/4c6b72b9-0f6c-11e9-875d-005056bb21b8"
                }
            },
            "services": ["intercluster_core"],
            "name": "net-intercluster",
        }
    )

## Creating service policies

You can use this API to create an SVM-scoped service policy by specifying the associated SVM, or a cluster-scoped service policy by specifying the associated IPspace. If the scope is not specified, it is inferred from the presence of the IPspace or SVM. Cluster scoped service policies will operate on the IPspace "Default" unless IPspace is explicitly specified.

## Examples

### Creating a cluster-scoped service policy

The following output displays the response when creating a service policy with a scope of "cluster" and an IPspace of "Default".

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpServicePolicy

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpServicePolicy()
        resource.name = "new-policy"
        resource.scope = "cluster"
        resource.ipspace.name = "Default"
        resource.services = ["intercluster_core"]
        resource.post(hydrate=True)
        print(resource)

Try it out

    IpServicePolicy(
        {
            "ipspace": {
                "uuid": "ba556295-e912-11e9-a1c8-005056a7080e",
                "_links": {
                    "self": {
                        "href": "/api/network/ipspaces/ba556295-e912-11e9-a1c8-005056a7080e"
                    }
                },
                "name": "Default",
            },
            "uuid": "74139267-f1aa-11e9-b5d7-005056a73e2e",
            "scope": "cluster",
            "_links": {
                "self": {
                    "href": "/api/network/ip/service-policies/74139267-f1aa-11e9-b5d7-005056a73e2e"
                }
            },
            "services": ["intercluster_core"],
            "name": "new-policy",
        }
    )

### Creating a cluster-scoped service policy without specifying IPspace

The following output displays the response when creating a service policy with a scope of "cluster" without specifying an IPspace".

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpServicePolicy

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpServicePolicy()
        resource.name = "new-policy"
        resource.scope = "cluster"
        resource.services = ["intercluster_core"]
        resource.post(hydrate=True)
        print(resource)

Try it out

    IpServicePolicy(
        {
            "ipspace": {
                "uuid": "ba556295-e912-11e9-a1c8-005056a7080e",
                "_links": {
                    "self": {
                        "href": "/api/network/ipspaces/ba556295-e912-11e9-a1c8-005056a7080e"
                    }
                },
                "name": "Default",
            },
            "uuid": "74139267-f1aa-11e9-b5d7-005056a73e2e",
            "scope": "cluster",
            "_links": {
                "self": {
                    "href": "/api/network/ip/service-policies/74139267-f1aa-11e9-b5d7-005056a73e2e"
                }
            },
            "services": ["intercluster_core"],
            "name": "new-policy",
        }
    )

### Creating a cluster-scoped service policy without specifying scope

The following output displays the response when creating a service policy in the "Default" IPspace without specifying the scope".

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpServicePolicy

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpServicePolicy()
        resource.name = "new-policy2"
        resource.ipspace.name = "Default"
        resource.services = ["intercluster_core"]
        resource.post(hydrate=True)
        print(resource)

Try it out

    IpServicePolicy(
        {
            "ipspace": {
                "uuid": "ba556295-e912-11e9-a1c8-005056a7080e",
                "_links": {
                    "self": {
                        "href": "/api/network/ipspaces/ba556295-e912-11e9-a1c8-005056a7080e"
                    }
                },
                "name": "Default",
            },
            "uuid": "59439267-f1aa-11e9-b5d7-005056a73e2e",
            "scope": "cluster",
            "_links": {
                "self": {
                    "href": "/api/network/ip/service-policies/74139267-f1aa-11e9-b5d7-005056a73e2e"
                }
            },
            "services": ["intercluster_core"],
            "name": "new-policy2",
        }
    )

### Creating an SVM-scoped service policy

The following output displays the response when creating a service policy with a scope of "svm" in the SVM "vs0".

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpServicePolicy

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpServicePolicy()
        resource.name = "new-policy"
        resource.scope = "svm"
        resource.svm.name = "vs0"
        resource.services = ["data-nfs", "data-cifs"]
        resource.post(hydrate=True)
        print(resource)

Try it out

    IpServicePolicy(
        {
            "ipspace": {
                "uuid": "1d3199d2-e906-11e9-a13a-005056a73e2e",
                "_links": {
                    "self": {
                        "href": "/api/network/ipspaces/1d3199d2-e906-11e9-a13a-005056a73e2e"
                    }
                },
                "name": "Default",
            },
            "uuid": "f3901097-f2c4-11e9-b5d7-005056a73e2e",
            "scope": "svm",
            "_links": {
                "self": {
                    "href": "/api/network/ip/service-policies/f3901097-f2c4-11e9-b5d7-005056a73e2e"
                }
            },
            "svm": {
                "name": "vs0",
                "uuid": "07df9cee-e912-11e9-a13a-005056a73e2e",
                "_links": {
                    "self": {"href": "/api/svm/svms/07df9cee-e912-11e9-a13a-005056a73e2e"}
                },
            },
            "services": ["data_nfs", "data_cifs"],
            "name": "new-policy",
        }
    )

### Creating an SVM-scoped service policy without specifying scope

The following output displays the response when creating a service policy with a SVM of "vs0" without specifying the scope.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpServicePolicy

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpServicePolicy()
        resource.name = "new-policy"
        resource.svm.name = "vs0"
        resource.services = ["data-nfs", "data-cifs"]
        resource.post(hydrate=True)
        print(resource)

Try it out

    IpServicePolicy(
        {
            "ipspace": {
                "uuid": "1d3199d2-e906-11e9-a13a-005056a73e2e",
                "_links": {
                    "self": {
                        "href": "/api/network/ipspaces/1d3199d2-e906-11e9-a13a-005056a73e2e"
                    }
                },
                "name": "Default",
            },
            "uuid": "f3901097-f2c4-11e9-b5d7-005056a73e2e",
            "scope": "svm",
            "_links": {
                "self": {
                    "href": "/api/network/ip/service-policies/f3901097-f2c4-11e9-b5d7-005056a73e2e"
                }
            },
            "svm": {
                "name": "vs0",
                "uuid": "07df9cee-e912-11e9-a13a-005056a73e2e",
                "_links": {
                    "self": {"href": "/api/svm/svms/07df9cee-e912-11e9-a13a-005056a73e2e"}
                },
            },
            "services": ["data_nfs", "data_cifs"],
            "name": "new-policy",
        }
    )

### Updating the name of a service policy

The following example displays the command used to update the name of a service policy scoped to a specific "svm". The system returns an error when there is no service policy associated with the UUID or the service policy cannot be renamed.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpServicePolicy

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpServicePolicy(uuid="734eaf57-d2fe-11e9-9284-005056acaad4")
        resource.name = "new-name"
        resource.patch()

### Updating the services for a service policy

The following example displays the command used to update the services a service policy contains. The specified services replace the existing services. To retain existing services, they must be included in the PATCH request. The system returns an error when there is no service policy associated with the UUID or the services cannot be applied.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpServicePolicy

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpServicePolicy(uuid="734eaf57-d2fe-11e9-9284-005056acaad4")
        resource.services = ["data-nfs", "data-cifs"]
        resource.patch()

### Deleting a service policy

The following output displays the response for deleting a service policy.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import IpServicePolicy

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = IpServicePolicy(uuid="757ed726-bdc1-11e9-8a92-005056a7bf25")
        resource.delete()

## Classes

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

  Allows interaction with IpServicePolicy 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`

    Retrieves a collection of service policies.

    ### Related ONTAP commands

    - `network interface service-policy show`

    ### Learn more

    - `DOC /network/ip/service-policies`

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

    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, body: typing.Union = None, connection: HostConnection = None, **kwargs) -> NetAppResponse`

    Deletes a service policy for network interfaces.

    ### Learn more

    - `DOC /network/ip/service-policies`

    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.
    `body`
      The body of the delete request. This could be a Resource instance or a dictionary object.
    `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 find(*args, connection: HostConnection = None, **kwargs) -> Resource`

    Retrieves a collection of service policies.

    ### Related ONTAP commands

    - `network interface service-policy show`

    ### Learn more

    - `DOC /network/ip/service-policies`

    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) -> typing.Iterable`

    Retrieves a collection of service policies.

    ### Related ONTAP commands

    - `network interface service-policy show`

    ### Learn more

    - `DOC /network/ip/service-policies`

    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
    `**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, connection: HostConnection = None, **kwargs) -> NetAppResponse`

    Updates a service policy for network interfaces.

    ### Learn more

    - `DOC /network/ip/service-policies`

    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.
    `*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.
    `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

  ### Methods

  `def delete(self, body: typing.Union = None, poll: bool = True, poll_interval: typing.Union = None, poll_timeout: typing.Union = None, **kwargs) -> NetAppResponse`

    Deletes a service policy for network interfaces.

    ### Learn more

    - `DOC /network/ip/service-policies`

    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.
    `**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 specific service policy.

    ### Related ONTAP commands

    - `network interface service-policy show`

    ### Learn more

    - `DOC /network/ip/service-policies`

    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: typing.Union = None, poll_timeout: typing.Union = None, **kwargs) -> NetAppResponse`

    Updates a service policy for network interfaces.

    ### Learn more

    - `DOC /network/ip/service-policies`

    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.
    `**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: typing.Union = None, poll_timeout: typing.Union = None, **kwargs) -> NetAppResponse`

    Creates a service policy for network interfaces.

    ### Required properties

    - `name` - Name of the service policy to create.
    - `ipspace.name` or `ipspace.uuid`
    - Required for cluster-scoped service policies.
    - Optional for SVM-scoped service policies.
    - `svm.name` or `svm.uuid`
    - Required for SVM-scoped service policies.
    - Not valid for cluster-scoped service policies.

    ### Default property values

    If not specified in POST, the following default property values are assigned: * `scope` * svm if the svm parameter is specified * cluster if the svm parameter is not specified

    ### Learn more

    - `DOC /network/ip/service-policies`

    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.
    `**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 IpServicePolicySchema (*, only: typing.Union = None, exclude: typing.Union = (), many: bool = False, context: typing.Dict = None, load_only: typing.Union = (), dump_only: typing.Union = (), partial: typing.Union = False, unknown: str = None)`

  The fields of the IpServicePolicy object

  ### Ancestors

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

  ### Class variables

  `ipspace GET POST`

    The ipspace field of the ip_service_policy.

  `links GET`

    The links field of the ip_service_policy.

  `name GET POST PATCH`

    The name field of the ip_service_policy.

    Example: default-intercluster

  `scope GET POST`

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

    Valid choices:

    - svm
    - cluster
  `services GET POST PATCH`

    The services field of the ip_service_policy.

  `svm GET POST`

    The svm field of the ip_service_policy.

  `uuid GET`

    The uuid field of the ip_service_policy.

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