probator.schema.
ResourceType
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
Resource type object
get
(resource_type)¶Returns the ResourceType object for resource_type. If no existing object was found, a new type will be created in the database and returned
Parameters: | resource_type (str, int, ResourceType) – Resource type name |
---|---|
Returns: | ResourceType |
probator.schema.
ResourceProperty
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
Resource Property object
probator.schema.
Resource
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
Resource object
resource_id
¶Unique Resource identifier
Type: | str |
---|
account_id
¶ID of the account owning the resource
Type: | int |
---|
location
¶Optional location of the resource (eg. aws region)
Type: | str, optional |
---|
created
¶Time the resource was created
Type: | datetime |
---|
updated
¶Time the resource was last updated
Type: | datetime |
---|
resource_type
¶ResourceType
reference
Type: | str |
---|
List of tags applied to the volume
Type: | list of Tag |
---|
properties
¶List of properties of the resource
Type: | list of ResourceProperty |
---|
probator.schema.
ResourceMapping
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
Mapping resource relationships (parent/child)
Warning
This object should never be accessed directly, it should only be updated by SQLAlchemy
probator.schema.
BaseModelMixin
(**kwargs)¶Bases: probator.schema.base.BaseModelMixin
Mixin class for Model object’s to expose some common functionality
probator.schema.
Account
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
probator.schema.
Tag
(resource_id=None, key=None, value=None)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
Tag object
created
¶The first time this tag was defined
Type: | datetime |
---|
probator.schema.
LogEvent
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
Log Event object
timestamp
¶Timestamp for log event
Type: | datetime |
---|
probator.schema.
Email
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
Email object
timestamp
¶Timestamp when the email was sent
Type: | datetime |
---|
recipients
¶List of recipients
Type: | list of str |
---|
probator.schema.
ConfigNamespace
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
Configuration Namespace object
config_items
¶List of configuration items for the namespace
Type: | list of ConfigItem |
---|
probator.schema.
ConfigItem
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
Configuration Item object
probator.schema.
Role
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
User role object
probator.schema.
User
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
User object
add_role
(user, roles)¶Map roles for user in database
Parameters: | |
---|---|
Returns: | None |
from_json
(data)¶Return object based on JSON / dict input
Parameters: | data (dict) – Dictionary containing a serialized User object |
---|---|
Returns: | User object representing the data |
Return type: | User |
to_json
()¶Exports the object to a JSON friendly dict
This method uses the base to_json method, but strips the password from the response
Returns: | dict |
---|
probator.schema.
UserRole
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
User to role mapping object
Warning
This object should never be accessed directly, it should only be updated by SQLAlchemy
probator.schema.
AuditLog
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
Audit Log Event
timestamp
¶Timestamp for the event
Type: | datetime |
---|
probator.schema.
SchedulerBatch
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
probator.schema.
SchedulerJob
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
probator.schema.
IssueTypeModel
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
Issue type object
probator.schema.
IssuePropertyModel
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
Issue Property object
probator.schema.
IssueModel
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
Issue object
created
¶Issue creation time
Type: | datetime |
---|
updated
¶Last time the issue was updated
Type: | datetime |
---|
properties
¶List of properties of the issue
Type: | list of IssueProperty |
---|
probator.schema.
Template
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
probator.schema.
AccountType
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
probator.schema.
AccountProperty
(data=None, **kargs)¶Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
probator.schema.
Account
(data=None, **kargs)Bases: sqlservice.model.ModelBase
, sqlalchemy.ext.declarative.api.BaseModelMixin
get
(account_id, account_type_id=None)Return account by ID and type
Parameters: |
|
---|---|
Returns: | Returns an Account object if found, else None |
Return type: |
user_has_access
(user)Check if a user has access to view information for the account
Parameters: | user (User ) – User object to check |
---|---|
Returns: | True if user has access to the account, else false |