N/keyControl Module
Use the N/keyControl module to use SSH keys and access key storage. You can also access keys in the UI at Setup > Company > Preferences > Keys.
By using the SSH keys, you can manage files and directories by using the SSH file transfer (SFTP) protocol. For more information, see SSH Keys for SFTP. For more information about SFTP, see N/sftp Module.
In This Help Topic
N/keyControl Module Members
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Object |
Object |
Server scripts |
Represents the key object. |
|
Method |
Object |
Server scripts |
Searches and returns a list of keys based on criteria set. If no options are set for criteria, the full list of keys stored in NetSuite is returned. |
|
Server scripts |
Creates a key. |
|||
Object |
Server scripts |
Marks the key as deleted in database. The history is retained. |
||
Server scripts |
Loads a key. |
|||
string |
Server scripts |
Locks a key so that it cannot be edited in the UI. |
||
string |
Server scripts |
Unlocks a key that has been locked by keyControl.lock(options). |
||
Enum |
enum |
Server scripts |
Holds the values for the key operators of keyControl.findKeys(options). |
Key Object Members
The following members are called on the keyControl.Key object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
Server scripts |
File object of the key. |
||
string |
Server scripts |
Password of the key (write-only). You can create a GUID using Form.addSecretKeyField(options). This property also accepts the script ID of an API secret stored at Setup > Company > API Secrets. |
||
string |
Server scripts |
Script ID of the key. NetSuite prepends this ID with |
||
string |
Server scripts |
Name of the key. |
||
string |
Server scripts |
Description of the key. |
||
string |
Server scripts |
The internal IDs of the employees selected in the Restrict to Employees field of the key record. |
||
Method |
Object |
Server scripts |
Saves the key. |