Tm1Database
using Skipcheck.Tm1.Testcontainers; A database of a Tm1EngineContainer: what a test of TM1 v12 uses.
An engine holds instances, and an instance holds databases. The REST API of one
database is at RestUrl; a user logs in to its instance
(Login), and the session serves every database there.
Members
Engine property | The engine this database is in. |
Instance property | The instance this database is in; tm1 unless one was named. |
Name property | The database's name. |
RestUrl property | The REST API's service root as seen from the host, ending in /, e.g. |
Version property | The version of TM1 the engine runs. |
Login | A login as admin, the administrator every database has. |
Login | A login as user. |
OAuth2Login | A login through OAuth 2.0. |
PassThroughLogin | A pass-through login as the TM1 11 server's own user (Tm1ServerContainer.Username). |
PassThroughLogin | A pass-through login as a user whose password the containers know. |
PassThroughLogin | A pass-through login with a name and password of your own. |
PassThroughLoginWith | A pass-through login with an Authorization header of your own, which TM1 v12 passes on as it is. |
Equals | |
Equals | |
GetHashCode | |
ToString |
Engine
propertyTm1EngineContainer EngineThe engine this database is in.
Instance
propertystring InstanceThe instance this database is in; tm1 unless one was named.
Name
propertystring NameThe database's name.
RestUrl
propertystring RestUrlThe REST API's service root as seen from the host, ending in /, e.g.
http://localhost:54321/tm1/api/v1/Databases('planning')/.
Version
propertyTm1Version VersionThe version of TM1 the engine runs. Only available once it has started.
Throws
InvalidOperationException- The engine isn't started.
Login
Tm1Login Login()A login as admin, the administrator every database has.
Login
Tm1Login Login(string user)A login as user. TM1 makes a session for any name; a user who isn't
in this database is then refused here (403).
OAuth2Login
Tm1Login OAuth2Login(string user)A login through OAuth 2.0: as a user the engine's Keycloak knows the password of
(Tm1EngineContainer.WithLogin). The login gets a token from Keycloak with that password and sends
it to TM1, as a program acting for the user would. It can be made before the engine has started.
Throws
InvalidOperationException- The engine has no
Tm1EngineContainer.WithOAuth2. ArgumentException- The user has no password.
PassThroughLogin
Tm1Login PassThroughLogin()A pass-through login as the TM1 11 server's own user (Tm1ServerContainer.Username): the
administrator of a server with its own users, or the first administrator of one in Cognos (CAM) security. The
login sends TM1 v12 what that server takes, and TM1 v12 asks it who that is.
Returns
- The login.
Throws
InvalidOperationException- The engine has no
Tm1EngineContainer.WithPassThrough.
PassThroughLogin
Tm1Login PassThroughLogin(string user)A pass-through login as a user whose password the containers know: one of Cognos's test users when the TM1 11 server is in CAM security, and otherwise that server's own user only.
Parameters
user- The user's name on the TM1 11 server, or in Cognos.
Returns
- The login.
Throws
InvalidOperationException- The engine has no
Tm1EngineContainer.WithPassThrough. ArgumentException- The user's password isn't known.
PassThroughLogin
Tm1Login PassThroughLogin(string user, string password)A pass-through login with a name and password of your own: a user you created on the TM1 11 server, or
a wrong password to see refused. They go as Basic, or as CAMNamespace when the server is in CAM
security.
Parameters
user- The user's name on the TM1 11 server, or in Cognos.
password- The password.
Returns
- The login.
Throws
InvalidOperationException- The engine has no
Tm1EngineContainer.WithPassThrough.
PassThroughLoginWith
Tm1Login PassThroughLoginWith(string authorization)A pass-through login with an Authorization header of your own, which TM1 v12 passes on as it is:
"CAMPassport " + passport from a Cognos logon, say.
Parameters
authorization- The header's value.
Returns
- The login, with no user name or password.
Throws
InvalidOperationException- The engine has no
Tm1EngineContainer.WithPassThrough.
Equals
bool Equals(Tm1Database? other)Equals
bool Equals(object? obj)GetHashCode
int GetHashCode()ToString
string ToString()