Method GetCredential
- Namespace
- Skyline.DataMiner.Automation
- Assembly
- SLManagedAutomation.dll
GetCredential(string)
Retrieves a set of credentials declared by this automation script from the Credentials Library.
public ScriptCredential GetCredential(string name)
Parameters
namestringThe name used to refer to the credentials in the script XML. The lookup is case insensitive.
Returns
- ScriptCredential
The set of credentials or null if the script does not declare a set of credentials with the specified name.
Examples
ScriptCredential credential = engine.GetCredential("myCredential");
Remarks
The values of the set of credentials are retrieved from the Credentials Library each time this method is called, so they are never cached.
For more information about credentials in Automation, refer to Creating a credential.
note
Available from DataMiner 10.6.10/10.7.0 onwards.
GetCredential(int)
Retrieves a set of credentials declared by this automation script from the Credentials Library.
public ScriptCredential GetCredential(int id)
Parameters
idintThe ID used to refer to the credentials in the script XML.
Returns
- ScriptCredential
The set of credentials or null if the script does not declare a set of credentials with the specified ID.
Examples
ScriptCredential credential = engine.GetCredential(1);
Remarks
The values of the set of credentials are retrieved from the Credentials Library each time this method is called, so they are never cached.
For more information about credentials in Automation, refer to Creating a credential.
note
Available from DataMiner 10.6.10/10.7.0 onwards.