Skip to content

S3  >  Operations  >  get_bucket_replication

get_bucket_replication

Operation

get_bucket_replication async

get_bucket_replication(input: GetBucketReplicationInput, plugins: list[Plugin] | None = None) -> GetBucketReplicationOutput
Note

This operation is not supported for directory buckets.

Returns the replication configuration of a bucket.

Note

It can take a while to propagate the put or delete a replication configuration to all Amazon S3 systems. Therefore, a get request soon after put or delete can return a wrong result.

For information about replication configuration, see Replication in the Amazon S3 User Guide.

This action requires permissions for the s3:GetReplicationConfiguration action. For more information about permissions, see Using Bucket Policies and User Policies.

If you include the Filter element in a replication configuration, you must also include the DeleteMarkerReplication and Priority elements. The response also returns those elements.

For information about GetBucketReplication errors, see List of replication-related error codes

The following operations are related to GetBucketReplication:

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
input GetBucketReplicationInput

An instance of GetBucketReplicationInput.

required
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
GetBucketReplicationOutput

An instance of GetBucketReplicationOutput.

Input

GetBucketReplicationInput dataclass

Bases: _SerdeShape

Dataclass for GetBucketReplicationInput structure.

Attributes

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

The bucket name for which to get the replication 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).

Output

GetBucketReplicationOutput dataclass

Bases: _SerdeShape

Dataclass for GetBucketReplicationOutput structure.

Attributes

replication_configuration class-attribute instance-attribute
replication_configuration: ReplicationConfiguration | None = ...

A container for replication rules. You can add up to 1,000 rules. The maximum size of a replication configuration is 2 MB.

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.