#NEWLINE# def _get_role_arn( name , region = None , key = None , keyid = None , profile = None ) : #NEWLINE# #INDENT# if name . startswith ( 'arn:aws:iam:' ) : #NEWLINE# #INDENT# return name #NEWLINE# #UNINDENT# account_id = __salt__ [ 'boto_iam.get_account_id' ] ( region = region , key = key , keyid = keyid , profile = profile ) #NEWLINE# if ( profile and ( 'region' in profile ) ) : #NEWLINE# #INDENT# region = region [ 'region' ] #NEWLINE# #UNINDENT# if ( region is None ) : #NEWLINE# #INDENT# region = 'us-east-1' #NEWLINE# #UNINDENT# return 'arn:aws:iam::{0}:role/{1}' . format ( account_id , name )