Skip to content

S3  >  Operations  >  get_bucket_logging

get_bucket_logging

Operation

get_bucket_logging async

get_bucket_logging(request: GetBucketLoggingInput | GetBucketLoggingInputDict, /, *, plugins: list[Plugin] | None = None) -> GetBucketLoggingOutput
get_bucket_logging(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetBucketLoggingInputDict]) -> GetBucketLoggingOutput
Note

This operation is not supported for directory buckets.

Returns the logging status of a bucket and the permissions users have to view and modify that status.

The following operations are related to GetBucketLogging:

Warning

You must URL encode any signed header values that contain spaces. For example, if your header value is my file.txt, containing two spaces after my, you must URL encode this value to my%20%20file.txt.

Parameters:

Name Type Description Default
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetBucketLoggingOutput

An instance of GetBucketLoggingOutput.

Input

Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.

Model

GetBucketLoggingInput dataclass

Bases: _SerdeShape

Dataclass for GetBucketLoggingInput structure.

Attributes
bucket class-attribute instance-attribute
bucket: str | None = ...

The bucket name for which to get the logging information.

expected_bucket_owner class-attribute instance-attribute
expected_bucket_owner: str | None = ...

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

Dictionaries

GetBucketLoggingInputDict

Bases: TypedDict

Dictionary form of GetBucketLoggingInput.

Attributes
bucket instance-attribute
bucket: Required[str]

The bucket name for which to get the logging information.

expected_bucket_owner instance-attribute
expected_bucket_owner: str | None

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

Output

GetBucketLoggingOutput dataclass

Bases: _SerdeShape

Dataclass for GetBucketLoggingOutput structure.

Attributes

logging_enabled class-attribute instance-attribute
logging_enabled: LoggingEnabled | None = ...

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.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.