Copyright | (c) 2013-2017 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 |
Language | Haskell2010 |
Creates or updates a resource policy allowing other AWS services to put log events to this account, such as Amazon Route 53. An account can have up to 50 resource policies per region.
- putResourcePolicy :: PutResourcePolicy
- data PutResourcePolicy
- prpPolicyName :: Lens' PutResourcePolicy (Maybe Text)
- prpPolicyDocument :: Lens' PutResourcePolicy (Maybe Text)
- putResourcePolicyResponse :: Int -> PutResourcePolicyResponse
- data PutResourcePolicyResponse
- prprsResourcePolicy :: Lens' PutResourcePolicyResponse (Maybe ResourcePolicy)
- prprsResponseStatus :: Lens' PutResourcePolicyResponse Int
Creating a Request
putResourcePolicy :: PutResourcePolicy Source #
Creates a value of PutResourcePolicy
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
prpPolicyName
- Name of the new policy. This parameter is required.prpPolicyDocument
- Details of the new policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. The following example creates a resource policy enabling the Route 53 service to put DNS query logs in to the specified log group. Replace "logArn" with the ARN of your CloudWatch Logs resource, such as a log group or log stream. { Version: "2012-10-17" Statement: [ { Sid: Route53LogsToCloudWatchLogs, Effect: Allow, Principal: { Service: [ "route53.amazonaws.com" ] }, Action:"logs:PutLogEvents", Resource: logArn } ] }
data PutResourcePolicy Source #
See: putResourcePolicy
smart constructor.
Request Lenses
prpPolicyName :: Lens' PutResourcePolicy (Maybe Text) Source #
Name of the new policy. This parameter is required.
prpPolicyDocument :: Lens' PutResourcePolicy (Maybe Text) Source #
Details of the new policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. The following example creates a resource policy enabling the Route 53 service to put DNS query logs in to the specified log group. Replace "logArn" with the ARN of your CloudWatch Logs resource, such as a log group or log stream. { Version: "2012-10-17" Statement: [ { Sid: Route53LogsToCloudWatchLogs, Effect: Allow, Principal: { Service: [ "route53.amazonaws.com" ] }, Action:"logs:PutLogEvents", Resource: logArn } ] }
Destructuring the Response
putResourcePolicyResponse Source #
Creates a value of PutResourcePolicyResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
prprsResourcePolicy
- The new policy.prprsResponseStatus
- -- | The response status code.
data PutResourcePolicyResponse Source #
See: putResourcePolicyResponse
smart constructor.
Response Lenses
prprsResourcePolicy :: Lens' PutResourcePolicyResponse (Maybe ResourcePolicy) Source #
The new policy.
prprsResponseStatus :: Lens' PutResourcePolicyResponse Int Source #
- - | The response status code.