pub struct AuditLogs<'a> { /* private fields */ }Expand description
Audit log routes, from Client::audit_logs.
A personal key sees its user’s own actions plus everything on the zones the user is Owner or Administrator of (membership as of now, so a new Owner sees the zone’s history); a zone key sees its zone. Some fields (e.g. other people’s IP addresses) are left out for non-Admins.
Implementations§
Source§impl<'a> AuditLogs<'a>
impl<'a> AuditLogs<'a>
Sourcepub async fn list(
&self,
filter: &AuditLogFilter,
) -> Result<CursorPage<AuditLog>>
pub async fn list( &self, filter: &AuditLogFilter, ) -> Result<CursorPage<AuditLog>>
One page of entries, newest first.
GET /api/v1/audit-logs
§Errors
ErrorCode::Validationfor a bad filter,fromnot beforeto, a range over 31 days, or a cursor not from this API.ErrorCode::AuditDisabledif Core runs without the audit log.Error::InvalidInputfor a time before 1970.
§Examples
use dinio_sdk::api::AuditLogFilter;
let mut filter = AuditLogFilter {
zone_id: Some(zone.uuid),
action: Some("record.*".into()),
..Default::default()
};
let first = client.audit_logs().list(&filter).await?;
if let Some(cursor) = first.next_cursor {
filter.cursor = Some(cursor);
let second = client.audit_logs().list(&filter).await?;
}Auto Trait Implementations§
impl<'a> !RefUnwindSafe for AuditLogs<'a>
impl<'a> !UnwindSafe for AuditLogs<'a>
impl<'a> Freeze for AuditLogs<'a>
impl<'a> Send for AuditLogs<'a>
impl<'a> Sync for AuditLogs<'a>
impl<'a> Unpin for AuditLogs<'a>
impl<'a> UnsafeUnpin for AuditLogs<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more