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

# Module `netapp_ontap.resources.ldap_service`

Copyright © 2026 NetApp Inc. All rights reserved.

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

## Overview

LDAP servers are used to centrally maintain user information. LDAP configurations must be set up to lookup information stored in the LDAP directory on the external LDAP servers. This API is used to retrieve and manage LDAP server configurations.

## Retrieving LDAP information

The LDAP GET endpoint retrieves all of the LDAP configurations in the cluster.

## Examples

### Retrieving all of the fields for all LDAP configurations

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LdapService

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

Try it out

    [
        LdapService(
            {
                "netgroup_scope": "subtree",
                "servers": ["10.10.10.10", "domainB.example.com"],
                "bind_dn": "cn=Administrators,cn=users,dc=domainA,dc=example,dc=com",
                "schema": "ad_idmu",
                "user_scope": "subtree",
                "try_channel_binding": True,
                "base_scope": "subtree",
                "referral_enabled": False,
                "status": {
                    "message": "The LDAP configuration is invalid. Verify that the AD domain or servers are reachable and that the network configuration is correct",
                    "dn_message": ["No LDAP DN configured"],
                    "code": 4915258,
                    "ipv6_state": "down",
                    "state": "down",
                    "ipv4_state": "down",
                },
                "bind_as_cifs_server": False,
                "group_scope": "subtree",
                "_links": {
                    "self": {
                        "href": "/api/name-services/ldap/179d3c85-7053-11e8-b9b8-005056b41bd1"
                    }
                },
                "is_owner": True,
                "session_security": "none",
                "base_dn": "dc=domainA,dc=example,dc=com",
                "port": 389,
                "group_membership_filter": "",
                "is_netgroup_byhost_enabled": False,
                "query_timeout": 3,
                "ldaps_enabled": False,
                "use_start_tls": True,
                "restrict_discovery_to_site": False,
                "min_bind_level": "anonymous",
                "netgroup_byhost_scope": "subtree",
                "svm": {
                    "name": "vs1",
                    "_links": {
                        "self": {
                            "href": "/api/svm/svms/179d3c85-7053-11e8-b9b8-005056b41bd1"
                        }
                    },
                    "uuid": "179d3c85-7053-11e8-b9b8-005056b41bd1",
                },
            }
        ),
        LdapService(
            {
                "netgroup_scope": "subtree",
                "bind_dn": "cn=Administrators,cn=users,dc=domainB,dc=example,dc=com",
                "schema": "rfc_2307",
                "ad_domain": "example.com",
                "user_scope": "subtree",
                "try_channel_binding": True,
                "base_scope": "subtree",
                "referral_enabled": False,
                "status": {
                    "message": 'Successfully connected to LDAP server "172.20.192.44". Successfully connected to LDAP server "fd20:8b1e:b255:5056:999:d9:516c:bf69".',
                    "dn_message": ["All the configured DNs are available."],
                    "code": 0,
                    "ipv6_state": "up",
                    "state": "up",
                    "ipv4_state": "up",
                },
                "bind_as_cifs_server": False,
                "group_scope": "subtree",
                "_links": {
                    "self": {
                        "href": "/api/name-services/ldap/6a52023b-7066-11e8-b9b8-005056b41bd1"
                    }
                },
                "is_owner": True,
                "session_security": "sign",
                "base_dn": "dc=domainB,dc=example,dc=com",
                "port": 389,
                "group_membership_filter": "",
                "is_netgroup_byhost_enabled": False,
                "query_timeout": 0,
                "ldaps_enabled": False,
                "use_start_tls": True,
                "restrict_discovery_to_site": True,
                "min_bind_level": "simple",
                "netgroup_byhost_scope": "subtree",
                "svm": {
                    "name": "vs2",
                    "_links": {
                        "self": {
                            "href": "/api/svm/svms/6a52023b-7066-11e8-b9b8-005056b41bd1"
                        }
                    },
                    "uuid": "6a52023b-7066-11e8-b9b8-005056b41bd1",
                },
            }
        ),
    ]

### Retrieving all of the LDAP configurations that have the use_start_tls set to true

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LdapService

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

Try it out

    [
        LdapService(
            {
                "_links": {
                    "self": {
                        "href": "/api/name-services/ldap/6a52023b-7066-11e8-b9b8-005056b41bd1"
                    }
                },
                "use_start_tls": True,
                "svm": {
                    "name": "vs2",
                    "_links": {
                        "self": {
                            "href": "/api/svm/svms/6a52023b-7066-11e8-b9b8-005056b41bd1"
                        }
                    },
                    "uuid": "6a52023b-7066-11e8-b9b8-005056b41bd1",
                },
            }
        )
    ]

### Retrieving the LDAP configuration of a specific SVM

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LdapService

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = LdapService(**{"svm.uuid": "179d3c85-7053-11e8-b9b8-005056b41bd1"})
        resource.get()
        print(resource)

Try it out

    LdapService(
        {
            "servers": ["10.10.10.10", "domainB.example.com"],
            "bind_dn": "cn=Administrators,cn=users,dc=domainA,dc=example,dc=com",
            "schema": "ad_idmu",
            "try_channel_binding": True,
            "base_scope": "subtree",
            "referral_enabled": False,
            "bind_as_cifs_server": True,
            "_links": {
                "self": {
                    "href": "/api/name-services/ldap/179d3c85-7053-11e8-b9b8-005056b41bd1"
                }
            },
            "is_owner": True,
            "session_security": "none",
            "base_dn": "dc=domainA,dc=example,dc=com",
            "port": 389,
            "query_timeout": 3,
            "ldaps_enabled": False,
            "use_start_tls": True,
            "restrict_discovery_to_site": False,
            "min_bind_level": "anonymous",
            "svm": {
                "name": "vs1",
                "_links": {
                    "self": {"href": "/api/svm/svms/179d3c85-7053-11e8-b9b8-005056b41bd1"}
                },
                "uuid": "179d3c85-7053-11e8-b9b8-005056b41bd1",
            },
        }
    )

### Retrieving all the fields of the LDAP configuration of a specific SVM

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LdapService

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = LdapService(**{"svm.uuid": "179d3c85-7053-11e8-b9b8-005056b41bd1"})
        resource.get(fields="**")
        print(resource)

Try it out

    LdapService(
        {
            "netgroup_scope": "subtree",
            "servers": ["10.10.10.10", "domainB.example.com"],
            "bind_dn": "cn=Administrators,cn=users,dc=domainA,dc=example,dc=com",
            "schema": "ad_idmu",
            "user_scope": "subtree",
            "try_channel_binding": True,
            "base_scope": "subtree",
            "referral_enabled": False,
            "status": {
                "message": "The LDAP configuration is invalid. Verify that the AD domain or servers are reachable and that the network configuration is correct",
                "dn_message": ["No LDAP DN configured"],
                "code": 4915258,
                "ipv6_state": "down",
                "state": "down",
                "ipv4_state": "down",
            },
            "bind_as_cifs_server": True,
            "group_scope": "subtree",
            "_links": {
                "self": {
                    "href": "/api/name-services/ldap/179d3c85-7053-11e8-b9b8-005056b41bd1"
                }
            },
            "is_owner": True,
            "session_security": "none",
            "base_dn": "dc=domainA,dc=example,dc=com",
            "port": 389,
            "group_membership_filter": "",
            "is_netgroup_byhost_enabled": False,
            "query_timeout": 3,
            "ldaps_enabled": False,
            "use_start_tls": True,
            "restrict_discovery_to_site": False,
            "min_bind_level": "anonymous",
            "netgroup_byhost_scope": "subtree",
            "svm": {
                "name": "vs1",
                "_links": {
                    "self": {"href": "/api/svm/svms/179d3c85-7053-11e8-b9b8-005056b41bd1"}
                },
                "uuid": "179d3c85-7053-11e8-b9b8-005056b41bd1",
            },
        }
    )

### Retrieving the LDAP server status of a specific SVM

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LdapService

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = LdapService(**{"svm.uuid": "9e4a2e3b-f66f-11ea-aec8-0050568e155c"})
        resource.get(fields="status")
        print(resource)

Try it out

    LdapService(
        {
            "status": {
                "message": 'Successfully connected to LDAP server "172.20.192.44". Successfully connected to LDAP server "fd20:8b1e:b255:5056:999:d9:516c:bf69".',
                "code": 0,
                "ipv6_state": "up",
                "state": "up",
                "ipv4_state": "up",
            },
            "svm": {"name": "vs2", "uuid": "9e4a2e3b-f66f-11ea-aec8-0050568e155c"},
        }
    )

### Retrieving all of the LDAP configurations that have the restrict_discovery_to_site set to true

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LdapService

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

Try it out

    [
        LdapService(
            {
                "_links": {
                    "self": {
                        "href": "/api/name-services/ldap/6a52023b-7066-11e8-b9b8-005056b41bd1"
                    }
                },
                "restrict_discovery_to_site": True,
                "svm": {
                    "name": "vs2",
                    "_links": {
                        "self": {
                            "href": "/api/svm/svms/6a52023b-7066-11e8-b9b8-005056b41bd1"
                        }
                    },
                    "uuid": "6a52023b-7066-11e8-b9b8-005056b41bd1",
                },
            }
        )
    ]

## Creating an LDAP configuration

The LDAP POST endpoint creates an LDAP configuration for the specified SVM.

## Examples

### Creating an LDAP configuration with all the fields specified

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LdapService

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = LdapService()
        resource.svm = {"uuid": "179d3c85-7053-11e8-b9b8-005056b41bd1"}
        resource.servers = ["10.10.10.10", "domainB.example.com"]
        resource.schema = "ad_idmu"
        resource.port = 389
        resource.ldaps_enabled = False
        resource.min_bind_level = "anonymous"
        resource.bind_dn = "cn=Administrators,cn=users,dc=domainA,dc=example,dc=com"
        resource.bind_password = "abc"
        resource.base_dn = "dc=domainA,dc=example,dc=com"
        resource.base_scope = "subtree"
        resource.use_start_tls = False
        resource.session_security = "none"
        resource.referral_enabled = False
        resource.bind_as_cifs_server = False
        resource.query_timeout = 4
        resource.user_dn = "cn=abc,users,dc=com"
        resource.user_scope = "subtree"
        resource.group_dn = "cn=abc,users,dc=com"
        resource.group_scope = "subtree"
        resource.netgroup_dn = "cn=abc,users,dc=com"
        resource.netgroup_scope = "subtree"
        resource.netgroup_byhost_dn = "cn=abc,users,dc=com"
        resource.netgroup_byhost_scope = "subtree"
        resource.is_netgroup_byhost_enabled = False
        resource.group_membership_filter = ""
        resource.skip_config_validation = False
        resource.post(hydrate=True)
        print(resource)

### Creating an LDAP configuration with Active Directory domain and preferred Active Directory servers specified

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LdapService

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = LdapService()
        resource.svm = {"name": "vs2"}
        resource.ad_domain = "domainA.example.com"
        resource.preferred_ad_servers = ["11.11.11.11"]
        resource.port = 389
        resource.ldaps_enabled = False
        resource.bind_dn = "cn=Administrators,cn=users,dc=domainA,dc=example,dc=com"
        resource.bind_password = "abc"
        resource.base_dn = "dc=domainA,dc=example,dc=com"
        resource.session_security = "none"
        resource.referral_enabled = False
        resource.query_timeout = 3
        resource.post(hydrate=True)
        print(resource)

### Creating an LDAP configuration with a number of optional fields not specified

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LdapService

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = LdapService()
        resource.svm = {"name": "vs2"}
        resource.servers = ["11.11.11.11"]
        resource.port = 389
        resource.bind_dn = "cn=Administrators,cn=users,dc=domainA,dc=example,dc=com"
        resource.bind_password = "abc"
        resource.base_dn = "dc=domainA,dc=example,dc=com"
        resource.session_security = "none"
        resource.post(hydrate=True)
        print(resource)

### Creating an LDAP configuration with Active Directory domain specified and restrict_discovery_to_site set to true

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LdapService

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = LdapService()
        resource.svm = {"name": "vs2"}
        resource.ad_domain = "example.com"
        resource.port = 389
        resource.bind_dn = "cn=Administrators,cn=users,dc=domainA,dc=example,dc=com"
        resource.bind_password = "abc"
        resource.base_dn = "dc=domainA,dc=example,dc=com"
        resource.session_security = "none"
        resource.restrict_discovery_to_site = True
        resource.post(hydrate=True)
        print(resource)

## Updating an LDAP configuration

The LDAP PATCH endpoint updates the LDAP configuration for the specified SVM. The following example shows a PATCH operation:

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LdapService

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = LdapService(**{"svm.uuid": "179d3c85-7053-11e8-b9b8-005056b41bd1"})
        resource.servers = ["55.55.55.55"]
        resource.schema = "ad_idmu"
        resource.port = 636
        resource.ldaps_enabled = True
        resource.use_start_tls = False
        resource.referral_enabled = False
        resource.restrict_discovery_to_site = False
        resource.patch()

## Deleting an LDAP configuration

The LDAP DELETE endpoint deletes the LDAP configuration for the specified SVM. The following example shows a DELETE operation:

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LdapService

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = LdapService(**{"svm.uuid": "179d3c85-7053-11e8-b9b8-005056b41bd1"})
        resource.delete()

## Classes

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

  Allows interaction with LdapService 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 LdapService 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('LdapService')] = 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 the LDAP configuration of the specified SVM. LDAP can be removed as a source from the ns-switch if LDAP is not used as a source for lookups.

    ### Learn more

    - `DOC /name-services/ldap`

    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 LdapService 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 LDAP configurations for all SVMs.

    ### Related ONTAP commands

    - `ldap show`
    - `ldap check -vserver vs0`
    - `ldap check-ipv6 -vserver vs0`

    ### Important notes

    - The status.code, status.dn_message, status.message, and status.state fields have the same status fields that are returned using the "ldap check" CLI command.
    - Refer to the ipv4 or ipv6 objects available in the status field to get specific information about the code, dn_messages, or message and state information for ipv4 or ipv6.

    ### Learn more

    - `DOC /name-services/ldap`

    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 LDAP configurations for all SVMs.

    ### Related ONTAP commands

    - `ldap show`
    - `ldap check -vserver vs0`
    - `ldap check-ipv6 -vserver vs0`

    ### Important notes

    - The status.code, status.dn_message, status.message, and status.state fields have the same status fields that are returned using the "ldap check" CLI command.
    - Refer to the ipv4 or ipv6 objects available in the status field to get specific information about the code, dn_messages, or message and state information for ipv4 or ipv6.

    ### Learn more

    - `DOC /name-services/ldap`

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

    Updates an LDAP configuration of an SVM.

    ### Important notes

    - Both mandatory and optional parameters of the LDAP configuration can be updated.
    - The LDAP servers and Active Directory domain are mutually exclusive fields. These fields cannot be empty. At any point in time, either the LDAP servers or Active Directory domain must be populated.
    - IPv6 must be enabled if IPv6 family addresses are specified.
      Configuring more than one LDAP server is recommended to avoid a single point of failure. Both FQDNs and IP addresses are supported for the "servers" field. The Active Directory domain or LDAP servers are validated as part of this operation.
      LDAP validation fails in the following scenarios:
    - The server does not have LDAP installed.
    - The server or Active Directory domain is invalid.
    - The server or Active Directory domain is unreachable

    ### Learn more

    - `DOC /name-services/ldap`

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

    Creates an LDAP configuration for an SVM.

    ### Important notes

    - Each SVM can have one LDAP configuration.
    - The LDAP servers and Active Directory domain are mutually exclusive fields. These fields cannot be empty. At any point in time, either the LDAP servers or Active Directory domain must be populated.
    - LDAP configuration with Active Directory domain cannot be created on an admin SVM.
    - IPv6 must be enabled if IPv6 family addresses are specified.

    #### The following parameters are optional:

    - preferred AD servers
    - schema
    - port
    - ldaps_enabled
    - min_bind_level
    - bind_password
    - base_scope
    - use_start_tls
    - session_security
    - referral_enabled
    - bind_as_cifs_server
    - query_timeout
    - user_dn
    - user_scope
    - group_dn
    - group_scope
    - netgroup_dn
    - netgroup_scope
    - netgroup_byhost_dn
    - netgroup_byhost_scope
    - is_netgroup_byhost_enabled
    - group_membership_filter
    - skip_config_validation
    - try_channel_binding
    - restrict_discovery_to_site Configuring more than one LDAP server is recommended to avoid a single point of failure. Both FQDNs and IP addresses are supported for the "servers" field. The Active Directory domain or LDAP servers are validated as part of this operation. LDAP validation fails in the following scenarios:
    - The server does not have LDAP installed.
    - The server or Active Directory domain is invalid.
    - The server or Active Directory domain is unreachable.

    ### Learn more

    - `DOC /name-services/ldap`

    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 the LDAP configuration of the specified SVM. LDAP can be removed as a source from the ns-switch if LDAP is not used as a source for lookups.

    ### Learn more

    - `DOC /name-services/ldap`

    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 LDAP configuration for an SVM. All parameters for the LDAP configuration are displayed by default.

    ### Related ONTAP commands

    - `ldap show`
    - `ldap check -vserver vs0`
    - `ldap check-ipv6 -vserver vs0`

    ### Important notes

    - The status.code, status.dn_message, status.message, and status.state fields have the same status fields that are returned using the "ldap check" CLI command.
    - Refer to the ipv4 or ipv6 objects available in the status field to get specific information about the code, dn_messages, or message and state information for ipv4 or ipv6.

    ### Learn more

    - `DOC /name-services/ldap`

    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 LDAP configuration of an SVM.

    ### Important notes

    - Both mandatory and optional parameters of the LDAP configuration can be updated.
    - The LDAP servers and Active Directory domain are mutually exclusive fields. These fields cannot be empty. At any point in time, either the LDAP servers or Active Directory domain must be populated.
    - IPv6 must be enabled if IPv6 family addresses are specified.
      Configuring more than one LDAP server is recommended to avoid a single point of failure. Both FQDNs and IP addresses are supported for the "servers" field. The Active Directory domain or LDAP servers are validated as part of this operation.
      LDAP validation fails in the following scenarios:
    - The server does not have LDAP installed.
    - The server or Active Directory domain is invalid.
    - The server or Active Directory domain is unreachable

    ### Learn more

    - `DOC /name-services/ldap`

    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 an LDAP configuration for an SVM.

    ### Important notes

    - Each SVM can have one LDAP configuration.
    - The LDAP servers and Active Directory domain are mutually exclusive fields. These fields cannot be empty. At any point in time, either the LDAP servers or Active Directory domain must be populated.
    - LDAP configuration with Active Directory domain cannot be created on an admin SVM.
    - IPv6 must be enabled if IPv6 family addresses are specified.

    #### The following parameters are optional:

    - preferred AD servers
    - schema
    - port
    - ldaps_enabled
    - min_bind_level
    - bind_password
    - base_scope
    - use_start_tls
    - session_security
    - referral_enabled
    - bind_as_cifs_server
    - query_timeout
    - user_dn
    - user_scope
    - group_dn
    - group_scope
    - netgroup_dn
    - netgroup_scope
    - netgroup_byhost_dn
    - netgroup_byhost_scope
    - is_netgroup_byhost_enabled
    - group_membership_filter
    - skip_config_validation
    - try_channel_binding
    - restrict_discovery_to_site Configuring more than one LDAP server is recommended to avoid a single point of failure. Both FQDNs and IP addresses are supported for the "servers" field. The Active Directory domain or LDAP servers are validated as part of this operation. LDAP validation fails in the following scenarios:
    - The server does not have LDAP installed.
    - The server or Active Directory domain is invalid.
    - The server or Active Directory domain is unreachable.

    ### Learn more

    - `DOC /name-services/ldap`

    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 LdapServiceSchema (*, 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 LdapService object

  ### Ancestors

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

  ### Class variables

  `ad_domain: str GET POST PATCH`

    This parameter specifies the name of the Active Directory domain used to discover LDAP servers for use by this client. This is mutually exclusive with `servers` during POST and PATCH.

    Example: example.com

  `base_dn: str GET POST PATCH`

    Specifies the default base DN for all searches.

    Example: dc=domainB,dc=example,dc=com

  `base_scope: str GET POST PATCH`

    Specifies the default search scope for LDAP queries:

    - base - search the named entry only
    - onelevel - search all entries immediately below the DN
    - subtree - search the named DN entry and the entire subtree below the DN

    Valid choices:

    - base
    - onelevel
    - subtree
  `bind_as_cifs_server: bool GET POST PATCH`

    Specifies whether or not CIFS server's credentials are used to bind to the LDAP server.

  `bind_dn: str GET POST PATCH`

    Specifies the user that binds to the LDAP servers.

    Example: cn=Administrators,cn=users,dc=domainB,dc=example,dc=com

  `bind_password: str POST PATCH`

    Specifies the bind password for the LDAP servers.

    Example: abc

  `group_dn: str GET POST PATCH`

    Specifies the group Distinguished Name (DN) that is used as the starting point in the LDAP directory tree for group lookups.

    Example: cn=abc,users,dc=com

  `group_membership_filter: str GET POST PATCH`

    Specifies the custom filter used for group membership lookups from an LDAP server.

    Example:

  `group_scope: str GET POST PATCH`

    Specifies the default search scope for LDAP for group lookups:

    - base - search the named entry only
    - onelevel - search all entries immediately below the DN
    - subtree - search the named DN entry and the entire subtree below the DN

    Valid choices:

    - base
    - onelevel
    - subtree
  `is_netgroup_byhost_enabled: bool GET POST PATCH`

    Specifies whether or not netgroup by host querying is enabled.

  `is_owner: bool GET`

    Specifies whether or not the SVM owns the LDAP client configuration.

  `ldaps_enabled: bool GET POST PATCH`

    Specifies whether or not LDAPS is enabled.

  `links: SelfLink GET`

    The links field of the ldap_service.

  `min_bind_level: str GET POST PATCH`

    The minimum bind authentication level. Possible values are:

    - anonymous - anonymous bind
    - simple - simple bind
    - sasl - Simple Authentication and Security Layer (SASL) bind

    Valid choices:

    - anonymous
    - simple
    - sasl
  `netgroup_byhost_dn: str GET POST PATCH`

    Specifies the netgroup Distinguished Name (DN) that is used as the starting point in the LDAP directory tree for netgroup by host lookups.

    Example: cn=abc,users,dc=com

  `netgroup_byhost_scope: str GET POST PATCH`

    Specifies the default search scope for LDAP for netgroup by host lookups:

    - base - search the named entry only
    - onelevel - search all entries immediately below the DN
    - subtree - search the named DN entry and the entire subtree below the DN

    Valid choices:

    - base
    - onelevel
    - subtree
  `netgroup_dn: str GET POST PATCH`

    Specifies the netgroup Distinguished Name (DN) that is used as the starting point in the LDAP directory tree for netgroup lookups.

    Example: cn=abc,users,dc=com

  `netgroup_scope: str GET POST PATCH`

    Specifies the default search scope for LDAP for netgroup lookups:

    - base - search the named entry only
    - onelevel - search all entries immediately below the DN
    - subtree - search the named DN entry and the entire subtree below the DN

    Valid choices:

    - base
    - onelevel
    - subtree
  `port: Size GET POST PATCH`

    The port used to connect to the LDAP Servers.

    Example: 389

  `preferred_ad_servers: List[str] GET POST PATCH`

    The preferred_ad_servers field of the ldap_service.

  `query_timeout: Size GET POST PATCH`

    Specifies the maximum time to wait for a query response from the LDAP server, in seconds.

  `referral_enabled: bool GET POST PATCH`

    Specifies whether or not LDAP referral is enabled.

  `restrict_discovery_to_site: bool GET POST PATCH`

    Specifies whether or not LDAP server discovery is restricted to site-scope.

  `schema: str GET POST PATCH`

    The name of the schema template used by the SVM.

    - AD-IDMU - Active Directory Identity Management for UNIX
    - AD-SFU - Active Directory Services for UNIX
    - MS-AD-BIS - Active Directory Identity Management for UNIX
    - RFC-2307 - Schema based on RFC 2307
    - Custom schema

    Example: ad_idmu

  `servers: List[str] GET POST PATCH`

    The servers field of the ldap_service.

  `session_security: str GET POST PATCH`

    Specifies the level of security to be used for LDAP communications:

    - none - no signing or sealing
    - sign - sign LDAP traffic
    - seal - seal and sign LDAP traffic

    Valid choices:

    - none
    - sign
    - seal
  `skip_config_validation: bool POST PATCH`

    Indicates whether or not the validation for the specified LDAP configuration is disabled.

  `status: LdapStatus GET`

    The status field of the ldap_service.

  `svm: Svm GET POST`

    The svm field of the ldap_service.

  `try_channel_binding: bool GET POST PATCH`

    Specifies whether or not channel binding is attempted in the case of TLS/LDAPS.

  `use_start_tls: bool GET POST PATCH`

    Specifies whether or not to use Start TLS over LDAP connections.

  `user_dn: str GET POST PATCH`

    Specifies the user Distinguished Name (DN) that is used as the starting point in the LDAP directory tree for user lookups.

    Example: cn=abc,users,dc=com

  `user_scope: str GET POST PATCH`

    Specifies the default search scope for LDAP for user lookups:

    - base - search the named entry only
    - onelevel - search all entries immediately below the DN
    - subtree - search the named DN entry and the entire subtree below the DN

    Valid choices:

    - base
    - onelevel
    - subtree