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 |
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
- data ListPolicyVersions = ListPolicyVersions' {}
- newListPolicyVersions :: Text -> ListPolicyVersions
- listPolicyVersions_marker :: Lens' ListPolicyVersions (Maybe Text)
- listPolicyVersions_maxItems :: Lens' ListPolicyVersions (Maybe Natural)
- listPolicyVersions_policyArn :: Lens' ListPolicyVersions Text
- data ListPolicyVersionsResponse = ListPolicyVersionsResponse' {
- versions :: Maybe [PolicyVersion]
- marker :: Maybe Text
- isTruncated :: Maybe Bool
- httpStatus :: Int
- newListPolicyVersionsResponse :: Int -> ListPolicyVersionsResponse
- listPolicyVersionsResponse_versions :: Lens' ListPolicyVersionsResponse (Maybe [PolicyVersion])
- listPolicyVersionsResponse_marker :: Lens' ListPolicyVersionsResponse (Maybe Text)
- listPolicyVersionsResponse_isTruncated :: Lens' ListPolicyVersionsResponse (Maybe Bool)
- listPolicyVersionsResponse_httpStatus :: Lens' ListPolicyVersionsResponse Int
Creating a Request
data ListPolicyVersions Source #
See: newListPolicyVersions
smart constructor.
ListPolicyVersions' | |
|
Instances
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.
ListPolicyVersionsResponse' | |
|
Instances
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.
listPolicyVersionsResponse_httpStatus :: Lens' ListPolicyVersionsResponse Int Source #
The response's http status code.