libZSservicesZSamazonka-iamZSamazonka-iam
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.IAM.GetPolicy

Description

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

Creating a Request

data GetPolicy Source #

See: newGetPolicy smart constructor.

Constructors

GetPolicy' 

Fields

  • policyArn :: Text

    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.

Instances

Instances details
Eq GetPolicy Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

Read GetPolicy Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

Show GetPolicy Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

Generic GetPolicy Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

Associated Types

type Rep GetPolicy :: Type -> Type #

NFData GetPolicy Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

Methods

rnf :: GetPolicy -> () #

Hashable GetPolicy Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

AWSRequest GetPolicy Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

Associated Types

type AWSResponse GetPolicy #

ToHeaders GetPolicy Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

Methods

toHeaders :: GetPolicy -> [Header] #

ToPath GetPolicy Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

ToQuery GetPolicy Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

type Rep GetPolicy Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

type Rep GetPolicy = D1 ('MetaData "GetPolicy" "Amazonka.IAM.GetPolicy" "libZSservicesZSamazonka-iamZSamazonka-iam" 'False) (C1 ('MetaCons "GetPolicy'" 'PrefixI 'True) (S1 ('MetaSel ('Just "policyArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))
type AWSResponse GetPolicy Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

newGetPolicy Source #

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.

Constructors

GetPolicyResponse' 

Fields

Instances

Instances details
Eq GetPolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

Read GetPolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

Show GetPolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

Generic GetPolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

Associated Types

type Rep GetPolicyResponse :: Type -> Type #

NFData GetPolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

Methods

rnf :: GetPolicyResponse -> () #

type Rep GetPolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.GetPolicy

type Rep GetPolicyResponse = D1 ('MetaData "GetPolicyResponse" "Amazonka.IAM.GetPolicy" "libZSservicesZSamazonka-iamZSamazonka-iam" 'False) (C1 ('MetaCons "GetPolicyResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "policy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Policy)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newGetPolicyResponse Source #

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.