@@ -705,3 +705,192 @@ HTTP Response
705705+---------------+-----------------------+----------------------------------------------------------+
706706
707707.. _S3 Notification Compatibility : ../../s3-notification-compatibility
708+
709+ Enable Bucket Logging
710+ ---------------------
711+
712+ Enable logging for a bucket.
713+
714+ Syntax
715+ ~~~~~~
716+
717+ ::
718+
719+ PUT /{bucket}?logging HTTP/1.1
720+
721+
722+ Request Entities
723+ ~~~~~~~~~~~~~~~~
724+
725+ Parameters are XML encoded in the body of the request, in the following format:
726+
727+ ::
728+
729+ <BucketLoggingStatus xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
730+ <LoggingEnabled>
731+ <TargetBucket>string</TargetBucket>
732+ <TargetGrants>
733+ <Grant>
734+ <Grantee>
735+ <DisplayName>string</DisplayName>
736+ <EmailAddress>string</EmailAddress>
737+ <ID>string</ID>
738+ <xsi:type>string</xsi:type>
739+ <URI>string</URI>
740+ </Grantee>
741+ <Permission>string</Permission>
742+ </Grant>
743+ </TargetGrants>
744+ <TargetObjectKeyFormat>
745+ <PartitionedPrefix>
746+ <PartitionDateSource>DeliveryTime|EventTime</PartitionDateSource>
747+ </PartitionedPrefix>
748+ <SimplePrefix>
749+ </SimplePrefix>
750+ </TargetObjectKeyFormat>
751+ <TargetPrefix>string</TargetPrefix>
752+ <LoggingType>Standard|Journal</LoggingType>
753+ <ObjectRollTime>integer</ObjectRollTime>
754+ </LoggingEnabled>
755+ </BucketLoggingStatus>
756+
757+ +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+
758+ | Name | Type | Description | Required |
759+ +===============================+===========+======================================================================================+==========+
760+ | ``BucketLoggingStatus `` | Container | Enabling/Disabling logging configuration for the bucket. | Yes |
761+ +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+
762+ | ``LoggingEnabled `` | Container | Holding the logging configuration for the bucket. | Yes |
763+ +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+
764+ | ``TargetBucket `` | String | The bucket where the logs are stored. The log bucket cannot have bucket logging | Yes |
765+ | | | enabled. | |
766+ +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+
767+ | ``TargetGrants `` | Container | Not supported. The owner of the log bucket is the owner of the log objects. | No |
768+ +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+
769+ | ``TargetObjectKeyFormat `` | Container | The format of the log object key. Contains either ``PartitionedPrefix `` or | No |
770+ | | | ``SimplePrefix `` entities. | |
771+ +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+
772+ | ``PartitionedPrefix `` | Container | Indicates a partitioned log object key format. Note that ``PartitionDateSource `` | No |
773+ | | | is ignored and hardcoded as ``DeliveryTime `` | |
774+ +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+
775+ | ``SimplePrefix `` | Container | Indicates a simple log object key format (default format) | No |
776+ +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+
777+ | ``TargetPrefix `` | String | The prefix for the log objects. Used in both formats. May be used to distinguish | No |
778+ | | | between different source buckets writing log records to the same log bucket. | |
779+ +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+
780+ | ``LoggingType `` | String | The type of logging. Valid values are: | No |
781+ | | | ``Standard `` (default) all bucket operations are logged after being perfomed. | |
782+ | | | The log record will contain all fields. | |
783+ | | | ``Journal `` only PUT, COPY, MULTI/DELETE and MPU operations are logged. | |
784+ | | | Will record the minimum subset of fields in the log record that is needed | |
785+ | | | for journaling. | |
786+ +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+
787+ | ``ObjectRollTime `` | Integer | The time in seconds after which a new log object is created, and the previous log | No |
788+ | | | object added to the log bucket. Default is 3600 seconds (1 hour). | |
789+ +-------------------------------+-----------+--------------------------------------------------------------------------------------+----------+
790+
791+
792+ HTTP Response
793+ ~~~~~~~~~~~~~
794+
795+ +---------------+-----------------------+----------------------------------------------------------+
796+ | HTTP Status | Status Code | Description |
797+ +===============+=======================+==========================================================+
798+ | ``400 `` | MalformedXML | The XML is not well-formed |
799+ +---------------+-----------------------+----------------------------------------------------------+
800+ | ``400 `` | InvalidArgument | Missing mandatory value or invalid value |
801+ +---------------+-----------------------+----------------------------------------------------------+
802+ | ``404 `` | NoSuchBucket | The bucket does not exist |
803+ +---------------+-----------------------+----------------------------------------------------------+
804+
805+
806+ Disable Bucket Logging
807+ ----------------------
808+
809+ Disable bucket logging from a bucket.
810+
811+ Syntax
812+ ~~~~~~
813+
814+ ::
815+
816+ PUT /{bucket}?logging HTTP/1.1
817+
818+
819+ Request Entities
820+ ~~~~~~~~~~~~~~~~
821+
822+ Parameters are XML encoded in the body of the request, in the following format:
823+
824+ ::
825+
826+ <BucketLoggingStatus xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
827+ </BucketLoggingStatus>
828+
829+
830+ HTTP Response
831+ ~~~~~~~~~~~~~
832+
833+ +---------------+-----------------------+----------------------------------------------------------+
834+ | HTTP Status | Status Code | Description |
835+ +===============+=======================+==========================================================+
836+ | ``404 `` | NoSuchBucket | The bucket does not exist |
837+ +---------------+-----------------------+----------------------------------------------------------+
838+
839+ Get Bucket Logging
840+ ------------------
841+
842+ Get logging configured on a bucket.
843+
844+ Syntax
845+ ~~~~~~
846+
847+ ::
848+
849+ GET /{bucket}?logging HTTP/1.1
850+
851+
852+ Response Entities
853+ ~~~~~~~~~~~~~~~~~
854+
855+ Response is XML encoded in the body of the request, in the following format:
856+
857+ ::
858+
859+ <BucketLoggingStatus xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
860+ <LoggingEnabled>
861+ <TargetBucket>string</TargetBucket>
862+ <TargetGrants>
863+ <Grant>
864+ <Grantee>
865+ <DisplayName>string</DisplayName>
866+ <EmailAddress>string</EmailAddress>
867+ <ID>string</ID>
868+ <xsi:type>string</xsi:type>
869+ <URI>string</URI>
870+ </Grantee>
871+ <Permission>string</Permission>
872+ </Grant>
873+ </TargetGrants>
874+ <TargetObjectKeyFormat>
875+ <PartitionedPrefix>
876+ <PartitionDateSource>DeliveryTime|EventTime</PartitionDateSource>
877+ </PartitionedPrefix>
878+ <SimplePrefix>
879+ </SimplePrefix>
880+ </TargetObjectKeyFormat>
881+ <TargetPrefix>string</TargetPrefix>
882+ <LoggingType>Standard|Journal</LoggingType>
883+ <ObjectRollTime>integer</ObjectRollTime>
884+ </LoggingEnabled>
885+ </BucketLoggingStatus>
886+
887+
888+ HTTP Response
889+ ~~~~~~~~~~~~~
890+
891+ +---------------+-----------------------+----------------------------------------------------------+
892+ | HTTP Status | Status Code | Description |
893+ +===============+=======================+==========================================================+
894+ | ``404 `` | NoSuchBucket | The bucket does not exist |
895+ +---------------+-----------------------+----------------------------------------------------------+
896+
0 commit comments