Kalm¶
Client¶
-
class
Kalm.
Client
¶ A client object representing ‘Kalm’ Service:
import almdrlib client = almdrlib.client('kalm')
Available methods:
-
get_account_named_queries
(**kwargs)¶ Returns list of named queries
Request Syntax
response = client.get_account_named_queries( account_id='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
- Return type
list
- Returns
Response Syntax
[ { 'description': 'string', 'key_spec': [ { 'description': 'string', 'key': 'string', 'type': 'string' } ], 'name': 'string' } ]
Response Definitions
(dict) –
description (string) –
key_spec (list) –
(dict) –
description (string) –
key (string) –
type (string) –
name (string) –
-
get_account_named_query
(**kwargs)¶ Returns named query
Request Syntax
response = client.get_account_named_query( account_id='string' query_name='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
query_name (string) –
[REQUIRED]
Named query name
- Return type
dict
- Returns
Response Syntax
{ 'description': 'string', 'key_spec': [ { 'description': 'string', 'key': 'string', 'type': 'string' } ], 'name': 'string' }
Response Definitions
description (string) –
key_spec (list) –
(dict) –
description (string) –
key (string) –
type (string) –
name (string) –
-
get_account_named_table
(**kwargs)¶ Returns table
Request Syntax
response = client.get_account_named_table( account_id='string' table_name='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
table_name (string) –
[REQUIRED]
Table name
- Return type
dict
- Returns
Response Syntax
{ 'columns': {}, 'name': 'string' }
Response Definitions
columns (dict) –
name (string) –
-
get_account_named_tables
(**kwargs)¶ Returns list of available tables.
Request Syntax
response = client.get_account_named_tables( account_id='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
- Return type
list
- Returns
Response Syntax
[ { 'columns': {}, 'name': 'string' } ]
Response Definitions
(dict) –
columns (dict) –
name (string) –
-
run_named_or_table_query
(**kwargs)¶ Runs query and returns query results for named query or existing table. For named queries additional query parameters with a single value each can be passed. If the parameter is not passed then its key is considered as
NULL
Request Syntax
response = client.run_named_or_table_query( account_id='string' managed_accounts='string' named_or_table_query='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
managed_accounts (string) –
A query parameter defining whether return query data for all managed accounts for specified account-id. Possible values:
true
- return data for account-id and its managed accountschildren_only
- return data for managed accounts onlyfalse
- return data for specified account-id only Default value:false
named_or_table_query (string) –
[REQUIRED]
Named query or existing table name
- Return type
dict
- Returns
Response Syntax
{ 'column_info': [ { 'name': 'string', 'type': 'string' } ], 'rows': [ [ 'string' ] ] }
Response Definitions
column_info (list) –
(dict) –
name (string) –
type (string) –
rows (list) –
(list) –
(string) –