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 policies from the root of the Directory
to the object specified. If there are no policies present, an empty list is returned. If policies are present, and if some objects don't have the policies attached, it returns the ObjectIdentifier
for such objects. If policies are present, it returns ObjectIdentifier
, policyId
, and policyType
. Paths that don't lead to the root from the target object are ignored. For more information, see Policies .
This operation returns paginated results.
- lookupPolicy :: Text -> ObjectReference -> LookupPolicy
- data LookupPolicy
- lpNextToken :: Lens' LookupPolicy (Maybe Text)
- lpMaxResults :: Lens' LookupPolicy (Maybe Natural)
- lpDirectoryARN :: Lens' LookupPolicy Text
- lpObjectReference :: Lens' LookupPolicy ObjectReference
- lookupPolicyResponse :: Int -> LookupPolicyResponse
- data LookupPolicyResponse
- lprsNextToken :: Lens' LookupPolicyResponse (Maybe Text)
- lprsPolicyToPathList :: Lens' LookupPolicyResponse [PolicyToPath]
- lprsResponseStatus :: Lens' LookupPolicyResponse Int
Creating a Request
Creates a value of LookupPolicy
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lpNextToken
- The token to request the next page of results.lpMaxResults
- The maximum number of items to be retrieved in a single call. This is an approximate number.lpDirectoryARN
- The Amazon Resource Name (ARN) that is associated with theDirectory
. For more information, seearns
.lpObjectReference
- Reference that identifies the object whose policies will be looked up.
data LookupPolicy Source #
See: lookupPolicy
smart constructor.
Request Lenses
lpNextToken :: Lens' LookupPolicy (Maybe Text) Source #
The token to request the next page of results.
lpMaxResults :: Lens' LookupPolicy (Maybe Natural) Source #
The maximum number of items to be retrieved in a single call. This is an approximate number.
lpDirectoryARN :: Lens' LookupPolicy Text Source #
The Amazon Resource Name (ARN) that is associated with the Directory
. For more information, see arns
.
lpObjectReference :: Lens' LookupPolicy ObjectReference Source #
Reference that identifies the object whose policies will be looked up.
Destructuring the Response
Creates a value of LookupPolicyResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lprsNextToken
- The pagination token.lprsPolicyToPathList
- Provides list of path to policies. Policies containPolicyId
,ObjectIdentifier
, andPolicyType
. For more information, see Policies .lprsResponseStatus
- -- | The response status code.
data LookupPolicyResponse Source #
See: lookupPolicyResponse
smart constructor.
Response Lenses
lprsNextToken :: Lens' LookupPolicyResponse (Maybe Text) Source #
The pagination token.
lprsPolicyToPathList :: Lens' LookupPolicyResponse [PolicyToPath] Source #
Provides list of path to policies. Policies contain PolicyId
, ObjectIdentifier
, and PolicyType
. For more information, see Policies .
lprsResponseStatus :: Lens' LookupPolicyResponse Int Source #
- - | The response status code.