amazonka-organizations-1.5.0: Amazon Organizations SDK.

Copyright(c) 2013-2017 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.Organizations.ListAccounts

Contents

Description

Lists all the accounts in the organization. To request only the accounts in a root or OU, use the ListAccountsForParent operation instead.

This operation can be called only from the organization's master account.

This operation returns paginated results.

Synopsis

Creating a Request

listAccounts :: ListAccounts Source #

Creates a value of ListAccounts with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • laNextToken - Use this parameter if you receive a NextToken response in a previous request that indicates that there is more output available. Set it to the value of the previous call's NextToken response to indicate where the output should continue from.
  • laMaxResults - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the NextToken response element is present and has a value (is not null). Include that value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

data ListAccounts Source #

See: listAccounts smart constructor.

Instances

Eq ListAccounts Source # 
Data ListAccounts Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ListAccounts -> c ListAccounts #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ListAccounts #

toConstr :: ListAccounts -> Constr #

dataTypeOf :: ListAccounts -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ListAccounts) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ListAccounts) #

gmapT :: (forall b. Data b => b -> b) -> ListAccounts -> ListAccounts #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ListAccounts -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ListAccounts -> r #

gmapQ :: (forall d. Data d => d -> u) -> ListAccounts -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ListAccounts -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ListAccounts -> m ListAccounts #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ListAccounts -> m ListAccounts #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ListAccounts -> m ListAccounts #

Read ListAccounts Source # 
Show ListAccounts Source # 
Generic ListAccounts Source # 

Associated Types

type Rep ListAccounts :: * -> * #

Hashable ListAccounts Source # 
ToJSON ListAccounts Source # 
NFData ListAccounts Source # 

Methods

rnf :: ListAccounts -> () #

AWSPager ListAccounts Source # 
AWSRequest ListAccounts Source # 
ToQuery ListAccounts Source # 
ToPath ListAccounts Source # 
ToHeaders ListAccounts Source # 
type Rep ListAccounts Source # 
type Rep ListAccounts = D1 (MetaData "ListAccounts" "Network.AWS.Organizations.ListAccounts" "amazonka-organizations-1.5.0-9d9i18lsT75IlwObP60hiK" False) (C1 (MetaCons "ListAccounts'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_laNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_laMaxResults") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Nat)))))
type Rs ListAccounts Source # 

Request Lenses

laNextToken :: Lens' ListAccounts (Maybe Text) Source #

Use this parameter if you receive a NextToken response in a previous request that indicates that there is more output available. Set it to the value of the previous call's NextToken response to indicate where the output should continue from.

laMaxResults :: Lens' ListAccounts (Maybe Natural) Source #

(Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the NextToken response element is present and has a value (is not null). Include that value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

Destructuring the Response

listAccountsResponse Source #

Creates a value of ListAccountsResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • larsAccounts - A list of objects in the organization.
  • larsNextToken - If present, this value indicates that there is more output available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null .
  • larsResponseStatus - -- | The response status code.

data ListAccountsResponse Source #

See: listAccountsResponse smart constructor.

Instances

Eq ListAccountsResponse Source # 
Data ListAccountsResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ListAccountsResponse -> c ListAccountsResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ListAccountsResponse #

toConstr :: ListAccountsResponse -> Constr #

dataTypeOf :: ListAccountsResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ListAccountsResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ListAccountsResponse) #

gmapT :: (forall b. Data b => b -> b) -> ListAccountsResponse -> ListAccountsResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ListAccountsResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ListAccountsResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> ListAccountsResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ListAccountsResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ListAccountsResponse -> m ListAccountsResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ListAccountsResponse -> m ListAccountsResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ListAccountsResponse -> m ListAccountsResponse #

Show ListAccountsResponse Source # 
Generic ListAccountsResponse Source # 
NFData ListAccountsResponse Source # 

Methods

rnf :: ListAccountsResponse -> () #

type Rep ListAccountsResponse Source # 
type Rep ListAccountsResponse = D1 (MetaData "ListAccountsResponse" "Network.AWS.Organizations.ListAccounts" "amazonka-organizations-1.5.0-9d9i18lsT75IlwObP60hiK" False) (C1 (MetaCons "ListAccountsResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_larsAccounts") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Account]))) ((:*:) (S1 (MetaSel (Just Symbol "_larsNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_larsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))))

Response Lenses

larsAccounts :: Lens' ListAccountsResponse [Account] Source #

A list of objects in the organization.

larsNextToken :: Lens' ListAccountsResponse (Maybe Text) Source #

If present, this value indicates that there is more output available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null .

larsResponseStatus :: Lens' ListAccountsResponse Int Source #

  • - | The response status code.