packages feed

stackctl-1.5.0.0: src/Stackctl/AWS/STS.hs

module Stackctl.AWS.STS
  ( awsGetCallerIdentityAccount
  ) where

import Stackctl.Prelude

import Amazonka.STS.GetCallerIdentity
import Stackctl.AWS.Core

awsGetCallerIdentityAccount
  :: (MonadResource m, MonadReader env m, HasAwsEnv env) => m AccountId
awsGetCallerIdentityAccount = do
  awsSimple newGetCallerIdentity $ \resp -> do
    AccountId <$> resp ^. getCallerIdentityResponse_account