@backblaze-labs/b2-sdk - v0.1.0
    Preparing search index...

    Interface EventNotificationRule

    A rule that defines which bucket events trigger webhook notifications and where they are sent.

    interface EventNotificationRule {
        eventTypes: readonly EventType[];
        isEnabled: boolean;
        isSuspended: boolean;
        name: string;
        objectNamePrefix: string;
        suspensionReason: string;
        targetConfiguration: {
            customHeaders?: Record<string, string>;
            hmacSha256SigningSecret?: string;
            targetType: string;
            url: string;
        };
    }
    Index

    Properties

    eventTypes: readonly EventType[]

    Event types that trigger this notification rule.

    isEnabled: boolean

    Whether this rule is actively sending notifications.

    isSuspended: boolean

    Whether B2 has suspended this rule due to delivery failures.

    name: string

    Unique name identifying this rule within the bucket.

    objectNamePrefix: string

    Only events for objects with this name prefix trigger the rule. Empty string matches all objects.

    suspensionReason: string

    Reason for suspension, or empty string if not suspended.

    targetConfiguration: {
        customHeaders?: Record<string, string>;
        hmacSha256SigningSecret?: string;
        targetType: string;
        url: string;
    }

    Webhook target configuration.

    Type Declaration

    • Optional ReadonlycustomHeaders?: Record<string, string>

      Optional custom headers included in webhook requests.

    • Optional ReadonlyhmacSha256SigningSecret?: string

      Optional HMAC-SHA256 secret used to sign notification payloads for verification.

    • ReadonlytargetType: string

      Target type (e.g., 'url' for webhook delivery).

    • Readonlyurl: string

      Webhook URL that receives the event notifications.