amazonka-cloudwatch-logs-2.0: Amazon CloudWatch Logs SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.CloudWatchLogs.GetLogGroupFields

Description

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

Creating a Request

data GetLogGroupFields Source #

See: newGetLogGroupFields smart constructor.

Constructors

GetLogGroupFields' 

Fields

  • logGroupIdentifier :: Maybe Text

    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.

  • time :: Maybe Natural

    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.

  • logGroupName :: Text

    The name of the log group to search.

    If you specify values for both logGroupName and logGroupIdentifier, the action returns an InvalidParameterException error.

Instances

Instances details
ToJSON GetLogGroupFields Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

ToHeaders GetLogGroupFields Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

ToPath GetLogGroupFields Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

ToQuery GetLogGroupFields Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

AWSRequest GetLogGroupFields Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

Associated Types

type AWSResponse GetLogGroupFields #

Generic GetLogGroupFields Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

Associated Types

type Rep GetLogGroupFields :: Type -> Type #

Read GetLogGroupFields Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

Show GetLogGroupFields Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

NFData GetLogGroupFields Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

Methods

rnf :: GetLogGroupFields -> () #

Eq GetLogGroupFields Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

Hashable GetLogGroupFields Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

type AWSResponse GetLogGroupFields Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

type Rep GetLogGroupFields Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

type Rep GetLogGroupFields = D1 ('MetaData "GetLogGroupFields" "Amazonka.CloudWatchLogs.GetLogGroupFields" "amazonka-cloudwatch-logs-2.0-6gvDalNFsfE8djZ4aTfA4V" 'False) (C1 ('MetaCons "GetLogGroupFields'" 'PrefixI 'True) (S1 ('MetaSel ('Just "logGroupIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "time") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "logGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newGetLogGroupFields Source #

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.

Constructors

GetLogGroupFieldsResponse' 

Fields

  • logGroupFields :: Maybe [LogGroupField]

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic GetLogGroupFieldsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

Associated Types

type Rep GetLogGroupFieldsResponse :: Type -> Type #

Read GetLogGroupFieldsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

Show GetLogGroupFieldsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

NFData GetLogGroupFieldsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

Eq GetLogGroupFieldsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

type Rep GetLogGroupFieldsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogGroupFields

type Rep GetLogGroupFieldsResponse = D1 ('MetaData "GetLogGroupFieldsResponse" "Amazonka.CloudWatchLogs.GetLogGroupFields" "amazonka-cloudwatch-logs-2.0-6gvDalNFsfE8djZ4aTfA4V" 'False) (C1 ('MetaCons "GetLogGroupFieldsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "logGroupFields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [LogGroupField])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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.