labpack/platforms/aws/r53.py
def list_records(self, zone_id):
        
        '''
            method for listing records associated with a hosted zone
            
        :param zone_id: string of hosted zone id on AWS
        :return: list of dictionaries with record fields
        
        'name': 'string',
        'dnsName': 'string',
        'evaluateTargetHealth': false,
        'hostedZoneID': 'string'
        
        '''

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

        # request list of records for zone
        self.iam.printer('Querying AWS region %s for records of hosted zone %s.' % (self.iam.region_name, zone_id))
        record_list = []
        try:
            response = self.connection.list_resource_record_sets(
                HostedZoneId=zone_id
            )
        except:
            raise AWSConnectionError(title)
    
        # populate a list of records from response
        if 'ResourceRecordSets' in response.keys():
            for record in response['ResourceRecordSets']:
                record_list.append(record)

        return record_list

            method for listing records associated with a hosted zone
            
        :param zone_id: string of hosted zone id on AWS
        :return: list of dictionaries with record fields
        
        'name': 'string',
        'dnsName': 'string',
        'evaluateTargetHealth': false,
        'hostedZoneID': 'string'
        
        
method for listing records associated with a hosted zone
method for listing records associated with a hosted zone
def list_records(self, zone_id):
        title = '%s.list_zones' % self.__class__.__name__
        self.iam.printer('Querying AWS region %s for records of hosted zone %s.' % (self.iam.region_name, zone_id))
        record_list = []
        try:
            response = self.connection.list_resource_record_sets(
                HostedZoneId=zone_id
            )
        except:
            raise AWSConnectionError(title)
        if 'ResourceRecordSets' in response.keys():
            for record in response['ResourceRecordSets']:
                record_list.append(record)
        return record_list
def list_records ( self , zone_id ) : title = '%s.list_zones' % self . __class__ . __name__ self . iam . printer ( 'Querying AWS region %s for records of hosted zone %s.' % ( self . iam . region_name , zone_id ) ) record_list = [ ] try : response = self . connection . list_resource_record_sets ( HostedZoneId = zone_id ) except : raise AWSConnectionError ( title ) if 'ResourceRecordSets' in response . keys ( ) : for record in response [ 'ResourceRecordSets' ] : record_list . append ( record ) return record_list
method for listing records associated with a hosted zone
method for listing records associated with a hosted zone
'''
            method for listing records associated with a hosted zone
            
        :param zone_id: string of hosted zone id on AWS
        :return: list of dictionaries with record fields
        
        'name': 'string',
        'dnsName': 'string',
        'evaluateTargetHealth': false,
        'hostedZoneID': 'string'
        
        ''' # request list of records for zone # populate a list of records from response
list of dictionaries with record fields
'name': 'string',
'dnsName': 'string',
'evaluateTargetHealth': false,
'hostedZoneID': 'string'
list of dictionaries with record fields ' name ' : ' string ' ' dnsName ' : ' string ' ' evaluateTargetHealth ' : false ' hostedZoneID ' : ' string '
self
zone_id
string of hosted zone id on AWS
string of hosted zone id on AWS