Partager via


LogFilesDataSource Class

  • java.lang.Object
    • com.azure.resourcemanager.monitor.models.LogFilesDataSource

Implements

public final class LogFilesDataSource
implements JsonSerializable<LogFilesDataSource>

Definition of which custom log files will be collected by this data collection rule.

Constructor Summary

Constructor Description
LogFilesDataSource()

Creates an instance of LogFilesDataSource class.

Method Summary

Modifier and Type Method and Description
List<String> filePatterns()

Get the filePatterns property: File Patterns where the log files are located.

KnownLogFilesDataSourceFormat format()

Get the format property: The data format of the log files.

static LogFilesDataSource fromJson(JsonReader jsonReader)

Reads an instance of LogFilesDataSource from the JsonReader.

String name()

Get the name property: A friendly name for the data source.

LogFilesDataSourceSettings settings()

Get the settings property: The log files specific settings.

List<String> streams()

Get the streams property: List of streams that this data source will be sent to.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

LogFilesDataSource withFilePatterns(List<String> filePatterns)

Set the filePatterns property: File Patterns where the log files are located.

LogFilesDataSource withFormat(KnownLogFilesDataSourceFormat format)

Set the format property: The data format of the log files.

LogFilesDataSource withName(String name)

Set the name property: A friendly name for the data source.

LogFilesDataSource withSettings(LogFilesDataSourceSettings settings)

Set the settings property: The log files specific settings.

LogFilesDataSource withStreams(List<String> streams)

Set the streams property: List of streams that this data source will be sent to.

Methods inherited from java.lang.Object

Constructor Details

LogFilesDataSource

public LogFilesDataSource()

Creates an instance of LogFilesDataSource class.

Method Details

filePatterns

public List filePatterns()

Get the filePatterns property: File Patterns where the log files are located.

Returns:

the filePatterns value.

format

public KnownLogFilesDataSourceFormat format()

Get the format property: The data format of the log files.

Returns:

the format value.

fromJson

public static LogFilesDataSource fromJson(JsonReader jsonReader)

Reads an instance of LogFilesDataSource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of LogFilesDataSource if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

name

public String name()

Get the name property: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule.

Returns:

the name value.

settings

public LogFilesDataSourceSettings settings()

Get the settings property: The log files specific settings.

Returns:

the settings value.

streams

public List streams()

Get the streams property: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data source.

Returns:

the streams value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withFilePatterns

public LogFilesDataSource withFilePatterns(List filePatterns)

Set the filePatterns property: File Patterns where the log files are located.

Parameters:

filePatterns - the filePatterns value to set.

Returns:

the LogFilesDataSource object itself.

withFormat

public LogFilesDataSource withFormat(KnownLogFilesDataSourceFormat format)

Set the format property: The data format of the log files.

Parameters:

format - the format value to set.

Returns:

the LogFilesDataSource object itself.

withName

public LogFilesDataSource withName(String name)

Set the name property: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule.

Parameters:

name - the name value to set.

Returns:

the LogFilesDataSource object itself.

withSettings

public LogFilesDataSource withSettings(LogFilesDataSourceSettings settings)

Set the settings property: The log files specific settings.

Parameters:

settings - the settings value to set.

Returns:

the LogFilesDataSource object itself.

withStreams

public LogFilesDataSource withStreams(List streams)

Set the streams property: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data source.

Parameters:

streams - the streams value to set.

Returns:

the LogFilesDataSource object itself.

Applies to