# Replication

Replication Configuration of a Bucket

## GetBucketReplication

> Returns the replication configuration of a bucket.\
> \
> The replication configuration may take a while to propagate to all IONOS Object Storage systems.\
> For example, when you apply a new configuration with a PUT request or delete a configuration using\
> a DELETE request. Similarly, a GET request may retrieve the previous state of the configuration,\
> or it may still exist if you use a DELETE request.\
> \
> \#### Permissions\
> You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission\
> to perform the \`s3:GetBucketReplication\` operation using \[Bucket Policy]\(#tag/Policy/operation/PutBucketPolicy).\
> \
> \#### S3 API Compatibility\
> \- The \`x-amz-expected-bucket-owner\` header isn't supported.<br>

```json
{"openapi":"3.0.3","info":{"title":"IONOS Object Storage API for contract-owned buckets","version":"2.0.3"},"tags":[{"name":"Replication","description":"Replication Configuration of a Bucket"}],"servers":[{"url":"https://s3.eu-central-3.ionoscloud.com","description":"The endpoint for the `eu-central-3` region (Berlin, Germany)"},{"url":"https://s3.us-central-1.ionoscloud.com","description":"The endpoint for the `us-central-1` region (Lenexa, USA)"}],"security":[{"hmac":[]}],"components":{"securitySchemes":{"hmac":{"type":"apiKey","name":"Authorization","in":"header","description":"IONOS Object Storage API requests are authenticated using the AWS signature. \nThe IONOS Object Storage API authenticates users using a customized HTTP scheme based on a [keyed-HMAC](https://en.wikipedia.org/wiki/HMAC) (Hash Message Authentication Code).\nThe process of generating the proper Authorization header is somewhat involved. We recommend that you make use of a tool such as Postman.\n\n<img src=\"/docs/s3/hmac-postman.png\" width=\"800px\" />\n\nIn the **Authorization** tab for a request, select **AWS Signature** from the **Type** dropdown list.\nSpecify where Postman should append your authorization data using the **Add authorization data to** drop-down menu.\n\n* If you select **Request Headers**, Postman populates the **Headers** tab with Authorization and `X-Amz-` prefixed fields.\n\n* If you select **Request URL**, Postman populates the **Params** tab with authentication details prefixed with `X-Amz-`.\n\n\n**Note:** The parameters listed below contain confidential information. We recommend using variables to keep this data secure while working in a collaborative environment.\n\n* For **Access Key**, enter your `access key` directly in the fields or through variables for added security.\n\n* For **Secret Key**, enter your `secret key` directly in the fields or through variables for added security.\n\nAdvanced fields are optional, but Postman will attempt to generate them automatically if necessary.\n* For **AWS Region**, enter one of the [regions](#section/Endpoints) (`eu-central-3`) where your bucket is hosted.\n\n* For **Service Name**, enter `s3`. The name of the service that receives the requests.\n\n* For **Session Token**, **leave the field blank**. This is only required when temporary security credentials are used.\n"}},"schemas":{"GetBucketReplicationOutput":{"type":"object","properties":{"ReplicationConfiguration":{"$ref":"#/components/schemas/ReplicationConfiguration"}}},"ReplicationConfiguration":{"type":"object","required":["Role","Rules"],"properties":{"Role":{"description":"The Resource Name of the Identity and Access Management (IAM) role that IONOS Object Storage assumes when replicating objects.","type":"string"},"Rules":{"allOf":[{"$ref":"#/components/schemas/ReplicationRules"},{"xml":{"name":"Rule"},"description":"A container for one or more replication rules. A replication configuration must have at least one rule and can contain a maximum of 1,000 rules. "}]}},"description":"A container for replication rules. You can add up to 1,000 rules. The maximum size of a replication configuration is 2 MB."},"ReplicationRules":{"type":"array","items":{"$ref":"#/components/schemas/ReplicationRule"},"xml":{"wrapped":false}},"ReplicationRule":{"description":"Specifies which IONOS Object Storage objects to replicate and where to store the replicas.","type":"object","required":["Status","Destination"],"properties":{"ID":{"$ref":"#/components/schemas/ID"},"Prefix":{"description":"An object key name prefix that identifies the subset of objects to which the rule applies.\nReplace the Object keys containing special characters, such as carriage returns, when using XML requests.\n","type":"string"},"Status":{"description":"Specifies whether the rule is enabled.","type":"string","enum":["Enabled","Disabled"]},"Destination":{"$ref":"#/components/schemas/Destination"}}},"ID":{"type":"integer","description":"Container for the Contract Number of the owner.","xml":{"name":"ID"}},"Destination":{"description":"A container for information about the replication destination.\n","type":"object","required":["Bucket"],"properties":{"Bucket":{"description":"Use the same \"Bucket\" value formatting as in the S3 API specification, that is, `arn:aws:s3:::{Bucket}`.\n","type":"string","minLength":3,"maxLength":63},"StorageClass":{"$ref":"#/components/schemas/StorageClass"}}},"StorageClass":{"description":"Currently, only one storage class is available – `STANDARD`. \n","type":"string","enum":["STANDARD"]},"BucketName":{"description":"The bucket name.","type":"string","minLength":3,"maxLength":63,"xml":{"name":"Name"}}}},"paths":{"/{Bucket}?replication":{"get":{"tags":["Replication"],"summary":"GetBucketReplication","operationId":"GetBucketReplication","description":"Returns the replication configuration of a bucket.\n\nThe replication configuration may take a while to propagate to all IONOS Object Storage systems.\nFor example, when you apply a new configuration with a PUT request or delete a configuration using\na DELETE request. Similarly, a GET request may retrieve the previous state of the configuration,\nor it may still exist if you use a DELETE request.\n\n#### Permissions\nYou must be the contract owner or an administrator to perform this operation. If not, they can grant you permission\nto perform the `s3:GetBucketReplication` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).\n\n#### S3 API Compatibility\n- The `x-amz-expected-bucket-owner` header isn't supported.\n","responses":{"200":{"description":"Successful operation","headers":{},"content":{"application/xml":{"schema":{"$ref":"#/components/schemas/GetBucketReplicationOutput"}}}}},"parameters":[{"name":"Bucket","in":"path","required":true,"schema":{"$ref":"#/components/schemas/BucketName"}},{"name":"replication","in":"query","required":true,"schema":{"type":"boolean","enum":[true]},"allowEmptyValue":true}]}}}}
```
