Database

Databases are databases that reside within database instances. This class inherits from TopLevelResource and has direct access to the resource’s database object. The following attributes are directly accessible:

attr resource_id:
 The provider id of this database
attr organization_service_id:
 The ID of the parent organization service (cloud)
attr region_name:
 The region that the database resides in
attr database_id:
 The provider ID of the database
attr name:The name of the database
attr instance_resource_id:
 The provider ID of the associated instance
attr collation:The implemented collation set for the database
attr character_set:
 The character set of the datbase
class DivvyResource.Resources.database.Database(resource_id)

Bases: DivvyResource.Resources.toplevelresource.TopLevelResource

Database operations

database
delete(user_resource_id=None)
Delete this resource. If wrapped in a with JobQueue() block, this will queue the deletion job to the wrapped queue, otherwise it
calls immediately.
static get_db_class()
static get_provider_id_field()
static get_resource_type()
get_state()

Retrieve the route state

get_supported_actions()
handle_resource_created(user_resource_id=None, project_resource_id=None)

This should be called when a resource is created/discovered after the basic data is added to the database. This gives an opportunity for post-addition hooks (assignment to groups, alerts, etc)