labpack/platforms/aws/rds.py
def delete_instance(self, instance_id):

        '''
            method for removing a db instance from AWS EC2

        :param instance_id: string of instance id on AWS
        :return: string reporting state of instance
        '''

        title = '%s.delete_instance' % self.__class__.__name__

    # # validate inputs
    #     input_fields = {
    #         'instance_id': instance_id
    #     }
    #     for key, value in input_fields.items():
    #         object_title = '%s(%s=%s)' % (title, key, str(value))
    #         self.fields.validate(value, '.%s' % key, object_title)

    # report query
        self.iam.printer('Removing db instance %s from AWS region %s.' % (instance_id, self.iam.region_name))

    # terminate instance
        try:
            response = self.connection.delete_db_instance(
                DBInstanceIdentifier=instance_id,
                SkipFinalSnapshot=True
            )
        except:
            raise AWSConnectionError(title)

    # report outcome and return true
        new_state = response['DBInstance']['DBInstanceStatus']
        self.iam.printer('Instance %s is %s.' % (instance_id, new_state))

        return response

            method for removing a db instance from AWS EC2

        :param instance_id: string of instance id on AWS
        :return: string reporting state of instance
        
method for removing a db instance from AWS EC2
method for removing a db instance from AWS EC2
def delete_instance(self, instance_id):
        title = '%s.delete_instance' % self.__class__.__name__
        self.iam.printer('Removing db instance %s from AWS region %s.' % (instance_id, self.iam.region_name))
        try:
            response = self.connection.delete_db_instance(
                DBInstanceIdentifier=instance_id,
                SkipFinalSnapshot=True
            )
        except:
            raise AWSConnectionError(title)
        new_state = response['DBInstance']['DBInstanceStatus']
        self.iam.printer('Instance %s is %s.' % (instance_id, new_state))
        return response
def delete_instance ( self , instance_id ) : title = '%s.delete_instance' % self . __class__ . __name__ self . iam . printer ( 'Removing db instance %s from AWS region %s.' % ( instance_id , self . iam . region_name ) ) try : response = self . connection . delete_db_instance ( DBInstanceIdentifier = instance_id , SkipFinalSnapshot = True ) except : raise AWSConnectionError ( title ) new_state = response [ 'DBInstance' ] [ 'DBInstanceStatus' ] self . iam . printer ( 'Instance %s is %s.' % ( instance_id , new_state ) ) return response
method for removing a db instance from AWS EC2
method for removing a db instance from AWS EC2
'''
            method for removing a db instance from AWS EC2

        :param instance_id: string of instance id on AWS
        :return: string reporting state of instance
        ''' # # validate inputs #     input_fields = { #         'instance_id': instance_id #     } #     for key, value in input_fields.items(): #         object_title = '%s(%s=%s)' % (title, key, str(value)) #         self.fields.validate(value, '.%s' % key, object_title) # report query # terminate instance # report outcome and return true
string reporting state of instance
string reporting state of instance
self
instance_id
string of instance id on AWS
string of instance id on AWS