1. Packages
  2. Packages
  3. Sumologic Provider
  4. API Docs
  5. getDataMaskRule
Viewing docs for sumologic 3.2.10
published on Thursday, Jul 23, 2026 by sumologic
sumologic logo
Viewing docs for sumologic 3.2.10
published on Thursday, Jul 23, 2026 by sumologic

    Provides a way to retrieve a Sumologic Data Mask Rule by its ID.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sumologic from "@pulumi/sumologic";
    
    const example = sumologic.getDataMaskRule({
        id: "000000000ABC1234",
    });
    
    import pulumi
    import pulumi_sumologic as sumologic
    
    example = sumologic.get_data_mask_rule(id="000000000ABC1234")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/sumologic/v3/sumologic"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sumologic.LookupDataMaskRule(ctx, &sumologic.LookupDataMaskRuleArgs{
    			Id: "000000000ABC1234",
    		}, nil)
    		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 example = Sumologic.GetDataMaskRule.Invoke(new()
        {
            Id = "000000000ABC1234",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sumologic.SumologicFunctions;
    import com.pulumi.sumologic.inputs.GetDataMaskRuleArgs;
    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) {
            final var example = SumologicFunctions.getDataMaskRule(GetDataMaskRuleArgs.builder()
                .id("000000000ABC1234")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: sumologic:getDataMaskRule
          arguments:
            id: 000000000ABC1234
    
    Example coming soon!
    

    Using getDataMaskRule

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDataMaskRule(args: GetDataMaskRuleArgs, opts?: InvokeOptions): Promise<GetDataMaskRuleResult>
    function getDataMaskRuleOutput(args: GetDataMaskRuleOutputArgs, opts?: InvokeOptions): Output<GetDataMaskRuleResult>
    def get_data_mask_rule(id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetDataMaskRuleResult
    def get_data_mask_rule_output(id: pulumi.Input[Optional[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetDataMaskRuleResult]
    func LookupDataMaskRule(ctx *Context, args *LookupDataMaskRuleArgs, opts ...InvokeOption) (*LookupDataMaskRuleResult, error)
    func LookupDataMaskRuleOutput(ctx *Context, args *LookupDataMaskRuleOutputArgs, opts ...InvokeOption) LookupDataMaskRuleResultOutput

    > Note: This function is named LookupDataMaskRule in the Go SDK.

    public static class GetDataMaskRule 
    {
        public static Task<GetDataMaskRuleResult> InvokeAsync(GetDataMaskRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetDataMaskRuleResult> Invoke(GetDataMaskRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDataMaskRuleResult> getDataMaskRule(GetDataMaskRuleArgs args, InvokeOptions options)
    public static Output<GetDataMaskRuleResult> getDataMaskRule(GetDataMaskRuleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: sumologic:index/getDataMaskRule:getDataMaskRule
      arguments:
        # arguments dictionary
    data "sumologic_get_data_mask_rule" "name" {
        # arguments
    }

    The following arguments are supported:

    Id string
    The ID of the data mask rule to retrieve.
    Id string
    The ID of the data mask rule to retrieve.
    id string
    The ID of the data mask rule to retrieve.
    id String
    The ID of the data mask rule to retrieve.
    id string
    The ID of the data mask rule to retrieve.
    id str
    The ID of the data mask rule to retrieve.
    id String
    The ID of the data mask rule to retrieve.

    getDataMaskRule Result

    The following output properties are available:

    Description string
    The description of the rule.
    Enabled bool
    Whether the rule is enabled.
    Id string
    MaskString string
    The replacement string used when masking.
    Name string
    The name of the data mask rule.
    RegexPattern string
    The regular expression pattern used to match sensitive data.
    Description string
    The description of the rule.
    Enabled bool
    Whether the rule is enabled.
    Id string
    MaskString string
    The replacement string used when masking.
    Name string
    The name of the data mask rule.
    RegexPattern string
    The regular expression pattern used to match sensitive data.
    description string
    The description of the rule.
    enabled bool
    Whether the rule is enabled.
    id string
    mask_string string
    The replacement string used when masking.
    name string
    The name of the data mask rule.
    regex_pattern string
    The regular expression pattern used to match sensitive data.
    description String
    The description of the rule.
    enabled Boolean
    Whether the rule is enabled.
    id String
    maskString String
    The replacement string used when masking.
    name String
    The name of the data mask rule.
    regexPattern String
    The regular expression pattern used to match sensitive data.
    description string
    The description of the rule.
    enabled boolean
    Whether the rule is enabled.
    id string
    maskString string
    The replacement string used when masking.
    name string
    The name of the data mask rule.
    regexPattern string
    The regular expression pattern used to match sensitive data.
    description str
    The description of the rule.
    enabled bool
    Whether the rule is enabled.
    id str
    mask_string str
    The replacement string used when masking.
    name str
    The name of the data mask rule.
    regex_pattern str
    The regular expression pattern used to match sensitive data.
    description String
    The description of the rule.
    enabled Boolean
    Whether the rule is enabled.
    id String
    maskString String
    The replacement string used when masking.
    name String
    The name of the data mask rule.
    regexPattern String
    The regular expression pattern used to match sensitive data.

    Package Details

    Repository
    Sumo Logic sumologic/terraform-provider-sumologic
    License
    Notes
    This Pulumi package is based on the sumologic Terraform Provider.
    sumologic logo
    Viewing docs for sumologic 3.2.10
    published on Thursday, Jul 23, 2026 by sumologic

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial