tcITResourceInstanceOperationsIntf service

Lookup

tcITResourceInstanceOperationsIntf operations = oimClient.getService(tcITResourceInstanceOperationsIntf.class);
Map<String, String> conditions = new HashMap<String, String>();
conditions.put("IT Resources.Name", "Directory Server");
tcResultSet resultSet = operations.findITResourceInstances(conditions);

returns

IT Resources Type Parameter.Key=17
IT Resources Type Parameter.Name=Abandoned connection timeout
IT Resource Type Definition.IT Resource Type Parametr.Default Value=
IT Resources Type Parameter.Encrypted=0
IT Resource.Parameter.Key=6
IT Resource.Parameter.Value=600

IT Resources Type Parameter.Key=15
IT Resources Type Parameter.Name=Admin Login
IT Resource Type Definition.IT Resource Type Parametr.Default Value=
IT Resources Type Parameter.Encrypted=0
IT Resource.Parameter.Key=4
IT Resource.Parameter.Value=
...

Create

Create a new ITResource instance of "Database" type (key=3 in the example installation)

Map attributes = new HashMap();
attributes.put("svr_name", "MyITResource");
attributes.put("svd_key", "3");
 
long key = service.createITResourceInstance(attributes);
 
Map parameters = new HashMap();    
parameters.put("DatabaseName", "mydb");
parameters.put("Driver", "com.mysql.jdbc.Driver");
parameters.put("Password", "secret");
parameters.put("URL", "jdbc:mysql://localhost:3306/mydb?useUnicode=true&characterEncoding=UTF-8&characterSetResults=utf8");
parameters.put("UserID", "someuser");
service.updateITResourceInstanceParameters(key, parameters);

Modify parameters

Modify parameters of an existing ITResource instance with the key 12345

Map parameters = new HashMap();    
parameters.put("DatabaseName", "mydb");
parameters.put("Driver", "com.mysql.jdbc.Driver");
parameters.put("Password", "secret");
parameters.put("URL", "jdbc:mysql://localhost:3306/mydb?useUnicode=true&characterEncoding=UTF-8&characterSetResults=utf8");
parameters.put("UserID", "someuser");
service.updateITResourceInstanceParameters(12345L, parameters);

Delete

Delete the IT Resource with key 2

long key = 2L;
service.deleteITResourceInstance(key);
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License