CustomDataIdentifierArgs

data class CustomDataIdentifierArgs(val description: Output<String>? = null, val ignoreWords: Output<List<String>>? = null, val keywords: Output<List<String>>? = null, val maximumMatchDistance: Output<Int>? = null, val name: Output<String>? = null, val namePrefix: Output<String>? = null, val regex: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<CustomDataIdentifierArgs>

Provides a resource to manage an AWS Macie Custom Data Identifier.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.macie2.Account("example", {});
const exampleCustomDataIdentifier = new aws.macie.CustomDataIdentifier("example", {
name: "NAME OF CUSTOM DATA IDENTIFIER",
regex: "[0-9]{3}-[0-9]{2}-[0-9]{4}",
description: "DESCRIPTION",
maximumMatchDistance: 10,
keywords: ["keyword"],
ignoreWords: ["ignore"],
}, {
dependsOn: [test],
});
import pulumi
import pulumi_aws as aws
example = aws.macie2.Account("example")
example_custom_data_identifier = aws.macie.CustomDataIdentifier("example",
name="NAME OF CUSTOM DATA IDENTIFIER",
regex="[0-9]{3}-[0-9]{2}-[0-9]{4}",
description="DESCRIPTION",
maximum_match_distance=10,
keywords=["keyword"],
ignore_words=["ignore"],
opts = pulumi.ResourceOptions(depends_on=[test]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Macie2.Account("example");
var exampleCustomDataIdentifier = new Aws.Macie.CustomDataIdentifier("example", new()
{
Name = "NAME OF CUSTOM DATA IDENTIFIER",
Regex = "[0-9]{3}-[0-9]{2}-[0-9]{4}",
Description = "DESCRIPTION",
MaximumMatchDistance = 10,
Keywords = new[]
{
"keyword",
},
IgnoreWords = new[]
{
"ignore",
},
}, new CustomResourceOptions
{
DependsOn =
{
test,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/macie"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/macie2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := macie2.NewAccount(ctx, "example", nil)
if err != nil {
return err
}
_, err = macie.NewCustomDataIdentifier(ctx, "example", &macie.CustomDataIdentifierArgs{
Name: pulumi.String("NAME OF CUSTOM DATA IDENTIFIER"),
Regex: pulumi.String("[0-9]{3}-[0-9]{2}-[0-9]{4}"),
Description: pulumi.String("DESCRIPTION"),
MaximumMatchDistance: pulumi.Int(10),
Keywords: pulumi.StringArray{
pulumi.String("keyword"),
},
IgnoreWords: pulumi.StringArray{
pulumi.String("ignore"),
},
}, pulumi.DependsOn([]pulumi.Resource{
test,
}))
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.macie2.Account;
import com.pulumi.aws.macie.CustomDataIdentifier;
import com.pulumi.aws.macie.CustomDataIdentifierArgs;
import com.pulumi.resources.CustomResourceOptions;
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 Account("example");
var exampleCustomDataIdentifier = new CustomDataIdentifier("exampleCustomDataIdentifier", CustomDataIdentifierArgs.builder()
.name("NAME OF CUSTOM DATA IDENTIFIER")
.regex("[0-9]{3}-[0-9]{2}-[0-9]{4}")
.description("DESCRIPTION")
.maximumMatchDistance(10)
.keywords("keyword")
.ignoreWords("ignore")
.build(), CustomResourceOptions.builder()
.dependsOn(test)
.build());
}
}
resources:
example:
type: aws:macie2:Account
exampleCustomDataIdentifier:
type: aws:macie:CustomDataIdentifier
name: example
properties:
name: NAME OF CUSTOM DATA IDENTIFIER
regex: '[0-9]{3}-[0-9]{2}-[0-9]{4}'
description: DESCRIPTION
maximumMatchDistance: 10
keywords:
- keyword
ignoreWords:
- ignore
options:
dependsOn:
- ${test}

Import

Using pulumi import, import aws_macie2_custom_data_identifier using the id. For example:

$ pulumi import aws:macie/customDataIdentifier:CustomDataIdentifier example abcd1

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, ignoreWords: Output<List<String>>? = null, keywords: Output<List<String>>? = null, maximumMatchDistance: Output<Int>? = null, name: Output<String>? = null, namePrefix: Output<String>? = null, regex: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

A custom description of the custom data identifier. The description can contain as many as 512 characters.

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

An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression is the same as any string in this array, Amazon Macie ignores it. The array can contain as many as 10 ignore words. Each ignore word can contain 4 - 90 characters. Ignore words are case sensitive.

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

An array that lists specific character sequences (keywords), one of which must be within proximity (maximum_match_distance) of the regular expression to match. The array can contain as many as 50 keywords. Each keyword can contain 3 - 90 characters. Keywords aren't case sensitive.

Link copied to clipboard
val maximumMatchDistance: Output<Int>? = null

The maximum number of characters that can exist between text that matches the regex pattern and the character sequences specified by the keywords array. Macie includes or excludes a result based on the proximity of a keyword to text that matches the regex pattern. The distance can be 1 - 300 characters. The default value is 50.

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

A custom name for the custom data identifier. The name can contain as many as 128 characters. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.

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

Creates a unique name beginning with the specified prefix. Conflicts with name.

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

The regular expression (regex) that defines the pattern to match. The expression can contain as many as 512 characters.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

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