Class CfnCustomDataIdentifier

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:19.665Z") @Stability(Stable) public class CfnCustomDataIdentifier extends CfnResource implements IInspectable, ITaggableV2
The AWS::Macie::CustomDataIdentifier resource specifies a custom data identifier.

A custom data identifier is a set of custom criteria for Amazon Macie to use when it inspects data sources for sensitive data. The criteria consist of a regular expression ( regex ) that defines a text pattern to match and, optionally, character sequences and a proximity rule that refine the results. The character sequences can be:

  • Keywords , which are words or phrases that must be in proximity of text that matches the regex, or
  • Ignore words , which are words or phrases to exclude from the results.

By using custom data identifiers, you can supplement the managed data identifiers that Macie provides and detect sensitive data that reflects your particular scenarios, intellectual property, or proprietary data. For more information, see Building custom data identifiers in the Amazon Macie User Guide .

An AWS::Macie::Session resource must exist for an AWS account before you can create an AWS::Macie::CustomDataIdentifier resource for the account. Use a DependsOn attribute to ensure that an AWS::Macie::Session resource is created before other Macie resources are created for an account. For example, "DependsOn": "Session" .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.macie.*;
 CfnCustomDataIdentifier cfnCustomDataIdentifier = CfnCustomDataIdentifier.Builder.create(this, "MyCfnCustomDataIdentifier")
         .name("name")
         .regex("regex")
         // the properties below are optional
         .description("description")
         .ignoreWords(List.of("ignoreWords"))
         .keywords(List.of("keywords"))
         .maximumMatchDistance(123)
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnCustomDataIdentifier

      protected CfnCustomDataIdentifier(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnCustomDataIdentifier

      protected CfnCustomDataIdentifier(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnCustomDataIdentifier

      @Stability(Stable) public CfnCustomDataIdentifier(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnCustomDataIdentifierProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the custom data identifier.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The unique identifier for the custom data identifier.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getName

      @Stability(Stable) @NotNull public String getName()
      A custom name for the custom data identifier.

      The name can contain 1-128 characters.

    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      A custom name for the custom data identifier.

      The name can contain 1-128 characters.

    • getRegex

      @Stability(Stable) @NotNull public String getRegex()
      The regular expression ( regex ) that defines the text pattern to match.
    • setRegex

      @Stability(Stable) public void setRegex(@NotNull String value)
      The regular expression ( regex ) that defines the text pattern to match.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A custom description of the custom data identifier.

      The description can contain 1-512 characters.

    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A custom description of the custom data identifier.

      The description can contain 1-512 characters.

    • getIgnoreWords

      @Stability(Stable) @Nullable public List<String> getIgnoreWords()
      An array of character sequences ( ignore words ) to exclude from the results.
    • setIgnoreWords

      @Stability(Stable) public void setIgnoreWords(@Nullable List<String> value)
      An array of character sequences ( ignore words ) to exclude from the results.
    • getKeywords

      @Stability(Stable) @Nullable public List<String> getKeywords()
      An array of character sequences ( keywords ), one of which must precede and be in proximity ( MaximumMatchDistance ) of the regular expression ( Regex ) to match.
    • setKeywords

      @Stability(Stable) public void setKeywords(@Nullable List<String> value)
      An array of character sequences ( keywords ), one of which must precede and be in proximity ( MaximumMatchDistance ) of the regular expression ( Regex ) to match.
    • getMaximumMatchDistance

      @Stability(Stable) @Nullable public Number getMaximumMatchDistance()
      The maximum number of characters that can exist between the end of at least one complete character sequence specified by the Keywords array and the end of text that matches the regular expression ( Regex ).
    • setMaximumMatchDistance

      @Stability(Stable) public void setMaximumMatchDistance(@Nullable Number value)
      The maximum number of characters that can exist between the end of at least one complete character sequence specified by the Keywords array and the end of text that matches the regular expression ( Regex ).
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      An array of key-value pairs to apply to the custom data identifier.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      An array of key-value pairs to apply to the custom data identifier.