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
ResultboolWhether the action was successful (true) or failed (false).
TypestringType of action (e.g., "create", "update", "delete", "change_setting").
TimeDateTime?When the action occurred (v2 API). In v1 API, this is at the top level When.
DescriptionstringHuman-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
Result
Whether the action was successful (true) or failed (false).
[JsonPropertyName("result")]
[JsonConverter(typeof(BooleanOrStringConverter))]
public bool Result { get; init; }
Property Value
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
Type
Type of action (e.g., "create", "update", "delete", "change_setting").
[JsonPropertyName("type")]
public string Type { get; init; }