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.ListPolicyVersions

Description

Lists information about the versions of the specified managed policy, including the version that is currently set as the policy's default version.

For more information about managed policies, see Managed policies and inline policies in the IAM User Guide.

This operation returns paginated results.

Synopsis

Creating a Request

data ListPolicyVersions Source #

See: newListPolicyVersions smart constructor.

Constructors

ListPolicyVersions' 

Fields

  • marker :: Maybe Text

    Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the Marker element in the response that you received to indicate where the next call should start.

  • maxItems :: Maybe Natural

    Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the IsTruncated response element is true.

    If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the IsTruncated response element returns true, and Marker contains a value to include in the subsequent call that tells the service where to continue from.

  • policyArn :: Text

    The Amazon Resource Name (ARN) of the IAM policy for which you want the versions.

    For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

Instances

Instances details
Eq ListPolicyVersions Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

Read ListPolicyVersions Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

Show ListPolicyVersions Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

Generic ListPolicyVersions Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

Associated Types

type Rep ListPolicyVersions :: Type -> Type #

NFData ListPolicyVersions Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

Methods

rnf :: ListPolicyVersions -> () #

Hashable ListPolicyVersions Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

AWSPager ListPolicyVersions Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

AWSRequest ListPolicyVersions Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

Associated Types

type AWSResponse ListPolicyVersions #

ToHeaders ListPolicyVersions Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

ToPath ListPolicyVersions Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

ToQuery ListPolicyVersions Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

type Rep ListPolicyVersions Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

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

Defined in Amazonka.IAM.ListPolicyVersions

newListPolicyVersions Source #

Create a value of ListPolicyVersions 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:marker:ListPolicyVersions', listPolicyVersions_marker - Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the Marker element in the response that you received to indicate where the next call should start.

$sel:maxItems:ListPolicyVersions', listPolicyVersions_maxItems - Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the IsTruncated response element is true.

If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the IsTruncated response element returns true, and Marker contains a value to include in the subsequent call that tells the service where to continue from.

$sel:policyArn:ListPolicyVersions', listPolicyVersions_policyArn - The Amazon Resource Name (ARN) of the IAM policy for which you want the versions.

For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

Request Lenses

listPolicyVersions_marker :: Lens' ListPolicyVersions (Maybe Text) Source #

Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the Marker element in the response that you received to indicate where the next call should start.

listPolicyVersions_maxItems :: Lens' ListPolicyVersions (Maybe Natural) Source #

Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the IsTruncated response element is true.

If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the IsTruncated response element returns true, and Marker contains a value to include in the subsequent call that tells the service where to continue from.

listPolicyVersions_policyArn :: Lens' ListPolicyVersions Text Source #

The Amazon Resource Name (ARN) of the IAM policy for which you want the versions.

For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

Destructuring the Response

data ListPolicyVersionsResponse Source #

Contains the response to a successful ListPolicyVersions request.

See: newListPolicyVersionsResponse smart constructor.

Constructors

ListPolicyVersionsResponse' 

Fields

  • versions :: Maybe [PolicyVersion]

    A list of policy versions.

    For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.

  • marker :: Maybe Text

    When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

  • isTruncated :: Maybe Bool

    A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items. Note that IAM might return fewer than the MaxItems number of results even when there are more results available. We recommend that you check IsTruncated after every call to ensure that you receive all your results.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq ListPolicyVersionsResponse Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

Read ListPolicyVersionsResponse Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

Show ListPolicyVersionsResponse Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

Generic ListPolicyVersionsResponse Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

Associated Types

type Rep ListPolicyVersionsResponse :: Type -> Type #

NFData ListPolicyVersionsResponse Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

type Rep ListPolicyVersionsResponse Source # 
Instance details

Defined in Amazonka.IAM.ListPolicyVersions

type Rep ListPolicyVersionsResponse = D1 ('MetaData "ListPolicyVersionsResponse" "Amazonka.IAM.ListPolicyVersions" "libZSservicesZSamazonka-iamZSamazonka-iam" 'False) (C1 ('MetaCons "ListPolicyVersionsResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "versions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [PolicyVersion])) :*: S1 ('MetaSel ('Just "marker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "isTruncated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newListPolicyVersionsResponse Source #

Create a value of ListPolicyVersionsResponse 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:versions:ListPolicyVersionsResponse', listPolicyVersionsResponse_versions - A list of policy versions.

For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.

$sel:marker:ListPolicyVersions', listPolicyVersionsResponse_marker - When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

$sel:isTruncated:ListPolicyVersionsResponse', listPolicyVersionsResponse_isTruncated - A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items. Note that IAM might return fewer than the MaxItems number of results even when there are more results available. We recommend that you check IsTruncated after every call to ensure that you receive all your results.

$sel:httpStatus:ListPolicyVersionsResponse', listPolicyVersionsResponse_httpStatus - The response's http status code.

Response Lenses

listPolicyVersionsResponse_versions :: Lens' ListPolicyVersionsResponse (Maybe [PolicyVersion]) Source #

A list of policy versions.

For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.

listPolicyVersionsResponse_marker :: Lens' ListPolicyVersionsResponse (Maybe Text) Source #

When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

listPolicyVersionsResponse_isTruncated :: Lens' ListPolicyVersionsResponse (Maybe Bool) Source #

A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items. Note that IAM might return fewer than the MaxItems number of results even when there are more results available. We recommend that you check IsTruncated after every call to ensure that you receive all your results.