@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
271 lines (270 loc) • 9.71 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Allows creation of custom info types.
*
* To get more information about StoredInfoType, see:
*
* * [API documentation](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.storedInfoTypes)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/dlp/docs/creating-stored-infotypes)
*
* ## Example Usage
*
* ### Dlp Stored Info Type Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const basic = new gcp.dataloss.PreventionStoredInfoType("basic", {
* parent: "projects/my-project-name",
* description: "Description",
* displayName: "Displayname",
* regex: {
* pattern: "patient",
* groupIndexes: [2],
* },
* });
* ```
* ### Dlp Stored Info Type Dictionary
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const dictionary = new gcp.dataloss.PreventionStoredInfoType("dictionary", {
* parent: "projects/my-project-name",
* description: "Description",
* displayName: "Displayname",
* dictionary: {
* wordList: {
* words: [
* "word",
* "word2",
* ],
* },
* },
* });
* ```
* ### Dlp Stored Info Type Large Custom Dictionary
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const bucket = new gcp.storage.Bucket("bucket", {
* name: "tf-test-bucket",
* location: "US",
* forceDestroy: true,
* });
* const object = new gcp.storage.BucketObject("object", {
* name: "tf-test-object",
* bucket: bucket.name,
* source: new pulumi.asset.FileAsset("./test-fixtures/words.txt"),
* });
* const large = new gcp.dataloss.PreventionStoredInfoType("large", {
* parent: "projects/my-project-name",
* description: "Description",
* displayName: "Displayname",
* largeCustomDictionary: {
* cloudStorageFileSet: {
* url: pulumi.interpolate`gs://${bucket.name}/${object.name}`,
* },
* outputPath: {
* path: pulumi.interpolate`gs://${bucket.name}/output/dictionary.txt`,
* },
* },
* });
* ```
* ### Dlp Stored Info Type With Id
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const withStoredInfoTypeId = new gcp.dataloss.PreventionStoredInfoType("with_stored_info_type_id", {
* parent: "projects/my-project-name",
* description: "Description",
* displayName: "Displayname",
* storedInfoTypeId: "id-",
* regex: {
* pattern: "patient",
* groupIndexes: [2],
* },
* });
* ```
*
* ## Import
*
* StoredInfoType can be imported using any of these accepted formats:
*
* * `{{parent}}/storedInfoTypes/{{name}}`
*
* * `{{parent}}/{{name}}`
*
* When using the `pulumi import` command, StoredInfoType can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:dataloss/preventionStoredInfoType:PreventionStoredInfoType default {{parent}}/storedInfoTypes/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:dataloss/preventionStoredInfoType:PreventionStoredInfoType default {{parent}}/{{name}}
* ```
*/
export declare class PreventionStoredInfoType extends pulumi.CustomResource {
/**
* Get an existing PreventionStoredInfoType resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PreventionStoredInfoTypeState, opts?: pulumi.CustomResourceOptions): PreventionStoredInfoType;
/**
* Returns true if the given object is an instance of PreventionStoredInfoType. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is PreventionStoredInfoType;
/**
* A description of the info type.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Dictionary which defines the rule.
* Structure is documented below.
*/
readonly dictionary: pulumi.Output<outputs.dataloss.PreventionStoredInfoTypeDictionary | undefined>;
/**
* User set display name of the info type.
*/
readonly displayName: pulumi.Output<string | undefined>;
/**
* Dictionary which defines the rule.
* Structure is documented below.
*/
readonly largeCustomDictionary: pulumi.Output<outputs.dataloss.PreventionStoredInfoTypeLargeCustomDictionary | undefined>;
/**
* The resource name of the info type. Set by the server.
*/
readonly name: pulumi.Output<string>;
/**
* The parent of the info type in any of the following formats:
* * `projects/{{project}}`
* * `projects/{{project}}/locations/{{location}}`
* * `organizations/{{organization_id}}`
* * `organizations/{{organization_id}}/locations/{{location}}`
*/
readonly parent: pulumi.Output<string>;
/**
* Regular expression which defines the rule.
* Structure is documented below.
*/
readonly regex: pulumi.Output<outputs.dataloss.PreventionStoredInfoTypeRegex | undefined>;
/**
* 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.
*/
readonly storedInfoTypeId: pulumi.Output<string>;
/**
* Create a PreventionStoredInfoType resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: PreventionStoredInfoTypeArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering PreventionStoredInfoType resources.
*/
export interface PreventionStoredInfoTypeState {
/**
* A description of the info type.
*/
description?: pulumi.Input<string>;
/**
* Dictionary which defines the rule.
* Structure is documented below.
*/
dictionary?: pulumi.Input<inputs.dataloss.PreventionStoredInfoTypeDictionary>;
/**
* User set display name of the info type.
*/
displayName?: pulumi.Input<string>;
/**
* Dictionary which defines the rule.
* Structure is documented below.
*/
largeCustomDictionary?: pulumi.Input<inputs.dataloss.PreventionStoredInfoTypeLargeCustomDictionary>;
/**
* The resource name of the info type. Set by the server.
*/
name?: pulumi.Input<string>;
/**
* The parent of the info type in any of the following formats:
* * `projects/{{project}}`
* * `projects/{{project}}/locations/{{location}}`
* * `organizations/{{organization_id}}`
* * `organizations/{{organization_id}}/locations/{{location}}`
*/
parent?: pulumi.Input<string>;
/**
* Regular expression which defines the rule.
* Structure is documented below.
*/
regex?: pulumi.Input<inputs.dataloss.PreventionStoredInfoTypeRegex>;
/**
* 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.
*/
storedInfoTypeId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a PreventionStoredInfoType resource.
*/
export interface PreventionStoredInfoTypeArgs {
/**
* A description of the info type.
*/
description?: pulumi.Input<string>;
/**
* Dictionary which defines the rule.
* Structure is documented below.
*/
dictionary?: pulumi.Input<inputs.dataloss.PreventionStoredInfoTypeDictionary>;
/**
* User set display name of the info type.
*/
displayName?: pulumi.Input<string>;
/**
* Dictionary which defines the rule.
* Structure is documented below.
*/
largeCustomDictionary?: pulumi.Input<inputs.dataloss.PreventionStoredInfoTypeLargeCustomDictionary>;
/**
* The parent of the info type in any of the following formats:
* * `projects/{{project}}`
* * `projects/{{project}}/locations/{{location}}`
* * `organizations/{{organization_id}}`
* * `organizations/{{organization_id}}/locations/{{location}}`
*/
parent: pulumi.Input<string>;
/**
* Regular expression which defines the rule.
* Structure is documented below.
*/
regex?: pulumi.Input<inputs.dataloss.PreventionStoredInfoTypeRegex>;
/**
* 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.
*/
storedInfoTypeId?: pulumi.Input<string>;
}