Skip to content

createPlatformEventSubscription

createPlatformEventSubscription(input, target): Promise<At4dxPlatformEventSubscriptionWriteResult>

Defined in: packages/simply-aep-core/src/at4dxPlatformEventSubscriptionWrite.ts:221

Creates a new PlatformEvents_Subscription__mdt record: validates the inputs, checks the DeveloperName doesn’t already exist in the scanned scope, runs it through validatePlatformEventSubscriptions alongside everything already scanned, then writes (and optionally deploys) the generated .md-meta.xml.

See docs/design/0025-at4dx-platform-event-subscription-support.md for the full behavior contract.

CreatePlatformEventSubscriptionInput

CreatePlatformEventSubscriptionTarget

Promise<At4dxPlatformEventSubscriptionWriteResult>

See the error codes in PlatformEventSubscriptionWriteErrorCode.