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 |
Lists the policies that are directly attached to the specified target root, organizational unit (OU), or account. You must specify the policy type that you want included in the returned list.
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 ListPoliciesForTarget = ListPoliciesForTarget' {
- nextToken :: Maybe Text
- maxResults :: Maybe Natural
- targetId :: Text
- filter' :: PolicyType
- newListPoliciesForTarget :: Text -> PolicyType -> ListPoliciesForTarget
- listPoliciesForTarget_nextToken :: Lens' ListPoliciesForTarget (Maybe Text)
- listPoliciesForTarget_maxResults :: Lens' ListPoliciesForTarget (Maybe Natural)
- listPoliciesForTarget_targetId :: Lens' ListPoliciesForTarget Text
- listPoliciesForTarget_filter :: Lens' ListPoliciesForTarget PolicyType
- data ListPoliciesForTargetResponse = ListPoliciesForTargetResponse' {
- nextToken :: Maybe Text
- policies :: Maybe [PolicySummary]
- httpStatus :: Int
- newListPoliciesForTargetResponse :: Int -> ListPoliciesForTargetResponse
- listPoliciesForTargetResponse_nextToken :: Lens' ListPoliciesForTargetResponse (Maybe Text)
- listPoliciesForTargetResponse_policies :: Lens' ListPoliciesForTargetResponse (Maybe [PolicySummary])
- listPoliciesForTargetResponse_httpStatus :: Lens' ListPoliciesForTargetResponse Int
Creating a Request
data ListPoliciesForTarget Source #
See: newListPoliciesForTarget
smart constructor.
ListPoliciesForTarget' | |
|
Instances
newListPoliciesForTarget Source #
:: Text | |
-> PolicyType | |
-> ListPoliciesForTarget |
Create a value of ListPoliciesForTarget
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:ListPoliciesForTarget'
, listPoliciesForTarget_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:ListPoliciesForTarget'
, listPoliciesForTarget_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:targetId:ListPoliciesForTarget'
, listPoliciesForTarget_targetId
- The unique identifier (ID) of the root, organizational unit, or account
whose policies you want to list.
The regex pattern for a target ID string requires one of the following:
- Root - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.
- Account - A string that consists of exactly 12 digits.
- Organizational unit (OU) - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
$sel:filter':ListPoliciesForTarget'
, listPoliciesForTarget_filter
- The type of policy that you want to include in the returned list. You
must specify one of the following values:
Request Lenses
listPoliciesForTarget_nextToken :: Lens' ListPoliciesForTarget (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.
listPoliciesForTarget_maxResults :: Lens' ListPoliciesForTarget (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.
listPoliciesForTarget_targetId :: Lens' ListPoliciesForTarget Text Source #
The unique identifier (ID) of the root, organizational unit, or account whose policies you want to list.
The regex pattern for a target ID string requires one of the following:
- Root - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.
- Account - A string that consists of exactly 12 digits.
- Organizational unit (OU) - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
listPoliciesForTarget_filter :: Lens' ListPoliciesForTarget PolicyType Source #
The type of policy that you want to include in the returned list. You must specify one of the following values:
Destructuring the Response
data ListPoliciesForTargetResponse Source #
See: newListPoliciesForTargetResponse
smart constructor.
ListPoliciesForTargetResponse' | |
|
Instances
newListPoliciesForTargetResponse Source #
Create a value of ListPoliciesForTargetResponse
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:ListPoliciesForTarget'
, listPoliciesForTargetResponse_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:ListPoliciesForTargetResponse'
, listPoliciesForTargetResponse_policies
- The list of policies that match the criteria in the request.
$sel:httpStatus:ListPoliciesForTargetResponse'
, listPoliciesForTargetResponse_httpStatus
- The response's http status code.
Response Lenses
listPoliciesForTargetResponse_nextToken :: Lens' ListPoliciesForTargetResponse (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
.
listPoliciesForTargetResponse_policies :: Lens' ListPoliciesForTargetResponse (Maybe [PolicySummary]) Source #
The list of policies that match the criteria in the request.
listPoliciesForTargetResponse_httpStatus :: Lens' ListPoliciesForTargetResponse Int Source #
The response's http status code.