Inbound S3 Logs

An InboundS3Log is an audit log for monitoring and troubleshooting S3-compatible API requests to your Files.com site.

Logs available through this endpoint are retained for 6 months, after which they are automatically discarded. For longer retention, use Files.com SIEM integrations to stream logs in real time to your preferred SIEM, or configure SIEM streaming to a file.

List Inbound S3 Logs

SDK Method

inbounds3log.List()

Return Object

[]*InboundS3Log

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Additional Arguments

Example Request

import (
    "fmt"
    "errors"

    files_sdk "github.com/Files-com/files-sdk-go/v3"
    inbound_s3_log "github.com/Files-com/files-sdk-go/v3/inbounds3log"
)

inboundS3LogIterator, err := inbound_s3_log.List(files_sdk.InboundS3LogListParams{})
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

for inboundS3LogIterator.Next() {
    inboundS3Log := inboundS3LogIterator.inboundS3Log()
}
err = inboundS3LogIterator.Err()
if err != nil {
    var respErr files_sdk.ResponseError
    if errors.As(err, &respErr) {
        fmt.Println("Response Error Occurred (" + respErr.Type + "): " + respErr.ErrorMessage)
    } else {
        fmt.Printf("Unexpected Error: %s\n", err.Error())
    }
}

The InboundS3Log Object

Some of the methods above return a InboundS3Log object. The attributes of this object are listed below.

AttributeDescription
Path
string
Request Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
ClientIp
string
Client IP
Operation
string
S3 Operation Type
Status
string
HTTP Status Code
AwsAccessKey
string
AWS Access Key ID
ErrorMessage
string
Error message, if applicable
ErrorType
string
Error type, if applicable
DurationMs
int64
Duration (in milliseconds)
RequestId
string
Request ID
UserAgent
string
User Agent
CreatedAt
date-time
Start Time of Request