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 |
Gets information about the specified policy with the policy document of the default version.
Requires permission to access the GetPolicy action.
Synopsis
- data GetPolicy = GetPolicy' {
- policyName :: Text
- newGetPolicy :: Text -> GetPolicy
- getPolicy_policyName :: Lens' GetPolicy Text
- data GetPolicyResponse = GetPolicyResponse' {}
- newGetPolicyResponse :: Int -> GetPolicyResponse
- getPolicyResponse_lastModifiedDate :: Lens' GetPolicyResponse (Maybe UTCTime)
- getPolicyResponse_policyName :: Lens' GetPolicyResponse (Maybe Text)
- getPolicyResponse_policyDocument :: Lens' GetPolicyResponse (Maybe Text)
- getPolicyResponse_defaultVersionId :: Lens' GetPolicyResponse (Maybe Text)
- getPolicyResponse_policyArn :: Lens' GetPolicyResponse (Maybe Text)
- getPolicyResponse_creationDate :: Lens' GetPolicyResponse (Maybe UTCTime)
- getPolicyResponse_generationId :: Lens' GetPolicyResponse (Maybe Text)
- getPolicyResponse_httpStatus :: Lens' GetPolicyResponse Int
Creating a Request
The input for the GetPolicy operation.
See: newGetPolicy
smart constructor.
GetPolicy' | |
|
Instances
Eq GetPolicy Source # | |
Read GetPolicy Source # | |
Show GetPolicy Source # | |
Generic GetPolicy Source # | |
NFData GetPolicy Source # | |
Defined in Amazonka.IoT.GetPolicy | |
Hashable GetPolicy Source # | |
Defined in Amazonka.IoT.GetPolicy | |
AWSRequest GetPolicy Source # | |
Defined in Amazonka.IoT.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.IoT.GetPolicy | |
ToPath GetPolicy Source # | |
Defined in Amazonka.IoT.GetPolicy toPath :: GetPolicy -> ByteString # | |
ToQuery GetPolicy Source # | |
Defined in Amazonka.IoT.GetPolicy toQuery :: GetPolicy -> QueryString # | |
type Rep GetPolicy Source # | |
Defined in Amazonka.IoT.GetPolicy | |
type AWSResponse GetPolicy Source # | |
Defined in Amazonka.IoT.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:policyName:GetPolicy'
, getPolicy_policyName
- The name of the policy.
Request Lenses
Destructuring the Response
data GetPolicyResponse Source #
The output from the GetPolicy operation.
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:lastModifiedDate:GetPolicyResponse'
, getPolicyResponse_lastModifiedDate
- The date the policy was last modified.
$sel:policyName:GetPolicy'
, getPolicyResponse_policyName
- The policy name.
$sel:policyDocument:GetPolicyResponse'
, getPolicyResponse_policyDocument
- The JSON document that describes the policy.
$sel:defaultVersionId:GetPolicyResponse'
, getPolicyResponse_defaultVersionId
- The default policy version ID.
$sel:policyArn:GetPolicyResponse'
, getPolicyResponse_policyArn
- The policy ARN.
$sel:creationDate:GetPolicyResponse'
, getPolicyResponse_creationDate
- The date the policy was created.
$sel:generationId:GetPolicyResponse'
, getPolicyResponse_generationId
- The generation ID of the policy.
$sel:httpStatus:GetPolicyResponse'
, getPolicyResponse_httpStatus
- The response's http status code.
Response Lenses
getPolicyResponse_lastModifiedDate :: Lens' GetPolicyResponse (Maybe UTCTime) Source #
The date the policy was last modified.
getPolicyResponse_policyName :: Lens' GetPolicyResponse (Maybe Text) Source #
The policy name.
getPolicyResponse_policyDocument :: Lens' GetPolicyResponse (Maybe Text) Source #
The JSON document that describes the policy.
getPolicyResponse_defaultVersionId :: Lens' GetPolicyResponse (Maybe Text) Source #
The default policy version ID.
getPolicyResponse_policyArn :: Lens' GetPolicyResponse (Maybe Text) Source #
The policy ARN.
getPolicyResponse_creationDate :: Lens' GetPolicyResponse (Maybe UTCTime) Source #
The date the policy was created.
getPolicyResponse_generationId :: Lens' GetPolicyResponse (Maybe Text) Source #
The generation ID of the policy.
getPolicyResponse_httpStatus :: Lens' GetPolicyResponse Int Source #
The response's http status code.