To use this function add it to the class library file named OrchestratorPluginSQLService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: OrchestratorPluginSQLService.ts
Description: Orchestrator Function to Update an SQL Database
Public Function: SQLDatabaseUpdate
public SQLDatabaseUpdate(objSQLDatabase: SQLDatabase, strName: string, strType: string, strConnectionURL: string, strUusername: string, strPassword: string, strSessionMode: string): SQLDatabase {
try {
objSQLDatabase = SQLDatabaseManager.getDatabaseById(objSQLDatabase.id);
objSQLDatabase.name = strName;
objSQLDatabase.type = strType;
objSQLDatabase.connectionURL = strConnectionURL;
objSQLDatabase.username = strUusername;
objSQLDatabase.password = strPassword;
objSQLDatabase.sessionMode = strSessionMode;
objSQLDatabase = SQLDatabaseManager.updateDatabase(objSQLDatabase);
this.objLogger.info(`SQLDatabase Update of: ${objSQLDatabase} Successfull.`);
}
catch (objException) {
this.objLogger.info(`SQLDatabase Update of: ${objSQLDatabase} Failed.`);
}
return objSQLDatabase;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
