Class MultiRegionAuditEvents
- Namespace
- Excalibur.Compliance
- Assembly
- Excalibur.Compliance.Abstractions.dll
Factory methods for creating multi-region disaster recovery audit events.
public static class MultiRegionAuditEvents
- Inheritance
-
MultiRegionAuditEvents
- Inherited Members
Remarks
Multi-region operations generate audit events for:
- Failover events (automatic and manual)
- Failback events
- RPO threshold breaches
- Replication status changes
These events support SOC 2 compliance by providing evidence of:
- CC6.6 - Encryption key availability and recovery
- CC7.2 - System availability monitoring
- CC9.1 - Business continuity planning
Methods
FailbackCompleted(string, string, string, string, int, string?)
Creates an audit event for a failback operation.
public static AuditEvent FailbackCompleted(string sourceRegion, string targetRegion, string reason, string actorId, int keysSynchronized, string? correlationId = null)
Parameters
sourceRegionstringThe region failing back from (secondary).
targetRegionstringThe region failing back to (primary).
reasonstringThe reason for failback.
actorIdstringThe actor who initiated the failback.
keysSynchronizedintNumber of keys synchronized during failback.
correlationIdstringOptional correlation ID for related events.
Returns
- AuditEvent
An audit event representing the failback.
FailoverInitiated(string, string, string, bool, string, string?)
Creates an audit event for a failover operation.
public static AuditEvent FailoverInitiated(string sourceRegion, string targetRegion, string reason, bool isAutomatic, string actorId, string? correlationId = null)
Parameters
sourceRegionstringThe region failing from (primary).
targetRegionstringThe region failing to (secondary).
reasonstringThe reason for failover.
isAutomaticboolWhether the failover was triggered automatically.
actorIdstringThe actor who initiated the failover (for manual) or "System" (for automatic).
correlationIdstringOptional correlation ID for related events.
Returns
- AuditEvent
An audit event representing the failover.
RegionHealthChanged(string, bool, bool, int, string?, string?)
Creates an audit event for a region health status change.
public static AuditEvent RegionHealthChanged(string regionId, bool previousStatus, bool currentStatus, int consecutiveFailures, string? errorMessage = null, string? correlationId = null)
Parameters
regionIdstringThe region whose health changed.
previousStatusboolThe previous health status.
currentStatusboolThe current health status.
consecutiveFailuresintNumber of consecutive health check failures.
errorMessagestringError message if unhealthy.
correlationIdstringOptional correlation ID for related events.
Returns
- AuditEvent
An audit event representing the health status change.
ReplicationSyncCompleted(string, string, int, TimeSpan, string?)
Creates an audit event for a replication sync completion.
public static AuditEvent ReplicationSyncCompleted(string sourceRegion, string targetRegion, int keyCount, TimeSpan duration, string? correlationId = null)
Parameters
sourceRegionstringThe source region of the replication.
targetRegionstringThe target region of the replication.
keyCountintNumber of keys synchronized.
durationTimeSpanDuration of the sync operation.
correlationIdstringOptional correlation ID for related events.
Returns
- AuditEvent
An audit event representing the sync completion.
RpoThresholdBreached(TimeSpan, TimeSpan, string, int, string?)
Creates an audit event for an RPO threshold breach.
public static AuditEvent RpoThresholdBreached(TimeSpan currentLag, TimeSpan threshold, string activeRegion, int pendingKeys, string? correlationId = null)
Parameters
currentLagTimeSpanThe current replication lag.
thresholdTimeSpanThe configured RPO threshold.
activeRegionstringThe currently active region.
pendingKeysintNumber of keys pending replication.
correlationIdstringOptional correlation ID for related events.
Returns
- AuditEvent
An audit event representing the RPO threshold breach.