Class MacieFactory

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
com.cloudforgeci.api.core.annotation.BaseFactory
com.cloudforgeci.api.observability.MacieFactory
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

public class MacieFactory extends BaseFactory
Factory for Amazon Macie (sensitive-data discovery), account/region-scoped like GuardDuty.

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.InitializationMode

    Nested 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
    Constructor
    Description
    MacieFactory(software.constructs.Construct scope, String id)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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 software.constructs.Construct

    getNode, isConstruct, toString

    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 Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • MacieFactory

      public MacieFactory(software.constructs.Construct scope, String id)
      Parameters:
      scope - parent construct
      id - 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:
      create in class BaseFactory