import { Value , List , IntrinsicFunction , ConditionIntrinsicFunction , Condition } from "./dataTypes" ; export function Base64 ( value ) { return new IntrinsicFunction ( 'Fn::Base64' , value ) ; } export function FindInMap ( mapName , topLevelKey , secondLevelKey ) { return new IntrinsicFunction ( 'Fn::FindInMap' , [ mapName , topLevelKey , secondLevelKey ] ) ; } export function GetAtt ( logicalNameOfResource , attributeName ) { return new IntrinsicFunction ( 'Fn::GetAtt' , [ logicalNameOfResource , attributeName ] ) ; } export function GetAZs ( region = '' ) { return new IntrinsicFunction ( 'Fn::GetAZs' , region ) ; } export function ImportValue ( sharedValueToImport ) { return new IntrinsicFunction ( 'Fn::ImportValue' , sharedValueToImport ) ; } export function Join ( delimiter , values ) { return new IntrinsicFunction ( 'Fn::Join' , [ delimiter , values ] ) ; } export function Select ( index , listOfObjects ) { return new IntrinsicFunction ( 'Fn::Select' , [ index , listOfObjects ] ) ; } export function Split ( delimiter , sourceString ) { return new IntrinsicFunction ( 'Fn::Split' , [ delimiter , sourceString ] ) ; } export function Sub ( string , vars ) { return new IntrinsicFunction ( 'Fn::Sub' , [ string , vars ] ) ; } export function Ref ( logicalName ) { return new IntrinsicFunction ( 'Ref' , logicalName ) ; } export function And ( conditions ) { return new ConditionIntrinsicFunction ( 'Fn::And' , conditions ) ; } export function Equals ( left , right ) { return new ConditionIntrinsicFunction ( 'Fn::Equals' , [ left , right ] ) ; } export function If ( conditionName , valueIfTrue , valueIfFalse ) { return new ConditionIntrinsicFunction ( 'Fn::If' , [ conditionName , valueIfTrue , valueIfFalse ] ) ; } export function Not ( condition ) { return new ConditionIntrinsicFunction ( 'Fn::Not' , [ condition ] ) ; } export function Or ( conditions ) { return new ConditionIntrinsicFunction ( 'Fn::Or' , conditions ) ; }