Import

Imports a new map entry, or individual map record, with the specified key into Active Directory.

Syntax

Entry Import(string key, string value, string comment);

Parameters

Specify the following parameters when using this method.

Parameter Description

key

The key field that uniquely defines this entry in the NIS map.

value

The value associated with the key field for this entry in the NIS map.

comment

Any optional text string to store in the comment field for this entry in the NIS map.

Return value

An entry object for the map entry imported.

Discussion

The difference between the Import and Add methods is that the Import method performs minimal checking and validation of data to maximize performance.

Exceptions

Import throws an ApplicationException if the key or value is invalid.

Example

The following code sample illustrates using Import to retrieve an existing NIS map entry from a specific map.

...
'Specify the zone you want to work with
set zone = cims.GetZoneByPath("LDAP://CN=qa-slovenia,CN=unix,DC=quantum,DC=net")
'Create the Store object
Set store = CreateObject("Centrify.DirectControl.Nis.Store")
'Attach to the target zone.
'Provide the path to the zone and user credentials (username and 'password).
store.Attach zone.ADsPath, "jae.smith", "pas$w0rd"
'Open the NIS map named "Remote servers"
Set map = store.open("Remote servers")
'Add an entry to the "Remote servers" NIS map. The input format is:
map.import "oaxaca", "127.67.32.10", "Latin America Support office"
...