(candidate)
return None, None, None
Attempt to extract and slice up an ARN from the input string
Attempt to extract and slice up an ARN from the input string
Attempt to extract and slice up an ARN from the input string
def report_arn(candidate):
    """
    Attempt to extract and slice up an ARN from the input string
    """
    logger = logging.getLogger()

    arn_search = re.search(r'.*(arn:aws:.*?) .*', candidate)

    if arn_search:
        arn = arn_search.group(1)

        arn_id = arn.split(':')[4]
        arn_path = arn.split(':')[5]

        logger.info('-- Account ARN : %s', arn)
        logger.info('-- Account Id  : %s', arn.split(':')[4])
        logger.info('-- Account Path: %s', arn.split(':')[5])

        return arn, arn_id, arn_path

    return None, None, None
def report_arn ( candidate ) : logger = logging . getLogger ( ) arn_search = re . search ( r'.*(arn:aws:.*?) .*' , candidate ) if arn_search : arn = arn_search . group ( 1 ) arn_id = arn . split ( ':' ) [ 4 ] arn_path = arn . split ( ':' ) [ 5 ] logger . info ( '-- Account ARN : %s' , arn ) logger . info ( '-- Account Id  : %s' , arn . split ( ':' ) [ 4 ] ) logger . info ( '-- Account Path: %s' , arn . split ( ':' ) [ 5 ] ) return arn , arn_id , arn_path return None , None , None