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

# Update source

> Update an existing import source.



## OpenAPI

````yaml /generated/openapi-import-generated-2023-12-01.json patch /import/sources/{source_id}
openapi: 3.1.0
info:
  title: Prequel Data Import
  description: Data Import API spec
  version: '2023-12-01'
servers:
  - url: https://api.prequel.co
    description: Cloud-hosted server (US)
  - url: https://eu-api.prequel.co
    description: Cloud-hosted server (EU)
  - url: https://{custom_host}
    description: Self-hosted Prequel API host
security:
  - ApiKeyAuth: []
paths:
  /import/sources/{source_id}:
    patch:
      tags:
        - Sources
      summary: Update source
      description: Update an existing import source.
      operationId: update-import-source
      parameters:
        - name: source_id
          in: path
          required: true
          description: Import Source ID.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSourceRequest'
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: >-
                https://github.com/prequel-co/datafeed/internal/import/api/models/update-source-request
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    $ref: '#/components/schemas/GetSourceResponse'
                    $schema: https://json-schema.org/draft/2020-12/schema
                    $id: >-
                      https://github.com/prequel-co/datafeed/internal/import/api/models/get-source-response
                  message:
                    type: string
                type: object
                required:
                  - status
                  - data
                  - message
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UpdateSourceRequest:
      properties:
        source:
          $ref: '#/components/schemas/UpdateSourceOptions'
      additionalProperties: false
      type: object
      required:
        - source
    GetSourceResponse:
      properties:
        source:
          $ref: '#/components/schemas/SourceResource'
      additionalProperties: false
      type: object
      required:
        - source
    UpdateSourceOptions:
      properties:
        name:
          type: string
          description: Unique name for this import source.
          examples:
            - production-primary
        postgres:
          $ref: '#/components/schemas/UpdatePostgresSourceOptions'
          title: PostgreSQL
        redshift:
          $ref: '#/components/schemas/UpdateRedshiftSourceOptions'
          title: Amazon Redshift
        redshift_serverless:
          $ref: '#/components/schemas/UpdateRedshiftServerlessSourceOptions'
          title: Amazon Redshift Serverless
        bigquery:
          $ref: '#/components/schemas/UpdateBigQuerySourceOptions'
          title: Google BigQuery
        s3:
          $ref: '#/components/schemas/UpdateS3SourceOptions'
          title: Amazon S3
        abs:
          $ref: '#/components/schemas/UpdateABSSourceOptions'
          title: Azure Blob Storage
        sftp:
          $ref: '#/components/schemas/UpdateSFTPSourceOptions'
          title: SFTP
        gcs:
          $ref: '#/components/schemas/UpdateGCSSourceOptions'
          title: Google Cloud Storage
        s3_compatible:
          $ref: '#/components/schemas/UpdateS3CompatibleSourceOptions'
          title: S3 Compatible
        snowflake:
          $ref: '#/components/schemas/UpdateSnowflakeSourceOptions'
          title: Snowflake
        delta_sharing:
          $ref: '#/components/schemas/UpdateDeltaSharingSourceOptions'
          title: Delta Sharing
      additionalProperties: false
      type: object
    SourceResource:
      oneOf:
        - $ref: '#/components/schemas/SourceResourcePostgres'
        - $ref: '#/components/schemas/SourceResourceRedshift'
        - $ref: '#/components/schemas/SourceResourceRedshiftServerless'
        - $ref: '#/components/schemas/SourceResourceBigQuery'
        - $ref: '#/components/schemas/SourceResourceS3'
        - $ref: '#/components/schemas/SourceResourceABS'
        - $ref: '#/components/schemas/SourceResourceSFTP'
        - $ref: '#/components/schemas/SourceResourceGCS'
        - $ref: '#/components/schemas/SourceResourceS3Compatible'
        - $ref: '#/components/schemas/SourceResourceSnowflake'
        - $ref: '#/components/schemas/SourceResourceDeltaSharing'
      discriminator:
        mapping:
          abs:
            $ref: '#/components/schemas/SourceResourceABS'
          bigquery:
            $ref: '#/components/schemas/SourceResourceBigQuery'
          delta_sharing:
            $ref: '#/components/schemas/SourceResourceDeltaSharing'
          gcs:
            $ref: '#/components/schemas/SourceResourceGCS'
          postgres:
            $ref: '#/components/schemas/SourceResourcePostgres'
          redshift:
            $ref: '#/components/schemas/SourceResourceRedshift'
          redshift_serverless:
            $ref: '#/components/schemas/SourceResourceRedshiftServerless'
          s3:
            $ref: '#/components/schemas/SourceResourceS3'
          s3_compatible:
            $ref: '#/components/schemas/SourceResourceS3Compatible'
          sftp:
            $ref: '#/components/schemas/SourceResourceSFTP'
          snowflake:
            $ref: '#/components/schemas/SourceResourceSnowflake'
        propertyName: vendor
    ErrorResponse:
      properties:
        status:
          type: string
          const: error
        message:
          type: string
        data:
          type: 'null'
      type: object
      required:
        - status
        - message
    UpdatePostgresSourceOptions:
      properties:
        host:
          type: string
          description: The hostname of the PostgreSQL server.
          examples:
            - example.ab02cdefgxyz.us-east-1.rds.amazonaws.com
        port:
          type: integer
          exclusiveMinimum: 0
          description: The port of the PostgreSQL server.
          examples:
            - 5432
        database:
          type: string
          description: The name of the database to connect to.
          examples:
            - analytics
        auth_method:
          type: string
          enum:
            - password_auth
          description: Authentication method.
        password_auth:
          $ref: '#/components/schemas/UpdatePasswordAuth'
          description: Required details for username/password authentication.
        use_ssh_tunnel:
          type: boolean
          title: Use SSH Tunnel
          description: Whether to use an SSH tunnel for the connection.
        ssh_tunnel:
          $ref: '#/components/schemas/SSHTunnelParams'
          description: Required details if using SSH tunneling.
        disable_ssl:
          type: boolean
          description: Whether to disable SSL for the connection.
          default: false
      additionalProperties: false
      type: object
    UpdateRedshiftSourceOptions:
      properties:
        host:
          type: string
          description: The hostname of the Redshift server.
          examples:
            - cluster-name.ab1cdefgh.us-east-1.redshift.amazonaws.com
        port:
          type: integer
          exclusiveMinimum: 0
          description: The port of the Redshift server.
          examples:
            - 5439
        database:
          type: string
          description: The name of the database to connect to.
          examples:
            - dev
        cluster:
          type: string
          description: The name of the Redshift cluster.
          examples:
            - acme-cluster
        region:
          type: string
          description: The AWS region of the Redshift cluster.
          examples:
            - us-east-1
        workgroup:
          type: string
          description: The name of the Redshift Serverless workgroup.
          examples:
            - default-workgroup
        username:
          type: string
          description: The username for authentication.
          examples:
            - data_export_user
        auth_method:
          type: string
          enum:
            - aws_iam_role
            - aws_access_keys
        aws_access_keys:
          $ref: '#/components/schemas/UpdateRedshiftAccessKeys'
          description: Required details for AWS access keys authentication.
        aws_iam_role:
          $ref: '#/components/schemas/AWSIAMRole'
          description: Required details for AWS IAM role authentication.
        use_ssh_tunnel:
          type: boolean
          title: Use SSH Tunnel
          description: Whether to use an SSH tunnel for the connection.
        ssh_tunnel:
          $ref: '#/components/schemas/SSHTunnelParams'
          description: Required details if using SSH tunneling.
        disable_ssl:
          type: boolean
          description: Whether to disable SSL for the connection.
          default: false
      additionalProperties: false
      type: object
    UpdateRedshiftServerlessSourceOptions:
      properties:
        host:
          type: string
          description: The hostname of the Redshift Serverless server.
          examples:
            - workgroup.123456789.us-east-1.redshift-serverless.amazonaws.com
        port:
          type: integer
          exclusiveMinimum: 0
          description: The port of the Redshift Serverless server.
          examples:
            - 5439
        database:
          type: string
          description: The name of the database to connect to.
          examples:
            - dev
        workgroup:
          type: string
          description: The name of the Redshift Serverless workgroup.
          examples:
            - default-workgroup
        region:
          type: string
          description: The AWS region of the Redshift Serverless workgroup.
          examples:
            - us-east-1
        auth_method:
          type: string
          enum:
            - aws_iam_role
            - aws_access_keys
        aws_access_keys:
          $ref: '#/components/schemas/UpdateRedshiftAccessKeys'
          description: Required details for AWS access keys authentication.
        aws_iam_role:
          $ref: '#/components/schemas/AWSIAMRole'
          description: Required details for AWS IAM role authentication.
        use_ssh_tunnel:
          type: boolean
          title: Use SSH Tunnel
          description: Whether to use an SSH tunnel for the connection.
        ssh_tunnel:
          $ref: '#/components/schemas/SSHTunnelParams'
          description: Required details if using SSH tunneling.
        disable_ssl:
          type: boolean
          description: Whether to disable SSL for the connection.
          default: false
      additionalProperties: false
      type: object
    UpdateBigQuerySourceOptions:
      properties:
        project_id:
          $comment: >-
            BigQuery Project IDs must consist of 4-30 lowercase letters,
            numbers, and hyphens, and must begin with a lowercase letter and end
            with a lowercase letter or number.
          type: string
          pattern: ^[a-z][a-z0-9-]{2,28}[a-z0-9]$
          title: Project ID
          examples:
            - acme-analytics-1234
        region:
          type: string
          title: Region
          examples:
            - us-central1
        auth_method:
          type: string
          enum:
            - gcp_service_account_role
            - gcp_service_account_key
            - federated_gcp_service_account_role
          title: Auth method
          description: The method of authentication to use for this source.
        gcp_service_account_role:
          $ref: '#/components/schemas/UpdateGCPServiceAccountRole'
          description: Required details if authenticating using a GCP service account role.
        federated_gcp_service_account_role:
          $ref: '#/components/schemas/UpdateFederatedGCPServiceAccountRole'
          description: Required details if authenticating using a GCP service account role.
        gcp_service_account_key:
          $ref: '#/components/schemas/UpdateGCPSourceServiceAccountKey'
          description: Required details if authenticating using a GCP service account key.
      additionalProperties: false
      type: object
    UpdateS3SourceOptions:
      properties:
        bucket_name:
          type: string
          description: The name of the S3 bucket.
          examples:
            - acme-data-export-staging
        region:
          type: string
          description: The AWS region of the S3 bucket.
          examples:
            - us-east-1
        auth_method:
          type: string
          enum:
            - aws_iam_role
            - aws_access_keys
        aws_iam_role:
          $ref: '#/components/schemas/AWSIAMRole'
          description: Required details for AWS IAM role authentication.
        aws_access_keys:
          $ref: '#/components/schemas/UpdateAWSAccessKeys'
          description: Required details for AWS access keys authentication.
        bucket_host:
          type: string
          description: The host address of the S3 bucket.
          examples:
            - s3.us-east-1.amazonaws.com
        use_ssh_tunnel:
          type: boolean
          title: Use SSH Tunnel
          description: Whether to use an SSH tunnel for the connection.
        ssh_tunnel:
          $ref: '#/components/schemas/SSHTunnelParams'
          description: Required details if using SSH tunneling.
      additionalProperties: false
      type: object
    UpdateABSSourceOptions:
      properties:
        bucket_name:
          type: string
          description: The name of the ABS container.
          examples:
            - acme-data-export-staging
        storage_account_name:
          type: string
          description: The name of the Azure storage account.
          examples:
            - acmestorage
        auth_method:
          type: string
          enum:
            - azure_service_shared_access_signature
          description: Authentication method.
        azure_service_shared_access_signature:
          $ref: '#/components/schemas/UpdateAzureServiceSharedAccessSignature'
          description: Required parameters to authenticate to Azure using a SAS token.
      additionalProperties: false
      type: object
    UpdateSFTPSourceOptions:
      properties:
        username:
          type: string
          description: The username for the SFTP connection.
          examples:
            - data_export_user
        host:
          type: string
          description: The hostname of the SFTP server.
          examples:
            - sftp.acme.com
        port:
          type: integer
          exclusiveMinimum: 0
          description: The port of the SFTP server.
          examples:
            - 22
        auth_method:
          type: string
          enum:
            - public_key_auth
          description: Authentication method.
        public_key_auth:
          $ref: '#/components/schemas/UpdatePublicKeyAuth'
          description: Required details for public key authentication.
      additionalProperties: false
      type: object
    UpdateGCSSourceOptions:
      properties:
        bucket_name:
          type: string
          description: The name of the GCS bucket.
          examples:
            - acme-data-export-staging
        region:
          type: string
          description: The GCP region of the GCS bucket.
          examples:
            - us-central1
        auth_method:
          type: string
          enum:
            - gcp_service_account_role
            - federated_gcp_service_account_role
            - gcs_hmac_keys
            - gcp_service_account_key
          description: Authentication method.
        gcp_service_account_role:
          $ref: '#/components/schemas/UpdateGCPServiceAccountRole'
          description: Required details if authenticating using a GCP service account role.
        federated_gcp_service_account_role:
          $ref: '#/components/schemas/UpdateFederatedGCPServiceAccountRole'
          description: Required details if authenticating using a GCP service account role.
        gcs_hmac_keys:
          $ref: '#/components/schemas/UpdateGCSAccessKeys'
          description: Required details if authenticating using GCS HMAC keys.
        gcp_service_account_key:
          $ref: '#/components/schemas/UpdateGCPSourceServiceAccountKey'
          description: Required details if authenticating using a GCP service account key.
      additionalProperties: false
      type: object
    UpdateS3CompatibleSourceOptions:
      properties:
        host:
          type: string
          description: The hostname of the S3-compatible server.
          examples:
            - s3.us-east-1.amazonaws.com
        port:
          type: integer
          exclusiveMinimum: 0
          description: The port of the S3-compatible server.
          examples:
            - 443
        bucket_name:
          type: string
          description: The name of the S3-compatible bucket.
          examples:
            - acme-data-export-staging
        auth_method:
          type: string
          enum:
            - access_keys
          description: Authentication method.
        aws_access_keys:
          $ref: '#/components/schemas/UpdateAWSAccessKeys'
          description: Required details for access key authentication.
        disable_ssl:
          type: boolean
          description: Whether to disable SSL for the connection.
          default: false
        use_ssh_tunnel:
          type: boolean
          title: Use SSH Tunnel
          description: Whether to use an SSH tunnel for the connection.
        ssh_tunnel:
          $ref: '#/components/schemas/SSHTunnelParams'
          description: Required details if using SSH tunneling.
      additionalProperties: false
      type: object
    UpdateSnowflakeSourceOptions:
      properties:
        host:
          type: string
          pattern: .*\.snowflakecomputing.com$
          description: The hostname of the Snowflake account.
          examples:
            - db54321.us-central1.gcp.snowflakecomputing.com
        port:
          type: integer
          exclusiveMinimum: 0
          description: The port of the Snowflake server.
          examples:
            - 443
        database:
          type: string
          description: The name of the database to connect to.
          examples:
            - ANALYTICS
        username:
          type: string
          description: The username for authentication.
          examples:
            - DATA_EXPORT_USER
        auth_method:
          type: string
          enum:
            - public_key_auth
        public_key_auth:
          $ref: '#/components/schemas/UpdatePublicKeyAuth'
          description: Required details for public key authentication.
      additionalProperties: false
      type: object
    UpdateDeltaSharingSourceOptions:
      properties:
        host:
          type: string
          description: The hostname of the Delta Sharing server.
          examples:
            - sharing.delta.io
        port:
          type: integer
          exclusiveMinimum: 0
          description: The port of the Delta Sharing server.
          examples:
            - 443
        auth_method:
          type: string
          enum:
            - bearer_token
            - oauth2
        bearer_token:
          $ref: '#/components/schemas/BearerTokenAuth'
          description: Required details for bearer token authentication.
        oauth2:
          $ref: '#/components/schemas/OAuthAuth'
          description: Required details for OAuth2 authentication.
      additionalProperties: false
      type: object
    SourceResourcePostgres:
      properties:
        id:
          type: string
        provider_id:
          type: string
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        name:
          type: string
          examples:
            - production-primary
        created_at:
          type: string
        updated_at:
          type: string
        vendor:
          type: string
          enum:
            - postgres
            - redshift
            - redshift_serverless
            - bigquery
            - s3
            - abs
            - sftp
            - gcs
            - s3_compatible
            - snowflake
            - delta_sharing
          const: postgres
        postgres:
          $ref: '#/components/schemas/PostgresSourceResource'
      type: object
      required:
        - id
        - provider_id
        - name
        - created_at
        - updated_at
        - vendor
        - postgres
      title: Postgres
      unevaluatedProperties: false
    SourceResourceRedshift:
      properties:
        id:
          type: string
        provider_id:
          type: string
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        name:
          type: string
          examples:
            - production-primary
        created_at:
          type: string
        updated_at:
          type: string
        vendor:
          type: string
          enum:
            - redshift
            - postgres
            - redshift_serverless
            - bigquery
            - s3
            - abs
            - sftp
            - gcs
            - s3_compatible
            - snowflake
            - delta_sharing
          const: redshift
        redshift:
          $ref: '#/components/schemas/RedshiftSourceResource'
      type: object
      required:
        - id
        - provider_id
        - name
        - created_at
        - updated_at
        - vendor
        - redshift
      title: Redshift
      unevaluatedProperties: false
    SourceResourceRedshiftServerless:
      properties:
        id:
          type: string
        provider_id:
          type: string
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        name:
          type: string
          examples:
            - production-primary
        created_at:
          type: string
        updated_at:
          type: string
        vendor:
          type: string
          enum:
            - redshift_serverless
            - postgres
            - redshift
            - bigquery
            - s3
            - abs
            - sftp
            - gcs
            - s3_compatible
            - snowflake
            - delta_sharing
          const: redshift_serverless
        redshift_serverless:
          $ref: '#/components/schemas/RedshiftServerlessSourceResource'
      type: object
      required:
        - id
        - provider_id
        - name
        - created_at
        - updated_at
        - vendor
        - redshift_serverless
      title: Redshift Serverless
      unevaluatedProperties: false
    SourceResourceBigQuery:
      properties:
        id:
          type: string
        provider_id:
          type: string
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        name:
          type: string
          examples:
            - production-primary
        created_at:
          type: string
        updated_at:
          type: string
        vendor:
          type: string
          enum:
            - bigquery
            - postgres
            - redshift
            - redshift_serverless
            - s3
            - abs
            - sftp
            - gcs
            - s3_compatible
            - snowflake
            - delta_sharing
          const: bigquery
        bigquery:
          $ref: '#/components/schemas/BigQuerySourceResource'
      type: object
      required:
        - id
        - provider_id
        - name
        - created_at
        - updated_at
        - vendor
        - bigquery
      title: BigQuery
      unevaluatedProperties: false
    SourceResourceS3:
      properties:
        id:
          type: string
        provider_id:
          type: string
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        name:
          type: string
          examples:
            - production-primary
        created_at:
          type: string
        updated_at:
          type: string
        vendor:
          type: string
          enum:
            - s3
            - postgres
            - redshift
            - redshift_serverless
            - bigquery
            - abs
            - sftp
            - gcs
            - s3_compatible
            - snowflake
            - delta_sharing
          const: s3
        s3:
          $ref: '#/components/schemas/S3SourceResource'
      type: object
      required:
        - id
        - provider_id
        - name
        - created_at
        - updated_at
        - vendor
        - s3
      title: S3
      unevaluatedProperties: false
    SourceResourceABS:
      properties:
        id:
          type: string
        provider_id:
          type: string
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        name:
          type: string
          examples:
            - production-primary
        created_at:
          type: string
        updated_at:
          type: string
        vendor:
          type: string
          enum:
            - abs
            - postgres
            - redshift
            - redshift_serverless
            - bigquery
            - s3
            - sftp
            - gcs
            - s3_compatible
            - snowflake
            - delta_sharing
          const: abs
        abs:
          $ref: '#/components/schemas/ABSSourceResource'
      type: object
      required:
        - id
        - provider_id
        - name
        - created_at
        - updated_at
        - vendor
        - abs
      title: ABS
      unevaluatedProperties: false
    SourceResourceSFTP:
      properties:
        id:
          type: string
        provider_id:
          type: string
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        name:
          type: string
          examples:
            - production-primary
        created_at:
          type: string
        updated_at:
          type: string
        vendor:
          type: string
          enum:
            - sftp
            - postgres
            - redshift
            - redshift_serverless
            - bigquery
            - s3
            - abs
            - gcs
            - s3_compatible
            - snowflake
            - delta_sharing
          const: sftp
        sftp:
          $ref: '#/components/schemas/SFTPSourceResource'
      type: object
      required:
        - id
        - provider_id
        - name
        - created_at
        - updated_at
        - vendor
        - sftp
      title: SFTP
      unevaluatedProperties: false
    SourceResourceGCS:
      properties:
        id:
          type: string
        provider_id:
          type: string
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        name:
          type: string
          examples:
            - production-primary
        created_at:
          type: string
        updated_at:
          type: string
        vendor:
          type: string
          enum:
            - gcs
            - postgres
            - redshift
            - redshift_serverless
            - bigquery
            - s3
            - abs
            - sftp
            - s3_compatible
            - snowflake
            - delta_sharing
          const: gcs
        gcs:
          $ref: '#/components/schemas/GCSSourceResource'
      type: object
      required:
        - id
        - provider_id
        - name
        - created_at
        - updated_at
        - vendor
        - gcs
      title: GCS
      unevaluatedProperties: false
    SourceResourceS3Compatible:
      properties:
        id:
          type: string
        provider_id:
          type: string
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        name:
          type: string
          examples:
            - production-primary
        created_at:
          type: string
        updated_at:
          type: string
        vendor:
          type: string
          enum:
            - s3_compatible
            - postgres
            - redshift
            - redshift_serverless
            - bigquery
            - s3
            - abs
            - sftp
            - gcs
            - snowflake
            - delta_sharing
          const: s3_compatible
        s3_compatible:
          $ref: '#/components/schemas/S3CompatibleSourceResource'
      type: object
      required:
        - id
        - provider_id
        - name
        - created_at
        - updated_at
        - vendor
        - s3_compatible
      title: S3 Compatible
      unevaluatedProperties: false
    SourceResourceSnowflake:
      properties:
        id:
          type: string
        provider_id:
          type: string
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        name:
          type: string
          examples:
            - production-primary
        created_at:
          type: string
        updated_at:
          type: string
        vendor:
          type: string
          enum:
            - snowflake
            - postgres
            - redshift
            - redshift_serverless
            - bigquery
            - s3
            - abs
            - sftp
            - gcs
            - s3_compatible
            - delta_sharing
          const: snowflake
        snowflake:
          $ref: '#/components/schemas/SnowflakeSourceResource'
      type: object
      required:
        - id
        - provider_id
        - name
        - created_at
        - updated_at
        - vendor
        - snowflake
      title: Snowflake
      unevaluatedProperties: false
    SourceResourceDeltaSharing:
      properties:
        id:
          type: string
        provider_id:
          type: string
          examples:
            - 3fa85f64-5717-4562-b3fc-2c963f66afa6
        name:
          type: string
          examples:
            - production-primary
        created_at:
          type: string
        updated_at:
          type: string
        vendor:
          type: string
          enum:
            - delta_sharing
            - postgres
            - redshift
            - redshift_serverless
            - bigquery
            - s3
            - abs
            - sftp
            - gcs
            - s3_compatible
            - snowflake
          const: delta_sharing
        delta_sharing:
          $ref: '#/components/schemas/DeltaSharingSourceResource'
      type: object
      required:
        - id
        - provider_id
        - name
        - created_at
        - updated_at
        - vendor
        - delta_sharing
      title: Delta Sharing
      unevaluatedProperties: false
    UpdatePasswordAuth:
      properties:
        username:
          type: string
          description: The username to use for authentication.
          examples:
            - data_export_user
        password:
          type: string
          description: The password to use for authentication.
      additionalProperties: false
      type: object
    SSHTunnelParams:
      properties:
        ssh_tunnel_host:
          type: string
          title: SSH tunnel host
        ssh_tunnel_port:
          type: integer
          title: SSH tunnel port
          default: 22
        ssh_tunnel_username:
          type: string
          title: SSH tunnel username
        ssh_public_key:
          type: string
          title: SSH Public Key
          description: >-
            This is the public SSH key that will be used to establish the SSH
            tunnel. It should be added to the list of authorized keys on the
            bastion host.
      additionalProperties: false
      type: object
      required:
        - ssh_tunnel_host
        - ssh_tunnel_port
        - ssh_tunnel_username
    UpdateRedshiftAccessKeys:
      properties:
        password:
          type: string
          title: Password
        access_id:
          type: string
          title: Bucket access ID
          examples:
            - AKIAIOSFODNN7EXAMPLE
        secret_key:
          type: string
          title: Bucket secret key
      additionalProperties: false
      type: object
      required:
        - password
        - access_id
        - secret_key
    AWSIAMRole:
      properties:
        aws_iam_role_arn:
          type: string
          title: IAM role ARN
          examples:
            - arn:aws:iam::123456789012:role/service-role/role-name
      additionalProperties: false
      type: object
      required:
        - aws_iam_role_arn
    UpdateGCPServiceAccountRole:
      properties:
        service_account_email:
          type: string
          pattern: ^.*gserviceaccount.com$
          format: email
          description: The email of the GCP service account to use for authentication.
          examples:
            - data-export@acme-analytics-1234.iam.gserviceaccount.com
        workload_identity_federation_metadata:
          $ref: '#/components/schemas/GcpExternalAccountMetadata'
          title: Workload identity metadata
          description: The federation metadata to use for authentication.
      additionalProperties: false
      type: object
    UpdateFederatedGCPServiceAccountRole:
      properties:
        service_account_email:
          type: string
          pattern: ^.*gserviceaccount.com$
          format: email
          title: Service account email
          examples:
            - service-account-name@project-id.iam.gserviceaccount.com
        workload_identity_federation_metadata:
          $ref: '#/components/schemas/GcpExternalAccountMetadata'
          title: Workload identity metadata
      additionalProperties: false
      type: object
      required:
        - service_account_email
    UpdateGCPSourceServiceAccountKey:
      properties:
        service_account_email:
          type: string
          pattern: ^.*gserviceaccount.com$
          format: email
          description: The email of the GCP service account to use for authentication.
          examples:
            - data-export@acme-analytics-1234.iam.gserviceaccount.com
        service_account_key:
          description: The full Google-generated JSON service account key object.
      additionalProperties: false
      type: object
    UpdateAWSAccessKeys:
      properties:
        access_id:
          type: string
          description: The access key ID to use for authentication.
          examples:
            - AKIAIOSFODNN7EXAMPLE
        secret_key:
          type: string
          description: The secret key to use for authentication.
      additionalProperties: false
      type: object
    UpdateAzureServiceSharedAccessSignature:
      properties:
        shared_access_signature_token:
          type: string
          title: Storage Account SAS Token
      additionalProperties: false
      type: object
    UpdatePublicKeyAuth:
      properties:
        public_key:
          type: string
          title: Public key
          description: This is the PKCS8 public key generated for keypair authentication.
      additionalProperties: false
      type: object
    UpdateGCSAccessKeys:
      properties:
        access_key:
          type: string
          description: The access key to use for authentication.
          examples:
            - GOOG1EXAMPLEACCESSID
        secret:
          type: string
          description: The secret to use for authentication.
      additionalProperties: false
      type: object
    BearerTokenAuth:
      properties:
        bearer_token:
          type: string
          title: Bearer Token
      additionalProperties: false
      type: object
      required:
        - bearer_token
    OAuthAuth:
      properties:
        client_id:
          type: string
          title: Client ID
          examples:
            - 1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
        client_secret:
          type: string
          title: Client Secret
      additionalProperties: false
      type: object
      required:
        - client_id
        - client_secret
    PostgresSourceResource:
      properties:
        is_valid:
          type: boolean
        host:
          type: string
          examples:
            - example.ab02cdefgxyz.us-east-1.rds.amazonaws.com
        port:
          type: integer
          examples:
            - 5432
        database:
          type: string
          examples:
            - analytics
        auth_method:
          type: string
          enum:
            - password_auth
          examples:
            - password_auth
        password_auth:
          $ref: '#/components/schemas/PasswordAuthResource'
        use_ssh_tunnel:
          type: boolean
        ssh_tunnel:
          $ref: '#/components/schemas/SSHTunnelResource'
        disable_ssl:
          type: boolean
      additionalProperties: false
      type: object
      required:
        - is_valid
        - host
        - port
        - database
        - auth_method
        - password_auth
        - use_ssh_tunnel
        - disable_ssl
    RedshiftSourceResource:
      properties:
        is_valid:
          type: boolean
        host:
          type: string
          examples:
            - cluster-name.ab1cdefgh.us-east-1.redshift.amazonaws.com
        port:
          type: integer
          examples:
            - 5439
        database:
          type: string
          examples:
            - dev
        cluster:
          type: string
          examples:
            - acme-cluster
        region:
          type: string
          examples:
            - us-east-1
        username:
          type: string
          examples:
            - data_export_user
        auth_method:
          type: string
          enum:
            - aws_iam_role
            - aws_access_keys
          examples:
            - aws_iam_role
        aws_iam_role:
          $ref: '#/components/schemas/AWSIAMRoleResource'
        aws_access_keys:
          $ref: '#/components/schemas/RedshiftAccessKeysResource'
        use_ssh_tunnel:
          type: boolean
        ssh_tunnel:
          $ref: '#/components/schemas/SSHTunnelResource'
        disable_ssl:
          type: boolean
      additionalProperties: false
      type: object
      required:
        - is_valid
        - host
        - port
        - database
        - auth_method
        - use_ssh_tunnel
        - disable_ssl
    RedshiftServerlessSourceResource:
      properties:
        is_valid:
          type: boolean
        host:
          type: string
          examples:
            - workgroup.123456789.us-east-1.redshift-serverless.amazonaws.com
        port:
          type: integer
          examples:
            - 5439
        database:
          type: string
          examples:
            - dev
        region:
          type: string
          examples:
            - us-east-1
        workgroup:
          type: string
          examples:
            - default-workgroup
        auth_method:
          type: string
          enum:
            - aws_iam_role
            - aws_access_keys
          examples:
            - aws_iam_role
        aws_iam_role:
          $ref: '#/components/schemas/AWSIAMRoleResource'
        aws_access_keys:
          $ref: '#/components/schemas/RedshiftAccessKeysResource'
        use_ssh_tunnel:
          type: boolean
        ssh_tunnel:
          $ref: '#/components/schemas/SSHTunnelResource'
        disable_ssl:
          type: boolean
      additionalProperties: false
      type: object
      required:
        - is_valid
        - host
        - port
        - database
        - workgroup
        - auth_method
        - use_ssh_tunnel
        - disable_ssl
    BigQuerySourceResource:
      oneOf:
        - $ref: '#/components/schemas/BigQuerySourceResourceGCPServiceAccountRole'
        - $ref: >-
            #/components/schemas/BigQuerySourceResourceFederatedGCPServiceAccountRole
        - $ref: '#/components/schemas/BigQuerySourceResourceGCPServiceAccountKey'
      discriminator:
        mapping:
          federated_gcp_service_account_role:
            $ref: >-
              #/components/schemas/BigQuerySourceResourceFederatedGCPServiceAccountRole
          gcp_service_account_key:
            $ref: '#/components/schemas/BigQuerySourceResourceGCPServiceAccountKey'
          gcp_service_account_role:
            $ref: '#/components/schemas/BigQuerySourceResourceGCPServiceAccountRole'
        propertyName: auth_method
    S3SourceResource:
      properties:
        is_valid:
          type: boolean
        bucket_name:
          type: string
          examples:
            - acme-data-export-staging
        region:
          type: string
          examples:
            - us-east-1
        auth_method:
          type: string
          enum:
            - aws_iam_role
            - aws_access_keys
          examples:
            - aws_iam_role
        aws_iam_role:
          $ref: '#/components/schemas/AWSIAMRoleResource'
        aws_access_keys:
          $ref: '#/components/schemas/AWSAccessKeysResource'
        bucket_host:
          type: string
          examples:
            - s3.us-east-1.amazonaws.com
        use_ssh_tunnel:
          type: boolean
        ssh_tunnel:
          $ref: '#/components/schemas/SSHTunnelResource'
      additionalProperties: false
      type: object
      required:
        - is_valid
        - bucket_name
        - region
        - auth_method
        - use_ssh_tunnel
    ABSSourceResource:
      properties:
        is_valid:
          type: boolean
        bucket_name:
          type: string
          examples:
            - acme-data-export-staging
        storage_account_name:
          type: string
          examples:
            - acmestorage
        auth_method:
          type: string
          enum:
            - azure_service_shared_access_signature
          examples:
            - azure_service_shared_access_signature
      additionalProperties: false
      type: object
      required:
        - is_valid
        - bucket_name
        - storage_account_name
        - auth_method
    SFTPSourceResource:
      properties:
        is_valid:
          type: boolean
        username:
          type: string
          examples:
            - data_export_user
        host:
          type: string
          examples:
            - sftp.acme.com
        port:
          type: integer
          examples:
            - 22
        auth_method:
          type: string
          enum:
            - public_key_auth
          examples:
            - public_key_auth
      additionalProperties: false
      type: object
      required:
        - is_valid
        - username
        - host
        - port
        - auth_method
    GCSSourceResource:
      properties:
        is_valid:
          type: boolean
        bucket_name:
          type: string
          examples:
            - acme-data-export-staging
        region:
          type: string
          examples:
            - us-central1
        auth_method:
          type: string
          enum:
            - gcp_service_account_role
            - federated_gcp_service_account_role
            - gcs_hmac_keys
            - gcp_service_account_key
          examples:
            - gcp_service_account_role
        gcp_service_account_role:
          $ref: '#/components/schemas/GCPServiceAccountRoleResource'
        federated_gcp_service_account_role:
          $ref: '#/components/schemas/FederatedGCPServiceAccountRoleResource'
        gcs_hmac_keys:
          $ref: '#/components/schemas/GCSAccessKeysResource'
        gcp_service_account_key:
          $ref: '#/components/schemas/GCPServiceAccountKeyResource'
      additionalProperties: false
      type: object
      required:
        - is_valid
        - bucket_name
        - region
        - auth_method
    S3CompatibleSourceResource:
      properties:
        is_valid:
          type: boolean
        host:
          type: string
          examples:
            - s3.us-east-1.amazonaws.com
        port:
          type: integer
          examples:
            - 443
        bucket_name:
          type: string
          examples:
            - acme-data-export-staging
        auth_method:
          type: string
          enum:
            - access_keys
          examples:
            - access_keys
        aws_access_keys:
          $ref: '#/components/schemas/AWSAccessKeysResource'
        disable_ssl:
          type: boolean
        use_ssh_tunnel:
          type: boolean
        ssh_tunnel:
          $ref: '#/components/schemas/SSHTunnelResource'
      additionalProperties: false
      type: object
      required:
        - is_valid
        - host
        - port
        - bucket_name
        - auth_method
        - disable_ssl
        - use_ssh_tunnel
    SnowflakeSourceResource:
      properties:
        is_valid:
          type: boolean
        host:
          type: string
          examples:
            - db54321.us-central1.gcp.snowflakecomputing.com
        port:
          type: integer
          examples:
            - 443
        database:
          type: string
          examples:
            - ANALYTICS
        username:
          type: string
          examples:
            - DATA_EXPORT_USER
        auth_method:
          type: string
          enum:
            - public_key_auth
        public_key_auth:
          $ref: '#/components/schemas/PublicKeyAuthResource'
      additionalProperties: false
      type: object
      required:
        - is_valid
        - host
        - port
        - database
        - username
        - auth_method
    DeltaSharingSourceResource:
      properties:
        is_valid:
          type: boolean
        host:
          type: string
          examples:
            - sharing.delta.io
        port:
          type: integer
          examples:
            - 443
        auth_method:
          type: string
          enum:
            - bearer_token
            - oauth2
          examples:
            - bearer_token
        oauth2:
          $ref: '#/components/schemas/OAuthAuthResource'
      additionalProperties: false
      type: object
      required:
        - is_valid
        - host
        - port
        - auth_method
    GcpExternalAccountMetadata:
      properties:
        type:
          type: string
          examples:
            - external_account
        audience:
          type: string
          examples:
            - >-
              //iam.googleapis.com/projects/123456789/locations/global/workloadIdentityPools/data-export-pool/providers/data-export-provider
        subject_token_type:
          type: string
          examples:
            - urn:ietf:params:oauth:token-type:aws4_request
        service_account_impersonation_url:
          type: string
          examples:
            - >-
              https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/data-export@acme-analytics-1234.iam.gserviceaccount.com:generateAccessToken
        token_url:
          type: string
          examples:
            - https://sts.googleapis.com/v1/token
        credential_source:
          $ref: '#/components/schemas/CredentialSource'
      type: object
      required:
        - type
        - audience
        - subject_token_type
        - service_account_impersonation_url
        - token_url
        - credential_source
    PasswordAuthResource:
      properties:
        username:
          type: string
          examples:
            - data_export_user
      additionalProperties: false
      type: object
      required:
        - username
    SSHTunnelResource:
      properties:
        ssh_tunnel_host:
          type: string
          examples:
            - bastion.example.com
        ssh_tunnel_port:
          type: integer
          examples:
            - 22
        ssh_tunnel_username:
          type: string
          examples:
            - data-export
        ssh_public_key:
          type: string
      additionalProperties: false
      type: object
    AWSIAMRoleResource:
      properties:
        aws_iam_role_arn:
          type: string
          examples:
            - arn:aws:iam::123456789012:role/service-role/role-name
      additionalProperties: false
      type: object
      required:
        - aws_iam_role_arn
    RedshiftAccessKeysResource:
      properties:
        access_id:
          type: string
          examples:
            - AKIAIOSFODNN7EXAMPLE
      additionalProperties: false
      type: object
      required:
        - access_id
    BigQuerySourceResourceGCPServiceAccountRole:
      properties:
        project_id:
          type: string
          examples:
            - acme-analytics-1234
        region:
          type: string
          examples:
            - us-central1
        auth_method:
          type: string
          enum:
            - gcp_service_account_role
            - gcp_service_account_key
            - federated_gcp_service_account_role
          const: gcp_service_account_role
        gcp_service_account_role:
          $ref: '#/components/schemas/GCPServiceAccountRoleResource'
      type: object
      required:
        - project_id
        - region
        - auth_method
        - gcp_service_account_role
      title: GCP Service Account Role
      unevaluatedProperties: false
    BigQuerySourceResourceFederatedGCPServiceAccountRole:
      properties:
        project_id:
          type: string
          examples:
            - acme-analytics-1234
        region:
          type: string
          examples:
            - us-central1
        auth_method:
          type: string
          enum:
            - federated_gcp_service_account_role
            - gcp_service_account_role
            - gcp_service_account_key
          const: federated_gcp_service_account_role
        federated_gcp_service_account_role:
          $ref: '#/components/schemas/FederatedGCPServiceAccountRoleResource'
      type: object
      required:
        - project_id
        - region
        - auth_method
        - federated_gcp_service_account_role
      title: Federated GCP Service Account Role
      unevaluatedProperties: false
    BigQuerySourceResourceGCPServiceAccountKey:
      properties:
        project_id:
          type: string
          examples:
            - acme-analytics-1234
        region:
          type: string
          examples:
            - us-central1
        auth_method:
          type: string
          enum:
            - gcp_service_account_key
            - gcp_service_account_role
            - federated_gcp_service_account_role
          const: gcp_service_account_key
        gcp_service_account_key:
          $ref: '#/components/schemas/GCPServiceAccountKeyResource'
      type: object
      required:
        - project_id
        - region
        - auth_method
        - gcp_service_account_key
      title: GCP Service Account Key
      unevaluatedProperties: false
    AWSAccessKeysResource:
      properties:
        access_id:
          type: string
          examples:
            - AKIAIOSFODNN7EXAMPLE
      additionalProperties: false
      type: object
      required:
        - access_id
    GCPServiceAccountRoleResource:
      properties:
        service_account_email:
          type: string
          examples:
            - data-export@acme-analytics-1234.iam.gserviceaccount.com
      additionalProperties: false
      type: object
      required:
        - service_account_email
    FederatedGCPServiceAccountRoleResource:
      properties:
        service_account_email:
          type: string
          examples:
            - data-export@acme-analytics-1234.iam.gserviceaccount.com
      additionalProperties: false
      type: object
      required:
        - service_account_email
    GCSAccessKeysResource:
      properties:
        access_key:
          type: string
          examples:
            - GOOG1EXAMPLEACCESSID
      additionalProperties: false
      type: object
      required:
        - access_key
    GCPServiceAccountKeyResource:
      properties:
        service_account_email:
          type: string
          examples:
            - data-export@acme-analytics-1234.iam.gserviceaccount.com
      additionalProperties: false
      type: object
      required:
        - service_account_email
    PublicKeyAuthResource:
      properties:
        public_key:
          type: string
      additionalProperties: false
      type: object
      required:
        - public_key
    OAuthAuthResource:
      properties:
        client_id:
          type: string
          examples:
            - 1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
      additionalProperties: false
      type: object
      required:
        - client_id
    CredentialSource:
      properties:
        environment_id:
          type: string
          examples:
            - aws1
        region_url:
          type: string
          examples:
            - >-
              http://169.254.169.254/latest/meta-data/placement/availability-zone
        url:
          type: string
          examples:
            - http://169.254.169.254/latest/meta-data/iam/security-credentials
        regional_cred_verification_url:
          type: string
          examples:
            - >-
              https://sts.us-east-1.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15
      additionalProperties: false
      type: object
      required:
        - environment_id
        - region_url
        - url
        - regional_cred_verification_url
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````