CustomDataIdentifier class

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/v7/go/aws/macie"
	"github.com/pulumi/pulumi-aws/sdk/v7/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
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_macie2_account" "example" {
}
resource "aws_macie_customdataidentifier" "example" {
  depends_on             = [test]
  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"]
}
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.ArrayList;
import java.util.Arrays;
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.macie.CustomDataIdentifier using the id. For example:

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

Constructors

CustomDataIdentifier(String name, {CustomDataIdentifierArgs? args, CustomResourceOptions? options})
Creates a new CustomDataIdentifier. name The Pulumi resource name. args Arguments used to configure this CustomDataIdentifier. The set of arguments for CustomDataIdentifier. options Resource options controlling this resource's behavior.
CustomDataIdentifier.reference(String urn)
Creates a typed reference to an existing CustomDataIdentifier resource.

Properties

arn ↔ Output<String>
ARN of the custom data identifier.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
createdAt ↔ Output<String>
The date and time, in UTC and extended RFC 3339 format, when the Amazon Macie account was created.
latefinal
description ↔ Output<String?>
A custom description of the custom data identifier. The description can contain as many as 512 characters.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
ignoreWords ↔ Output<List<String>?>
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.
latefinal
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
keywords ↔ Output<List<String>?>
An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) 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.
latefinal
maximumMatchDistance ↔ Output<int>
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.
latefinal
name ↔ Output<String>
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 namePrefix.
latefinal
namePrefix ↔ Output<String>
Creates a unique name beginning with the specified prefix. Conflicts with name.
latefinal
regex ↔ Output<String?>
The regular expression (regex) that defines the pattern to match. The expression can contain as many as 512 characters.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tags ↔ Output<Map<String, String>?>
Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {CustomDataIdentifierState? state, CustomResourceOptions? options}) → CustomDataIdentifier
Gets an existing CustomDataIdentifier resource's state with the given name and id.