Skip to content

Commit

Permalink
* Add RdsOptionGroup class
Browse files Browse the repository at this point in the history
Signed-off-by: Alina Buzachis <[email protected]>
  • Loading branch information
alinabuzachis committed Apr 26, 2021
1 parent dca8095 commit e53bf89
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions aws/terminator/data_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,24 @@ def created_time(self):

def terminate(self):
self.client.delete_cluster(ClusterIdentifier=self.id, SkipFinalClusterSnapshot=True)


class RdsOptionGroup(DbTerminator):
@staticmethod
def create(credentials):
return Terminator._create(credentials, RdsOptionGroup, 'rds', lambda client: client.describe_option_groups()['OptionGroupsList'])

@property
def id(self):
return self.instance['OptionGroupArn']

@property
def name(self):
return self.instance['OptionGroupName']

@property
def ignore(self):
return not self.name.startswith('default')

def terminate(self):
self.client.delete_option_group(OptionGroupName=self.name)

0 comments on commit e53bf89

Please sign in to comment.