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 information about the specified managed policy, including the policy's default version and the total number of IAM users, groups, and roles to which the policy is attached. To retrieve the list of the specific users, groups, and roles that the policy is attached to, use ListEntitiesForPolicy. This operation returns metadata about the policy. To retrieve the actual policy document for a specific version of the policy, use GetPolicyVersion.
This operation retrieves information about managed policies. To retrieve information about an inline policy that is embedded with an IAM user, group, or role, use GetUserPolicy, GetGroupPolicy, or GetRolePolicy.
For more information about policies, see Managed policies and inline policies in the IAM User Guide.
Synopsis
- data GetPolicy = GetPolicy' {}
- newGetPolicy :: Text -> GetPolicy
- getPolicy_policyArn :: Lens' GetPolicy Text
- data GetPolicyResponse = GetPolicyResponse' {
- policy :: Maybe Policy
- httpStatus :: Int
- newGetPolicyResponse :: Int -> GetPolicyResponse
- getPolicyResponse_policy :: Lens' GetPolicyResponse (Maybe Policy)
- getPolicyResponse_httpStatus :: Lens' GetPolicyResponse Int
Creating a Request
See: newGetPolicy
smart constructor.
GetPolicy' | |
|
Instances
Eq GetPolicy Source # | |
Read GetPolicy Source # | |
Show GetPolicy Source # | |
Generic GetPolicy Source # | |
NFData GetPolicy Source # | |
Defined in Amazonka.IAM.GetPolicy | |
Hashable GetPolicy Source # | |
Defined in Amazonka.IAM.GetPolicy | |
AWSRequest GetPolicy Source # | |
Defined in Amazonka.IAM.GetPolicy type AWSResponse GetPolicy # request :: GetPolicy -> Request GetPolicy # response :: MonadResource m => Logger -> Service -> Proxy GetPolicy -> ClientResponse ClientBody -> m (Either Error (ClientResponse (AWSResponse GetPolicy))) # | |
ToHeaders GetPolicy Source # | |
Defined in Amazonka.IAM.GetPolicy | |
ToPath GetPolicy Source # | |
Defined in Amazonka.IAM.GetPolicy toPath :: GetPolicy -> ByteString # | |
ToQuery GetPolicy Source # | |
Defined in Amazonka.IAM.GetPolicy toQuery :: GetPolicy -> QueryString # | |
type Rep GetPolicy Source # | |
Defined in Amazonka.IAM.GetPolicy | |
type AWSResponse GetPolicy Source # | |
Defined in Amazonka.IAM.GetPolicy |
Create a value of GetPolicy
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:policyArn:GetPolicy'
, getPolicy_policyArn
- The Amazon Resource Name (ARN) of the managed policy that you want
information about.
For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
Request Lenses
getPolicy_policyArn :: Lens' GetPolicy Text Source #
The Amazon Resource Name (ARN) of the managed policy that you want information about.
For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
Destructuring the Response
data GetPolicyResponse Source #
Contains the response to a successful GetPolicy request.
See: newGetPolicyResponse
smart constructor.
GetPolicyResponse' | |
|
Instances
Create a value of GetPolicyResponse
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:policy:GetPolicyResponse'
, getPolicyResponse_policy
- A structure containing details about the policy.
$sel:httpStatus:GetPolicyResponse'
, getPolicyResponse_httpStatus
- The response's http status code.
Response Lenses
getPolicyResponse_policy :: Lens' GetPolicyResponse (Maybe Policy) Source #
A structure containing details about the policy.
getPolicyResponse_httpStatus :: Lens' GetPolicyResponse Int Source #
The response's http status code.