| 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 |
Network.AWS.Organizations.ListRoots
Description
Lists the roots that are defined in the current organization.
This operation can be called only from the organization's master account.
This operation returns paginated results.
- listRoots :: ListRoots
- data ListRoots
- lrNextToken :: Lens' ListRoots (Maybe Text)
- lrMaxResults :: Lens' ListRoots (Maybe Natural)
- listRootsResponse :: Int -> ListRootsResponse
- data ListRootsResponse
- lrrsRoots :: Lens' ListRootsResponse [Root]
- lrrsNextToken :: Lens' ListRootsResponse (Maybe Text)
- lrrsResponseStatus :: Lens' ListRootsResponse Int
Creating a Request
listRoots :: ListRoots Source #
Creates a value of ListRoots with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lrNextToken- Use this parameter if you receive aNextTokenresponse in a previous request that indicates that there is more output available. Set it to the value of the previous call'sNextTokenresponse to indicate where the output should continue from.lrMaxResults- (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, theNextTokenresponse element is present and has a value (is not null). Include that value as theNextTokenrequest 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 checkNextTokenafter every operation to ensure that you receive all of the results.
See: listRoots smart constructor.
Instances
Request Lenses
lrNextToken :: Lens' ListRoots (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.
lrMaxResults :: Lens' ListRoots (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
Arguments
| :: Int | |
| -> ListRootsResponse |
Creates a value of ListRootsResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lrrsRoots- A list of roots that are defined in an organization.lrrsNextToken- If present, this value indicates that there is more output available than is included in the current response. Use this value in theNextTokenrequest parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until theNextTokenresponse element comes back asnull.lrrsResponseStatus- -- | The response status code.
data ListRootsResponse Source #
See: listRootsResponse smart constructor.
Response Lenses
lrrsRoots :: Lens' ListRootsResponse [Root] Source #
A list of roots that are defined in an organization.
lrrsNextToken :: Lens' ListRootsResponse (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 .
lrrsResponseStatus :: Lens' ListRootsResponse Int Source #
- - | The response status code.