---
title: "Update service backup bucket"
method: PATCH
path: "/v1/organizations/{organizationId}/services/{serviceId}/backupBucket"
tags: ["Backup"]
---

# Update service backup bucket

`PATCH /v1/organizations/{organizationId}/services/{serviceId}/backupBucket`

## Request

- Base URL: `https://api.clickhouse.cloud`
- URL: `https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/backupBucket`
- Auth: HTTP basic

**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Update service backup bucket. Requires ADMIN auth key role. The secrets of the specified bucket provider are always required

## Path parameters

- `organizationId` string, uuid, required
- `serviceId` string, uuid, required

## Request body

- union
  - AwsBackupBucketPatchRequestV1
    - `bucketProvider` 'AWS': Bucket provider
    - `bucketPath` string: Bucket path
    - `iamRoleArn` string: AWS Role ARN
    - `iamRoleSessionName` string, nullable: AWS IAM Role session name
    - `iamRoleExternalId` string, nullable: External ID the IAM role trust policy requires when the data plane assumes the role. Set to `null` to clear it.
  - GcpBackupBucketPatchRequestV1
    - `bucketProvider` 'GCP': Bucket provider
    - `bucketPath` string: Bucket path
    - `accessKeyId` string: Access Key ID (HMAC key)
    - `secretAccessKey` string: Secret Access Key (HMAC secret key)
  - AzureBackupBucketPatchRequestV1
    - `bucketProvider` 'AZURE': Bucket provider
    - `containerName` string: Container Name
    - `connectionString` string: Connection String

## Response `200`

Successful response

- object
  - `status` number: HTTP status code.
  - `requestId` string, uuid: Unique id assigned to every request. UUIDv4
  - `result` union
    - AwsBackupBucket
      - `id` string, uuid: Unique backup bucket ID
      - `bucketProvider` 'AWS': Bucket provider
      - `bucketPath` string: Bucket path
      - `iamRoleArn` string: AWS Role ARN
      - `iamRoleSessionName` string: AWS Role session name
      - `iamRoleExternalId` string: External ID the IAM role trust policy requires when the data plane assumes the role
    - GcpBackupBucket
      - `id` string, uuid: Unique backup bucket ID
      - `bucketProvider` 'GCP': Bucket provider
      - `bucketPath` string: Bucket path
      - `accessKeyId` string: Access Key ID (HMAC key)
    - AzureBackupBucket
      - `id` string, uuid: Unique backup bucket ID.
      - `bucketProvider` 'AZURE': Bucket provider
      - `containerName` string: Container Name

## Other responses

- `400`: The request cannot be processed due to a client error. Please verify your request parameters and try again.
- `500`: An internal server error has occurred. If this issue persists, please contact ClickHouse Cloud support for assistance.

## Changes

- **2026-10-19** `d834f602767a`: 2 info
  - added the new optional request property `oneOf[#/components/schemas/AwsBackupBucketPatchRequestV1]/iamRoleExternalId`
  - added the optional property `result/oneOf[#/components/schemas/AwsBackupBucket]/iamRoleExternalId` to the response with the `200` status

[Operation history](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/changes/v1/organizations/:organizationId/services/:serviceId/backupBucket/patch.md)

---

[API](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud.md) - [All operations](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/revisions/eac345053548?raw)
