Logging

Logging Configuration of a Bucket

GetBucketLogging

get

Returns the logging status of a bucket and the permissions users have to view and modify that status. To use GET, you must be the bucket owner.

Authorizations
Path parameters
BucketstringRequired

The bucket name for which to get the logging information.

Query parameters
loggingboolean · enumRequiredPossible values:
Responses
200
Successful operation
application/xml
get
GET /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01">
  <LoggingEnabled>
    <TargetBucket>my-destination-bucket</TargetBucket>
    <TargetPrefix>mylogs/</TargetPrefix>
  </LoggingEnabled>
</BucketLoggingStatus>

PutBucketLogging

put

Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters. All logs are saved to buckets in the same IONOS Object Storage Region as the source bucket. To set the logging status of a bucket, you must be the bucket owner.

The bucket owner is automatically granted FULL_CONTROL to all logs. You use the Grantee request element to grant access to other people. The Permissions request element specifies the kind of access the grantee has to the logs.

Authorizations
Path parameters
BucketstringRequired

The name of the bucket for which to set the logging parameters.

Query parameters
loggingboolean · enumRequiredPossible values:
Header parameters
Content-MD5all ofOptional
stringOptional

The base64 encoded MD5 digest of the message (without the headers) according to RFC 1864.

Body
Responses
200
Successful operation
put
PUT /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Content-Type: application/xml
Accept: */*
Content-Length: 281

"<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01">
  <LoggingEnabled>
    <TargetBucket>my-destination-bucket</TargetBucket>
    <TargetPrefix>mylogs/</TargetPrefix>
  </LoggingEnabled>
</BucketLoggingStatus>
"

No content

Was this helpful?