1. Packages
  2. Prismacloud Provider
  3. API Docs
  4. Datapattern
prismacloud 1.7.0 published on Monday, Apr 14, 2025 by paloaltonetworks

prismacloud.Datapattern

Explore with Pulumi AI

Manage a data pattern.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as prismacloud from "@pulumi/prismacloud";

const example = new prismacloud.Datapattern("example", {
    description: "Made by Pulumi",
    proximityKeywords: [
        "terraform",
        "prisma",
    ],
    regexes: [{
        regex: "prisma",
        weight: 2,
    }],
});
Copy
import pulumi
import pulumi_prismacloud as prismacloud

example = prismacloud.Datapattern("example",
    description="Made by Pulumi",
    proximity_keywords=[
        "terraform",
        "prisma",
    ],
    regexes=[{
        "regex": "prisma",
        "weight": 2,
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/prismacloud/prismacloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := prismacloud.NewDatapattern(ctx, "example", &prismacloud.DatapatternArgs{
			Description: pulumi.String("Made by Pulumi"),
			ProximityKeywords: pulumi.StringArray{
				pulumi.String("terraform"),
				pulumi.String("prisma"),
			},
			Regexes: prismacloud.DatapatternRegexArray{
				&prismacloud.DatapatternRegexArgs{
					Regex:  pulumi.String("prisma"),
					Weight: pulumi.Float64(2),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Prismacloud = Pulumi.Prismacloud;

return await Deployment.RunAsync(() => 
{
    var example = new Prismacloud.Datapattern("example", new()
    {
        Description = "Made by Pulumi",
        ProximityKeywords = new[]
        {
            "terraform",
            "prisma",
        },
        Regexes = new[]
        {
            new Prismacloud.Inputs.DatapatternRegexArgs
            {
                Regex = "prisma",
                Weight = 2,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.prismacloud.Datapattern;
import com.pulumi.prismacloud.DatapatternArgs;
import com.pulumi.prismacloud.inputs.DatapatternRegexArgs;
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 Datapattern("example", DatapatternArgs.builder()
            .description("Made by Pulumi")
            .proximityKeywords(            
                "terraform",
                "prisma")
            .regexes(DatapatternRegexArgs.builder()
                .regex("prisma")
                .weight(2)
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: prismacloud:Datapattern
    properties:
      description: Made by Pulumi
      proximityKeywords:
        - terraform
        - prisma
      regexes:
        - regex: prisma
          weight: 2
Copy

Create Datapattern Resource

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

Constructor syntax

new Datapattern(name: string, args: DatapatternArgs, opts?: CustomResourceOptions);
@overload
def Datapattern(resource_name: str,
                args: DatapatternArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def Datapattern(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                regexes: Optional[Sequence[DatapatternRegexArgs]] = None,
                datapattern_id: Optional[str] = None,
                description: Optional[str] = None,
                detection_technique: Optional[str] = None,
                name: Optional[str] = None,
                proximity_keywords: Optional[Sequence[str]] = None)
func NewDatapattern(ctx *Context, name string, args DatapatternArgs, opts ...ResourceOption) (*Datapattern, error)
public Datapattern(string name, DatapatternArgs args, CustomResourceOptions? opts = null)
public Datapattern(String name, DatapatternArgs args)
public Datapattern(String name, DatapatternArgs args, CustomResourceOptions options)
type: prismacloud:Datapattern
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DatapatternArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DatapatternArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DatapatternArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DatapatternArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DatapatternArgs
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 datapatternResource = new Prismacloud.Datapattern("datapatternResource", new()
{
    Regexes = new[]
    {
        new Prismacloud.Inputs.DatapatternRegexArgs
        {
            Regex = "string",
            Weight = 0,
        },
    },
    DatapatternId = "string",
    Description = "string",
    DetectionTechnique = "string",
    Name = "string",
    ProximityKeywords = new[]
    {
        "string",
    },
});
Copy
example, err := prismacloud.NewDatapattern(ctx, "datapatternResource", &prismacloud.DatapatternArgs{
Regexes: .DatapatternRegexArray{
&.DatapatternRegexArgs{
Regex: pulumi.String("string"),
Weight: pulumi.Float64(0),
},
},
DatapatternId: pulumi.String("string"),
Description: pulumi.String("string"),
DetectionTechnique: pulumi.String("string"),
Name: pulumi.String("string"),
ProximityKeywords: pulumi.StringArray{
pulumi.String("string"),
},
})
Copy
var datapatternResource = new Datapattern("datapatternResource", DatapatternArgs.builder()
    .regexes(DatapatternRegexArgs.builder()
        .regex("string")
        .weight(0)
        .build())
    .datapatternId("string")
    .description("string")
    .detectionTechnique("string")
    .name("string")
    .proximityKeywords("string")
    .build());
Copy
datapattern_resource = prismacloud.Datapattern("datapatternResource",
    regexes=[{
        "regex": "string",
        "weight": 0,
    }],
    datapattern_id="string",
    description="string",
    detection_technique="string",
    name="string",
    proximity_keywords=["string"])
Copy
const datapatternResource = new prismacloud.Datapattern("datapatternResource", {
    regexes: [{
        regex: "string",
        weight: 0,
    }],
    datapatternId: "string",
    description: "string",
    detectionTechnique: "string",
    name: "string",
    proximityKeywords: ["string"],
});
Copy
type: prismacloud:Datapattern
properties:
    datapatternId: string
    description: string
    detectionTechnique: string
    name: string
    proximityKeywords:
        - string
    regexes:
        - regex: string
          weight: 0
Copy

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

Regexes This property is required. List<DatapatternRegex>
List of regexes, as defined below.
DatapatternId string
Description string
Pattern description.
DetectionTechnique string
Detection technique (default: regex).
Name string
Pattern name.
ProximityKeywords List<string>
List of proximity keywords.
Regexes This property is required. []DatapatternRegexArgs
List of regexes, as defined below.
DatapatternId string
Description string
Pattern description.
DetectionTechnique string
Detection technique (default: regex).
Name string
Pattern name.
ProximityKeywords []string
List of proximity keywords.
regexes This property is required. List<DatapatternRegex>
List of regexes, as defined below.
datapatternId String
description String
Pattern description.
detectionTechnique String
Detection technique (default: regex).
name String
Pattern name.
proximityKeywords List<String>
List of proximity keywords.
regexes This property is required. DatapatternRegex[]
List of regexes, as defined below.
datapatternId string
description string
Pattern description.
detectionTechnique string
Detection technique (default: regex).
name string
Pattern name.
proximityKeywords string[]
List of proximity keywords.
regexes This property is required. Sequence[DatapatternRegexArgs]
List of regexes, as defined below.
datapattern_id str
description str
Pattern description.
detection_technique str
Detection technique (default: regex).
name str
Pattern name.
proximity_keywords Sequence[str]
List of proximity keywords.
regexes This property is required. List<Property Map>
List of regexes, as defined below.
datapatternId String
description String
Pattern description.
detectionTechnique String
Detection technique (default: regex).
name String
Pattern name.
proximityKeywords List<String>
List of proximity keywords.

Outputs

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

CreatedBy string
Created by.
Entity string
Entity value.
Grammar string
Grammar value.
Id string
The provider-assigned unique ID for this managed resource.
IsEditable bool
(bool) Is editable.
Mode string
Pattern mode (predefined or custom).
ParentId string
Parent ID for cloned data pattern.
PatternId string
Pattern ID.
RootType string
Root type (predefined or custom) for cloned data pattern.
S3Path string
S3 Path to the grammar.
UpdatedAt double
(int) Last updated at.
UpdatedBy string
Updated by.
CreatedBy string
Created by.
Entity string
Entity value.
Grammar string
Grammar value.
Id string
The provider-assigned unique ID for this managed resource.
IsEditable bool
(bool) Is editable.
Mode string
Pattern mode (predefined or custom).
ParentId string
Parent ID for cloned data pattern.
PatternId string
Pattern ID.
RootType string
Root type (predefined or custom) for cloned data pattern.
S3Path string
S3 Path to the grammar.
UpdatedAt float64
(int) Last updated at.
UpdatedBy string
Updated by.
createdBy String
Created by.
entity String
Entity value.
grammar String
Grammar value.
id String
The provider-assigned unique ID for this managed resource.
isEditable Boolean
(bool) Is editable.
mode String
Pattern mode (predefined or custom).
parentId String
Parent ID for cloned data pattern.
patternId String
Pattern ID.
rootType String
Root type (predefined or custom) for cloned data pattern.
s3Path String
S3 Path to the grammar.
updatedAt Double
(int) Last updated at.
updatedBy String
Updated by.
createdBy string
Created by.
entity string
Entity value.
grammar string
Grammar value.
id string
The provider-assigned unique ID for this managed resource.
isEditable boolean
(bool) Is editable.
mode string
Pattern mode (predefined or custom).
parentId string
Parent ID for cloned data pattern.
patternId string
Pattern ID.
rootType string
Root type (predefined or custom) for cloned data pattern.
s3Path string
S3 Path to the grammar.
updatedAt number
(int) Last updated at.
updatedBy string
Updated by.
created_by str
Created by.
entity str
Entity value.
grammar str
Grammar value.
id str
The provider-assigned unique ID for this managed resource.
is_editable bool
(bool) Is editable.
mode str
Pattern mode (predefined or custom).
parent_id str
Parent ID for cloned data pattern.
pattern_id str
Pattern ID.
root_type str
Root type (predefined or custom) for cloned data pattern.
s3_path str
S3 Path to the grammar.
updated_at float
(int) Last updated at.
updated_by str
Updated by.
createdBy String
Created by.
entity String
Entity value.
grammar String
Grammar value.
id String
The provider-assigned unique ID for this managed resource.
isEditable Boolean
(bool) Is editable.
mode String
Pattern mode (predefined or custom).
parentId String
Parent ID for cloned data pattern.
patternId String
Pattern ID.
rootType String
Root type (predefined or custom) for cloned data pattern.
s3Path String
S3 Path to the grammar.
updatedAt Number
(int) Last updated at.
updatedBy String
Updated by.

Look up Existing Datapattern Resource

Get an existing Datapattern 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?: DatapatternState, opts?: CustomResourceOptions): Datapattern
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_by: Optional[str] = None,
        datapattern_id: Optional[str] = None,
        description: Optional[str] = None,
        detection_technique: Optional[str] = None,
        entity: Optional[str] = None,
        grammar: Optional[str] = None,
        is_editable: Optional[bool] = None,
        mode: Optional[str] = None,
        name: Optional[str] = None,
        parent_id: Optional[str] = None,
        pattern_id: Optional[str] = None,
        proximity_keywords: Optional[Sequence[str]] = None,
        regexes: Optional[Sequence[DatapatternRegexArgs]] = None,
        root_type: Optional[str] = None,
        s3_path: Optional[str] = None,
        updated_at: Optional[float] = None,
        updated_by: Optional[str] = None) -> Datapattern
func GetDatapattern(ctx *Context, name string, id IDInput, state *DatapatternState, opts ...ResourceOption) (*Datapattern, error)
public static Datapattern Get(string name, Input<string> id, DatapatternState? state, CustomResourceOptions? opts = null)
public static Datapattern get(String name, Output<String> id, DatapatternState state, CustomResourceOptions options)
resources:  _:    type: prismacloud:Datapattern    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CreatedBy string
Created by.
DatapatternId string
Description string
Pattern description.
DetectionTechnique string
Detection technique (default: regex).
Entity string
Entity value.
Grammar string
Grammar value.
IsEditable bool
(bool) Is editable.
Mode string
Pattern mode (predefined or custom).
Name string
Pattern name.
ParentId string
Parent ID for cloned data pattern.
PatternId string
Pattern ID.
ProximityKeywords List<string>
List of proximity keywords.
Regexes List<DatapatternRegex>
List of regexes, as defined below.
RootType string
Root type (predefined or custom) for cloned data pattern.
S3Path string
S3 Path to the grammar.
UpdatedAt double
(int) Last updated at.
UpdatedBy string
Updated by.
CreatedBy string
Created by.
DatapatternId string
Description string
Pattern description.
DetectionTechnique string
Detection technique (default: regex).
Entity string
Entity value.
Grammar string
Grammar value.
IsEditable bool
(bool) Is editable.
Mode string
Pattern mode (predefined or custom).
Name string
Pattern name.
ParentId string
Parent ID for cloned data pattern.
PatternId string
Pattern ID.
ProximityKeywords []string
List of proximity keywords.
Regexes []DatapatternRegexArgs
List of regexes, as defined below.
RootType string
Root type (predefined or custom) for cloned data pattern.
S3Path string
S3 Path to the grammar.
UpdatedAt float64
(int) Last updated at.
UpdatedBy string
Updated by.
createdBy String
Created by.
datapatternId String
description String
Pattern description.
detectionTechnique String
Detection technique (default: regex).
entity String
Entity value.
grammar String
Grammar value.
isEditable Boolean
(bool) Is editable.
mode String
Pattern mode (predefined or custom).
name String
Pattern name.
parentId String
Parent ID for cloned data pattern.
patternId String
Pattern ID.
proximityKeywords List<String>
List of proximity keywords.
regexes List<DatapatternRegex>
List of regexes, as defined below.
rootType String
Root type (predefined or custom) for cloned data pattern.
s3Path String
S3 Path to the grammar.
updatedAt Double
(int) Last updated at.
updatedBy String
Updated by.
createdBy string
Created by.
datapatternId string
description string
Pattern description.
detectionTechnique string
Detection technique (default: regex).
entity string
Entity value.
grammar string
Grammar value.
isEditable boolean
(bool) Is editable.
mode string
Pattern mode (predefined or custom).
name string
Pattern name.
parentId string
Parent ID for cloned data pattern.
patternId string
Pattern ID.
proximityKeywords string[]
List of proximity keywords.
regexes DatapatternRegex[]
List of regexes, as defined below.
rootType string
Root type (predefined or custom) for cloned data pattern.
s3Path string
S3 Path to the grammar.
updatedAt number
(int) Last updated at.
updatedBy string
Updated by.
created_by str
Created by.
datapattern_id str
description str
Pattern description.
detection_technique str
Detection technique (default: regex).
entity str
Entity value.
grammar str
Grammar value.
is_editable bool
(bool) Is editable.
mode str
Pattern mode (predefined or custom).
name str
Pattern name.
parent_id str
Parent ID for cloned data pattern.
pattern_id str
Pattern ID.
proximity_keywords Sequence[str]
List of proximity keywords.
regexes Sequence[DatapatternRegexArgs]
List of regexes, as defined below.
root_type str
Root type (predefined or custom) for cloned data pattern.
s3_path str
S3 Path to the grammar.
updated_at float
(int) Last updated at.
updated_by str
Updated by.
createdBy String
Created by.
datapatternId String
description String
Pattern description.
detectionTechnique String
Detection technique (default: regex).
entity String
Entity value.
grammar String
Grammar value.
isEditable Boolean
(bool) Is editable.
mode String
Pattern mode (predefined or custom).
name String
Pattern name.
parentId String
Parent ID for cloned data pattern.
patternId String
Pattern ID.
proximityKeywords List<String>
List of proximity keywords.
regexes List<Property Map>
List of regexes, as defined below.
rootType String
Root type (predefined or custom) for cloned data pattern.
s3Path String
S3 Path to the grammar.
updatedAt Number
(int) Last updated at.
updatedBy String
Updated by.

Supporting Types

DatapatternRegex
, DatapatternRegexArgs

Regex This property is required. string
Regular expression (match criteria for the data you want to find within your assets).
Weight double
Weight to assign a score to a text entry (pattern match occurs when the score threshold is exceeded). Default: 1.
Regex This property is required. string
Regular expression (match criteria for the data you want to find within your assets).
Weight float64
Weight to assign a score to a text entry (pattern match occurs when the score threshold is exceeded). Default: 1.
regex This property is required. String
Regular expression (match criteria for the data you want to find within your assets).
weight Double
Weight to assign a score to a text entry (pattern match occurs when the score threshold is exceeded). Default: 1.
regex This property is required. string
Regular expression (match criteria for the data you want to find within your assets).
weight number
Weight to assign a score to a text entry (pattern match occurs when the score threshold is exceeded). Default: 1.
regex This property is required. str
Regular expression (match criteria for the data you want to find within your assets).
weight float
Weight to assign a score to a text entry (pattern match occurs when the score threshold is exceeded). Default: 1.
regex This property is required. String
Regular expression (match criteria for the data you want to find within your assets).
weight Number
Weight to assign a score to a text entry (pattern match occurs when the score threshold is exceeded). Default: 1.

Import

Resources can be imported using the data pattern ID:

$ pulumi import prismacloud:index/datapattern:Datapattern example 111111111111111111111111
Copy

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

Package Details

Repository
prismacloud paloaltonetworks/terraform-provider-prismacloud
License
Notes
This Pulumi package is based on the prismacloud Terraform Provider.