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

# 创建 BYOC 基础设施

> 在组织中创建新的 BYOC 基础设施，并返回新创建基础设施的配置。



## OpenAPI

````yaml /zh/products/cloud/api-reference/cloud-openapi.json post /v1/organizations/{organizationId}/byocInfrastructure
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}/byocInfrastructure:
    post:
      tags:
        - Organization
      summary: 创建 BYOC 基础设施
      description: 在组织中创建新的 BYOC 基础设施，并返回新创建基础设施的配置。
      parameters:
        - description: 请求的组织 ID。
          in: path
          name: organizationId
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ByocInfrastructurePostRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  requestId:
                    description: 为每个请求分配的唯一 ID。UUIDv4
                    format: uuid
                    type: string
                  result:
                    $ref: '#/components/schemas/ByocConfig'
                  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:
    ByocInfrastructurePostRequest:
      properties:
        accountId:
          description: 配置 BYOC 基础设施所对应的云账户 ID
          type: string
        availabilityZoneSuffixes:
          description: 可用区后缀列表
          items:
            enum:
              - a
              - b
              - c
              - d
              - e
              - f
            type: string
          type: array
        regionId:
          description: BYOC 基础设施所在区域
          enum:
            - ap-northeast-1
            - ap-south-1
            - ap-southeast-1
            - ap-southeast-2
            - eu-central-1
            - eu-west-1
            - eu-west-2
            - me-central-1
            - us-east-1
            - us-east-2
            - us-west-2
            - us-east1
            - us-central1
            - europe-west4
            - asia-southeast1
            - eastus
            - eastus2
            - westus3
            - germanywestcentral
          type: string
        vpcCidrRange:
          description: VPC 的 CIDR 范围
          type: string
    ByocConfig:
      properties:
        accountName:
          description: 账户名称
          type: string
        cloudProvider:
          description: 该区域的云提供商
          enum:
            - gcp
            - aws
            - azure
          type: string
        id:
          description: BYOC configuration 的唯一标识符
          type: string
        regionId:
          description: 已为 BYOC 配置且可在其中创建服务的区域
          enum:
            - ap-northeast-1
            - ap-south-1
            - ap-southeast-1
            - ap-southeast-2
            - eu-central-1
            - eu-west-1
            - eu-west-2
            - me-central-1
            - us-east-1
            - us-east-2
            - us-west-2
            - us-east1
            - us-central1
            - europe-west4
            - asia-southeast1
            - eastus
            - eastus2
            - westus3
            - germanywestcentral
          type: string
        state:
          description: 基础设施的状态
          enum:
            - infra-ready
            - infra-provisioning
            - infra-terminated
          type: string
  securitySchemes:
    basicAuth:
      description: >-
        使用在 ClickHouse Cloud 控制台中获取的 key ID 和 key
        secret：https://clickhouse.com/docs/cloud/manage/openapi
      scheme: basic
      type: http

````