> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-3a82795f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ClickPipe のスケーリング

> **この endpoint はベータです。** API コントラクトは安定しており、今後破壊的変更が加えられる予定はありません。<br /><br /> 指定した ClickPipe のスケーリング設定を変更します。



## OpenAPI

````yaml /ja/products/cloud/api-reference/cloud-openapi.json patch /v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/scaling
openapi: 3.0.1
info:
  contact:
    email: support@clickhouse.com
    name: ClickHouse Support
    url: >-
      https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-299828
  title: OpenAPI spec for ClickHouse Cloud
  version: '1.0'
servers:
  - url: https://api.clickhouse.cloud
security:
  - basicAuth: []
tags:
  - name: Organization
  - name: User management
  - name: Billing
  - name: Service
  - name: Backup
  - name: OpenAPI
  - name: Prometheus
  - name: ClickPipes
paths:
  /v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/scaling:
    patch:
      tags:
        - ClickPipes
      summary: ClickPipe のスケーリング
      description: >-
        **この endpoint はベータです。** API コントラクトは安定しており、今後破壊的変更が加えられる予定はありません。<br
        /><br /> 指定した ClickPipe のスケーリング設定を変更します。
      parameters:
        - description: サービスを所有する組織の ID。
          in: path
          name: organizationId
          required: true
          schema:
            format: uuid
            type: string
        - description: ClickPipe を所有するサービスの ID。
          in: path
          name: serviceId
          required: true
          schema:
            format: uuid
            type: string
        - description: スケーリング設定を更新する対象の ClickPipe の ID。
          in: path
          name: clickPipeId
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClickPipeScalingPatchRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  requestId:
                    description: 各リクエストに割り当てられる一意の ID。UUIDv4
                    format: uuid
                    type: string
                  result:
                    $ref: '#/components/schemas/ClickPipe'
                  status:
                    description: HTTP ステータスコード。
                    example: 200
                    type: number
                type: object
          description: 正常なレスポンス
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: エラーの詳細な説明。
                    type: string
                  status:
                    description: HTTP ステータスコード。
                    example: 400
                    type: number
                type: object
          description: クライアントエラーと判断されたため、サーバーはリクエストを処理できないか、処理しません。
components:
  schemas:
    ClickPipeScalingPatchRequest:
      properties:
        concurrency:
          description: スケール先の並行数。S3 パイプのスケーリングに使用します。
          maximum: 34
          minimum: 0
          nullable: true
          type: integer
        replicaCpuMillicores:
          description: 各レプリカの CPU（millicores）。streaming パイプのスケーリングに使用します。
          maximum: 2000
          minimum: 125
          nullable: true
          type: integer
        replicaMemoryGb:
          description: 各レプリカのメモリ（GB）。streaming パイプのスケーリングに使用します。
          maximum: 8
          minimum: 0.5
          nullable: true
          type: number
        replicas:
          description: スケール先のレプリカ数。Kafka パイプのスケーリングに使用します。
          maximum: 10
          minimum: 1
          nullable: true
          type: integer
    ClickPipe:
      properties:
        createdAt:
          description: ClickPipe の作成日。
          type: string
        destination:
          $ref: '#/components/schemas/ClickPipeDestination'
        fieldMappings:
          description: ClickPipe のフィールドマッピング。すべての宛先カラムをマッピングに含める必要がある点に注意してください。
          items:
            $ref: '#/components/schemas/ClickPipeFieldMapping'
          type: array
        id:
          description: 一意の ClickPipe ID。
          format: uuid
          type: string
        name:
          description: ClickPipe の名前。
          type: string
        scaling:
          $ref: '#/components/schemas/ClickPipeScaling'
        serviceId:
          description: この ClickPipe が属するサービスの ID。
          format: uuid
          type: string
        settings:
          $ref: '#/components/schemas/ClickPipeSettings'
        source:
          $ref: '#/components/schemas/ClickPipeSource'
        state:
          description: ClickPipe の現在の状態。
          type: string
        updatedAt:
          description: ClickPipe の最終更新日。
          type: string
    ClickPipeDestination:
      properties:
        columns:
          description: 宛先テーブルのカラム。Postgres を除くすべてのパイプタイプで必須のフィールドです。
          items:
            $ref: '#/components/schemas/ClickPipeDestinationColumn'
          type: array
        database:
          description: 宛先データベース。
          type: string
        managedTable:
          description: このテーブルを ClickPipes が管理するかどうか。Postgres を除くすべてのパイプタイプで必須のフィールドです。
          type: boolean
        table:
          description: 宛先テーブル。Postgres を除くすべてのパイプタイプで必須のフィールドです。
          type: string
        tableDefinition:
          $ref: '#/components/schemas/ClickPipeDestinationTableDefinition'
    ClickPipeFieldMapping:
      properties:
        destinationField:
          description: 宛先フィールド名。
          type: string
        sourceField:
          description: ソースフィールド名。
          type: string
    ClickPipeScaling:
      properties:
        concurrency:
          deprecated: true
          description: 必要な並行数。S3 パイプでのみ使用します。0 に設定した場合、並行数はクラスターのメモリに基づいて自動スケーリングされます。
          type: integer
        replicaCpuMillicores:
          description: 各レプリカの CPU（ミリコア）。ストリーミングパイプでのみ使用します。
          maximum: 2000
          minimum: 125
          type: integer
        replicaMemoryGb:
          description: 各レプリカのメモリ（GB）。ストリーミングパイプでのみ使用します。
          maximum: 8
          minimum: 0.5
          type: number
        replicas:
          description: 必要なレプリカ数。スケーラブルなパイプでのみ使用します。
          type: integer
    ClickPipeSettings:
      properties:
        clickhouse_max_download_threads:
          description: 最大ダウンロードスレッド数。同時実行されるダウンロードスレッドの最大数です
          example: 4
          maximum: 32
          minimum: 0
          nullable: true
          type: integer
        clickhouse_max_insert_threads:
          description: 最大挿入スレッド数。同時実行される挿入スレッドの最大数です
          example: 1
          maximum: 16
          minimum: 0
          nullable: true
          type: integer
        clickhouse_max_threads:
          description: 最大スレッド数。ファイル処理に使用する同時実行スレッドの最大数です
          example: 8
          maximum: 64
          minimum: 0
          nullable: true
          type: integer
        clickhouse_min_insert_block_size_bytes:
          description: 最小挿入ブロックサイズ（バイト）。挿入時のデータブロックの最小サイズです（バイト単位）
          example: 1073741824
          maximum: 10737418240
          minimum: 0
          nullable: true
          type: integer
        clickhouse_parallel_distributed_insert_select:
          description: >-
            parallel distributed insert select。parallel distributed insert
            select の設定です
          example: 2
          maximum: 2
          minimum: 0
          nullable: true
          type: integer
        clickhouse_parallel_view_processing:
          description: 並列ビュー処理。アタッチされたビューへのプッシュを順次ではなく同時実行で有効にするかどうかです
          example: false
          nullable: true
          type: boolean
        object_storage_concurrency:
          description: オブジェクトストレージの同時実行数。同時に実行されるファイル処理スレッド数です
          example: 1
          maximum: 35
          minimum: 1
          nullable: true
          type: integer
        object_storage_max_file_count:
          description: 最大ファイル数。1 回の挿入バッチで処理するファイルの最大数です
          example: 100
          maximum: 10000
          minimum: 1
          nullable: true
          type: integer
        object_storage_max_insert_bytes:
          description: 最大挿入バイト数。1 回の挿入バッチで処理するバイト数です
          example: 10737418240
          maximum: 53687091200
          minimum: 10485760
          nullable: true
          type: integer
        object_storage_polling_interval_ms:
          description: オブジェクトストレージのポーリング間隔。新しいオブジェクトストレージデータの継続的な取り込みをクエリする際の更新間隔を設定します
          example: 30000
          maximum: 3600000
          minimum: 100
          nullable: true
          type: integer
        object_storage_use_cluster_function:
          description: cluster 関数を使用。分散処理に ClickHouse の cluster 関数を使用するかどうかです
          example: true
          nullable: true
          type: boolean
        streaming_max_insert_wait_ms:
          description: ストリーミングの最大挿入待機時間。データを ClickHouse に挿入する前の最大待機時間を設定します。
          example: 5000
          maximum: 60000
          minimum: 500
          nullable: true
          type: integer
    ClickPipeSource:
      properties:
        kafka:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ClickPipeKafkaSource'
        kinesis:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ClickPipeKinesisSource'
        objectStorage:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ClickPipeObjectStorageSource'
        postgres:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ClickPipePostgresSource'
    ClickPipeDestinationColumn:
      properties:
        name:
          description: カラム名。
          type: string
        type:
          description: カラムの型。
          type: string
    ClickPipeDestinationTableDefinition:
      properties:
        engine:
          $ref: '#/components/schemas/ClickPipeDestinationTableEngine'
        partitionBy:
          description: パーティションキーの SQL 式。
          type: string
        primaryKey:
          description: 主キーの SQL 式。
          type: string
        sortingKey:
          description: 宛先テーブルのソートキー。カラムの一覧。
          items:
            type: string
          type: array
    ClickPipeKafkaSource:
      properties:
        authentication:
          description: >-
            Kafka ソースの認証方式。サポートされている認証方式: kafka: PLAIN, SCRAM-SHA-256,
            SCRAM-SHA-512, MUTUAL_TLS, msk: SCRAM-SHA-512, IAM_ROLE, IAM_USER,
            MUTUAL_TLS, confluent: PLAIN, MUTUAL_TLS, warpstream: PLAIN,
            azureeventhub: PLAIN, redpanda: SCRAM-SHA-256, SCRAM-SHA-512,
            MUTUAL_TLS, dokafka: SCRAM-SHA-256, MUTUAL_TLS
          enum:
            - PLAIN
            - SCRAM-SHA-256
            - SCRAM-SHA-512
            - IAM_ROLE
            - IAM_USER
            - MUTUAL_TLS
          type: string
        brokers:
          description: Kafka ソースのブローカー。
          type: string
        caCertificate:
          description: ブローカーの証明書を検証するための PEM エンコードされた CA 証明書。
          nullable: true
          type: string
        consumerGroup:
          description: Kafka ソースのコンシューマグループ。指定しない場合は "clickpipes-<<ID>>" が使用されます。
          example: my-clickpipe-consumer-group
          nullable: true
          type: string
        format:
          description: Kafka ソースのフォーマット。
          enum:
            - JSONEachRow
            - Avro
            - AvroConfluent
          type: string
        iamRole:
          description: >-
            Kafka ソース用の IAM ロール。IAM ロール認証で使用します。詳しくは ClickPipes
            のドキュメントを参照してください:
            https://clickhouse.com/docs/en/integrations/clickpipes/kafka#iam
          example: arn:aws:iam::123456789012:role/MyRole
          nullable: true
          type: string
        offset:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ClickPipeKafkaOffset'
        reversePrivateEndpointIds:
          description: Kafka ソースへの安全なプライベート接続に使用する Reverse Private Endpoint の UUID。
          items:
            type: string
          type: array
        schemaRegistry:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ClickPipeKafkaSchemaRegistry'
        topics:
          description: Kafka ソースのトピック。
          type: string
        type:
          description: Kafka ソースのタイプ。
          enum:
            - kafka
            - redpanda
            - msk
            - confluent
            - warpstream
            - azureeventhub
            - dokafka
          type: string
    ClickPipeKinesisSource:
      properties:
        authentication:
          description: Kinesis ストリームで使用する認証方式。
          enum:
            - IAM_ROLE
            - IAM_USER
          type: string
        format:
          description: Kinesis ストリームのフォーマット。
          enum:
            - JSONEachRow
            - Avro
            - AvroConfluent
          type: string
        iamRole:
          description: 認証に使用する IAM ロール。IAM_ROLE を使用する場合は必須です。
          example: arn:aws:iam::123456789012:role/MyRole
          nullable: true
          type: string
        iteratorType:
          description: >-
            Kinesis ストリームから読み取る際に使用するイテレーターの種類。AT_TIMESTAMP を使用する場合は、timestamp
            フィールドを指定する必要があります。
          enum:
            - TRIM_HORIZON
            - LATEST
            - AT_TIMESTAMP
          type: string
        region:
          description: Kinesis ストリームの AWS リージョン。
          example: us-east-1
          type: string
        streamName:
          description: Kinesis ストリームの名前。
          example: my-stream
          type: string
        timestamp:
          description: >-
            Kinesis ストリームから読み取りを開始する UNIX タイムスタンプ。iteratorType が AT_TIMESTAMP
            の場合は必須です。
          example: 1615766400
          nullable: true
          type: integer
        useEnhancedFanOut:
          description: Kinesis ストリームで enhanced fan-out を使用します。
          nullable: true
          type: boolean
    ClickPipeObjectStorageSource:
      properties:
        authentication:
          description: >-
            認証方式。CONNECTION_STRING は Azure Blob Storage 用です。IAM_ROLE と IAM_USER
            は AWS S3/GCS/DigitalOcean 用です。指定しない場合は認証を使用しません。
          enum:
            - IAM_ROLE
            - IAM_USER
            - CONNECTION_STRING
          nullable: true
          type: string
        azureContainerName:
          description: Azure Blob Storage のコンテナー名。type が azureblobstorage の場合に必須です。
          example: mycontainer
          nullable: true
          type: string
        compression:
          description: ファイルに使用する圧縮アルゴリズム。
          enum:
            - gzip
            - gz
            - brotli
            - br
            - xz
            - LZMA
            - zstd
            - auto
          example: auto
          nullable: true
          type: string
        connectionString:
          description: >-
            Azure Blob Storage 認証用の接続文字列。authentication が CONNECTION_STRING
            の場合に必須です。
          example: >-
            DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=mykey;EndpointSuffix=core.windows.net
          nullable: true
          type: string
        delimiter:
          description: ファイルで使用する区切り文字。
          example: ','
          nullable: true
          type: string
        format:
          description: ファイルのフォーマット。
          enum:
            - JSONEachRow
            - JSONAsObject
            - CSV
            - CSVWithNames
            - Parquet
            - Avro
          type: string
        iamRole:
          description: >-
            IAM ロール認証で使用する IAM ロール。詳細は ClickPipes のドキュメントを参照してください:
            https://clickhouse.com/docs/en/integrations/clickpipes/object-storage#authentication
          example: arn:aws:iam::123456789012:role/MyRole
          nullable: true
          type: string
        isContinuous:
          description: >-
            true に設定すると、このパイプはソースから新しいファイルを継続的に読み取ります。false
            に設定すると、このパイプはファイルを一度だけ読み取ります。新しいファイルは辞書式順序でアップロードする必要があります。
          nullable: true
          type: boolean
        path:
          description: >-
            Azure コンテナー内のファイルへのパス。Azure Blob Storage ソースで使用されます。bash
            風のワイルドカードを使用して複数のファイルを指定できます。詳細については、path
            でのワイルドカードの使用に関するドキュメントを参照してください:
            https://clickhouse.com/docs/en/integrations/clickpipes/object-storage#limitations
          example: data/logs/*.json
          nullable: true
          type: string
        queueUrl:
          description: >-
            イベントベースの継続的インジェスト用の SQS キュー URL。指定すると、ファイルは辞書式順序ではなく S3
            イベント通知に基づいて取り込まれます。isContinuous が true で、authentication が public
            ではない場合にのみ適用されます。
          example: https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue
          nullable: true
          type: string
        type:
          description: ObjectStorage ソースの種類。
          enum:
            - s3
            - gcs
            - dospaces
            - azureblobstorage
          type: string
        url:
          description: >-
            取り込みたいファイルのパスを指定します。bash 風のワイルドカードを使用して複数のファイルを指定できます。詳細については、path
            でのワイルドカードの使用に関するドキュメントを参照してください:
            https://clickhouse.com/docs/en/integrations/clickpipes/object-storage#limitations
          example: >-
            https://datasets-documentation.s3.eu-west-3.amazonaws.com/http/**.ndjson.gz
          type: string
    ClickPipePostgresSource:
      properties:
        database:
          description: 接続先の Postgres インスタンスのデータベース。
          type: string
        host:
          description: 接続先の Postgres インスタンスのホスト。
          type: string
        port:
          description: 接続先の Postgres インスタンスのポート。
          type: number
        settings:
          $ref: '#/components/schemas/ClickPipePostgresPipeSettings'
        tableMappings:
          description: Postgres パイプのテーブルマッピング。
          items:
            $ref: '#/components/schemas/ClickPipePostgresPipeTableMapping'
          type: array
    ClickPipeDestinationTableEngine:
      properties:
        columnIds:
          description: SummingMergeTree エンジンで合計するカラム名。
          items:
            type: string
          type: array
        type:
          description: 宛先テーブルのエンジンタイプ。
          enum:
            - MergeTree
            - ReplacingMergeTree
            - SummingMergeTree
            - 'Null'
          type: string
        versionColumnId:
          description: ReplacingMergeTree エンジンのバージョンとして使用するカラム名。
          nullable: true
          type: string
    ClickPipeKafkaOffset:
      properties:
        strategy:
          description: Offset 戦略。
          enum:
            - from_beginning
            - from_latest
            - from_timestamp
          type: string
        timestamp:
          description: 開始時点となる、分精度の UTC timestamp。"from_timestamp" 戦略では必須です。
          example: 2021-01-01T00:00
          nullable: true
          type: string
    ClickPipeKafkaSchemaRegistry:
      properties:
        authentication:
          description: スキーマレジストリの認証タイプ。
          enum:
            - PLAIN
          type: string
        caCertificate:
          description: スキーマレジストリの証明書を検証するための PEM エンコードされた CA 証明書。
          nullable: true
          type: string
        url:
          description: スキーマ URL。HTTPS が必要です。
          example: https://psrc-aa00.us-east-2.aws.confluent.cloud/schemas/ids/100004
          type: string
    ClickPipePostgresPipeSettings:
      properties:
        allowNullableColumns:
          description: 宛先テーブルで Nullable カラムを許可します。
          type: boolean
        enableFailoverSlots:
          description: >-
            作成された replication slot のフェイルオーバーを有効にします。replication slot
            が設定されていないことが必要です。
          type: boolean
        initialLoadParallelism:
          description: 初期ロード中に同期する並列テーブル数です。
          type: number
        publicationName:
          description: レプリケーションで使用する publication 名です。
          type: string
        pullBatchSize:
          description: 各バッチで取得する行数です。
          type: number
        replicationMode:
          description: パイプで使用するレプリケーションモードです。
          enum:
            - cdc
            - snapshot
            - cdc_only
          type: string
        replicationSlotName:
          description: レプリケーションで使用する replication slot 名です。
          type: string
        snapshotNumRowsPerPartition:
          description: 各パーティションでスナップショットする行数です。
          type: number
        snapshotNumberOfParallelTables:
          description: スナップショットする並列テーブル数です。
          type: number
        syncIntervalSeconds:
          description: Postgres からデータを同期する間隔（秒）です。
          type: number
    ClickPipePostgresPipeTableMapping:
      properties:
        excludedColumns:
          description: ターゲットテーブルから除外するカラムです。
          items:
            type: string
          type: array
        sortingKeys:
          description: ターゲットテーブルのソートキーとして使用する、順序付きのカラム一覧。
          items:
            type: string
          type: array
        sourceSchemaName:
          description: ソーススキーマ名です。
          type: string
        sourceTable:
          description: ソーステーブル名です。
          type: string
        tableEngine:
          description: ターゲットテーブルに使用するテーブルエンジン。
          enum:
            - MergeTree
            - ReplacingMergeTree
            - 'Null'
          type: string
        targetTable:
          description: ターゲットテーブル名です。
          type: string
        useCustomSortingKey:
          description: ターゲットテーブルにカスタムのソートキーを使用するかどうかです。
          type: boolean
  securitySchemes:
    basicAuth:
      description: >-
        ClickHouse Cloud コンソールで取得した key ID と key secret を使用してください:
        https://clickhouse.com/docs/cloud/manage/openapi
      scheme: basic
      type: http

````