AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. For more information, see PUT Bucket logging in the Amazon S3 API Reference.

Inheritance Hierarchy

System.Object
  Amazon.S3.Model.S3BucketLoggingConfig

Namespace: Amazon.S3.Model
Assembly: AWSSDK.S3.dll
Version: 3.x.y.z

Syntax

C#
public class S3BucketLoggingConfig

The S3BucketLoggingConfig type exposes the following members

Constructors

NameDescription
Public Method S3BucketLoggingConfig()

Properties

NameTypeDescription
Public Property Grants System.Collections.Generic.List<Amazon.S3.Model.S3Grant>

Gets and sets the property Grants.

Container for granting information.

Buckets that use the bucket owner enforced setting for Object Ownership don't support target grants. For more information, see Permissions for server access log delivery in the Amazon S3 User Guide.

Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.

Public Property TargetBucketName System.String

Gets and sets the property TargetBucketName.

Specifies the bucket where you want Amazon S3 to store server access logs. You can have your logs delivered to any bucket that you own, including the same bucket that is being logged. You can also configure multiple buckets to deliver their logs to the same target bucket. In this case, you should choose a different TargetPrefix for each source bucket so that the delivered log files can be distinguished by key.

Public Property TargetObjectKeyFormat Amazon.S3.Model.TargetObjectKeyFormat

Gets and sets the property TargetObjectKeyFormat.

Amazon S3 key format for log objects.

Public Property TargetPrefix System.String

Gets and sets the property TargetPrefix.

A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.7.2 or higher.

NameDescription
Public Method AddGrant(S3Grantee, S3Permission)

Creates a S3Grant and adds it to the list of grants.

Public Method RemoveGrant(S3Grantee, S3Permission)

Removes a specific permission for the given grantee.

Public Method RemoveGrant(S3Grantee)

Removes all permissions for the given grantee.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer