UNPKG

@pulumi/sumologic

Version:

A Pulumi package for creating and managing sumologic cloud resources.

271 lines (270 loc) 10.9 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * !> **WARNING:** This data source is deprecated and will be removed in the next major version. * * Provides a Sumologic Polling source. This source is used to import data from various AWS products, eg. AWS S3 buckets, Cloudwatch Metrics etc. * * __IMPORTANT:__ The AWS credentials are stored in plain-text in the state. This is a potential security issue. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const tagfilters = [ * { * type: "TagFilters", * namespace: "All", * tags: ["k3=v3"], * }, * { * type: "TagFilters", * namespace: "AWS/Route53", * tags: ["k1=v1"], * }, * { * type: "TagFilters", * namespace: "AWS/S3", * tags: ["k2=v2"], * }, * ]; * const collector = new sumologic.Collector("collector", { * name: "my-collector", * description: "Just testing this", * }); * const s3Audit = new sumologic.PollingSource("s3_audit", { * name: "Amazon S3 Audit", * description: "My description", * category: "aws/s3audit", * contentType: "AwsS3AuditBucket", * scanInterval: 300000, * paused: false, * collectorId: collector.id, * filters: [{ * name: "Exclude Comments", * filterType: "Exclude", * regexp: "#.*", * }], * authentication: { * type: "S3BucketAuthentication", * accessKey: "someKey", * secretKey: "******", * }, * path: { * type: "S3BucketPathExpression", * bucketName: "Bucket1", * pathExpression: "*", * }, * }); * const cwMetrics = new sumologic.PollingSource("cw_metrics", { * name: "CloudWatch Metrics", * description: "My description", * category: "aws/cw", * contentType: "AwsCloudWatch", * scanInterval: 300000, * paused: false, * collectorId: collector.id, * authentication: { * type: "AWSRoleBasedAuthentication", * roleArn: "arn:aws:iam::604066827510:role/cw-role-SumoRole-4AOLS73TGKYI", * }, * path: { * tagFilters: tagfilters.map((v, k) => ({key: k, value: v})).map(entry => ({ * type: entry.value.type, * namespace: entry.value.namespace, * tags: entry.value.tags, * })), * type: "CloudWatchPath", * limitToRegions: ["us-west-2"], * limitToNamespaces: [ * "AWS/Route53", * "AWS/S3", * "customNamespace", * ], * }, * }); * ``` * * ## Import * * Polling sources can be imported using the collector and source IDs (`collector/source`), e.g.: * * hcl * * ```sh * $ pulumi import sumologic:index/pollingSource:PollingSource test 123/456 * ``` * * HTTP sources can be imported using the collector name and source name (`collectorName/sourceName`), e.g.: * * hcl * * ```sh * $ pulumi import sumologic:index/pollingSource:PollingSource test my-test-collector/my-test-source * ``` * * [1]: https://help.sumologic.com/Send_Data/Sources/03Use_JSON_to_Configure_Sources/JSON_Parameters_for_Hosted_Sources */ export declare class PollingSource extends pulumi.CustomResource { /** * Get an existing PollingSource 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?: PollingSourceState, opts?: pulumi.CustomResourceOptions): PollingSource; /** * Returns true if the given object is an instance of PollingSource. 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 PollingSource; /** * Authentication details for connecting to the S3 bucket. */ readonly authentication: pulumi.Output<outputs.PollingSourceAuthentication>; readonly automaticDateParsing: pulumi.Output<boolean | undefined>; readonly category: pulumi.Output<string | undefined>; readonly collectorId: pulumi.Output<number>; /** * The content-type of the collected data. Details can be found in the [Sumologic documentation for hosted sources](https://help.sumologic.com/Send_Data/Sources/03Use_JSON_to_Configure_Sources/JSON_Parameters_for_Hosted_Sources). */ readonly contentType: pulumi.Output<string>; readonly cutoffRelativeTime: pulumi.Output<string | undefined>; readonly cutoffTimestamp: pulumi.Output<number | undefined>; readonly defaultDateFormats: pulumi.Output<outputs.PollingSourceDefaultDateFormat[] | undefined>; readonly description: pulumi.Output<string | undefined>; readonly fields: pulumi.Output<{ [key: string]: string; } | undefined>; readonly filters: pulumi.Output<outputs.PollingSourceFilter[] | 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>; readonly name: pulumi.Output<string>; /** * The location to scan for new data. */ readonly path: pulumi.Output<outputs.PollingSourcePath>; /** * When set to true, the scanner is paused. To disable, set to false. */ readonly paused: pulumi.Output<boolean>; /** * Time interval in milliseconds of scans for new data. The default is 300000 and the minimum value is 1000 milliseconds. */ readonly scanInterval: pulumi.Output<number>; readonly timezone: pulumi.Output<string | undefined>; /** * The HTTP endpoint to use with [SNS to notify Sumo Logic of new files](https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/Amazon-Web-Services/AWS-S3-Source#Set_up_SNS_in_AWS_(Optional)). */ readonly url: pulumi.Output<string>; readonly useAutolineMatching: pulumi.Output<boolean | undefined>; /** * Create a PollingSource 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: PollingSourceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PollingSource resources. */ export interface PollingSourceState { /** * Authentication details for connecting to the S3 bucket. */ authentication?: pulumi.Input<inputs.PollingSourceAuthentication>; automaticDateParsing?: pulumi.Input<boolean>; category?: pulumi.Input<string>; collectorId?: pulumi.Input<number>; /** * The content-type of the collected data. Details can be found in the [Sumologic documentation for hosted sources](https://help.sumologic.com/Send_Data/Sources/03Use_JSON_to_Configure_Sources/JSON_Parameters_for_Hosted_Sources). */ contentType?: pulumi.Input<string>; cutoffRelativeTime?: pulumi.Input<string>; cutoffTimestamp?: pulumi.Input<number>; defaultDateFormats?: pulumi.Input<pulumi.Input<inputs.PollingSourceDefaultDateFormat>[]>; description?: pulumi.Input<string>; fields?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; filters?: pulumi.Input<pulumi.Input<inputs.PollingSourceFilter>[]>; forceTimezone?: pulumi.Input<boolean>; hashAlgorithm?: pulumi.Input<string>; hostName?: pulumi.Input<string>; manualPrefixRegexp?: pulumi.Input<string>; multilineProcessingEnabled?: pulumi.Input<boolean>; name?: pulumi.Input<string>; /** * The location to scan for new data. */ path?: pulumi.Input<inputs.PollingSourcePath>; /** * When set to true, the scanner is paused. To disable, set to false. */ paused?: pulumi.Input<boolean>; /** * Time interval in milliseconds of scans for new data. The default is 300000 and the minimum value is 1000 milliseconds. */ scanInterval?: pulumi.Input<number>; timezone?: pulumi.Input<string>; /** * The HTTP endpoint to use with [SNS to notify Sumo Logic of new files](https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/Amazon-Web-Services/AWS-S3-Source#Set_up_SNS_in_AWS_(Optional)). */ url?: pulumi.Input<string>; useAutolineMatching?: pulumi.Input<boolean>; } /** * The set of arguments for constructing a PollingSource resource. */ export interface PollingSourceArgs { /** * Authentication details for connecting to the S3 bucket. */ authentication: pulumi.Input<inputs.PollingSourceAuthentication>; automaticDateParsing?: pulumi.Input<boolean>; category?: pulumi.Input<string>; collectorId: pulumi.Input<number>; /** * The content-type of the collected data. Details can be found in the [Sumologic documentation for hosted sources](https://help.sumologic.com/Send_Data/Sources/03Use_JSON_to_Configure_Sources/JSON_Parameters_for_Hosted_Sources). */ contentType: pulumi.Input<string>; cutoffRelativeTime?: pulumi.Input<string>; cutoffTimestamp?: pulumi.Input<number>; defaultDateFormats?: pulumi.Input<pulumi.Input<inputs.PollingSourceDefaultDateFormat>[]>; description?: pulumi.Input<string>; fields?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; filters?: pulumi.Input<pulumi.Input<inputs.PollingSourceFilter>[]>; forceTimezone?: pulumi.Input<boolean>; hashAlgorithm?: pulumi.Input<string>; hostName?: pulumi.Input<string>; manualPrefixRegexp?: pulumi.Input<string>; multilineProcessingEnabled?: pulumi.Input<boolean>; name?: pulumi.Input<string>; /** * The location to scan for new data. */ path: pulumi.Input<inputs.PollingSourcePath>; /** * When set to true, the scanner is paused. To disable, set to false. */ paused: pulumi.Input<boolean>; /** * Time interval in milliseconds of scans for new data. The default is 300000 and the minimum value is 1000 milliseconds. */ scanInterval: pulumi.Input<number>; timezone?: pulumi.Input<string>; useAutolineMatching?: pulumi.Input<boolean>; }