def describe_db_instances(self, db_instance_identifier=None, marker=None, max_records=None): request = Request() request.set_action('DescribeDBInstances') if db_instance_identifier is not None: request.set_db_instance_identifier(db_instance_identifier) if marker is not None: request.set_marker(marker) if max_records is not None: request.set_max_records(max_records) try: response = self.call(request) except AwsServiceException as ex: if ex.code == 404: raise RdsDBInstanceNotFoundException(ex) raise results = response['DescribeDBInstancesResponse']\ ['DescribeDBInstancesResult']['DBInstances'] marker = response['DescribeDBInstancesResponse']\ ['DescribeDBInstancesResult']['Marker'] request_id = response['DescribeDBInstancesResponse']\ ['ResponseMetadata']['RequestId'] instances = [] for result in results: instances.append(DBInstance.from_json(result)) return Response(request_id, instances, marker)
def describe_db_instances(self, db_instance_identifier = None, marker = None, max_records = None): request = Request() request.set_action('DescribeDBInstances') if db_instance_identifier is not None: request.set_db_instance_identifier(db_instance_identifier) if marker is not None: request.set_marker(marker) if max_records is not None: request.set_max_records(max_records) try: response = self.call(request) except AwsServiceException as ex: if ex.code == 404: raise RdsDBInstanceNotFoundException(ex) raise results = response['DescribeDBInstancesResponse']\ ['DescribeDBInstancesResult']['DBInstances'] marker = response['DescribeDBInstancesResponse']\ ['DescribeDBInstancesResult']['Marker'] request_id = response['DescribeDBInstancesResponse']\ ['ResponseMetadata']['RequestId'] instances = [] for result in results: instances.append(DBInstance.from_json(result)) return Response(request_id, instances, marker)
def describe_db_snapshots(self, db_instance_identifier = None, db_snapshot_identifier = None, snapshot_type = None, marker = None, max_records = None): request = Request() request.set_action(u'DescribeDBSnapshots') if db_instance_identifier is not None: request.set_db_instance_identifier(db_instance_identifier) if db_snapshot_identifier is not None: request.set_db_snapshot_identifier(db_snapshot_identifier) if snapshot_type is not None: request.set_snapshot_type(snapshot_type) if marker is not None: request.set_marker(marker) if max_records is not None: request.set_max_records(max_records) try: response = self.call(request) except AwsServiceException as ex: if ex.code == 404: raise RdsDBSnapshotNotFoundException(ex) raise results = response[u'DescribeDBSnapshotsResponse']\ [u'DescribeDBSnapshotsResult'][u'DBSnapshots'] marker = response[u'DescribeDBSnapshotsResponse']\ [u'DescribeDBSnapshotsResult'][u'Marker'] request_id = response[u'DescribeDBSnapshotsResponse']\ [u'ResponseMetadata'][u'RequestId'] snapshots = [] for result in results: snapshots.append(DBSnapshot.from_json(result)) return Response(request_id, snapshots, marker)