pcf.particle.aws.rds package

Submodules

pcf.particle.aws.rds.rds_instance module

class pcf.particle.aws.rds.rds_instance.RDS(particle_definition, session=None)

Bases: pcf.core.aws_resource.AWSResource

Particle that maps to AWS RDS Instance.

Required Parameters:

Parameters:
  • DBInstanceIdentifier (string) – The DB instance identifier.
  • DBInstanceClass (string) – The compute and memory capacity of the DB instance, for example, db.m4.large .
  • Engine (string) – The name of the database engine to be used for this instance.
START_PARAM_FILTER = {'AllocatedStorage', 'AvailabilityZone', 'BackupRetentionPeriod', 'DBInstanceClass', 'DBInstanceIdentifier', 'DBName', 'DBParameterGroupName', 'DBSubnetGroupName', 'Engine', 'EngineVersion', 'KmsKeyId', 'MasterUserPassword', 'MasterUsername', 'MultiAZ', 'Port', 'StorageEncrypted', 'Tags', 'VpcSecurityGroupIds'}
UNIQUE_KEYS = ['aws_resource.DBInstanceIdentifier']
UPDATE_PARAM_FILTER = {'AllocatedStorage', 'ApplyImmediately', 'BackupRetentionPeriod', 'DBInstanceClass', 'DBInstanceIdentifier', 'EngineVersion'}
_set_unique_keys()

Logic that sets keys from state definition that are used to uniquely identify the RDS Instance

_start()

starts the stopped rds instance that matches current state definition

Returns:response of boto3 start rds instance with action start_db_instance.
_stop()

Stops the rds instance that matches current state definition

Returns:response of boto3 stop rds instance with action stop_db_instance.
_terminate()

Deletes the rds instance that matches current state definition

Returns:response of boto3 terminate resource rds instance with action delete_db_instance.
_update()

Updates the rds instance that matches current state definition

Returns:response of boto3 change rds instance with modify_db_instance.
create()

Creates the rds instance that matches current state definition

Returns:response of boto3 create rds instance with action create_db_instance.
flavor = 'rds_instance'
get_status()

Get the current status of your rds instance.

Returns:status of rds instance.
is_state_definition_equivalent()

Determines if the current state definition matches the desired state definition.

Returns:bool
state_lookup = {'available': <State.running: 1>, 'backing-up': <State.pending: 4>, 'creating': <State.pending: 4>, 'deleting': <State.pending: 4>, 'maintenance': <State.pending: 4>, 'missing': <State.terminated: 3>, 'modifying': <State.pending: 4>, 'rebooting': <State.pending: 4>, 'renaming': <State.pending: 4>, 'resetting-master-credentials': <State.pending: 4>, 'starting': <State.pending: 4>, 'stopped': <State.stopped: 2>, 'stopping': <State.pending: 4>, 'upgrading': <State.pending: 4>}
sync_state()

Sync state calls get_status to determines and set the state of the rds instance particle.

Module contents