Copyright | (c) 2013-2021 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 |
Retrieves the list of all policies in an organization of a specified type.
Always check the NextToken
response parameter for a null
value when
calling a List*
operation. These operations can occasionally return an
empty set of results even when there are more results available. The
NextToken
response parameter value is null
only when there are no
more results to display.
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an AWS service.
This operation returns paginated results.
Synopsis
- data ListPolicies = ListPolicies' {}
- newListPolicies :: PolicyType -> ListPolicies
- listPolicies_nextToken :: Lens' ListPolicies (Maybe Text)
- listPolicies_maxResults :: Lens' ListPolicies (Maybe Natural)
- listPolicies_filter :: Lens' ListPolicies PolicyType
- data ListPoliciesResponse = ListPoliciesResponse' {
- nextToken :: Maybe Text
- policies :: Maybe [PolicySummary]
- httpStatus :: Int
- newListPoliciesResponse :: Int -> ListPoliciesResponse
- listPoliciesResponse_nextToken :: Lens' ListPoliciesResponse (Maybe Text)
- listPoliciesResponse_policies :: Lens' ListPoliciesResponse (Maybe [PolicySummary])
- listPoliciesResponse_httpStatus :: Lens' ListPoliciesResponse Int
Creating a Request
data ListPolicies Source #
See: newListPolicies
smart constructor.
ListPolicies' | |
|
Instances
Create a value of ListPolicies
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:nextToken:ListPolicies'
, listPolicies_nextToken
- The parameter for receiving additional results if you receive a
NextToken
response in a previous request. A NextToken
response
indicates that more output is available. Set this parameter to the value
of the previous call's NextToken
response to indicate where the
output should continue from.
$sel:maxResults:ListPolicies'
, listPolicies_maxResults
- The total number of results that you want included on each page of 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.
$sel:filter':ListPolicies'
, listPolicies_filter
- Specifies the type of policy that you want to include in the response.
You must specify one of the following values:
Request Lenses
listPolicies_nextToken :: Lens' ListPolicies (Maybe Text) Source #
The parameter for receiving additional results if you receive a
NextToken
response in a previous request. A NextToken
response
indicates that more output is available. Set this parameter to the value
of the previous call's NextToken
response to indicate where the
output should continue from.
listPolicies_maxResults :: Lens' ListPolicies (Maybe Natural) Source #
The total number of results that you want included on each page of 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.
listPolicies_filter :: Lens' ListPolicies PolicyType Source #
Specifies the type of policy that you want to include in the response. You must specify one of the following values:
Destructuring the Response
data ListPoliciesResponse Source #
See: newListPoliciesResponse
smart constructor.
ListPoliciesResponse' | |
|
Instances
newListPoliciesResponse Source #
Create a value of ListPoliciesResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:nextToken:ListPolicies'
, listPoliciesResponse_nextToken
- If present, indicates that more output is 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
.
$sel:policies:ListPoliciesResponse'
, listPoliciesResponse_policies
- A list of policies that match the filter criteria in the request. The
output list doesn't include the policy contents. To see the content for
a policy, see DescribePolicy.
$sel:httpStatus:ListPoliciesResponse'
, listPoliciesResponse_httpStatus
- The response's http status code.
Response Lenses
listPoliciesResponse_nextToken :: Lens' ListPoliciesResponse (Maybe Text) Source #
If present, indicates that more output is 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
.
listPoliciesResponse_policies :: Lens' ListPoliciesResponse (Maybe [PolicySummary]) Source #
A list of policies that match the filter criteria in the request. The output list doesn't include the policy contents. To see the content for a policy, see DescribePolicy.
listPoliciesResponse_httpStatus :: Lens' ListPoliciesResponse Int Source #
The response's http status code.