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 version of the specified managed policy, including the policy document.
Policies returned by this operation are URL-encoded compliant with
RFC 3986. You can use a URL
decoding method to convert the policy back to plain JSON text. For
example, if you use Java, you can use the decode
method of the
java.net.URLDecoder
utility class in the Java SDK. Other languages and
SDKs provide similar functionality.
To list the available versions for a policy, use ListPolicyVersions.
This operation retrieves information about managed policies. To retrieve information about an inline policy that is embedded in a user, group, or role, use GetUserPolicy, GetGroupPolicy, or GetRolePolicy.
For more information about the types of policies, see Managed policies and inline policies in the IAM User Guide.
For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.
Synopsis
- data GetPolicyVersion = GetPolicyVersion' {}
- newGetPolicyVersion :: Text -> Text -> GetPolicyVersion
- getPolicyVersion_policyArn :: Lens' GetPolicyVersion Text
- getPolicyVersion_versionId :: Lens' GetPolicyVersion Text
- data GetPolicyVersionResponse = GetPolicyVersionResponse' {}
- newGetPolicyVersionResponse :: Int -> GetPolicyVersionResponse
- getPolicyVersionResponse_policyVersion :: Lens' GetPolicyVersionResponse (Maybe PolicyVersion)
- getPolicyVersionResponse_httpStatus :: Lens' GetPolicyVersionResponse Int
Creating a Request
data GetPolicyVersion Source #
See: newGetPolicyVersion
smart constructor.
GetPolicyVersion' | |
|
Instances
Create a value of GetPolicyVersion
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:GetPolicyVersion'
, getPolicyVersion_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.
$sel:versionId:GetPolicyVersion'
, getPolicyVersion_versionId
- Identifies the policy version to retrieve.
This parameter allows (through its regex pattern) a string of characters that consists of the lowercase letter 'v' followed by one or two digits, and optionally followed by a period '.' and a string of letters and digits.
Request Lenses
getPolicyVersion_policyArn :: Lens' GetPolicyVersion 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.
getPolicyVersion_versionId :: Lens' GetPolicyVersion Text Source #
Identifies the policy version to retrieve.
This parameter allows (through its regex pattern) a string of characters that consists of the lowercase letter 'v' followed by one or two digits, and optionally followed by a period '.' and a string of letters and digits.
Destructuring the Response
data GetPolicyVersionResponse Source #
Contains the response to a successful GetPolicyVersion request.
See: newGetPolicyVersionResponse
smart constructor.
GetPolicyVersionResponse' | |
|
Instances
newGetPolicyVersionResponse Source #
Create a value of GetPolicyVersionResponse
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:policyVersion:GetPolicyVersionResponse'
, getPolicyVersionResponse_policyVersion
- A structure containing details about the policy version.
$sel:httpStatus:GetPolicyVersionResponse'
, getPolicyVersionResponse_httpStatus
- The response's http status code.
Response Lenses
getPolicyVersionResponse_policyVersion :: Lens' GetPolicyVersionResponse (Maybe PolicyVersion) Source #
A structure containing details about the policy version.
getPolicyVersionResponse_httpStatus :: Lens' GetPolicyVersionResponse Int Source #
The response's http status code.