<s> """<STR_LIT>""" <EOL> from . . config import Config <EOL> from . . utils import constants as const <EOL> from . pipeline_object import PipelineObject <EOL> config = Config ( ) <EOL> SNS_TOPIC_ARN_FAILURE = config . etl . get ( '<STR_LIT>' , const . NONE ) <EOL> ROLE = config . etl [ '<STR_LIT>' ] <EOL> class SNSAlarm ( PipelineObject ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , <EOL> id , <EOL> pipeline_name = None , <EOL> failure_message = None , <EOL> topic_arn = None , <EOL> ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> if not pipeline_name : <EOL> pipeline_name = "<STR_LIT:None>" <EOL> if not failure_message : <EOL> failure_message = '<STR_LIT:\n>' . join ( [ <EOL> '<STR_LIT>' + pipeline_name , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ] ) <EOL> subject = '<STR_LIT>' % pipeline_name <EOL> if topic_arn is None : <EOL> topic_arn = SNS_TOPIC_ARN_FAILURE <EOL> super ( SNSAlarm , self ) . __init__ ( <EOL> id = id , <EOL> type = '<STR_LIT>' , <EOL> topicArn = topic_arn , <EOL> role = ROLE , <EOL> subject = subject , <EOL> message = failure_message , <EOL> ) </s>
