Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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
- listAccountsForParent :: Text -> ListAccountsForParent
- data ListAccountsForParent
- lafpNextToken :: Lens' ListAccountsForParent (Maybe Text)
- lafpMaxResults :: Lens' ListAccountsForParent (Maybe Natural)
- lafpParentId :: Lens' ListAccountsForParent Text
- listAccountsForParentResponse :: Int -> ListAccountsForParentResponse
- data ListAccountsForParentResponse
- lafprsAccounts :: Lens' ListAccountsForParentResponse [Account]
- lafprsNextToken :: Lens' ListAccountsForParentResponse (Maybe Text)
- lafprsResponseStatus :: Lens' ListAccountsForParentResponse Int
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 aNextToken
response in a previous request that indicates that there is more output available. Set it to the value of the previous call'sNextToken
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, theNextToken
response element is present and has a value (is not null). Include that value as theNextToken
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 checkNextToken
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
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 theNextToken
request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until theNextToken
response element comes back asnull
.lafprsResponseStatus
- -- | The response status code.
data ListAccountsForParentResponse Source #
See: listAccountsForParentResponse
smart constructor.
Instances
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
.
lafprsResponseStatus :: Lens' ListAccountsForParentResponse Int Source #
- - | The response status code.