sumologic.DataForwardingRule
Explore with Pulumi AI
Provider to manage Sumologic Data Forwarding Rule
Example Usage
For Partitions
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",
});
import pulumi
import pulumi_sumologic as sumologic
test_partition = sumologic.Partition("test_partition",
name="testing_rule_partitions",
routing_expression="_sourcecategory=abc/Terraform",
is_compliant=False,
retention_period=30,
analytics_tier="flex")
example_data_forwarding_rule = sumologic.DataForwardingRule("example_data_forwarding_rule",
index_id=test_partition.id,
destination_id="00000000000732AA",
enabled=True,
file_format="test/{index}/{day}/{hour}/{minute}",
payload_schema="builtInFields",
format="json")
package main
import (
"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testPartition, err := sumologic.NewPartition(ctx, "test_partition", &sumologic.PartitionArgs{
Name: pulumi.String("testing_rule_partitions"),
RoutingExpression: pulumi.String("_sourcecategory=abc/Terraform"),
IsCompliant: pulumi.Bool(false),
RetentionPeriod: pulumi.Int(30),
AnalyticsTier: pulumi.String("flex"),
})
if err != nil {
return err
}
_, err = sumologic.NewDataForwardingRule(ctx, "example_data_forwarding_rule", &sumologic.DataForwardingRuleArgs{
IndexId: testPartition.ID(),
DestinationId: pulumi.String("00000000000732AA"),
Enabled: pulumi.Bool(true),
FileFormat: pulumi.String("test/{index}/{day}/{hour}/{minute}"),
PayloadSchema: pulumi.String("builtInFields"),
Format: pulumi.String("json"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using SumoLogic = Pulumi.SumoLogic;
return await Deployment.RunAsync(() =>
{
var testPartition = new SumoLogic.Partition("test_partition", new()
{
Name = "testing_rule_partitions",
RoutingExpression = "_sourcecategory=abc/Terraform",
IsCompliant = false,
RetentionPeriod = 30,
AnalyticsTier = "flex",
});
var exampleDataForwardingRule = new SumoLogic.DataForwardingRule("example_data_forwarding_rule", new()
{
IndexId = testPartition.Id,
DestinationId = "00000000000732AA",
Enabled = true,
FileFormat = "test/{index}/{day}/{hour}/{minute}",
PayloadSchema = "builtInFields",
Format = "json",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.Partition;
import com.pulumi.sumologic.PartitionArgs;
import com.pulumi.sumologic.DataForwardingRule;
import com.pulumi.sumologic.DataForwardingRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var testPartition = new Partition("testPartition", PartitionArgs.builder()
.name("testing_rule_partitions")
.routingExpression("_sourcecategory=abc/Terraform")
.isCompliant(false)
.retentionPeriod(30)
.analyticsTier("flex")
.build());
var exampleDataForwardingRule = new DataForwardingRule("exampleDataForwardingRule", DataForwardingRuleArgs.builder()
.indexId(testPartition.id())
.destinationId("00000000000732AA")
.enabled(true)
.fileFormat("test/{index}/{day}/{hour}/{minute}")
.payloadSchema("builtInFields")
.format("json")
.build());
}
}
resources:
testPartition:
type: sumologic:Partition
name: test_partition
properties:
name: testing_rule_partitions
routingExpression: _sourcecategory=abc/Terraform
isCompliant: false
retentionPeriod: 30
analyticsTier: flex
exampleDataForwardingRule:
type: sumologic:DataForwardingRule
name: example_data_forwarding_rule
properties:
indexId: ${testPartition.id}
destinationId: 00000000000732AA
enabled: true
fileFormat: test/{index}/{day}/{hour}/{minute}
payloadSchema: builtInFields
format: json
For Scheduled Views
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",
});
import pulumi
import pulumi_sumologic as sumologic
failed_connections = sumologic.ScheduledView("failed_connections",
index_name="failed_connections",
query="_sourceCategory=fire | count",
start_time="2024-09-01T00:00:00Z",
retention_period=1)
test_rule_sv = sumologic.DataForwardingRule("test_rule_sv",
index_id=failed_connections.index_id,
destination_id=test_destination["id"],
enabled=False,
file_format="test/{index}",
payload_schema="raw",
format="text")
package main
import (
"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
failedConnections, err := sumologic.NewScheduledView(ctx, "failed_connections", &sumologic.ScheduledViewArgs{
IndexName: pulumi.String("failed_connections"),
Query: pulumi.String("_sourceCategory=fire | count"),
StartTime: pulumi.String("2024-09-01T00:00:00Z"),
RetentionPeriod: pulumi.Int(1),
})
if err != nil {
return err
}
_, err = sumologic.NewDataForwardingRule(ctx, "test_rule_sv", &sumologic.DataForwardingRuleArgs{
IndexId: failedConnections.IndexId,
DestinationId: pulumi.Any(testDestination.Id),
Enabled: pulumi.Bool(false),
FileFormat: pulumi.String("test/{index}"),
PayloadSchema: pulumi.String("raw"),
Format: pulumi.String("text"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using SumoLogic = Pulumi.SumoLogic;
return await Deployment.RunAsync(() =>
{
var failedConnections = new SumoLogic.ScheduledView("failed_connections", new()
{
IndexName = "failed_connections",
Query = "_sourceCategory=fire | count",
StartTime = "2024-09-01T00:00:00Z",
RetentionPeriod = 1,
});
var testRuleSv = new SumoLogic.DataForwardingRule("test_rule_sv", new()
{
IndexId = failedConnections.IndexId,
DestinationId = testDestination.Id,
Enabled = false,
FileFormat = "test/{index}",
PayloadSchema = "raw",
Format = "text",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.ScheduledView;
import com.pulumi.sumologic.ScheduledViewArgs;
import com.pulumi.sumologic.DataForwardingRule;
import com.pulumi.sumologic.DataForwardingRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var failedConnections = new ScheduledView("failedConnections", ScheduledViewArgs.builder()
.indexName("failed_connections")
.query("_sourceCategory=fire | count")
.startTime("2024-09-01T00:00:00Z")
.retentionPeriod(1)
.build());
var testRuleSv = new DataForwardingRule("testRuleSv", DataForwardingRuleArgs.builder()
.indexId(failedConnections.indexId())
.destinationId(testDestination.id())
.enabled(false)
.fileFormat("test/{index}")
.payloadSchema("raw")
.format("text")
.build());
}
}
resources:
failedConnections:
type: sumologic:ScheduledView
name: failed_connections
properties:
indexName: failed_connections
query: _sourceCategory=fire | count
startTime: 2024-09-01T00:00:00Z
retentionPeriod: 1
testRuleSv:
type: sumologic:DataForwardingRule
name: test_rule_sv
properties:
indexId: ${failedConnections.indexId}
destinationId: ${testDestination.id}
enabled: false
fileFormat: test/{index}
payloadSchema: raw
format: text
Create DataForwardingRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DataForwardingRule(name: string, args: DataForwardingRuleArgs, opts?: CustomResourceOptions);
@overload
def DataForwardingRule(resource_name: str,
args: DataForwardingRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DataForwardingRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination_id: Optional[str] = None,
index_id: Optional[str] = None,
enabled: Optional[bool] = None,
file_format: Optional[str] = None,
format: Optional[str] = None,
payload_schema: Optional[str] = None)
func NewDataForwardingRule(ctx *Context, name string, args DataForwardingRuleArgs, opts ...ResourceOption) (*DataForwardingRule, error)
public DataForwardingRule(string name, DataForwardingRuleArgs args, CustomResourceOptions? opts = null)
public DataForwardingRule(String name, DataForwardingRuleArgs args)
public DataForwardingRule(String name, DataForwardingRuleArgs args, CustomResourceOptions options)
type: sumologic:DataForwardingRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DataForwardingRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DataForwardingRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DataForwardingRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DataForwardingRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DataForwardingRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var dataForwardingRuleResource = new SumoLogic.DataForwardingRule("dataForwardingRuleResource", new()
{
DestinationId = "string",
IndexId = "string",
Enabled = false,
FileFormat = "string",
Format = "string",
PayloadSchema = "string",
});
example, err := sumologic.NewDataForwardingRule(ctx, "dataForwardingRuleResource", &sumologic.DataForwardingRuleArgs{
DestinationId: pulumi.String("string"),
IndexId: pulumi.String("string"),
Enabled: pulumi.Bool(false),
FileFormat: pulumi.String("string"),
Format: pulumi.String("string"),
PayloadSchema: pulumi.String("string"),
})
var dataForwardingRuleResource = new DataForwardingRule("dataForwardingRuleResource", DataForwardingRuleArgs.builder()
.destinationId("string")
.indexId("string")
.enabled(false)
.fileFormat("string")
.format("string")
.payloadSchema("string")
.build());
data_forwarding_rule_resource = sumologic.DataForwardingRule("dataForwardingRuleResource",
destination_id="string",
index_id="string",
enabled=False,
file_format="string",
format="string",
payload_schema="string")
const dataForwardingRuleResource = new sumologic.DataForwardingRule("dataForwardingRuleResource", {
destinationId: "string",
indexId: "string",
enabled: false,
fileFormat: "string",
format: "string",
payloadSchema: "string",
});
type: sumologic:DataForwardingRule
properties:
destinationId: string
enabled: false
fileFormat: string
format: string
indexId: string
payloadSchema: string
DataForwardingRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DataForwardingRule resource accepts the following input properties:
- Destination
Id string - The data forwarding destination id.
- Index
Id string - The id of the Partition or index_id of the Scheduled View the rule applies to.
- Enabled bool
- True when the data forwarding rule is enabled. Will be treated as false if left blank.
- File
Format string - 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.
- Format 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:
- Payload
Schema 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.
- Destination
Id string - The data forwarding destination id.
- Index
Id string - The id of the Partition or index_id of the Scheduled View the rule applies to.
- Enabled bool
- True when the data forwarding rule is enabled. Will be treated as false if left blank.
- File
Format string - 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.
- Format 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:
- Payload
Schema 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.
- destination
Id String - The data forwarding destination id.
- index
Id String - The id of the Partition or index_id of the Scheduled View the rule applies to.
- enabled Boolean
- True when the data forwarding rule is enabled. Will be treated as false if left blank.
- file
Format String - 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.
- format 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:
- payload
Schema 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.
- destination
Id string - The data forwarding destination id.
- index
Id string - The id of the Partition or index_id of the Scheduled View the rule applies to.
- enabled boolean
- True when the data forwarding rule is enabled. Will be treated as false if left blank.
- file
Format string - 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.
- format 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:
- payload
Schema 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.
- destination_
id str - The data forwarding destination id.
- index_
id str - The id of the Partition or index_id of the Scheduled View the rule applies to.
- enabled bool
- True when the data forwarding rule is enabled. Will be treated as false if left blank.
- file_
format str - 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.
- format str
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:
- payload_
schema str - 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.
- destination
Id String - The data forwarding destination id.
- index
Id String - The id of the Partition or index_id of the Scheduled View the rule applies to.
- enabled Boolean
- True when the data forwarding rule is enabled. Will be treated as false if left blank.
- file
Format String - 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.
- format 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:
- payload
Schema 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the DataForwardingRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing DataForwardingRule Resource
Get an existing DataForwardingRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DataForwardingRuleState, opts?: CustomResourceOptions): DataForwardingRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
destination_id: Optional[str] = None,
enabled: Optional[bool] = None,
file_format: Optional[str] = None,
format: Optional[str] = None,
index_id: Optional[str] = None,
payload_schema: Optional[str] = None) -> DataForwardingRule
func GetDataForwardingRule(ctx *Context, name string, id IDInput, state *DataForwardingRuleState, opts ...ResourceOption) (*DataForwardingRule, error)
public static DataForwardingRule Get(string name, Input<string> id, DataForwardingRuleState? state, CustomResourceOptions? opts = null)
public static DataForwardingRule get(String name, Output<String> id, DataForwardingRuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Destination
Id string - The data forwarding destination id.
- Enabled bool
- True when the data forwarding rule is enabled. Will be treated as false if left blank.
- File
Format string - 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.
- Format 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:
- Index
Id string - The id of the Partition or index_id of the Scheduled View the rule applies to.
- Payload
Schema 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.
- Destination
Id string - The data forwarding destination id.
- Enabled bool
- True when the data forwarding rule is enabled. Will be treated as false if left blank.
- File
Format string - 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.
- Format 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:
- Index
Id string - The id of the Partition or index_id of the Scheduled View the rule applies to.
- Payload
Schema 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.
- destination
Id String - The data forwarding destination id.
- enabled Boolean
- True when the data forwarding rule is enabled. Will be treated as false if left blank.
- file
Format String - 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.
- format 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:
- index
Id String - The id of the Partition or index_id of the Scheduled View the rule applies to.
- payload
Schema 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.
- destination
Id string - The data forwarding destination id.
- enabled boolean
- True when the data forwarding rule is enabled. Will be treated as false if left blank.
- file
Format string - 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.
- format 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:
- index
Id string - The id of the Partition or index_id of the Scheduled View the rule applies to.
- payload
Schema 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.
- destination_
id str - The data forwarding destination id.
- enabled bool
- True when the data forwarding rule is enabled. Will be treated as false if left blank.
- file_
format str - 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.
- format str
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:
- index_
id str - The id of the Partition or index_id of the Scheduled View the rule applies to.
- payload_
schema str - 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.
- destination
Id String - The data forwarding destination id.
- enabled Boolean
- True when the data forwarding rule is enabled. Will be treated as false if left blank.
- file
Format String - 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.
- format 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:
- index
Id String - The id of the Partition or index_id of the Scheduled View the rule applies to.
- payload
Schema 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.
Package Details
- Repository
- Sumo Logic pulumi/pulumi-sumologic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
sumologic
Terraform Provider.