@pulumi/sumologic
Version:
A Pulumi package for creating and managing sumologic cloud resources.
209 lines (208 loc) • 9.96 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Provides a [Sumologic Local File Source](https://help.sumologic.com/docs/send-data/installed-collectors/sources/local-file-source/).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as sumologic from "@pulumi/sumologic";
*
* const installedCollector = new sumologic.InstalledCollector("installed_collector", {
* name: "test-collector",
* category: "macos/test",
* ephemeral: true,
* });
* const local = new sumologic.LocalFileSource("local", {
* name: "localfile-mac",
* description: "test",
* category: "test",
* collectorId: installedCollector.id,
* pathExpression: "/Applications/Sumo Logic Collector/logs/*.log.*",
* });
* ```
*
* ## Import
*
* Local file sources can be imported using the collector and source IDs, e.g.:
*
* hcl
*
* ```sh
* $ pulumi import sumologic:index/localFileSource:LocalFileSource test 123/456
* ```
*
* Local file sources can also be imported using the collector name and source name, e.g.:
*
* hcl
*
* ```sh
* $ pulumi import sumologic:index/localFileSource:LocalFileSource test my-test-collector/my-test-source
* ```
*
* [1]: https://help.sumologic.com/docs/send-data/installed-collectors/sources/local-file-source/
*
* [2]: https://help.sumologic.com/Manage/Fields
*
* [3]: https://help.sumologic.com/docs/send-data/installed-collectors/sources/local-file-source/#supported-encoding-for-local-file-sources
*/
export declare class LocalFileSource extends pulumi.CustomResource {
/**
* Get an existing LocalFileSource resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LocalFileSourceState, opts?: pulumi.CustomResourceOptions): LocalFileSource;
/**
* Returns true if the given object is an instance of LocalFileSource. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is LocalFileSource;
readonly automaticDateParsing: pulumi.Output<boolean | undefined>;
/**
* The default source category for the source.
*/
readonly category: pulumi.Output<string | undefined>;
readonly collectorId: pulumi.Output<number>;
readonly contentType: pulumi.Output<string | undefined>;
readonly cutoffRelativeTime: pulumi.Output<string | undefined>;
readonly cutoffTimestamp: pulumi.Output<number | undefined>;
readonly defaultDateFormats: pulumi.Output<outputs.LocalFileSourceDefaultDateFormat[] | undefined>;
readonly denyLists: pulumi.Output<string[] | undefined>;
/**
* The description of the source.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Defines the encoding form. Default is "UTF-8". Other supported encodings are listed [here](https://help.sumologic.com/docs/send-data/installed-collectors/sources/local-file-source/#supported-encoding-for-local-file-sources).
*/
readonly encoding: pulumi.Output<string | undefined>;
/**
* Map containing [key/value pairs][2].
*/
readonly fields: pulumi.Output<{
[key: string]: string;
} | undefined>;
readonly filters: pulumi.Output<outputs.LocalFileSourceFilter[] | undefined>;
readonly forceTimezone: pulumi.Output<boolean | undefined>;
readonly hashAlgorithm: pulumi.Output<string | undefined>;
readonly hostName: pulumi.Output<string | undefined>;
readonly manualPrefixRegexp: pulumi.Output<string | undefined>;
readonly multilineProcessingEnabled: pulumi.Output<boolean | undefined>;
/**
* The name of the local file source. This is required, and has to be unique. Changing this will force recreation the source.
*/
readonly name: pulumi.Output<string>;
/**
* A valid path expression (full path) of the file to collect. For files on Windows systems (not including Windows Events), enter the absolute path including the drive letter. Escape special characters and spaces with a backslash (). If you are collecting from Windows using CIFS/SMB, see Prerequisites for Windows Log Collection. Use a single asterisk wildcard [*] for file or folder names. Example:[var/foo/*.log]. Use two asterisks [**]to recurse within directories and subdirectories. Example: [var/*/.log].
*/
readonly pathExpression: pulumi.Output<string>;
readonly timezone: pulumi.Output<string | undefined>;
readonly useAutolineMatching: pulumi.Output<boolean | undefined>;
/**
* Create a LocalFileSource resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: LocalFileSourceArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering LocalFileSource resources.
*/
export interface LocalFileSourceState {
automaticDateParsing?: pulumi.Input<boolean>;
/**
* The default source category for the source.
*/
category?: pulumi.Input<string>;
collectorId?: pulumi.Input<number>;
contentType?: pulumi.Input<string>;
cutoffRelativeTime?: pulumi.Input<string>;
cutoffTimestamp?: pulumi.Input<number>;
defaultDateFormats?: pulumi.Input<pulumi.Input<inputs.LocalFileSourceDefaultDateFormat>[]>;
denyLists?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The description of the source.
*/
description?: pulumi.Input<string>;
/**
* Defines the encoding form. Default is "UTF-8". Other supported encodings are listed [here](https://help.sumologic.com/docs/send-data/installed-collectors/sources/local-file-source/#supported-encoding-for-local-file-sources).
*/
encoding?: pulumi.Input<string>;
/**
* Map containing [key/value pairs][2].
*/
fields?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
filters?: pulumi.Input<pulumi.Input<inputs.LocalFileSourceFilter>[]>;
forceTimezone?: pulumi.Input<boolean>;
hashAlgorithm?: pulumi.Input<string>;
hostName?: pulumi.Input<string>;
manualPrefixRegexp?: pulumi.Input<string>;
multilineProcessingEnabled?: pulumi.Input<boolean>;
/**
* The name of the local file source. This is required, and has to be unique. Changing this will force recreation the source.
*/
name?: pulumi.Input<string>;
/**
* A valid path expression (full path) of the file to collect. For files on Windows systems (not including Windows Events), enter the absolute path including the drive letter. Escape special characters and spaces with a backslash (). If you are collecting from Windows using CIFS/SMB, see Prerequisites for Windows Log Collection. Use a single asterisk wildcard [*] for file or folder names. Example:[var/foo/*.log]. Use two asterisks [**]to recurse within directories and subdirectories. Example: [var/*/.log].
*/
pathExpression?: pulumi.Input<string>;
timezone?: pulumi.Input<string>;
useAutolineMatching?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a LocalFileSource resource.
*/
export interface LocalFileSourceArgs {
automaticDateParsing?: pulumi.Input<boolean>;
/**
* The default source category for the source.
*/
category?: pulumi.Input<string>;
collectorId: pulumi.Input<number>;
contentType?: pulumi.Input<string>;
cutoffRelativeTime?: pulumi.Input<string>;
cutoffTimestamp?: pulumi.Input<number>;
defaultDateFormats?: pulumi.Input<pulumi.Input<inputs.LocalFileSourceDefaultDateFormat>[]>;
denyLists?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The description of the source.
*/
description?: pulumi.Input<string>;
/**
* Defines the encoding form. Default is "UTF-8". Other supported encodings are listed [here](https://help.sumologic.com/docs/send-data/installed-collectors/sources/local-file-source/#supported-encoding-for-local-file-sources).
*/
encoding?: pulumi.Input<string>;
/**
* Map containing [key/value pairs][2].
*/
fields?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
filters?: pulumi.Input<pulumi.Input<inputs.LocalFileSourceFilter>[]>;
forceTimezone?: pulumi.Input<boolean>;
hashAlgorithm?: pulumi.Input<string>;
hostName?: pulumi.Input<string>;
manualPrefixRegexp?: pulumi.Input<string>;
multilineProcessingEnabled?: pulumi.Input<boolean>;
/**
* The name of the local file source. This is required, and has to be unique. Changing this will force recreation the source.
*/
name?: pulumi.Input<string>;
/**
* A valid path expression (full path) of the file to collect. For files on Windows systems (not including Windows Events), enter the absolute path including the drive letter. Escape special characters and spaces with a backslash (). If you are collecting from Windows using CIFS/SMB, see Prerequisites for Windows Log Collection. Use a single asterisk wildcard [*] for file or folder names. Example:[var/foo/*.log]. Use two asterisks [**]to recurse within directories and subdirectories. Example: [var/*/.log].
*/
pathExpression: pulumi.Input<string>;
timezone?: pulumi.Input<string>;
useAutolineMatching?: pulumi.Input<boolean>;
}