Database Instance
Database Instances are managed systems with one or more relational database management software installed. Examples of this would be AWS RDS, Azure SQL and Google Cloud SQL. This class inherits from TopLevelResource and has direct access to the resource’s database object.
Attribute |
Description |
---|---|
resource_id |
The primary resource identifier that takes the form of a prefix followed by numbers and letters |
organization_service_id |
The ID of the parent organization service (cloud) |
region_name |
The region that the instance resides in |
instance_id |
The provider ID of the instance |
name |
The name of the instance |
instance_type |
The type of instance |
instance_flavor_resource_id |
The resource ID of the type (flavor) this is instance runs on |
state |
The state that the instance is in |
endpoint_address |
The FQDN of the instance |
endpoint_port |
The port that the instance listens on |
engine |
The engine that the database uses, e.g., mysql |
engine_version |
The install version of the engine |
storage_size |
The size in gigabytes allocated to the instance |
storage_type |
The storage type that is used |
db_name |
The name of the master database |
backup_retention |
An integer representing the number of days that automatic snapshots are retained for |
license |
The type of license associated with this instance |
multi_az |
Flags whether or not this system is set up for high availability and is distributed across multiple zones |
create_time |
The time this instance was created |
master_username |
The username of the master user |
encrypted |
Denotes if the data stored on the instance is encrypted |
publicly_accessible |
Denotes if the instance can be accessed over the Internet |
access_lists |
Returns a list of associated security groups |
snapshots |
Returns a list of snapshots that are associated with this instance |
databases |
Returns a list of databases that are active on the instance |
instance_flavor |
Returns a flavor object which contains information on the size of the instance |
Database Instance Operations
db_instance
delete(wait_for_result=True, user_resource_id=None)
get_date_created()
static get_db_class()
get_instance_type()
static get_provider_id_field()
static get_resource_type()
get_snapshots()
get_state()
get_supported_actions()
handle_resource_created(user_resource_id=None, project_resource_id=None)
handle_resource_destroyed(user_resource_id=None)
handle_resource_modified(resource, *args, **kwargs)
top_level_resource = True