AWS SDK Version 2 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

.NET Framework 3.5
 
Container for the parameters to the GetLogEvents operation. Retrieves log events from the specified log stream. You can provide an optional time range to filter the results on the event timestamp.

By default, this operation returns as much log events as can fit in a response size of 1MB, up to 10,000 log events. The response will always include a nextForwardToken and a nextBackwardToken in the response body. You can use any of these tokens in subsequent GetLogEvents requests to paginate through events in either forward or backward direction. You can also limit the number of log events returned in the response by specifying the limit parameter in the request.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.CloudWatchLogs.AmazonCloudWatchLogsRequest
      Amazon.CloudWatchLogs.Model.GetLogEventsRequest

Namespace: Amazon.CloudWatchLogs.Model
Assembly: AWSSDK.dll
Version: (assembly version)

Syntax

C#
public class GetLogEventsRequest : AmazonCloudWatchLogsRequest
         IRequestEvents

The GetLogEventsRequest type exposes the following members

Constructors

NameDescription
Public Method GetLogEventsRequest() Empty constructor used to set properties independently even when a simple constructor is available
Public Method GetLogEventsRequest(string, string) Instantiates GetLogEventsRequest with the parameterized properties

Properties

NameTypeDescription
Public Property EndTime System.DateTime Gets and sets the property EndTime.
Public Property Limit System.Int32 Gets and sets the property Limit.

The maximum number of log events returned in the response. If you don't specify a value, the request would return as many log events as can fit in a response size of 1MB, up to 10,000 log events.

Public Property LogGroupName System.String Gets and sets the property LogGroupName.

The name of the log group to query.

Public Property LogStreamName System.String Gets and sets the property LogStreamName.

The name of the log stream to query.

Public Property NextToken System.String Gets and sets the property NextToken.

A string token used for pagination that points to the next page of results. It must be a value obtained from the nextForwardToken or nextBackwardToken fields in the response of the previous GetLogEvents request.

Public Property StartFromHead System.Boolean Gets and sets the property StartFromHead.

If set to true, the earliest log events would be returned first. The default is false (the latest log events are returned first).

Public Property StartTime System.DateTime Gets and sets the property StartTime.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5