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.ListAccountsForParent

Contents

Description

Lists the accounts in an organization that are contained by the specified target root or organizational unit (OU). If you specify the root, you get a list of all the accounts that are not in any OU. If you specify an OU, you get a list of all the accounts in only that OU, and not in any child OUs. To get a list of all accounts in the organization, use the ListAccounts operation.

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

This operation returns paginated results.

Synopsis

Creating a Request

listAccountsForParent Source #

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

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

  • lafpNextToken - 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.
  • lafpMaxResults - (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.
  • lafpParentId - The unique identifier (ID) for the parent root or organization unit (OU) whose accounts you want to list.

data ListAccountsForParent Source #

See: listAccountsForParent smart constructor.

Instances

Eq ListAccountsForParent Source # 
Data ListAccountsForParent Source # 

Methods

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

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

toConstr :: ListAccountsForParent -> Constr #

dataTypeOf :: ListAccountsForParent -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ListAccountsForParent Source # 
Show ListAccountsForParent Source # 
Generic ListAccountsForParent Source # 
Hashable ListAccountsForParent Source # 
ToJSON ListAccountsForParent Source # 
NFData ListAccountsForParent Source # 

Methods

rnf :: ListAccountsForParent -> () #

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

Request Lenses

lafpNextToken :: Lens' ListAccountsForParent (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.

lafpMaxResults :: Lens' ListAccountsForParent (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.

lafpParentId :: Lens' ListAccountsForParent Text Source #

The unique identifier (ID) for the parent root or organization unit (OU) whose accounts you want to list.

Destructuring the Response

listAccountsForParentResponse Source #

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

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

  • lafprsAccounts - A list of the accounts in the specified root or OU.
  • lafprsNextToken - 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 .
  • lafprsResponseStatus - -- | The response status code.

data ListAccountsForParentResponse Source #

See: listAccountsForParentResponse smart constructor.

Instances

Eq ListAccountsForParentResponse Source # 
Data ListAccountsForParentResponse Source # 

Methods

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

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

toConstr :: ListAccountsForParentResponse -> Constr #

dataTypeOf :: ListAccountsForParentResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Show ListAccountsForParentResponse Source # 
Generic ListAccountsForParentResponse Source # 
NFData ListAccountsForParentResponse Source # 
type Rep ListAccountsForParentResponse Source # 
type Rep ListAccountsForParentResponse = D1 (MetaData "ListAccountsForParentResponse" "Network.AWS.Organizations.ListAccountsForParent" "amazonka-organizations-1.5.0-9d9i18lsT75IlwObP60hiK" False) (C1 (MetaCons "ListAccountsForParentResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_lafprsAccounts") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Account]))) ((:*:) (S1 (MetaSel (Just Symbol "_lafprsNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_lafprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))))

Response Lenses

lafprsAccounts :: Lens' ListAccountsForParentResponse [Account] Source #

A list of the accounts in the specified root or OU.

lafprsNextToken :: Lens' ListAccountsForParentResponse (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 .