public static String getAccountId ( final CloudTrailEvent event ) { final CloudTrailEventData eventData = getEventData ( event ) ; final UserIdentity userIdentity = checkNotNull ( eventData . getUserIdentity ( ) , USER_IDENTITY_SHOULD_NEVER_BE_NULL ) ; final String value = ofNullable ( userIdentity . getAccountId ( ) ) . orElse ( eventData . getRecipientAccountId ( ) ) ; return checkNotNull ( value , ACCOUNT_ID_OR_RECIPIENT_SHOULD_NEVER_BE_NULL ) ; }
Extracts the accountId .