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

# Module `netapp_ontap.resources.local_cifs_users_and_groups_import`

Copyright © 2026 NetApp Inc. All rights reserved.

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

## Overview

Bulk import of the CIFS local users, groups and group membership information can be done from the specified Uniform Resource Identifier (URI). This replaces the existing contents of the CIFS local users, groups and group memberships. This API is used to bulk import from the specified URI, get the status of the last import and to upload the import status to the specified URI.

## Retrieving import status of the last bulk import

The bulk-import GET endpoint retrieves the status of the last bulk-import operation of the specified SVM.

## Examples

### Retrieving the status of a successful bulk import

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LocalCifsUsersAndGroupsImport

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = LocalCifsUsersAndGroupsImport("6de1d39d-1473-11ec-b0cf-0050568e4acc")
        resource.get()
        print(resource)

Try it out

    LocalCifsUsersAndGroupsImport(
        {
            "elements_ignored": 0,
            "_links": {
                "self": {
                    "href": "/api/protocols/cifs/users-and-groups/import/6de1d39d-1473-11ec-b0cf-0050568e4acc"
                }
            },
            "state": "success",
            "detailed_status": {
                "message": "Operation completed successfully.",
                "code": "0",
            },
            "import_uri": {"path": "http://<import_uri>/file.7z"},
            "elements_imported": 2,
            "svm": {
                "name": "vs1",
                "_links": {
                    "self": {"href": "/api/svm/svms/6de1d39d-1473-11ec-b0cf-0050568e4acc"}
                },
                "uuid": "6de1d39d-1473-11ec-b0cf-0050568e4acc",
            },
        }
    )

### Retrieving the status of a bulk import that failed

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LocalCifsUsersAndGroupsImport

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = LocalCifsUsersAndGroupsImport("6de1d39d-1473-11ec-b0cf-0050568e4acc")
        resource.get()
        print(resource)

Try it out

    LocalCifsUsersAndGroupsImport(
        {
            "elements_ignored": 0,
            "_links": {
                "self": {
                    "href": "/api/protocols/cifs/users-and-groups/import/6de1d39d-1473-11ec-b0cf-0050568e4acc"
                }
            },
            "state": "success",
            "detailed_status": {
                "message": "Failed parsing line 1 of the input file. Check syntax and contents.",
                "code": "655698",
            },
            "import_uri": {"path": "http://<import_uri>/file.7z"},
            "elements_imported": 0,
            "svm": {
                "name": "vs1",
                "_links": {
                    "self": {"href": "/api/svm/svms/6de1d39d-1473-11ec-b0cf-0050568e4acc"}
                },
                "uuid": "6de1d39d-1473-11ec-b0cf-0050568e4acc",
            },
        }
    )

## Retrieving bulk import information for CIFS local users, groups, and group memberships

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LocalCifsUsersAndGroupsImport

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = LocalCifsUsersAndGroupsImport("6de1d39d-1473-11ec-b0cf-0050568e4acc")
        resource.import_uri.username = "user1"
        resource.import_uri.password = "aaaa"
        resource.decryption_password = "cccc"
        resource.import_uri.path = "http://example.com/file1.7z"
        resource.post(hydrate=True)
        print(resource)

Try it out

    LocalCifsUsersAndGroupsImport(
        {
            "import_uri": {
                "password": "aaaa",
                "username": "user1",
                "path": "http://example.com/file1.7z",
            },
            "decryption_password": "cccc",
        }
    )

## Retrieving status upload information of the last import operation for the specified URI

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import LocalCifsUsersAndGroupsImport

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = LocalCifsUsersAndGroupsImport("6de1d39d-1473-11ec-b0cf-0050568e4acc")
        resource.status_uri.username = "user1"
        resource.status_uri.password = "aaaa"
        resource.status_uri.path = "http://example.com/fileupload.7z"
        resource.patch()

## Classes

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

  Allows interaction with LocalCifsUsersAndGroupsImport 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

  ### Methods

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

    Retrieves information about the import operation status of the CIFS local users, groups, and group memberships.

    ### Related ONTAP commands

    - `vserver cifs users-and-groups import get-status`

    ### Learn more

    - `DOC /protocols/cifs/users-and-groups/bulk-import/{svm.uuid}`

    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`

    Upload the status of the bulk-import of the specified SVM to the specified URI.

    ### Important notes

    - Only the status of the last bulk-import will be uploaded and not the status of the previous bulk-imports.

    ### Required properties

    - status_uri.path - URI to which the status needs to be uploaded.

    ### Optional properties

    - status_uri.username - Username of the specified URI.
    - status_uri.password - Password of the specified URI.

    ### Related ONTAP commands

    - `vserver cifs users-and-groups import get-status`

    ### Learn more

    - `DOC /protocols/cifs/users-and-groups/bulk-import/{svm.uuid}`

    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`

    Loads CIFS local users,groups and group memberships file from the specified URL.

    ### Important notes

    Existing CIFS local users, groups, and group memberships will be replaced with the contents of the file.

    ### Required properties

    - import_uri.path
    - decryption_password

    ### Optional properties

    - import_uri.username
    - import_uri.password

    ### Related ONTAP commands

    - `vserver cifs users-and-groups import load-from-uri`

    ### Learn more

    - `DOC /protocols/cifs/users-and-groups/bulk-import/{svm.uuid}`

    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 LocalCifsUsersAndGroupsImportSchema (*, 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 LocalCifsUsersAndGroupsImport object

  ### Ancestors

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

  ### Class variables

  `decryption_password: str POST`

    Password to decrypt the compressed file.

  `detailed_status: DetailedStatusCodeMessage GET`

    The detailed_status field of the local_cifs_users_and_groups_import.

  `elements_ignored: Size GET`

    Number of elements ignored.

  `elements_imported: Size GET`

    Number of elements successfully imported.

  `import_uri: UniformResourceIdentifier GET POST`

    The import_uri field of the local_cifs_users_and_groups_import.

  `links: SelfLink GET`

    The links field of the local_cifs_users_and_groups_import.

  `state: str GET`

    Operation status.

    Valid choices:

    - failed
    - success
    - success_with_warnings
    - in_progress
    - unknown
  `status_uri: UniformResourceIdentifier PATCH`

    The status_uri field of the local_cifs_users_and_groups_import.

  `svm: Svm GET`

    The svm field of the local_cifs_users_and_groups_import.