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 |
Creates or updates a destination. This operation is used only to create destinations for cross-account subscriptions.
A destination encapsulates a physical resource (such as an Amazon Kinesis stream) and enables you to subscribe to a real-time stream of log events for a different account, ingested using PutLogEvents.
Through an access policy, a destination controls what is written to it.
By default, PutDestination
does not set any access policy with the
destination, which means a cross-account user cannot call
PutSubscriptionFilter
against this destination. To enable this, the destination owner must
call
PutDestinationPolicy
after PutDestination
.
To perform a PutDestination
operation, you must also have the
iam:PassRole
permission.
Synopsis
- data PutDestination = PutDestination' {}
- newPutDestination :: Text -> Text -> Text -> PutDestination
- putDestination_destinationName :: Lens' PutDestination Text
- putDestination_targetArn :: Lens' PutDestination Text
- putDestination_roleArn :: Lens' PutDestination Text
- data PutDestinationResponse = PutDestinationResponse' {}
- newPutDestinationResponse :: Int -> PutDestinationResponse
- putDestinationResponse_destination :: Lens' PutDestinationResponse (Maybe Destination)
- putDestinationResponse_httpStatus :: Lens' PutDestinationResponse Int
Creating a Request
data PutDestination Source #
See: newPutDestination
smart constructor.
Instances
:: Text | |
-> Text | |
-> Text | |
-> PutDestination |
Create a value of PutDestination
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:destinationName:PutDestination'
, putDestination_destinationName
- A name for the destination.
$sel:targetArn:PutDestination'
, putDestination_targetArn
- The ARN of an Amazon Kinesis stream to which to deliver matching log
events.
$sel:roleArn:PutDestination'
, putDestination_roleArn
- The ARN of an IAM role that grants CloudWatch Logs permissions to call
the Amazon Kinesis PutRecord
operation on the destination stream.
Request Lenses
putDestination_destinationName :: Lens' PutDestination Text Source #
A name for the destination.
putDestination_targetArn :: Lens' PutDestination Text Source #
The ARN of an Amazon Kinesis stream to which to deliver matching log events.
putDestination_roleArn :: Lens' PutDestination Text Source #
The ARN of an IAM role that grants CloudWatch Logs permissions to call
the Amazon Kinesis PutRecord
operation on the destination stream.
Destructuring the Response
data PutDestinationResponse Source #
See: newPutDestinationResponse
smart constructor.
PutDestinationResponse' | |
|
Instances
newPutDestinationResponse Source #
Create a value of PutDestinationResponse
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:destination:PutDestinationResponse'
, putDestinationResponse_destination
- The destination.
$sel:httpStatus:PutDestinationResponse'
, putDestinationResponse_httpStatus
- The response's http status code.
Response Lenses
putDestinationResponse_destination :: Lens' PutDestinationResponse (Maybe Destination) Source #
The destination.
putDestinationResponse_httpStatus :: Lens' PutDestinationResponse Int Source #
The response's http status code.