cloudwatchlogs_put_log_events: Uploads a batch of log events to the specified log stream

Description Usage Arguments Value Request syntax

View source: R/cloudwatchlogs_operations.R

Description

Uploads a batch of log events to the specified log stream.

You must include the sequence token obtained from the response of the previous call. An upload in a newly created log stream does not require a sequence token. You can also get the sequence token in the expectedSequenceToken field from InvalidSequenceTokenException. If you call put_log_events twice within a narrow time period using the same value for sequenceToken, both calls might be successful or one might be rejected.

The batch of events must satisfy the following constraints:

If a call to put_log_events returns "UnrecognizedClientException" the most likely cause is an invalid AWS access key ID or secret key.

Usage

1
2
cloudwatchlogs_put_log_events(logGroupName, logStreamName, logEvents,
  sequenceToken)

Arguments

logGroupName

[required] The name of the log group.

logStreamName

[required] The name of the log stream.

logEvents

[required] The log events.

sequenceToken

The sequence token obtained from the response of the previous put_log_events call. An upload in a newly created log stream does not require a sequence token. You can also get the sequence token using describe_log_streams. If you call put_log_events twice within a narrow time period using the same value for sequenceToken, both calls might be successful or one might be rejected.

Value

A list with the following syntax:

1
2
3
4
5
6
7
8
list(
  nextSequenceToken = "string",
  rejectedLogEventsInfo = list(
    tooNewLogEventStartIndex = 123,
    tooOldLogEventEndIndex = 123,
    expiredLogEventEndIndex = 123
  )
)

Request syntax

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
svc$put_log_events(
  logGroupName = "string",
  logStreamName = "string",
  logEvents = list(
    list(
      timestamp = 123,
      message = "string"
    )
  ),
  sequenceToken = "string"
)

paws.management documentation built on Aug. 23, 2021, 9:11 a.m.