/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace CloudWatchLogs { namespace Model { /** */ class GetLogEventsRequest : public CloudWatchLogsRequest { public: AWS_CLOUDWATCHLOGS_API GetLogEventsRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "GetLogEvents"; } AWS_CLOUDWATCHLOGS_API Aws::String SerializePayload() const override; AWS_CLOUDWATCHLOGS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the log group.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline const Aws::String& GetLogGroupName() const{ return m_logGroupName; } /** *

The name of the log group.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; } /** *

The name of the log group.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline void SetLogGroupName(const Aws::String& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = value; } /** *

The name of the log group.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline void SetLogGroupName(Aws::String&& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = std::move(value); } /** *

The name of the log group.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline void SetLogGroupName(const char* value) { m_logGroupNameHasBeenSet = true; m_logGroupName.assign(value); } /** *

The name of the log group.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline GetLogEventsRequest& WithLogGroupName(const Aws::String& value) { SetLogGroupName(value); return *this;} /** *

The name of the log group.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline GetLogEventsRequest& WithLogGroupName(Aws::String&& value) { SetLogGroupName(std::move(value)); return *this;} /** *

The name of the log group.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline GetLogEventsRequest& WithLogGroupName(const char* value) { SetLogGroupName(value); return *this;} /** *

Specify either the name or ARN of the log group to view events from. If the * log group is in a source account and you are using a monitoring account, you * must use the log group ARN.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline const Aws::String& GetLogGroupIdentifier() const{ return m_logGroupIdentifier; } /** *

Specify either the name or ARN of the log group to view events from. If the * log group is in a source account and you are using a monitoring account, you * must use the log group ARN.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline bool LogGroupIdentifierHasBeenSet() const { return m_logGroupIdentifierHasBeenSet; } /** *

Specify either the name or ARN of the log group to view events from. If the * log group is in a source account and you are using a monitoring account, you * must use the log group ARN.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline void SetLogGroupIdentifier(const Aws::String& value) { m_logGroupIdentifierHasBeenSet = true; m_logGroupIdentifier = value; } /** *

Specify either the name or ARN of the log group to view events from. If the * log group is in a source account and you are using a monitoring account, you * must use the log group ARN.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline void SetLogGroupIdentifier(Aws::String&& value) { m_logGroupIdentifierHasBeenSet = true; m_logGroupIdentifier = std::move(value); } /** *

Specify either the name or ARN of the log group to view events from. If the * log group is in a source account and you are using a monitoring account, you * must use the log group ARN.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline void SetLogGroupIdentifier(const char* value) { m_logGroupIdentifierHasBeenSet = true; m_logGroupIdentifier.assign(value); } /** *

Specify either the name or ARN of the log group to view events from. If the * log group is in a source account and you are using a monitoring account, you * must use the log group ARN.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline GetLogEventsRequest& WithLogGroupIdentifier(const Aws::String& value) { SetLogGroupIdentifier(value); return *this;} /** *

Specify either the name or ARN of the log group to view events from. If the * log group is in a source account and you are using a monitoring account, you * must use the log group ARN.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline GetLogEventsRequest& WithLogGroupIdentifier(Aws::String&& value) { SetLogGroupIdentifier(std::move(value)); return *this;} /** *

Specify either the name or ARN of the log group to view events from. If the * log group is in a source account and you are using a monitoring account, you * must use the log group ARN.

You must include either * logGroupIdentifier or logGroupName, but not both.

* */ inline GetLogEventsRequest& WithLogGroupIdentifier(const char* value) { SetLogGroupIdentifier(value); return *this;} /** *

The name of the log stream.

*/ inline const Aws::String& GetLogStreamName() const{ return m_logStreamName; } /** *

The name of the log stream.

*/ inline bool LogStreamNameHasBeenSet() const { return m_logStreamNameHasBeenSet; } /** *

The name of the log stream.

*/ inline void SetLogStreamName(const Aws::String& value) { m_logStreamNameHasBeenSet = true; m_logStreamName = value; } /** *

The name of the log stream.

*/ inline void SetLogStreamName(Aws::String&& value) { m_logStreamNameHasBeenSet = true; m_logStreamName = std::move(value); } /** *

The name of the log stream.

*/ inline void SetLogStreamName(const char* value) { m_logStreamNameHasBeenSet = true; m_logStreamName.assign(value); } /** *

The name of the log stream.

*/ inline GetLogEventsRequest& WithLogStreamName(const Aws::String& value) { SetLogStreamName(value); return *this;} /** *

The name of the log stream.

*/ inline GetLogEventsRequest& WithLogStreamName(Aws::String&& value) { SetLogStreamName(std::move(value)); return *this;} /** *

The name of the log stream.

*/ inline GetLogEventsRequest& WithLogStreamName(const char* value) { SetLogStreamName(value); return *this;} /** *

The start of the time range, expressed as the number of milliseconds after * Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to this * time or later than this time are included. Events with a timestamp earlier than * this time are not included.

*/ inline long long GetStartTime() const{ return m_startTime; } /** *

The start of the time range, expressed as the number of milliseconds after * Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to this * time or later than this time are included. Events with a timestamp earlier than * this time are not included.

*/ inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; } /** *

The start of the time range, expressed as the number of milliseconds after * Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to this * time or later than this time are included. Events with a timestamp earlier than * this time are not included.

*/ inline void SetStartTime(long long value) { m_startTimeHasBeenSet = true; m_startTime = value; } /** *

The start of the time range, expressed as the number of milliseconds after * Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to this * time or later than this time are included. Events with a timestamp earlier than * this time are not included.

*/ inline GetLogEventsRequest& WithStartTime(long long value) { SetStartTime(value); return *this;} /** *

The end of the time range, expressed as the number of milliseconds after * Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to or later * than this time are not included.

*/ inline long long GetEndTime() const{ return m_endTime; } /** *

The end of the time range, expressed as the number of milliseconds after * Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to or later * than this time are not included.

*/ inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; } /** *

The end of the time range, expressed as the number of milliseconds after * Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to or later * than this time are not included.

*/ inline void SetEndTime(long long value) { m_endTimeHasBeenSet = true; m_endTime = value; } /** *

The end of the time range, expressed as the number of milliseconds after * Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to or later * than this time are not included.

*/ inline GetLogEventsRequest& WithEndTime(long long value) { SetEndTime(value); return *this;} /** *

The token for the next set of items to return. (You received this token from * a previous call.)

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

The token for the next set of items to return. (You received this token from * a previous call.)

*/ inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } /** *

The token for the next set of items to return. (You received this token from * a previous call.)

*/ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** *

The token for the next set of items to return. (You received this token from * a previous call.)

*/ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** *

The token for the next set of items to return. (You received this token from * a previous call.)

*/ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** *

The token for the next set of items to return. (You received this token from * a previous call.)

*/ inline GetLogEventsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

The token for the next set of items to return. (You received this token from * a previous call.)

*/ inline GetLogEventsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

The token for the next set of items to return. (You received this token from * a previous call.)

*/ inline GetLogEventsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} /** *

The maximum number of log events returned. If you don't specify a limit, the * default is as many log events as can fit in a response size of 1 MB (up to * 10,000 log events).

*/ inline int GetLimit() const{ return m_limit; } /** *

The maximum number of log events returned. If you don't specify a limit, the * default is as many log events as can fit in a response size of 1 MB (up to * 10,000 log events).

*/ inline bool LimitHasBeenSet() const { return m_limitHasBeenSet; } /** *

The maximum number of log events returned. If you don't specify a limit, the * default is as many log events as can fit in a response size of 1 MB (up to * 10,000 log events).

*/ inline void SetLimit(int value) { m_limitHasBeenSet = true; m_limit = value; } /** *

The maximum number of log events returned. If you don't specify a limit, the * default is as many log events as can fit in a response size of 1 MB (up to * 10,000 log events).

*/ inline GetLogEventsRequest& WithLimit(int value) { SetLimit(value); return *this;} /** *

If the value is true, the earliest log events are returned first. If the * value is false, the latest log events are returned first. The default value is * false.

If you are using a previous nextForwardToken value as * the nextToken in this operation, you must specify true * for startFromHead.

*/ inline bool GetStartFromHead() const{ return m_startFromHead; } /** *

If the value is true, the earliest log events are returned first. If the * value is false, the latest log events are returned first. The default value is * false.

If you are using a previous nextForwardToken value as * the nextToken in this operation, you must specify true * for startFromHead.

*/ inline bool StartFromHeadHasBeenSet() const { return m_startFromHeadHasBeenSet; } /** *

If the value is true, the earliest log events are returned first. If the * value is false, the latest log events are returned first. The default value is * false.

If you are using a previous nextForwardToken value as * the nextToken in this operation, you must specify true * for startFromHead.

*/ inline void SetStartFromHead(bool value) { m_startFromHeadHasBeenSet = true; m_startFromHead = value; } /** *

If the value is true, the earliest log events are returned first. If the * value is false, the latest log events are returned first. The default value is * false.

If you are using a previous nextForwardToken value as * the nextToken in this operation, you must specify true * for startFromHead.

*/ inline GetLogEventsRequest& WithStartFromHead(bool value) { SetStartFromHead(value); return *this;} /** *

Specify true to display the log event fields with all sensitive * data unmasked and visible. The default is false.

To use this * operation with this parameter, you must be signed into an account with the * logs:Unmask permission.

*/ inline bool GetUnmask() const{ return m_unmask; } /** *

Specify true to display the log event fields with all sensitive * data unmasked and visible. The default is false.

To use this * operation with this parameter, you must be signed into an account with the * logs:Unmask permission.

*/ inline bool UnmaskHasBeenSet() const { return m_unmaskHasBeenSet; } /** *

Specify true to display the log event fields with all sensitive * data unmasked and visible. The default is false.

To use this * operation with this parameter, you must be signed into an account with the * logs:Unmask permission.

*/ inline void SetUnmask(bool value) { m_unmaskHasBeenSet = true; m_unmask = value; } /** *

Specify true to display the log event fields with all sensitive * data unmasked and visible. The default is false.

To use this * operation with this parameter, you must be signed into an account with the * logs:Unmask permission.

*/ inline GetLogEventsRequest& WithUnmask(bool value) { SetUnmask(value); return *this;} private: Aws::String m_logGroupName; bool m_logGroupNameHasBeenSet = false; Aws::String m_logGroupIdentifier; bool m_logGroupIdentifierHasBeenSet = false; Aws::String m_logStreamName; bool m_logStreamNameHasBeenSet = false; long long m_startTime; bool m_startTimeHasBeenSet = false; long long m_endTime; bool m_endTimeHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; int m_limit; bool m_limitHasBeenSet = false; bool m_startFromHead; bool m_startFromHeadHasBeenSet = false; bool m_unmask; bool m_unmaskHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchLogs } // namespace Aws