---
title: "POST /v2/UpdateBucket"
method: POST
path: "/v2/UpdateBucket"
tags: ["Bucket"]
---

# POST /v2/UpdateBucket

`POST /v2/UpdateBucket`

All fields (`websiteAccess` and `quotas`) are optional.
If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed.

In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified.
The field `errorDocument` is optional, if no error document is set a generic
error message is displayed when errors happen. Conversely, if `enabled` is
`false`, neither `indexDocument` nor `errorDocument` must be specified.

In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null`
to remove the quotas. An absent value will be considered the same as a `null`. It is not possible
to change only one of the two quotas.

## Query parameters

- `id` string, required

## Request body

- UpdateBucketRequestBody
  - `corsRules` CorsRule[], nullable
    - `AllowedHeader` unknown[]
      - unknown
    - `AllowedMethod` unknown[], required
      - unknown
    - `AllowedOrigin` unknown[], required
      - unknown
    - `ExposeHeader` unknown[]
      - unknown
    - `ID` unknown
    - `MaxAgeSeconds` integer
  - `lifecycleRules` LifecycleRule[], nullable
    - `AbortIncompleteMultipartUpload` LifecycleAbortIncompleteMpu
      - `DaysAfterInitiation` integer, required
    - `Expiration` LifecycleExpiration
      - `Date` unknown
      - `Days` integer
    - `Filter` LifecycleFilter
      - `And` LifecycleFilter — recursive
      - `ObjectSizeGreaterThan` integer
      - `ObjectSizeLessThan` integer
      - `Prefix` unknown
    - `ID` unknown
    - `Status` unknown, required
  - `quotas` ApiBucketQuotas
    - `maxObjects` integer, nullable
    - `maxSize` integer, nullable
  - `websiteAccess` UpdateBucketWebsiteAccess
    - `enabled` boolean, required
    - `errorDocument` string, nullable
    - `indexDocument` string, nullable
    - `routingRules` WebsiteRoutingRule[], nullable
      - `Condition` WebsiteCondition
        - `HttpErrorCodeReturnedEquals` integer
        - `KeyPrefixEquals` unknown
      - `Redirect` WebsiteRedirect, required
        - `HostName` unknown
        - `HttpRedirectCode` integer
        - `Protocol` unknown
        - `ReplaceKeyPrefixWith` unknown
        - `ReplaceKeyWith` unknown

## Response `200`

Bucket has been updated

- UpdateBucketResponse
  - `bytes` integer, required — Total number of bytes used by objects in this bucket
  - `corsRules` CorsRule[], nullable — CORS rules for this bucket
    - `AllowedHeader` unknown[]
      - unknown
    - `AllowedMethod` unknown[], required
      - unknown
    - `AllowedOrigin` unknown[], required
      - unknown
    - `ExposeHeader` unknown[]
      - unknown
    - `ID` unknown
    - `MaxAgeSeconds` integer
  - `created` string, date-time, required — Bucket creation date
  - `globalAliases` string[], required — List of global aliases for this bucket
  - `id` string, required — Identifier of the bucket
  - `keys` GetBucketInfoKey[], required — List of access keys that have permissions granted on this bucket
    - `accessKeyId` string, required
    - `bucketLocalAliases` string[], required
    - `name` string, required
    - `permissions` ApiBucketKeyPerm, required
      - `owner` boolean
      - `read` boolean
      - `write` boolean
  - `lifecycleRules` LifecycleRule[], nullable — Object lifecycle rules for this bucket
    - `AbortIncompleteMultipartUpload` LifecycleAbortIncompleteMpu
      - `DaysAfterInitiation` integer, required
    - `Expiration` LifecycleExpiration
      - `Date` unknown
      - `Days` integer
    - `Filter` LifecycleFilter
      - `And` LifecycleFilter — recursive
      - `ObjectSizeGreaterThan` integer
      - `ObjectSizeLessThan` integer
      - `Prefix` unknown
    - `ID` unknown
    - `Status` unknown, required
  - `objects` integer, required — Number of objects in this bucket
  - `quotas` ApiBucketQuotas, required
    - `maxObjects` integer, nullable
    - `maxSize` integer, nullable
  - `unfinishedMultipartUploadBytes` integer, required — Total number of bytes used by unfinished multipart uploads in this bucket
  - `unfinishedMultipartUploadParts` integer, required — Number of parts in unfinished multipart uploads in this bucket
  - `unfinishedMultipartUploads` integer, required — Number of unfinished multipart uploads in this bucket
  - `unfinishedUploads` integer, required — Number of unfinished uploads in this bucket
  - `websiteAccess` boolean, required — Whether website access is enabled for this bucket
  - `websiteConfig` GetBucketInfoWebsiteResponse
    - `errorDocument` string, nullable
    - `indexDocument` string, required
    - `routingRules` WebsiteRoutingRule[], nullable
      - `Condition` WebsiteCondition
        - `HttpErrorCodeReturnedEquals` integer
        - `KeyPrefixEquals` unknown
      - `Redirect` WebsiteRedirect, required
        - `HostName` unknown
        - `HttpRedirectCode` integer
        - `Protocol` unknown
        - `ReplaceKeyPrefixWith` unknown
        - `ReplaceKeyWith` unknown

## Other responses

- `404` — Bucket not found
- `500` — Internal server error

---

[API](https://skmtc.dev/deuxfleurs/apis/garage-administration-api.md) · [All operations](https://skmtc.dev/deuxfleurs/apis/garage-administration-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/deuxfleurs/garage-administration-api/revisions/07ffb2d0febb/schema)
