Table of Contents

Class AuditLogAction

Namespace
Cloudflare.NET.AuditLogs.Models
Assembly
Cloudflare.NET.dll

Action details for an audit log entry.

public record AuditLogAction : IEquatable<AuditLogAction>
Inheritance
AuditLogAction
Implements
Inherited Members

Remarks

The v1 audit logs API returns result as a boolean. The v2 beta API (at /accounts//logs/audit) returns a string ("success"/"failure"). The BooleanOrStringConverter handles both formats transparently.

Constructors

AuditLogAction(bool, string, DateTime?, string?)

Action details for an audit log entry.

public AuditLogAction(bool Result, string Type, DateTime? Time = null, string? Description = null)

Parameters

Result bool

Whether the action was successful (true) or failed (false).

Type string

Type of action (e.g., "create", "update", "delete", "change_setting").

Time DateTime?

When the action occurred (v2 API). In v1 API, this is at the top level When.

Description string

Human-readable description of the action (v2 API only).

Remarks

The v1 audit logs API returns result as a boolean. The v2 beta API (at /accounts//logs/audit) returns a string ("success"/"failure"). The BooleanOrStringConverter handles both formats transparently.

Properties

Description

Human-readable description of the action (v2 API only).

[JsonPropertyName("description")]
public string? Description { get; init; }

Property Value

string

Result

Whether the action was successful (true) or failed (false).

[JsonPropertyName("result")]
[JsonConverter(typeof(BooleanOrStringConverter))]
public bool Result { get; init; }

Property Value

bool

Time

When the action occurred (v2 API). In v1 API, this is at the top level When.

[JsonPropertyName("time")]
public DateTime? Time { get; init; }

Property Value

DateTime?

Type

Type of action (e.g., "create", "update", "delete", "change_setting").

[JsonPropertyName("type")]
public string Type { get; init; }

Property Value

string