1. Packages
  2. Incapsula Provider
  3. API Docs
  4. SiteLogConfiguration
incapsula 3.33.0 published on Wednesday, Apr 30, 2025 by imperva

incapsula.SiteLogConfiguration

Explore with Pulumi AI

incapsula logo
incapsula 3.33.0 published on Wednesday, Apr 30, 2025 by imperva

    Provides an Incapsula Site Log Configuration resource. This resource applies only to sites created by the incapsula.SiteV3 resource.

    In this resource, you can configure:

    • Log Level: The log level for the site. Options include security logs only, both security and access logs, or no logging.
    • Logs Account ID: The account ID that collects the logs.
    • Data Storage Region: The region where the data is stored.

    Note: This resource is designed to work with sites represented by the “incapsula.SiteV3” resource only.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as incapsula from "@pulumi/incapsula";
    
    const example = new incapsula.SiteLogConfiguration("example", {
        dataStorageRegion: "US",
        hashSalt: "EJKHRT48375N4TKE7956NG",
        hashingEnabled: true,
        logLevel: "full",
        logsAccountId: "67890",
        siteId: "1234341",
    });
    
    import pulumi
    import pulumi_incapsula as incapsula
    
    example = incapsula.SiteLogConfiguration("example",
        data_storage_region="US",
        hash_salt="EJKHRT48375N4TKE7956NG",
        hashing_enabled=True,
        log_level="full",
        logs_account_id="67890",
        site_id="1234341")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := incapsula.NewSiteLogConfiguration(ctx, "example", &incapsula.SiteLogConfigurationArgs{
    			DataStorageRegion: pulumi.String("US"),
    			HashSalt:          pulumi.String("EJKHRT48375N4TKE7956NG"),
    			HashingEnabled:    pulumi.Bool(true),
    			LogLevel:          pulumi.String("full"),
    			LogsAccountId:     pulumi.String("67890"),
    			SiteId:            pulumi.String("1234341"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Incapsula = Pulumi.Incapsula;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Incapsula.SiteLogConfiguration("example", new()
        {
            DataStorageRegion = "US",
            HashSalt = "EJKHRT48375N4TKE7956NG",
            HashingEnabled = true,
            LogLevel = "full",
            LogsAccountId = "67890",
            SiteId = "1234341",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incapsula.SiteLogConfiguration;
    import com.pulumi.incapsula.SiteLogConfigurationArgs;
    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 SiteLogConfiguration("example", SiteLogConfigurationArgs.builder()
                .dataStorageRegion("US")
                .hashSalt("EJKHRT48375N4TKE7956NG")
                .hashingEnabled(true)
                .logLevel("full")
                .logsAccountId("67890")
                .siteId("1234341")
                .build());
    
        }
    }
    
    resources:
      example:
        type: incapsula:SiteLogConfiguration
        properties:
          dataStorageRegion: US
          hashSalt: EJKHRT48375N4TKE7956NG
          hashingEnabled: true
          logLevel: full
          logsAccountId: '67890'
          siteId: '1234341'
    

    Dependencies

    The log_level attribute is specific to logs for the Cloud WAF service.

    To configure the log level, you need the incapsula.SiemLogConfiguration resource with logs configured for the Cloud WAF service.

    Create SiteLogConfiguration Resource

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

    Constructor syntax

    new SiteLogConfiguration(name: string, args: SiteLogConfigurationArgs, opts?: CustomResourceOptions);
    @overload
    def SiteLogConfiguration(resource_name: str,
                             args: SiteLogConfigurationArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def SiteLogConfiguration(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             site_id: Optional[str] = None,
                             data_storage_region: Optional[str] = None,
                             hash_salt: Optional[str] = None,
                             hashing_enabled: Optional[bool] = None,
                             log_level: Optional[str] = None,
                             logs_account_id: Optional[str] = None,
                             site_log_configuration_id: Optional[str] = None)
    func NewSiteLogConfiguration(ctx *Context, name string, args SiteLogConfigurationArgs, opts ...ResourceOption) (*SiteLogConfiguration, error)
    public SiteLogConfiguration(string name, SiteLogConfigurationArgs args, CustomResourceOptions? opts = null)
    public SiteLogConfiguration(String name, SiteLogConfigurationArgs args)
    public SiteLogConfiguration(String name, SiteLogConfigurationArgs args, CustomResourceOptions options)
    
    type: incapsula:SiteLogConfiguration
    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 SiteLogConfigurationArgs
    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 SiteLogConfigurationArgs
    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 SiteLogConfigurationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SiteLogConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SiteLogConfigurationArgs
    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 siteLogConfigurationResource = new Incapsula.SiteLogConfiguration("siteLogConfigurationResource", new()
    {
        SiteId = "string",
        DataStorageRegion = "string",
        HashSalt = "string",
        HashingEnabled = false,
        LogLevel = "string",
        LogsAccountId = "string",
        SiteLogConfigurationId = "string",
    });
    
    example, err := incapsula.NewSiteLogConfiguration(ctx, "siteLogConfigurationResource", &incapsula.SiteLogConfigurationArgs{
    	SiteId:                 pulumi.String("string"),
    	DataStorageRegion:      pulumi.String("string"),
    	HashSalt:               pulumi.String("string"),
    	HashingEnabled:         pulumi.Bool(false),
    	LogLevel:               pulumi.String("string"),
    	LogsAccountId:          pulumi.String("string"),
    	SiteLogConfigurationId: pulumi.String("string"),
    })
    
    var siteLogConfigurationResource = new SiteLogConfiguration("siteLogConfigurationResource", SiteLogConfigurationArgs.builder()
        .siteId("string")
        .dataStorageRegion("string")
        .hashSalt("string")
        .hashingEnabled(false)
        .logLevel("string")
        .logsAccountId("string")
        .siteLogConfigurationId("string")
        .build());
    
    site_log_configuration_resource = incapsula.SiteLogConfiguration("siteLogConfigurationResource",
        site_id="string",
        data_storage_region="string",
        hash_salt="string",
        hashing_enabled=False,
        log_level="string",
        logs_account_id="string",
        site_log_configuration_id="string")
    
    const siteLogConfigurationResource = new incapsula.SiteLogConfiguration("siteLogConfigurationResource", {
        siteId: "string",
        dataStorageRegion: "string",
        hashSalt: "string",
        hashingEnabled: false,
        logLevel: "string",
        logsAccountId: "string",
        siteLogConfigurationId: "string",
    });
    
    type: incapsula:SiteLogConfiguration
    properties:
        dataStorageRegion: string
        hashSalt: string
        hashingEnabled: false
        logLevel: string
        logsAccountId: string
        siteId: string
        siteLogConfigurationId: string
    

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

    SiteId string
    Numeric identifier of the site to operate on.
    DataStorageRegion string
    The data region to use. Options are APAC, AU, EU, and US.
    HashSalt string
    Hashing salt to use for the hashing process. Required if hashing is enabled. Maximum length of 64 characters.
    HashingEnabled bool
    Use the hashing method for masking fields in your logs and in the Security Events page, instead of the default (XXX) data masking.
    LogLevel string
    The log level options are full, security, and none. Full logging includes both security and access logs.
    LogsAccountId string
    Numeric identifier of the account that collects the logs.
    SiteLogConfigurationId string
    Unique identifier in the API for the Site Log Configuration. The id is identical to Site id.
    SiteId string
    Numeric identifier of the site to operate on.
    DataStorageRegion string
    The data region to use. Options are APAC, AU, EU, and US.
    HashSalt string
    Hashing salt to use for the hashing process. Required if hashing is enabled. Maximum length of 64 characters.
    HashingEnabled bool
    Use the hashing method for masking fields in your logs and in the Security Events page, instead of the default (XXX) data masking.
    LogLevel string
    The log level options are full, security, and none. Full logging includes both security and access logs.
    LogsAccountId string
    Numeric identifier of the account that collects the logs.
    SiteLogConfigurationId string
    Unique identifier in the API for the Site Log Configuration. The id is identical to Site id.
    siteId String
    Numeric identifier of the site to operate on.
    dataStorageRegion String
    The data region to use. Options are APAC, AU, EU, and US.
    hashSalt String
    Hashing salt to use for the hashing process. Required if hashing is enabled. Maximum length of 64 characters.
    hashingEnabled Boolean
    Use the hashing method for masking fields in your logs and in the Security Events page, instead of the default (XXX) data masking.
    logLevel String
    The log level options are full, security, and none. Full logging includes both security and access logs.
    logsAccountId String
    Numeric identifier of the account that collects the logs.
    siteLogConfigurationId String
    Unique identifier in the API for the Site Log Configuration. The id is identical to Site id.
    siteId string
    Numeric identifier of the site to operate on.
    dataStorageRegion string
    The data region to use. Options are APAC, AU, EU, and US.
    hashSalt string
    Hashing salt to use for the hashing process. Required if hashing is enabled. Maximum length of 64 characters.
    hashingEnabled boolean
    Use the hashing method for masking fields in your logs and in the Security Events page, instead of the default (XXX) data masking.
    logLevel string
    The log level options are full, security, and none. Full logging includes both security and access logs.
    logsAccountId string
    Numeric identifier of the account that collects the logs.
    siteLogConfigurationId string
    Unique identifier in the API for the Site Log Configuration. The id is identical to Site id.
    site_id str
    Numeric identifier of the site to operate on.
    data_storage_region str
    The data region to use. Options are APAC, AU, EU, and US.
    hash_salt str
    Hashing salt to use for the hashing process. Required if hashing is enabled. Maximum length of 64 characters.
    hashing_enabled bool
    Use the hashing method for masking fields in your logs and in the Security Events page, instead of the default (XXX) data masking.
    log_level str
    The log level options are full, security, and none. Full logging includes both security and access logs.
    logs_account_id str
    Numeric identifier of the account that collects the logs.
    site_log_configuration_id str
    Unique identifier in the API for the Site Log Configuration. The id is identical to Site id.
    siteId String
    Numeric identifier of the site to operate on.
    dataStorageRegion String
    The data region to use. Options are APAC, AU, EU, and US.
    hashSalt String
    Hashing salt to use for the hashing process. Required if hashing is enabled. Maximum length of 64 characters.
    hashingEnabled Boolean
    Use the hashing method for masking fields in your logs and in the Security Events page, instead of the default (XXX) data masking.
    logLevel String
    The log level options are full, security, and none. Full logging includes both security and access logs.
    logsAccountId String
    Numeric identifier of the account that collects the logs.
    siteLogConfigurationId String
    Unique identifier in the API for the Site Log Configuration. The id is identical to Site id.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SiteLogConfiguration 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 SiteLogConfiguration Resource

    Get an existing SiteLogConfiguration 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?: SiteLogConfigurationState, opts?: CustomResourceOptions): SiteLogConfiguration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            data_storage_region: Optional[str] = None,
            hash_salt: Optional[str] = None,
            hashing_enabled: Optional[bool] = None,
            log_level: Optional[str] = None,
            logs_account_id: Optional[str] = None,
            site_id: Optional[str] = None,
            site_log_configuration_id: Optional[str] = None) -> SiteLogConfiguration
    func GetSiteLogConfiguration(ctx *Context, name string, id IDInput, state *SiteLogConfigurationState, opts ...ResourceOption) (*SiteLogConfiguration, error)
    public static SiteLogConfiguration Get(string name, Input<string> id, SiteLogConfigurationState? state, CustomResourceOptions? opts = null)
    public static SiteLogConfiguration get(String name, Output<String> id, SiteLogConfigurationState state, CustomResourceOptions options)
    resources:  _:    type: incapsula:SiteLogConfiguration    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:
    DataStorageRegion string
    The data region to use. Options are APAC, AU, EU, and US.
    HashSalt string
    Hashing salt to use for the hashing process. Required if hashing is enabled. Maximum length of 64 characters.
    HashingEnabled bool
    Use the hashing method for masking fields in your logs and in the Security Events page, instead of the default (XXX) data masking.
    LogLevel string
    The log level options are full, security, and none. Full logging includes both security and access logs.
    LogsAccountId string
    Numeric identifier of the account that collects the logs.
    SiteId string
    Numeric identifier of the site to operate on.
    SiteLogConfigurationId string
    Unique identifier in the API for the Site Log Configuration. The id is identical to Site id.
    DataStorageRegion string
    The data region to use. Options are APAC, AU, EU, and US.
    HashSalt string
    Hashing salt to use for the hashing process. Required if hashing is enabled. Maximum length of 64 characters.
    HashingEnabled bool
    Use the hashing method for masking fields in your logs and in the Security Events page, instead of the default (XXX) data masking.
    LogLevel string
    The log level options are full, security, and none. Full logging includes both security and access logs.
    LogsAccountId string
    Numeric identifier of the account that collects the logs.
    SiteId string
    Numeric identifier of the site to operate on.
    SiteLogConfigurationId string
    Unique identifier in the API for the Site Log Configuration. The id is identical to Site id.
    dataStorageRegion String
    The data region to use. Options are APAC, AU, EU, and US.
    hashSalt String
    Hashing salt to use for the hashing process. Required if hashing is enabled. Maximum length of 64 characters.
    hashingEnabled Boolean
    Use the hashing method for masking fields in your logs and in the Security Events page, instead of the default (XXX) data masking.
    logLevel String
    The log level options are full, security, and none. Full logging includes both security and access logs.
    logsAccountId String
    Numeric identifier of the account that collects the logs.
    siteId String
    Numeric identifier of the site to operate on.
    siteLogConfigurationId String
    Unique identifier in the API for the Site Log Configuration. The id is identical to Site id.
    dataStorageRegion string
    The data region to use. Options are APAC, AU, EU, and US.
    hashSalt string
    Hashing salt to use for the hashing process. Required if hashing is enabled. Maximum length of 64 characters.
    hashingEnabled boolean
    Use the hashing method for masking fields in your logs and in the Security Events page, instead of the default (XXX) data masking.
    logLevel string
    The log level options are full, security, and none. Full logging includes both security and access logs.
    logsAccountId string
    Numeric identifier of the account that collects the logs.
    siteId string
    Numeric identifier of the site to operate on.
    siteLogConfigurationId string
    Unique identifier in the API for the Site Log Configuration. The id is identical to Site id.
    data_storage_region str
    The data region to use. Options are APAC, AU, EU, and US.
    hash_salt str
    Hashing salt to use for the hashing process. Required if hashing is enabled. Maximum length of 64 characters.
    hashing_enabled bool
    Use the hashing method for masking fields in your logs and in the Security Events page, instead of the default (XXX) data masking.
    log_level str
    The log level options are full, security, and none. Full logging includes both security and access logs.
    logs_account_id str
    Numeric identifier of the account that collects the logs.
    site_id str
    Numeric identifier of the site to operate on.
    site_log_configuration_id str
    Unique identifier in the API for the Site Log Configuration. The id is identical to Site id.
    dataStorageRegion String
    The data region to use. Options are APAC, AU, EU, and US.
    hashSalt String
    Hashing salt to use for the hashing process. Required if hashing is enabled. Maximum length of 64 characters.
    hashingEnabled Boolean
    Use the hashing method for masking fields in your logs and in the Security Events page, instead of the default (XXX) data masking.
    logLevel String
    The log level options are full, security, and none. Full logging includes both security and access logs.
    logsAccountId String
    Numeric identifier of the account that collects the logs.
    siteId String
    Numeric identifier of the site to operate on.
    siteLogConfigurationId String
    Unique identifier in the API for the Site Log Configuration. The id is identical to Site id.

    Import

    Site Log Configuration can be imported using the site_id:

    $ pulumi import incapsula:index/siteLogConfiguration:SiteLogConfiguration demo 1234
    

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

    Package Details

    Repository
    incapsula imperva/terraform-provider-incapsula
    License
    Notes
    This Pulumi package is based on the incapsula Terraform Provider.
    incapsula logo
    incapsula 3.33.0 published on Wednesday, Apr 30, 2025 by imperva