1. Packages
  2. Lacework Provider
  3. API Docs
  4. DataExportRule
lacework 2.0.6 published on Monday, Apr 14, 2025 by lacework

lacework.DataExportRule

Explore with Pulumi AI

lacework logo
lacework 2.0.6 published on Monday, Apr 14, 2025 by lacework

    Use this resource to export data collected from your Lacework account and send it to an S3 bucket of your choice.

    For more information, see Data Export Rules and S3 Data Export documentation.

    Example Usage

    Data Export Rule

    import * as pulumi from "@pulumi/pulumi";
    import * as lacework from "@pulumi/lacework";
    
    const example = new lacework.DataExportRule("example", {integrationIds: ["INT_ABC123AB385C123D4567AB8EB45BA0E7ABCD12ABF65673A"]});
    
    import pulumi
    import pulumi_lacework as lacework
    
    example = lacework.DataExportRule("example", integration_ids=["INT_ABC123AB385C123D4567AB8EB45BA0E7ABCD12ABF65673A"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/lacework/v2/lacework"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lacework.NewDataExportRule(ctx, "example", &lacework.DataExportRuleArgs{
    			IntegrationIds: pulumi.StringArray{
    				pulumi.String("INT_ABC123AB385C123D4567AB8EB45BA0E7ABCD12ABF65673A"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Lacework = Pulumi.Lacework;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Lacework.DataExportRule("example", new()
        {
            IntegrationIds = new[]
            {
                "INT_ABC123AB385C123D4567AB8EB45BA0E7ABCD12ABF65673A",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.lacework.DataExportRule;
    import com.pulumi.lacework.DataExportRuleArgs;
    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 example = new DataExportRule("example", DataExportRuleArgs.builder()
                .integrationIds("INT_ABC123AB385C123D4567AB8EB45BA0E7ABCD12ABF65673A")
                .build());
    
        }
    }
    
    resources:
      example:
        type: lacework:DataExportRule
        properties:
          integrationIds:
            - INT_ABC123AB385C123D4567AB8EB45BA0E7ABCD12ABF65673A
    

    Data Export Rule with S3 Data Export Channel

    import * as pulumi from "@pulumi/pulumi";
    import * as lacework from "@pulumi/lacework";
    
    const dataExport = new lacework.AlertChannelAwsS3("dataExport", {
        bucketArn: "arn:aws:s3:::bucket_name/key_name",
        credentials: {
            roleArn: "arn:aws:iam::1234567890:role/lacework_iam_example_role",
            externalId: "12345",
        },
    });
    const example = new lacework.DataExportRule("example", {integrationIds: [dataExport.alertChannelAwsS3Id]});
    
    import pulumi
    import pulumi_lacework as lacework
    
    data_export = lacework.AlertChannelAwsS3("dataExport",
        bucket_arn="arn:aws:s3:::bucket_name/key_name",
        credentials={
            "role_arn": "arn:aws:iam::1234567890:role/lacework_iam_example_role",
            "external_id": "12345",
        })
    example = lacework.DataExportRule("example", integration_ids=[data_export.alert_channel_aws_s3_id])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/lacework/v2/lacework"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		dataExport, err := lacework.NewAlertChannelAwsS3(ctx, "dataExport", &lacework.AlertChannelAwsS3Args{
    			BucketArn: pulumi.String("arn:aws:s3:::bucket_name/key_name"),
    			Credentials: &lacework.AlertChannelAwsS3CredentialsArgs{
    				RoleArn:    pulumi.String("arn:aws:iam::1234567890:role/lacework_iam_example_role"),
    				ExternalId: pulumi.String("12345"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = lacework.NewDataExportRule(ctx, "example", &lacework.DataExportRuleArgs{
    			IntegrationIds: pulumi.StringArray{
    				dataExport.AlertChannelAwsS3Id,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Lacework = Pulumi.Lacework;
    
    return await Deployment.RunAsync(() => 
    {
        var dataExport = new Lacework.AlertChannelAwsS3("dataExport", new()
        {
            BucketArn = "arn:aws:s3:::bucket_name/key_name",
            Credentials = new Lacework.Inputs.AlertChannelAwsS3CredentialsArgs
            {
                RoleArn = "arn:aws:iam::1234567890:role/lacework_iam_example_role",
                ExternalId = "12345",
            },
        });
    
        var example = new Lacework.DataExportRule("example", new()
        {
            IntegrationIds = new[]
            {
                dataExport.AlertChannelAwsS3Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.lacework.AlertChannelAwsS3;
    import com.pulumi.lacework.AlertChannelAwsS3Args;
    import com.pulumi.lacework.inputs.AlertChannelAwsS3CredentialsArgs;
    import com.pulumi.lacework.DataExportRule;
    import com.pulumi.lacework.DataExportRuleArgs;
    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 dataExport = new AlertChannelAwsS3("dataExport", AlertChannelAwsS3Args.builder()
                .bucketArn("arn:aws:s3:::bucket_name/key_name")
                .credentials(AlertChannelAwsS3CredentialsArgs.builder()
                    .roleArn("arn:aws:iam::1234567890:role/lacework_iam_example_role")
                    .externalId("12345")
                    .build())
                .build());
    
            var example = new DataExportRule("example", DataExportRuleArgs.builder()
                .integrationIds(dataExport.alertChannelAwsS3Id())
                .build());
    
        }
    }
    
    resources:
      dataExport:
        type: lacework:AlertChannelAwsS3
        properties:
          bucketArn: arn:aws:s3:::bucket_name/key_name
          credentials:
            roleArn: arn:aws:iam::1234567890:role/lacework_iam_example_role
            externalId: '12345'
      example:
        type: lacework:DataExportRule
        properties:
          integrationIds:
            - ${dataExport.alertChannelAwsS3Id}
    

    Create DataExportRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DataExportRule(name: string, args: DataExportRuleArgs, opts?: CustomResourceOptions);
    @overload
    def DataExportRule(resource_name: str,
                       args: DataExportRuleArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def DataExportRule(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       integration_ids: Optional[Sequence[str]] = None,
                       data_export_rule_id: Optional[str] = None,
                       description: Optional[str] = None,
                       enabled: Optional[bool] = None,
                       name: Optional[str] = None)
    func NewDataExportRule(ctx *Context, name string, args DataExportRuleArgs, opts ...ResourceOption) (*DataExportRule, error)
    public DataExportRule(string name, DataExportRuleArgs args, CustomResourceOptions? opts = null)
    public DataExportRule(String name, DataExportRuleArgs args)
    public DataExportRule(String name, DataExportRuleArgs args, CustomResourceOptions options)
    
    type: lacework:DataExportRule
    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 DataExportRuleArgs
    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 DataExportRuleArgs
    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 DataExportRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DataExportRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DataExportRuleArgs
    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 dataExportRuleResource = new Lacework.DataExportRule("dataExportRuleResource", new()
    {
        IntegrationIds = new[]
        {
            "string",
        },
        DataExportRuleId = "string",
        Description = "string",
        Enabled = false,
        Name = "string",
    });
    
    example, err := lacework.NewDataExportRule(ctx, "dataExportRuleResource", &lacework.DataExportRuleArgs{
    	IntegrationIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	DataExportRuleId: pulumi.String("string"),
    	Description:      pulumi.String("string"),
    	Enabled:          pulumi.Bool(false),
    	Name:             pulumi.String("string"),
    })
    
    var dataExportRuleResource = new DataExportRule("dataExportRuleResource", DataExportRuleArgs.builder()
        .integrationIds("string")
        .dataExportRuleId("string")
        .description("string")
        .enabled(false)
        .name("string")
        .build());
    
    data_export_rule_resource = lacework.DataExportRule("dataExportRuleResource",
        integration_ids=["string"],
        data_export_rule_id="string",
        description="string",
        enabled=False,
        name="string")
    
    const dataExportRuleResource = new lacework.DataExportRule("dataExportRuleResource", {
        integrationIds: ["string"],
        dataExportRuleId: "string",
        description: "string",
        enabled: false,
        name: "string",
    });
    
    type: lacework:DataExportRule
    properties:
        dataExportRuleId: string
        description: string
        enabled: false
        integrationIds:
            - string
        name: string
    

    DataExportRule 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 DataExportRule resource accepts the following input properties:

    IntegrationIds List<string>
    The list s3 data export alert channel ids for the rule to use.
    DataExportRuleId string
    Description string
    The summary of the data export rule.
    Enabled bool
    Whether the rule is enabled or disabled. Defaults to true.
    Name string
    The data export rule name.
    IntegrationIds []string
    The list s3 data export alert channel ids for the rule to use.
    DataExportRuleId string
    Description string
    The summary of the data export rule.
    Enabled bool
    Whether the rule is enabled or disabled. Defaults to true.
    Name string
    The data export rule name.
    integrationIds List<String>
    The list s3 data export alert channel ids for the rule to use.
    dataExportRuleId String
    description String
    The summary of the data export rule.
    enabled Boolean
    Whether the rule is enabled or disabled. Defaults to true.
    name String
    The data export rule name.
    integrationIds string[]
    The list s3 data export alert channel ids for the rule to use.
    dataExportRuleId string
    description string
    The summary of the data export rule.
    enabled boolean
    Whether the rule is enabled or disabled. Defaults to true.
    name string
    The data export rule name.
    integration_ids Sequence[str]
    The list s3 data export alert channel ids for the rule to use.
    data_export_rule_id str
    description str
    The summary of the data export rule.
    enabled bool
    Whether the rule is enabled or disabled. Defaults to true.
    name str
    The data export rule name.
    integrationIds List<String>
    The list s3 data export alert channel ids for the rule to use.
    dataExportRuleId String
    description String
    The summary of the data export rule.
    enabled Boolean
    Whether the rule is enabled or disabled. Defaults to true.
    name String
    The data export rule name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DataExportRule resource produces the following output properties:

    CreatedOrUpdatedBy string
    CreatedOrUpdatedTime string
    Guid string
    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    CreatedOrUpdatedBy string
    CreatedOrUpdatedTime string
    Guid string
    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    createdOrUpdatedBy String
    createdOrUpdatedTime String
    guid String
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    createdOrUpdatedBy string
    createdOrUpdatedTime string
    guid string
    id string
    The provider-assigned unique ID for this managed resource.
    type string
    created_or_updated_by str
    created_or_updated_time str
    guid str
    id str
    The provider-assigned unique ID for this managed resource.
    type str
    createdOrUpdatedBy String
    createdOrUpdatedTime String
    guid String
    id String
    The provider-assigned unique ID for this managed resource.
    type String

    Look up Existing DataExportRule Resource

    Get an existing DataExportRule 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?: DataExportRuleState, opts?: CustomResourceOptions): DataExportRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_or_updated_by: Optional[str] = None,
            created_or_updated_time: Optional[str] = None,
            data_export_rule_id: Optional[str] = None,
            description: Optional[str] = None,
            enabled: Optional[bool] = None,
            guid: Optional[str] = None,
            integration_ids: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            type: Optional[str] = None) -> DataExportRule
    func GetDataExportRule(ctx *Context, name string, id IDInput, state *DataExportRuleState, opts ...ResourceOption) (*DataExportRule, error)
    public static DataExportRule Get(string name, Input<string> id, DataExportRuleState? state, CustomResourceOptions? opts = null)
    public static DataExportRule get(String name, Output<String> id, DataExportRuleState state, CustomResourceOptions options)
    resources:  _:    type: lacework:DataExportRule    get:      id: ${id}
    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.
    The following state arguments are supported:
    CreatedOrUpdatedBy string
    CreatedOrUpdatedTime string
    DataExportRuleId string
    Description string
    The summary of the data export rule.
    Enabled bool
    Whether the rule is enabled or disabled. Defaults to true.
    Guid string
    IntegrationIds List<string>
    The list s3 data export alert channel ids for the rule to use.
    Name string
    The data export rule name.
    Type string
    CreatedOrUpdatedBy string
    CreatedOrUpdatedTime string
    DataExportRuleId string
    Description string
    The summary of the data export rule.
    Enabled bool
    Whether the rule is enabled or disabled. Defaults to true.
    Guid string
    IntegrationIds []string
    The list s3 data export alert channel ids for the rule to use.
    Name string
    The data export rule name.
    Type string
    createdOrUpdatedBy String
    createdOrUpdatedTime String
    dataExportRuleId String
    description String
    The summary of the data export rule.
    enabled Boolean
    Whether the rule is enabled or disabled. Defaults to true.
    guid String
    integrationIds List<String>
    The list s3 data export alert channel ids for the rule to use.
    name String
    The data export rule name.
    type String
    createdOrUpdatedBy string
    createdOrUpdatedTime string
    dataExportRuleId string
    description string
    The summary of the data export rule.
    enabled boolean
    Whether the rule is enabled or disabled. Defaults to true.
    guid string
    integrationIds string[]
    The list s3 data export alert channel ids for the rule to use.
    name string
    The data export rule name.
    type string
    created_or_updated_by str
    created_or_updated_time str
    data_export_rule_id str
    description str
    The summary of the data export rule.
    enabled bool
    Whether the rule is enabled or disabled. Defaults to true.
    guid str
    integration_ids Sequence[str]
    The list s3 data export alert channel ids for the rule to use.
    name str
    The data export rule name.
    type str
    createdOrUpdatedBy String
    createdOrUpdatedTime String
    dataExportRuleId String
    description String
    The summary of the data export rule.
    enabled Boolean
    Whether the rule is enabled or disabled. Defaults to true.
    guid String
    integrationIds List<String>
    The list s3 data export alert channel ids for the rule to use.
    name String
    The data export rule name.
    type String

    Import

    A Lacework Data Export Rule can be imported using a GUID, e.g.

    $ pulumi import lacework:index/dataExportRule:DataExportRule example EXAMPLE_1234BAE1E42182964D23973F44CFEA3C4AB63B99E9A1EC5
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    lacework lacework/terraform-provider-lacework
    License
    Notes
    This Pulumi package is based on the lacework Terraform Provider.
    lacework logo
    lacework 2.0.6 published on Monday, Apr 14, 2025 by lacework