# Edit bucket

```http
PUT /v1/tenants/{tenantId}/buckets/{bucketName}
```

Base URL: `https://api-portal.aur.lu/api`

Operation ID: `EditBucket`

Authentication: ApiKeyAuth (API key in header `X-Api-Key`)

Required permission: `update:s3:buckets`

Updates bucket configuration (currently only default retention for object lock buckets)

## Parameters

### Path parameters

- `tenantId` (string, required) — Tenant ID
- `bucketName` (string, required) — Bucket name

## Request body (required)

Bucket edit request

Content type: `application/json`

- `defaultRetention` (object)
  - `duration` (object)
    - `duration` (integer)
    - `type` (string, one of: `d`, `y`)
  - `enabled` (boolean)
  - `mode` (string, one of: `off`, `governance`, `compliance`)

Example request body:

```json
{
  "defaultRetention": {
    "duration": {
      "duration": 0,
      "type": "d"
    },
    "enabled": true,
    "mode": "off"
  }
}
```

## Responses

### 204 — No Content

Content type: `*/*`

Type: `string`

### 400 — Bad request

Content type: `*/*`

- `message` (string)

### 404 — Not found

Content type: `*/*`

- `message` (string)

### 409 — Conflict

Content type: `*/*`

- `message` (string)
