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 |
Returns a list of the fields that are included in log events in the specified log group. Includes the percentage of log events that contain each field. The search is limited to a time period that you specify.
In the results, fields that start with @
are fields generated by
CloudWatch Logs. For example, @timestamp
is the timestamp of each log
event. For more information about the fields that are generated by
CloudWatch logs, see
Supported Logs and Discovered Fields.
The response results are sorted by the frequency percentage, starting with the highest percentage.
If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and view data from the linked source accounts. For more information, see CloudWatch cross-account observability.
Synopsis
- data GetLogGroupFields = GetLogGroupFields' {}
- newGetLogGroupFields :: Text -> GetLogGroupFields
- getLogGroupFields_logGroupIdentifier :: Lens' GetLogGroupFields (Maybe Text)
- getLogGroupFields_time :: Lens' GetLogGroupFields (Maybe Natural)
- getLogGroupFields_logGroupName :: Lens' GetLogGroupFields Text
- data GetLogGroupFieldsResponse = GetLogGroupFieldsResponse' {}
- newGetLogGroupFieldsResponse :: Int -> GetLogGroupFieldsResponse
- getLogGroupFieldsResponse_logGroupFields :: Lens' GetLogGroupFieldsResponse (Maybe [LogGroupField])
- getLogGroupFieldsResponse_httpStatus :: Lens' GetLogGroupFieldsResponse Int
Creating a Request
data GetLogGroupFields Source #
See: newGetLogGroupFields
smart constructor.
GetLogGroupFields' | |
|
Instances
Create a value of GetLogGroupFields
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:logGroupIdentifier:GetLogGroupFields'
, getLogGroupFields_logGroupIdentifier
- Specify either the name or ARN of the log group to view. If the log
group is in a source account and you are using a monitoring account, you
must specify the ARN.
If you specify values for both logGroupName
and logGroupIdentifier
,
the action returns an InvalidParameterException
error.
$sel:time:GetLogGroupFields'
, getLogGroupFields_time
- The time to set as the center of the query. If you specify time
, the
15 minutes before this time are queries. If you omit time
, the 8
minutes before and 8 minutes after this time are searched.
The time
value is specified as epoch time, which is the number of
seconds since January 1, 1970, 00:00:00 UTC
.
GetLogGroupFields
, getLogGroupFields_logGroupName
- The name of the log group to search.
If you specify values for both logGroupName
and logGroupIdentifier
,
the action returns an InvalidParameterException
error.
Request Lenses
getLogGroupFields_logGroupIdentifier :: Lens' GetLogGroupFields (Maybe Text) Source #
Specify either the name or ARN of the log group to view. If the log group is in a source account and you are using a monitoring account, you must specify the ARN.
If you specify values for both logGroupName
and logGroupIdentifier
,
the action returns an InvalidParameterException
error.
getLogGroupFields_time :: Lens' GetLogGroupFields (Maybe Natural) Source #
The time to set as the center of the query. If you specify time
, the
15 minutes before this time are queries. If you omit time
, the 8
minutes before and 8 minutes after this time are searched.
The time
value is specified as epoch time, which is the number of
seconds since January 1, 1970, 00:00:00 UTC
.
getLogGroupFields_logGroupName :: Lens' GetLogGroupFields Text Source #
The name of the log group to search.
If you specify values for both logGroupName
and logGroupIdentifier
,
the action returns an InvalidParameterException
error.
Destructuring the Response
data GetLogGroupFieldsResponse Source #
See: newGetLogGroupFieldsResponse
smart constructor.
GetLogGroupFieldsResponse' | |
|
Instances
newGetLogGroupFieldsResponse Source #
Create a value of GetLogGroupFieldsResponse
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:logGroupFields:GetLogGroupFieldsResponse'
, getLogGroupFieldsResponse_logGroupFields
- The array of fields found in the query. Each object in the array
contains the name of the field, along with the percentage of time it
appeared in the log events that were queried.
$sel:httpStatus:GetLogGroupFieldsResponse'
, getLogGroupFieldsResponse_httpStatus
- The response's http status code.
Response Lenses
getLogGroupFieldsResponse_logGroupFields :: Lens' GetLogGroupFieldsResponse (Maybe [LogGroupField]) Source #
The array of fields found in the query. Each object in the array contains the name of the field, along with the percentage of time it appeared in the log events that were queried.
getLogGroupFieldsResponse_httpStatus :: Lens' GetLogGroupFieldsResponse Int Source #
The response's http status code.