Class CfnAllowList
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::Macie::AllowList
.
The AWS::Macie::AllowList
resource specifies an allow list. In Amazon Macie , an allow list defines specific text or a text pattern for Macie to ignore when it inspects data sources for sensitive data. If data matches text or a text pattern in an allow list, Macie doesn’t report the data in sensitive data findings or sensitive data discovery results, even if the data matches the criteria of a custom data identifier or a managed data identifier. You can create and use allow lists in all the AWS Regions where Macie is currently available except the Asia Pacific (Osaka) Region.
Macie supports two types of allow lists:
- Predefined text - For this type of list (
S3WordsList
), you create a line-delimited plaintext file that lists specific text to ignore, and you store the file in an Amazon Simple Storage Service ( Amazon S3 ) bucket. You then configure settings for Macie to access the list in the bucket.
This type of list typically contains specific words, phrases, and other kinds of character sequences that aren’t sensitive, aren't likely to change, and don’t necessarily adhere to a common pattern. If you use this type of list, Macie doesn't report occurrences of text that exactly match a complete entry in the list. Macie treats each entry in the list as a string literal value. Matches aren't case sensitive.
- Regular expression - For this type of list (
Regex
), you specify a regular expression that defines a text pattern to ignore. Unlike an allow list with predefined text, you store the regex and all other list settings in Macie .
This type of list is helpful if you want to specify text that isn’t sensitive but varies or is likely to change while also adhering to a common pattern. If you use this type of list, Macie doesn't report occurrences of text that completely match the pattern defined by the list.
For more information, see Defining sensitive data exceptions with allow lists in the Amazon Macie User Guide .
An AWS::Macie::Session
resource must exist for an AWS account before you can create an AWS::Macie::AllowList
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.*; CfnAllowList cfnAllowList = CfnAllowList.Builder.create(this, "MyCfnAllowList") .criteria(CriteriaProperty.builder() .regex("regex") .s3WordsList(S3WordsListProperty.builder() .bucketName("bucketName") .objectKey("objectKey") .build()) .build()) .name("name") // the properties below are optional .description("description") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnAllowList
.static interface
Specifies the criteria for an allow list, which is a list that defines specific text or a text pattern to ignore when inspecting data sources for sensitive data.static interface
Specifies the location and name of an Amazon Simple Storage Service ( Amazon S3 ) object that lists specific, predefined text to ignore when inspecting data sources for sensitive data.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnAllowList
(Construct scope, String id, CfnAllowListProps props) Create a newAWS::Macie::AllowList
.protected
CfnAllowList
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnAllowList
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the allow list.The unique identifier for the allow list.The current status of the allow list, which indicates whether Amazon Macie can access and use the list's criteria.The criteria that specify the text or text pattern to ignore.A custom description of the allow list.getName()
A custom name for the allow list.getTags()
An array of key-value pairs to apply to the allow list.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setCriteria
(IResolvable value) The criteria that specify the text or text pattern to ignore.void
The criteria that specify the text or text pattern to ignore.void
setDescription
(String value) A custom description of the allow list.void
A custom name for the allow list.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnAllowList
protected CfnAllowList(software.amazon.jsii.JsiiObjectRef objRef) -
CfnAllowList
protected CfnAllowList(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnAllowList
@Stability(Stable) public CfnAllowList(@NotNull Construct scope, @NotNull String id, @NotNull CfnAllowListProps props) Create a newAWS::Macie::AllowList
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the allow list. -
getAttrId
The unique identifier for the allow list. -
getAttrStatus
The current status of the allow list, which indicates whether Amazon Macie can access and use the list's criteria.If the list's criteria specify a regular expression (
Regex
), this value is typicallyOK
. Macie can compile the expression. If the list's criteria specify an Amazon S3 object (S3WordsList
), possible values are:OK
- Macie can retrieve and parse the contents of the object.S3_OBJECT_ACCESS_DENIED
- Macie isn't allowed to access the object or the object is encrypted with a customer managed AWS KMS key that Macie isn't allowed to use. Check the bucket policy and other permissions settings for the bucket and the object. If the object is encrypted, also ensure that it's encrypted with a key that Macie is allowed to use.S3_OBJECT_EMPTY
- Macie can retrieve the object but the object doesn't contain any content. Ensure that the object contains the correct entries. Also ensure that the list's criteria specify the correct bucket and object names.S3_OBJECT_NOT_FOUND
- The object doesn't exist in Amazon S3 . Ensure that the list's criteria specify the correct bucket and object names.S3_OBJECT_OVERSIZE
- Macie can retrieve the object. However, the object contains too many entries or its storage size exceeds the quota for an allow list. Try breaking the list into multiple files and ensure that each file doesn't exceed any quotas. Then configure list settings in Macie for each file.S3_THROTTLED
- Amazon S3 throttled the request to retrieve the object. Wait a few minutes and then try again.S3_USER_ACCESS_DENIED
- Amazon S3 denied the request to retrieve the object. If the specified object exists, you're not allowed to access it or it's encrypted with an AWS KMS key that you're not allowed to use. Work with your AWS administrator to ensure that the list's criteria specify the correct bucket and object names, and you have read access to the bucket and the object. If the object is encrypted, also ensure that it's encrypted with a key that you're allowed to use.UNKNOWN_ERROR
- A transient or internal error occurred when Macie attempted to retrieve or parse the object. Wait a few minutes and then try again. A list can also have this status if it's encrypted with a key that Amazon S3 and Macie can't access or use.
For more information, see Allow list options and requirements in the Amazon Macie User Guide .
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
An array of key-value pairs to apply to the allow list.For more information, see Tag .
-
getCriteria
The criteria that specify the text or text pattern to ignore.The criteria can be the location and name of an Amazon S3 object that lists specific text to ignore (
S3WordsList
), or a regular expression (Regex
) that defines a text pattern to ignore. -
setCriteria
The criteria that specify the text or text pattern to ignore.The criteria can be the location and name of an Amazon S3 object that lists specific text to ignore (
S3WordsList
), or a regular expression (Regex
) that defines a text pattern to ignore. -
setCriteria
The criteria that specify the text or text pattern to ignore.The criteria can be the location and name of an Amazon S3 object that lists specific text to ignore (
S3WordsList
), or a regular expression (Regex
) that defines a text pattern to ignore. -
getName
A custom name for the allow list.The name can contain 1-128 characters.
-
setName
A custom name for the allow list.The name can contain 1-128 characters.
-
getDescription
A custom description of the allow list.The description can contain 1-512 characters.
-
setDescription
A custom description of the allow list.The description can contain 1-512 characters.
-