Class MacieFactory
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable
An AWS account allows only one Macie session per Region, and macie2:EnableMacie is
not idempotent -- it throws ConflictException when a session already exists. Multiple
CloudForgeCI stacks in the same account/Region (e.g. two PRODUCTION applications) would
otherwise race to create AWS::Macie::Session and the second deploy would fail outright.
This uses an AwsCustomResource calling macie2:EnableMacie directly and ignores
that specific conflict, so a second stack's deploy adopts the existing session instead of
failing. No onDelete: Macie is an account/Region singleton another stack may still
depend on, so deleting this stack must not disable it for everyone else.
Automated discovery jobs (macieAutomatedDiscoveryEnabled) are a separate concern from
the session itself and aren't modeled here yet -- there's no CfnClassificationJob
equivalent for "continuous discovery" wired up; this factory only turns Macie on.
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy -
Field Summary
Fields inherited from class BaseFactory
cfc, config, ctx -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()Resolves whether Macie is required, then enables the account/Region session, adopting an existing one if another stack already created it.Methods inherited from class BaseFactory
getDeploymentContext, getSecurityProfileConfiguration, getSystemContextMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
MacieFactory
- Parameters:
scope- parent constructid- construct ID
-
-
Method Details
-
create
public void create()Resolves whether Macie is required, then enables the account/Region session, adopting an existing one if another stack already created it.- Specified by:
createin classBaseFactory
-