| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.CloudWatchLogs.PutDestination
Description
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). With a destination, you can 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_tags :: Lens' PutDestination (Maybe (HashMap Text Text))
- 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.
Constructors
| PutDestination' | |
Fields
| |
Instances
Arguments
| :: 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:tags:PutDestination', putDestination_tags - An optional list of key-value pairs to associate with the resource.
For more information about tagging, see Tagging Amazon Web Services resources
PutDestination, putDestination_destinationName - A name for the destination.
PutDestination, putDestination_targetArn - The ARN of an Amazon Kinesis stream to which to deliver matching log
events.
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_tags :: Lens' PutDestination (Maybe (HashMap Text Text)) Source #
An optional list of key-value pairs to associate with the resource.
For more information about tagging, see Tagging Amazon Web Services resources
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.
Constructors
| PutDestinationResponse' | |
Fields
| |
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:
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.