> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.select.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a BigQuery connection



## OpenAPI

````yaml https://api.select.dev/v2/openapi.json patch /bigquery-connections/{bigquery_connection_id}
openapi: 3.1.0
info:
  title: SELECT API (v2)
  version: 0.1.0
servers:
  - url: https://api.select.dev/v2
    description: SELECT API v2
security: []
paths:
  /bigquery-connections/{bigquery_connection_id}:
    patch:
      tags:
        - bigquery-connections
      summary: Update a BigQuery connection
      operationId: >-
        update_bigquery_connection_route_bigquery_connections__bigquery_connection_id__patch
      parameters:
        - name: bigquery_connection_id
          in: path
          required: true
          schema:
            type: string
            title: Bigquery Connection Id
        - name: If-Match
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: If-Match
        - name: x-tenant-id
          in: header
          required: true
          schema:
            type: string
            description: The organization ID the request is scoped to.
            title: X-Tenant-Id
          description: The organization ID the request is scoped to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BigQueryConnectionUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BigQueryConnection'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '409':
          $ref: '#/components/responses/Conflict'
        '412':
          $ref: '#/components/responses/PreconditionFailed'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '428':
          $ref: '#/components/responses/PreconditionRequired'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HTTPBearer: []
components:
  schemas:
    BigQueryConnectionUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Display name for the connection, as shown throughout SELECT.
        gcp_project_id:
          anyOf:
            - type: string
              pattern: ^[a-z][a-z0-9-]{4,28}[a-z0-9]$
            - type: 'null'
          title: Gcp Project Id
          description: >-
            The GCP project to read BigQuery usage and spend from. 6-30
            characters, starting with a lowercase letter, made up of lowercase
            letters, digits and hyphens, and not ending in a hyphen.
        bigquery_dataset_id:
          anyOf:
            - type: string
              pattern: ^[a-zA-Z0-9_]{1,1024}$
            - type: 'null'
          title: Bigquery Dataset Id
          description: >-
            The BigQuery dataset holding the project's billing and pricing
            exports. Letters, digits and underscores only. Must be omitted on a
            DoiT-managed connection, and cannot be cleared with `null` on any
            other.
        billing_account_id:
          anyOf:
            - type: string
              pattern: ^[0-9A-Fa-f]{6}-[0-9A-Fa-f]{6}-[0-9A-Fa-f]{6}$
            - type: 'null'
          title: Billing Account Id
          description: >-
            The Cloud Billing account the exports belong to, in
            `XXXXXX-XXXXXX-XXXXXX` form, case-insensitive. Must be omitted on a
            DoiT-managed connection, and cannot be cleared with `null` on any
            other.
        service_account:
          anyOf:
            - type: string
              pattern: >-
                ^[a-z][a-z0-9-]{4,28}[a-z0-9]@[a-z][a-z0-9-]{4,28}[a-z0-9]\.iam\.gserviceaccount\.com$
            - type: 'null'
          title: Service Account
          description: >-
            The GCP service account SELECT impersonates to reach the project, in
            `name@project-id.iam.gserviceaccount.com` form.
        sync_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Sync Enabled
          description: Whether SELECT syncs data for this connection.
        query_sanitization_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Query Sanitization Enabled
          description: Whether query text is sanitized before SELECT stores it.
      type: object
      title: BigQueryConnectionUpdate
      description: >-
        A merge-patch update to an existing BigQuery connection: an omitted

        field is left unchanged, and `null` clears it.


        Every field mirrors its `BigQueryConnectionCreate` counterpart.
        `is_doit`

        cannot be changed once the connection is added, so it has no counterpart

        here.
    BigQueryConnection:
      properties:
        id:
          type: string
          title: Id
          description: The unique identifier of the connection.
          readOnly: true
          x-terraform-computed: true
        etag:
          type: string
          title: Etag
          description: >-
            Opaque strong ETag for this connection's configuration. Matches the
            `ETag` response header, and is what `If-Match` requires on a write.
            It changes whenever a configurable field on the connection changes.
          readOnly: true
          x-terraform-computed: true
        name:
          type: string
          title: Name
          description: Display name for the connection, as shown throughout SELECT.
        gcp_project_id:
          type: string
          title: Gcp Project Id
          description: The GCP project SELECT reads BigQuery usage and spend from.
        bigquery_dataset_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Bigquery Dataset Id
          description: >-
            The BigQuery dataset holding the project's billing and pricing
            exports. Null when `is_doit` is true, since SELECT reads DoiT's
            export rather than one in your own dataset.
        billing_account_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Billing Account Id
          description: >-
            The Cloud Billing account the exports belong to, in
            `XXXXXX-XXXXXX-XXXXXX` form. Null when `is_doit` is true.
        service_account:
          anyOf:
            - type: string
            - type: 'null'
          title: Service Account
          description: >-
            The GCP service account SELECT impersonates to reach the project.
            Null for a connection SELECT reaches without impersonation.
        gcp_organization_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Gcp Organization Id
          description: >-
            Numeric id of the GCP organization the project belongs to. Null for
            a standalone project, or when SELECT cannot read the project's
            ancestry.
          readOnly: true
          x-terraform-computed: true
        gcp_organization_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Gcp Organization Name
          description: >-
            Display name of the GCP organization the project belongs to. Null
            when the name cannot be read even though the id resolved.
          readOnly: true
          x-terraform-computed: true
        regions:
          items:
            type: string
          type: array
          title: Regions
          description: >-
            The BigQuery regions SELECT detected query activity in. Empty until
            the first successful detection.
          readOnly: true
          x-terraform-computed: true
        is_doit:
          type: boolean
          title: Is Doit
          description: >-
            Whether this project's GCP billing account is managed by DoiT as a
            resale customer, so SELECT reads its spend from DoiT's billing data
            rather than from an export in your own dataset.
          readOnly: true
          x-terraform-computed: true
        doit_billing_status:
          anyOf:
            - type: string
              enum:
                - active
                - pending
                - inactive
            - type: 'null'
          title: Doit Billing Status
          description: >-
            Whether SELECT can read this connection's spend from DoiT's billing
            data. `pending` while SELECT confirms access, `active` once spend is
            flowing, and `inactive` if it cannot be read — contact support. Null
            when `is_doit` is false.
          readOnly: true
          x-terraform-computed: true
        connection_id:
          type: string
          title: Connection Id
          description: >-
            Identifier of the underlying connection this BigQuery project reads
            through.
          readOnly: true
          x-terraform-computed: true
        sync_enabled:
          type: boolean
          title: Sync Enabled
          description: Whether SELECT is currently syncing data for this connection.
        query_sanitization_enabled:
          type: boolean
          title: Query Sanitization Enabled
          description: Whether query text is sanitized before SELECT stores it.
        added_by_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Added By Email
          description: >-
            Email address of the person who added the connection. Null when it
            was not added by a person.
          readOnly: true
          x-doit-confidentiality: customer-data
          x-doit-pii: true
          x-terraform-computed: true
        last_successful_sync_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Successful Sync Time
          description: >-
            When SELECT last completed a sync for this connection. Null before
            the first one succeeds.
          readOnly: true
          x-terraform-computed: true
        create_time:
          type: string
          title: Create Time
          description: When the connection was added.
          readOnly: true
          x-terraform-computed: true
        update_time:
          type: string
          title: Update Time
          description: When the connection was last changed.
          readOnly: true
          x-terraform-computed: true
      type: object
      required:
        - id
        - etag
        - name
        - gcp_project_id
        - regions
        - is_doit
        - connection_id
        - sync_enabled
        - query_sanitization_enabled
        - create_time
        - update_time
      title: BigQueryConnection
      description: A connection to one BigQuery project.
    ProblemDetail:
      additionalProperties: true
      description: >-
        RFC 9457-style error payload, served as ``application/problem+json``.


        ``code`` is the stable, machine-readable identifier — consumers branch
        on it,

        never on ``title``. ``type`` stays ``about:blank``: we keep no per-error

        documentation pages. There is no ``instance``/request-id member (we
        don't run

        access logs). See the flat error-code catalogue in §4 of the standards
        doc.
      properties:
        type:
          default: about:blank
          title: Type
          type: string
        title:
          type: string
          title: Title
        status:
          title: Status
          type: integer
        detail:
          title: Detail
          type: string
        code:
          title: Code
          type: string
        retryable:
          title: Retryable
          type: boolean
        details:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          default: null
          title: Details
      required:
        - title
        - status
        - detail
        - code
        - retryable
      title: ProblemDetail
      type: object
  responses:
    BadRequest:
      description: Bad request
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        WWW-Authenticate:
          description: Authentication challenge for the requested resource.
          required: true
          schema:
            type: string
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    NotFound:
      description: Not found
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    MethodNotAllowed:
      description: Method not allowed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Allow:
          description: HTTP methods supported by the requested resource.
          required: true
          schema:
            type: string
    RequestTimeout:
      description: Request Timeout
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Conflict:
      description: Conflict
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    PreconditionFailed:
      description: Precondition failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ValidationFailed:
      description: Validation failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    PreconditionRequired:
      description: Precondition required
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    RateLimited:
      description: Rate limited
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
    InternalError:
      description: Internal error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ServiceUnavailable:
      description: Service unavailable
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
  securitySchemes:
    HTTPBearer:
      type: http
      description: Organization API key (sl_…).
      scheme: bearer

````