UNPKG

@pulumi/sumologic

Version:

A Pulumi package for creating and managing sumologic cloud resources.

168 lines (167 loc) 7.09 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provider to manage [Sumologic Data Forwarding Rule](https://help.sumologic.com/docs/manage/data-forwarding/amazon-s3-bucket/#forward-datato-s3) * * ## Example Usage * * For Partitions * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const testPartition = new sumologic.Partition("test_partition", { * name: "testing_rule_partitions", * routingExpression: "_sourcecategory=abc/Terraform", * isCompliant: false, * retentionPeriod: 30, * analyticsTier: "flex", * }); * const exampleDataForwardingRule = new sumologic.DataForwardingRule("example_data_forwarding_rule", { * indexId: testPartition.id, * destinationId: "00000000000732AA", * enabled: true, * fileFormat: "test/{index}/{day}/{hour}/{minute}", * payloadSchema: "builtInFields", * format: "json", * }); * ``` * For Scheduled Views * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const failedConnections = new sumologic.ScheduledView("failed_connections", { * indexName: "failed_connections", * query: "_sourceCategory=fire | count", * startTime: "2024-09-01T00:00:00Z", * retentionPeriod: 1, * }); * const testRuleSv = new sumologic.DataForwardingRule("test_rule_sv", { * indexId: failedConnections.indexId, * destinationId: testDestination.id, * enabled: false, * fileFormat: "test/{index}", * payloadSchema: "raw", * format: "text", * }); * ``` */ export declare class DataForwardingRule extends pulumi.CustomResource { /** * Get an existing DataForwardingRule 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?: DataForwardingRuleState, opts?: pulumi.CustomResourceOptions): DataForwardingRule; /** * Returns true if the given object is an instance of DataForwardingRule. 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 DataForwardingRule; /** * The data forwarding destination id. */ readonly destinationId: pulumi.Output<string>; /** * True when the data forwarding rule is enabled. Will be treated as _false_ if left blank. */ readonly enabled: pulumi.Output<boolean | undefined>; /** * Specify the path prefix to a directory in the S3 bucket and how to format the file name. For possible values, kindly refer the point 6 in the [documentation](https://help.sumologic.com/docs/manage/data-forwarding/amazon-s3-bucket/#forward-datato-s3). */ readonly fileFormat: pulumi.Output<string | undefined>; /** * Format of the payload. Default format will be _csv_. * _text_ format should be used in conjunction with _raw_ payloadSchema and vice versa. * * The following attributes are exported: */ readonly format: pulumi.Output<string | undefined>; /** * The *id* of the Partition or *index_id* of the Scheduled View the rule applies to. */ readonly indexId: pulumi.Output<string>; /** * Schema for the payload. Default value of the payload schema is _allFields_ for scheduled view, and _builtInFields_ for partition. * _raw_ payloadSchema should be used in conjunction with _text_ format and vice versa. */ readonly payloadSchema: pulumi.Output<string | undefined>; /** * Create a DataForwardingRule 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: DataForwardingRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DataForwardingRule resources. */ export interface DataForwardingRuleState { /** * The data forwarding destination id. */ destinationId?: pulumi.Input<string>; /** * True when the data forwarding rule is enabled. Will be treated as _false_ if left blank. */ enabled?: pulumi.Input<boolean>; /** * Specify the path prefix to a directory in the S3 bucket and how to format the file name. For possible values, kindly refer the point 6 in the [documentation](https://help.sumologic.com/docs/manage/data-forwarding/amazon-s3-bucket/#forward-datato-s3). */ fileFormat?: pulumi.Input<string>; /** * Format of the payload. Default format will be _csv_. * _text_ format should be used in conjunction with _raw_ payloadSchema and vice versa. * * The following attributes are exported: */ format?: pulumi.Input<string>; /** * The *id* of the Partition or *index_id* of the Scheduled View the rule applies to. */ indexId?: pulumi.Input<string>; /** * Schema for the payload. Default value of the payload schema is _allFields_ for scheduled view, and _builtInFields_ for partition. * _raw_ payloadSchema should be used in conjunction with _text_ format and vice versa. */ payloadSchema?: pulumi.Input<string>; } /** * The set of arguments for constructing a DataForwardingRule resource. */ export interface DataForwardingRuleArgs { /** * The data forwarding destination id. */ destinationId: pulumi.Input<string>; /** * True when the data forwarding rule is enabled. Will be treated as _false_ if left blank. */ enabled?: pulumi.Input<boolean>; /** * Specify the path prefix to a directory in the S3 bucket and how to format the file name. For possible values, kindly refer the point 6 in the [documentation](https://help.sumologic.com/docs/manage/data-forwarding/amazon-s3-bucket/#forward-datato-s3). */ fileFormat?: pulumi.Input<string>; /** * Format of the payload. Default format will be _csv_. * _text_ format should be used in conjunction with _raw_ payloadSchema and vice versa. * * The following attributes are exported: */ format?: pulumi.Input<string>; /** * The *id* of the Partition or *index_id* of the Scheduled View the rule applies to. */ indexId: pulumi.Input<string>; /** * Schema for the payload. Default value of the payload schema is _allFields_ for scheduled view, and _builtInFields_ for partition. * _raw_ payloadSchema should be used in conjunction with _text_ format and vice versa. */ payloadSchema?: pulumi.Input<string>; }