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 all the roots, OUs, and accounts to which the specified policy is attached.
This operation can be called only from the organization's master account.
This operation returns paginated results.
- listTargetsForPolicy :: Text -> ListTargetsForPolicy
- data ListTargetsForPolicy
- ltfpNextToken :: Lens' ListTargetsForPolicy (Maybe Text)
- ltfpMaxResults :: Lens' ListTargetsForPolicy (Maybe Natural)
- ltfpPolicyId :: Lens' ListTargetsForPolicy Text
- listTargetsForPolicyResponse :: Int -> ListTargetsForPolicyResponse
- data ListTargetsForPolicyResponse
- ltfprsNextToken :: Lens' ListTargetsForPolicyResponse (Maybe Text)
- ltfprsTargets :: Lens' ListTargetsForPolicyResponse [PolicyTargetSummary]
- ltfprsResponseStatus :: Lens' ListTargetsForPolicyResponse Int
Creating a Request
Creates a value of ListTargetsForPolicy
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ltfpNextToken
- 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.ltfpMaxResults
- (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.ltfpPolicyId
- The unique identifier (ID) of the policy for which you want to know its attachments. The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.
data ListTargetsForPolicy Source #
See: listTargetsForPolicy
smart constructor.
Request Lenses
ltfpNextToken :: Lens' ListTargetsForPolicy (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.
ltfpMaxResults :: Lens' ListTargetsForPolicy (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.
ltfpPolicyId :: Lens' ListTargetsForPolicy Text Source #
The unique identifier (ID) of the policy for which you want to know its attachments. The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.
Destructuring the Response
listTargetsForPolicyResponse Source #
Creates a value of ListTargetsForPolicyResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ltfprsNextToken
- 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
.ltfprsTargets
- A list of structures, each of which contains details about one of the entities to which the specified policy is attached.ltfprsResponseStatus
- -- | The response status code.
data ListTargetsForPolicyResponse Source #
See: listTargetsForPolicyResponse
smart constructor.
Response Lenses
ltfprsNextToken :: Lens' ListTargetsForPolicyResponse (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
.
ltfprsTargets :: Lens' ListTargetsForPolicyResponse [PolicyTargetSummary] Source #
A list of structures, each of which contains details about one of the entities to which the specified policy is attached.
ltfprsResponseStatus :: Lens' ListTargetsForPolicyResponse Int Source #
- - | The response status code.