PreventionStoredInfoTypeArgs

data class PreventionStoredInfoTypeArgs(val description: Output<String>? = null, val dictionary: Output<PreventionStoredInfoTypeDictionaryArgs>? = null, val displayName: Output<String>? = null, val largeCustomDictionary: Output<PreventionStoredInfoTypeLargeCustomDictionaryArgs>? = null, val parent: Output<String>? = null, val regex: Output<PreventionStoredInfoTypeRegexArgs>? = null, val storedInfoTypeId: Output<String>? = null) : ConvertibleToJava<PreventionStoredInfoTypeArgs>

Allows creation of custom info types. To get more information about StoredInfoType, see:

Example Usage

Dlp Stored Info Type Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dataloss.PreventionStoredInfoType;
import com.pulumi.gcp.dataloss.PreventionStoredInfoTypeArgs;
import com.pulumi.gcp.dataloss.inputs.PreventionStoredInfoTypeRegexArgs;
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 basic = new PreventionStoredInfoType("basic", PreventionStoredInfoTypeArgs.builder()
.description("Description")
.displayName("Displayname")
.parent("projects/my-project-name")
.regex(PreventionStoredInfoTypeRegexArgs.builder()
.groupIndexes(2)
.pattern("patient")
.build())
.build());
}
}

Dlp Stored Info Type Dictionary

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dataloss.PreventionStoredInfoType;
import com.pulumi.gcp.dataloss.PreventionStoredInfoTypeArgs;
import com.pulumi.gcp.dataloss.inputs.PreventionStoredInfoTypeDictionaryArgs;
import com.pulumi.gcp.dataloss.inputs.PreventionStoredInfoTypeDictionaryWordListArgs;
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 dictionary = new PreventionStoredInfoType("dictionary", PreventionStoredInfoTypeArgs.builder()
.description("Description")
.dictionary(PreventionStoredInfoTypeDictionaryArgs.builder()
.wordList(PreventionStoredInfoTypeDictionaryWordListArgs.builder()
.words(
"word",
"word2")
.build())
.build())
.displayName("Displayname")
.parent("projects/my-project-name")
.build());
}
}

Dlp Stored Info Type Large Custom Dictionary

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.gcp.dataloss.PreventionStoredInfoType;
import com.pulumi.gcp.dataloss.PreventionStoredInfoTypeArgs;
import com.pulumi.gcp.dataloss.inputs.PreventionStoredInfoTypeLargeCustomDictionaryArgs;
import com.pulumi.gcp.dataloss.inputs.PreventionStoredInfoTypeLargeCustomDictionaryCloudStorageFileSetArgs;
import com.pulumi.gcp.dataloss.inputs.PreventionStoredInfoTypeLargeCustomDictionaryOutputPathArgs;
import com.pulumi.asset.FileAsset;
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 bucket = new Bucket("bucket", BucketArgs.builder()
.location("US")
.forceDestroy(true)
.build());
var object = new BucketObject("object", BucketObjectArgs.builder()
.bucket(bucket.name())
.source(new FileAsset("./test-fixtures/words.txt"))
.build());
var large = new PreventionStoredInfoType("large", PreventionStoredInfoTypeArgs.builder()
.parent("projects/my-project-name")
.description("Description")
.displayName("Displayname")
.largeCustomDictionary(PreventionStoredInfoTypeLargeCustomDictionaryArgs.builder()
.cloudStorageFileSet(PreventionStoredInfoTypeLargeCustomDictionaryCloudStorageFileSetArgs.builder()
.url(Output.tuple(bucket.name(), object.name()).applyValue(values -> {
var bucketName = values.t1;
var objectName = values.t2;
return String.format("gs://%s/%s", bucketName,objectName);
}))
.build())
.outputPath(PreventionStoredInfoTypeLargeCustomDictionaryOutputPathArgs.builder()
.path(bucket.name().applyValue(name -> String.format("gs://%s/output/dictionary.txt", name)))
.build())
.build())
.build());
}
}

Dlp Stored Info Type With Id

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dataloss.PreventionStoredInfoType;
import com.pulumi.gcp.dataloss.PreventionStoredInfoTypeArgs;
import com.pulumi.gcp.dataloss.inputs.PreventionStoredInfoTypeRegexArgs;
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 withStoredInfoTypeId = new PreventionStoredInfoType("withStoredInfoTypeId", PreventionStoredInfoTypeArgs.builder()
.description("Description")
.displayName("Displayname")
.parent("projects/my-project-name")
.regex(PreventionStoredInfoTypeRegexArgs.builder()
.groupIndexes(2)
.pattern("patient")
.build())
.storedInfoTypeId("id-")
.build());
}
}

Import

StoredInfoType can be imported using any of these accepted formats

$ pulumi import gcp:dataloss/preventionStoredInfoType:PreventionStoredInfoType default {{parent}}/storedInfoTypes/{{name}}
$ pulumi import gcp:dataloss/preventionStoredInfoType:PreventionStoredInfoType default {{parent}}/{{name}}

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, dictionary: Output<PreventionStoredInfoTypeDictionaryArgs>? = null, displayName: Output<String>? = null, largeCustomDictionary: Output<PreventionStoredInfoTypeLargeCustomDictionaryArgs>? = null, parent: Output<String>? = null, regex: Output<PreventionStoredInfoTypeRegexArgs>? = null, storedInfoTypeId: Output<String>? = null)

Properties

Link copied to clipboard
val description: Output<String>? = null

A description of the info type.

Link copied to clipboard

Dictionary which defines the rule. Structure is documented below.

Link copied to clipboard
val displayName: Output<String>? = null

User set display name of the info type.

Link copied to clipboard

Dictionary which defines the rule. Structure is documented below.

Link copied to clipboard
val parent: Output<String>? = null

The parent of the info type in any of the following formats:

Link copied to clipboard

Regular expression which defines the rule. Structure is documented below.

Link copied to clipboard
val storedInfoTypeId: Output<String>? = null

The storedInfoType ID can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: a-zA-Z\d-_+. The maximum length is 100 characters. Can be empty to allow the system to generate one.

Functions

Link copied to clipboard
open override fun toJava(): PreventionStoredInfoTypeArgs