> ## 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.

# Create import source

> Add a new import source.



## OpenAPI

````yaml /generated/openapi-import-generated-2023-12-01.json post /import/sources
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:
    post:
      tags:
        - Import Sources
      summary: Create import source
      description: Add a new import source.
      operationId: create-import-source
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSourceRequest'
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: >-
                https://github.com/prequel-co/datafeed/internal/import/api/models/create-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:
    CreateSourceRequest:
      properties:
        source:
          $ref: '#/components/schemas/SourceOptions'
      additionalProperties: false
      type: object
      required:
        - source
    GetSourceResponse:
      properties:
        source:
          $ref: '#/components/schemas/SourceResource'
      additionalProperties: false
      type: object
      required:
        - source
    SourceOptions:
      oneOf:
        - properties:
            vendor:
              const: postgres
            postgres:
              $ref: '#/components/schemas/PostgresSourceOptions'
              title: PostgreSQL
          required:
            - vendor
            - postgres
          title: PostgreSQL
        - properties:
            vendor:
              const: redshift
            redshift:
              $ref: '#/components/schemas/RedshiftSourceOptions'
              title: Amazon Redshift
          required:
            - vendor
            - redshift
          title: Amazon Redshift
        - properties:
            vendor:
              const: redshift_serverless
            redshift_serverless:
              $ref: '#/components/schemas/RedshiftServerlessSourceOptions'
              title: Amazon Redshift Serverless
          required:
            - vendor
            - redshift_serverless
          title: Amazon Redshift Serverless
        - properties:
            vendor:
              const: bigquery
            bigquery:
              $ref: '#/components/schemas/BigQuerySourceOptions'
              title: Google BigQuery
          required:
            - vendor
            - bigquery
          title: Google BigQuery
        - properties:
            vendor:
              const: s3
            s3:
              $ref: '#/components/schemas/S3SourceOptions'
              title: Amazon S3
          required:
            - vendor
            - s3
          title: Amazon S3
        - properties:
            vendor:
              const: abs
            abs:
              $ref: '#/components/schemas/ABSSourceOptions'
              title: Azure Blob Storage
          required:
            - vendor
            - abs
          title: Azure Blob Storage
        - properties:
            vendor:
              const: sftp
            sftp:
              $ref: '#/components/schemas/SFTPSourceOptions'
              title: SFTP
          required:
            - vendor
            - sftp
          title: SFTP
        - properties:
            vendor:
              const: gcs
            gcs:
              $ref: '#/components/schemas/GCSSourceOptions'
              title: Google Cloud Storage
          required:
            - vendor
            - gcs
          title: Google Cloud Storage
        - properties:
            vendor:
              const: s3_compatible
            s3_compatible:
              $ref: '#/components/schemas/S3CompatibleSourceOptions'
              title: S3 Compatible
          required:
            - vendor
            - s3_compatible
          title: S3 Compatible
        - properties:
            vendor:
              const: snowflake
            snowflake:
              $ref: '#/components/schemas/SnowflakeSourceOptions'
              title: Snowflake
          required:
            - vendor
            - snowflake
          title: Snowflake
        - properties:
            vendor:
              const: delta_sharing
            delta_sharing:
              $ref: '#/components/schemas/DeltaSharingSourceOptions'
              title: Delta Sharing
          required:
            - vendor
            - delta_sharing
          title: Delta Sharing
      properties:
        provider_id:
          type: string
          title: Provider ID
          description: ID of the import provider this source belongs to.
        name:
          type: string
          title: Name
          description: Unique name for this import source.
      type: object
      required:
        - provider_id
        - name
      unevaluatedProperties: false
    SourceResource:
      oneOf:
        - properties:
            vendor:
              const: postgres
            postgres:
              $ref: '#/components/schemas/PostgresSourceResource'
          required:
            - vendor
            - postgres
          title: postgres
        - properties:
            vendor:
              const: redshift
            redshift:
              $ref: '#/components/schemas/RedshiftSourceResource'
          required:
            - vendor
            - redshift
          title: redshift
        - properties:
            vendor:
              const: redshift_serverless
            redshift_serverless:
              $ref: '#/components/schemas/RedshiftServerlessSourceResource'
          required:
            - vendor
            - redshift_serverless
          title: redshift_serverless
        - properties:
            vendor:
              const: bigquery
            bigquery:
              $ref: '#/components/schemas/BigQuerySourceResource'
          required:
            - vendor
            - bigquery
          title: bigquery
        - properties:
            vendor:
              const: s3
            s3:
              $ref: '#/components/schemas/S3SourceResource'
          required:
            - vendor
            - s3
          title: s3
        - properties:
            vendor:
              const: abs
            abs:
              $ref: '#/components/schemas/ABSSourceResource'
          required:
            - vendor
            - abs
          title: abs
        - properties:
            vendor:
              const: sftp
            sftp:
              $ref: '#/components/schemas/SFTPSourceResource'
          required:
            - vendor
            - sftp
          title: sftp
        - properties:
            vendor:
              const: gcs
            gcs:
              $ref: '#/components/schemas/GCSSourceResource'
          required:
            - vendor
            - gcs
          title: gcs
        - properties:
            vendor:
              const: s3_compatible
            s3_compatible:
              $ref: '#/components/schemas/S3CompatibleSourceResource'
          required:
            - vendor
            - s3_compatible
          title: s3_compatible
        - properties:
            vendor:
              const: snowflake
            snowflake:
              $ref: '#/components/schemas/SnowflakeSourceResource'
          required:
            - vendor
            - snowflake
          title: snowflake
        - properties:
            vendor:
              const: delta_sharing
            delta_sharing:
              $ref: '#/components/schemas/DeltaSharingSourceResource'
          required:
            - vendor
            - delta_sharing
          title: delta_sharing
      properties:
        id:
          type: string
        provider_id:
          type: string
        name:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      type: object
      required:
        - id
        - provider_id
        - name
        - created_at
        - updated_at
      unevaluatedProperties: false
    ErrorResponse:
      properties:
        status:
          type: string
          const: error
        message:
          type: string
        data:
          type: 'null'
      type: object
      required:
        - status
        - message
    PostgresSourceOptions:
      properties:
        host:
          type: string
          title: Host
          description: Host address of the database.
        port:
          type: integer
          exclusiveMinimum: 0
          title: Port
          default: 5432
        database:
          type: string
          title: Database
          description: Name of the database.
        auth_method:
          type: string
          enum:
            - password_auth
          title: Auth method
          description: Authentication method.
          oneof_title_password_auth: Username and Password
        password_auth:
          $ref: '#/components/schemas/PasswordAuth'
          title: Username and Password
          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
          title: Disable SSL
      additionalProperties: false
      type: object
      required:
        - host
        - port
        - database
        - auth_method
        - password_auth
    RedshiftSourceOptions:
      oneOf:
        - $ref: '#/components/schemas/RedshiftSourceOptionsAWSAccessKeys'
        - $ref: '#/components/schemas/RedshiftSourceOptionsAWSIAMRole'
      discriminator:
        mapping:
          aws_access_keys:
            $ref: '#/components/schemas/RedshiftSourceOptionsAWSAccessKeys'
          aws_iam_role:
            $ref: '#/components/schemas/RedshiftSourceOptionsAWSIAMRole'
        propertyName: auth_method
    RedshiftServerlessSourceOptions:
      oneOf:
        - $ref: '#/components/schemas/RedshiftServerlessSourceOptionsAWSAccessKeys'
        - $ref: '#/components/schemas/RedshiftServerlessSourceOptionsAWSIAMRole'
      discriminator:
        mapping:
          aws_access_keys:
            $ref: '#/components/schemas/RedshiftServerlessSourceOptionsAWSAccessKeys'
          aws_iam_role:
            $ref: '#/components/schemas/RedshiftServerlessSourceOptionsAWSIAMRole'
        propertyName: auth_method
    BigQuerySourceOptions:
      oneOf:
        - $ref: '#/components/schemas/BigQuerySourceOptionsGCPServiceAccountRole'
        - $ref: >-
            #/components/schemas/BigQuerySourceOptionsFederatedGCPServiceAccountRole
        - $ref: '#/components/schemas/BigQuerySourceOptionsGCPServiceAccountKey'
      discriminator:
        mapping:
          federated_gcp_service_account_role:
            $ref: >-
              #/components/schemas/BigQuerySourceOptionsFederatedGCPServiceAccountRole
          gcp_service_account_key:
            $ref: '#/components/schemas/BigQuerySourceOptionsGCPServiceAccountKey'
          gcp_service_account_role:
            $ref: '#/components/schemas/BigQuerySourceOptionsGCPServiceAccountRole'
        propertyName: auth_method
    S3SourceOptions:
      oneOf:
        - $ref: '#/components/schemas/S3SourceOptionsAWSIAMRole'
        - $ref: '#/components/schemas/S3SourceOptionsAWSAccessKeys'
      discriminator:
        mapping:
          aws_access_keys:
            $ref: '#/components/schemas/S3SourceOptionsAWSAccessKeys'
          aws_iam_role:
            $ref: '#/components/schemas/S3SourceOptionsAWSIAMRole'
        propertyName: auth_method
    ABSSourceOptions:
      properties:
        bucket_name:
          type: string
          title: Container name
        storage_account_name:
          type: string
          title: Storage account name
        auth_method:
          type: string
          enum:
            - azure_service_shared_access_signature
          title: Auth method
          oneof_title_azure_service_shared_access_signature: SAS Token
        azure_service_shared_access_signature:
          $ref: '#/components/schemas/AzureServiceSharedAccessSignature'
          title: SAS Token
      additionalProperties: false
      type: object
      required:
        - bucket_name
        - storage_account_name
        - auth_method
        - azure_service_shared_access_signature
    SFTPSourceOptions:
      properties:
        username:
          type: string
          title: Username
        host:
          type: string
          title: Host
        port:
          type: integer
          exclusiveMinimum: 0
          title: Port
          default: 22
        auth_method:
          type: string
          enum:
            - public_key_auth
          title: Auth method
          oneof_title_public_key_auth: Key Pair Authentication
        public_key_auth:
          $ref: '#/components/schemas/PublicKeyAuth'
          title: Key Pair Authentication
      additionalProperties: false
      type: object
      required:
        - username
        - host
        - port
        - auth_method
        - public_key_auth
    GCSSourceOptions:
      oneOf:
        - $ref: '#/components/schemas/GCSSourceOptionsGCPServiceAccountRole'
        - $ref: '#/components/schemas/GCSSourceOptionsFederatedGCPServiceAccountRole'
        - $ref: '#/components/schemas/GCSSourceOptionsGCSHMACKeys'
        - $ref: '#/components/schemas/GCSSourceOptionsGCPServiceAccountKey'
      discriminator:
        mapping:
          federated_gcp_service_account_role:
            $ref: >-
              #/components/schemas/GCSSourceOptionsFederatedGCPServiceAccountRole
          gcp_service_account_key:
            $ref: '#/components/schemas/GCSSourceOptionsGCPServiceAccountKey'
          gcp_service_account_role:
            $ref: '#/components/schemas/GCSSourceOptionsGCPServiceAccountRole'
          gcs_hmac_keys:
            $ref: '#/components/schemas/GCSSourceOptionsGCSHMACKeys'
        propertyName: auth_method
    S3CompatibleSourceOptions:
      properties:
        host:
          type: string
          title: Host
        port:
          type: integer
          exclusiveMinimum: 0
          title: Port
        bucket_name:
          type: string
          title: Bucket name
        auth_method:
          type: string
          enum:
            - access_keys
          title: Auth method
          oneof_title_access_keys: Access Keys
        aws_access_keys:
          $ref: '#/components/schemas/AWSAccessKeys'
          title: Access Keys
          description: Required details for access key authentication.
        disable_ssl:
          type: boolean
          title: Disable SSL
        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
      required:
        - host
        - port
        - bucket_name
        - auth_method
        - aws_access_keys
    SnowflakeSourceOptions:
      oneOf:
        - $ref: '#/components/schemas/SnowflakeSourceOptionsPublicKeyAuth'
      discriminator:
        mapping:
          public_key_auth:
            $ref: '#/components/schemas/SnowflakeSourceOptionsPublicKeyAuth'
        propertyName: auth_method
    DeltaSharingSourceOptions:
      oneOf:
        - $ref: '#/components/schemas/DeltaSharingSourceOptionsBearerToken'
        - $ref: '#/components/schemas/DeltaSharingSourceOptionsOAuth2'
      discriminator:
        mapping:
          bearer_token:
            $ref: '#/components/schemas/DeltaSharingSourceOptionsBearerToken'
          oauth2:
            $ref: '#/components/schemas/DeltaSharingSourceOptionsOAuth2'
        propertyName: auth_method
    PostgresSourceResource:
      properties:
        is_valid:
          type: boolean
        host:
          type: string
        port:
          type: integer
        database:
          type: string
        username:
          type: string
        auth_method:
          type: string
        use_ssh_tunnel:
          type: boolean
        ssh_tunnel:
          $ref: '#/components/schemas/SSHTunnelResource'
        disable_ssl:
          type: boolean
        connection_timeout_in_seconds:
          type: integer
      additionalProperties: false
      type: object
      required:
        - is_valid
        - host
        - port
        - database
        - username
        - auth_method
        - use_ssh_tunnel
        - disable_ssl
        - connection_timeout_in_seconds
    RedshiftSourceResource:
      properties:
        is_valid:
          type: boolean
        host:
          type: string
        port:
          type: integer
        database:
          type: string
        cluster:
          type: string
        region:
          type: string
        workgroup:
          type: string
        username:
          type: string
        auth_method:
          type: string
        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
        connection_timeout_in_seconds:
          type: integer
      additionalProperties: false
      type: object
      required:
        - is_valid
        - host
        - port
        - database
        - auth_method
        - use_ssh_tunnel
        - disable_ssl
        - connection_timeout_in_seconds
    RedshiftServerlessSourceResource:
      properties:
        is_valid:
          type: boolean
        host:
          type: string
        port:
          type: integer
        database:
          type: string
        region:
          type: string
        workgroup:
          type: string
        auth_method:
          type: string
        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
        connection_timeout_in_seconds:
          type: integer
      additionalProperties: false
      type: object
      required:
        - is_valid
        - host
        - port
        - database
        - workgroup
        - auth_method
        - use_ssh_tunnel
        - disable_ssl
        - connection_timeout_in_seconds
    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
        region:
          type: string
        auth_method:
          type: string
        aws_iam_role:
          $ref: '#/components/schemas/AWSIAMRoleResource'
        aws_access_keys:
          $ref: '#/components/schemas/AWSAccessKeysResource'
        bucket_host:
          type: string
        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
        storage_account_name:
          type: string
        auth_method:
          type: string
      additionalProperties: false
      type: object
      required:
        - is_valid
        - bucket_name
        - storage_account_name
        - auth_method
    SFTPSourceResource:
      properties:
        is_valid:
          type: boolean
        username:
          type: string
        host:
          type: string
        port:
          type: integer
        auth_method:
          type: string
      additionalProperties: false
      type: object
      required:
        - is_valid
        - username
        - host
        - port
        - auth_method
    GCSSourceResource:
      properties:
        is_valid:
          type: boolean
        bucket_name:
          type: string
        region:
          type: string
        auth_method:
          type: string
        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
        port:
          type: integer
        bucket_name:
          type: string
        auth_method:
          type: string
        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
        port:
          type: integer
        database:
          type: string
        username:
          type: string
        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
        port:
          type: integer
        auth_method:
          type: string
        oauth_client_id:
          type: string
      additionalProperties: false
      type: object
      required:
        - is_valid
        - host
        - port
        - auth_method
    PasswordAuth:
      properties:
        username:
          type: string
          title: Username
        password:
          type: string
          title: Password
      additionalProperties: false
      type: object
      required:
        - username
        - password
    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
          enum:
            - primary_public_key
            - secondary_public_key
          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
    RedshiftSourceOptionsAWSAccessKeys:
      properties:
        host:
          type: string
          title: Host
          description: Host address of the Redshift cluster.
        port:
          type: integer
          exclusiveMinimum: 0
          title: Port
          default: 5439
        database:
          type: string
          title: Database
          description: Name of the database.
        cluster:
          type: string
          title: Cluster
          description: Redshift Cluster identifier
        region:
          type: string
          title: Region
          description: AWS Region identifier
        username:
          type: string
          title: Username
        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
          title: Disable SSL
        connection_timeout_in_seconds:
          type: integer
          minimum: 0
          title: Connection Timeout
          description: Duration to wait for successful connection
        auth_method:
          const: aws_access_keys
        aws_access_keys:
          $ref: '#/components/schemas/RedshiftAccessKeys'
          title: AWS Access Keys
          description: Required details for AWS access keys authentication.
      type: object
      required:
        - host
        - port
        - database
        - cluster
        - region
        - username
        - auth_method
        - aws_access_keys
      title: AWS Access Keys
      unevaluatedProperties: false
    RedshiftSourceOptionsAWSIAMRole:
      properties:
        host:
          type: string
          title: Host
          description: Host address of the Redshift cluster.
        port:
          type: integer
          exclusiveMinimum: 0
          title: Port
          default: 5439
        database:
          type: string
          title: Database
          description: Name of the database.
        cluster:
          type: string
          title: Cluster
          description: Redshift Cluster identifier
        region:
          type: string
          title: Region
          description: AWS Region identifier
        username:
          type: string
          title: Username
        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
          title: Disable SSL
        connection_timeout_in_seconds:
          type: integer
          minimum: 0
          title: Connection Timeout
          description: Duration to wait for successful connection
        auth_method:
          const: aws_iam_role
        aws_iam_role:
          $ref: '#/components/schemas/AWSIAMRole'
          title: AWS IAM Role
          description: Required details for AWS IAM role authentication.
      type: object
      required:
        - host
        - port
        - database
        - cluster
        - region
        - username
        - auth_method
        - aws_iam_role
      title: AWS IAM Role
      unevaluatedProperties: false
    RedshiftServerlessSourceOptionsAWSAccessKeys:
      properties:
        host:
          type: string
          title: Host
          description: Host address of the Redshift Serverless workgroup.
        port:
          type: integer
          exclusiveMinimum: 0
          title: Port
          default: 5439
        database:
          type: string
          title: Database
          description: Name of the database.
        workgroup:
          type: string
          title: Workgroup
          description: Redshift Serverless Workgroup name
        region:
          type: string
          title: Region
          description: AWS Region identifier
        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
          title: Disable SSL
        connection_timeout_in_seconds:
          type: integer
          minimum: 0
          title: Connection Timeout
          description: Duration to wait for successful connection
        auth_method:
          const: aws_access_keys
        aws_access_keys:
          $ref: '#/components/schemas/RedshiftAccessKeys'
          title: AWS Access Keys
          description: Required details for AWS access keys authentication.
      type: object
      required:
        - host
        - port
        - database
        - workgroup
        - region
        - auth_method
        - aws_access_keys
      title: AWS Access Keys
      unevaluatedProperties: false
    RedshiftServerlessSourceOptionsAWSIAMRole:
      properties:
        host:
          type: string
          title: Host
          description: Host address of the Redshift Serverless workgroup.
        port:
          type: integer
          exclusiveMinimum: 0
          title: Port
          default: 5439
        database:
          type: string
          title: Database
          description: Name of the database.
        workgroup:
          type: string
          title: Workgroup
          description: Redshift Serverless Workgroup name
        region:
          type: string
          title: Region
          description: AWS Region identifier
        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
          title: Disable SSL
        connection_timeout_in_seconds:
          type: integer
          minimum: 0
          title: Connection Timeout
          description: Duration to wait for successful connection
        auth_method:
          const: aws_iam_role
        aws_iam_role:
          $ref: '#/components/schemas/AWSIAMRole'
          title: AWS IAM Role
          description: Required details for AWS IAM role authentication.
      type: object
      required:
        - host
        - port
        - database
        - workgroup
        - region
        - auth_method
        - aws_iam_role
      title: AWS IAM Role
      unevaluatedProperties: false
    BigQuerySourceOptionsGCPServiceAccountRole:
      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
        region:
          type: string
          title: Region
        auth_method:
          const: gcp_service_account_role
        gcp_service_account_role:
          $ref: '#/components/schemas/GCPServiceAccountRole'
          title: GCP Service Account
          description: Required details if authenticating using a GCP service account role.
      type: object
      required:
        - project_id
        - region
        - auth_method
        - gcp_service_account_role
      title: GCP Service Account
      unevaluatedProperties: false
    BigQuerySourceOptionsFederatedGCPServiceAccountRole:
      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
        region:
          type: string
          title: Region
        auth_method:
          const: federated_gcp_service_account_role
        federated_gcp_service_account_role:
          $ref: '#/components/schemas/FederatedGCPServiceAccountRole'
          title: Federation
          description: Required details if authenticating using a GCP service account role.
      type: object
      required:
        - project_id
        - region
        - auth_method
        - federated_gcp_service_account_role
      title: Federation
      unevaluatedProperties: false
    BigQuerySourceOptionsGCPServiceAccountKey:
      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
        region:
          type: string
          title: Region
        auth_method:
          const: gcp_service_account_key
        gcp_service_account_key:
          $ref: '#/components/schemas/GCPSourceServiceAccountKey'
          title: Direct Access
          description: Required details if authenticating using a GCP service account key.
      type: object
      required:
        - project_id
        - region
        - auth_method
        - gcp_service_account_key
      title: Direct Access
      unevaluatedProperties: false
    S3SourceOptionsAWSIAMRole:
      properties:
        bucket_name:
          type: string
          title: S3 bucket name
        region:
          type: string
          title: Region
        bucket_host:
          type: string
          title: Bucket host
        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.
        auth_method:
          const: aws_iam_role
        aws_iam_role:
          $ref: '#/components/schemas/AWSIAMRole'
          title: AWS IAM Role
          description: Required details for AWS IAM role authentication.
      type: object
      required:
        - bucket_name
        - region
        - auth_method
        - aws_iam_role
      title: AWS IAM Role
      unevaluatedProperties: false
    S3SourceOptionsAWSAccessKeys:
      properties:
        bucket_name:
          type: string
          title: S3 bucket name
        region:
          type: string
          title: Region
        bucket_host:
          type: string
          title: Bucket host
        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.
        auth_method:
          const: aws_access_keys
        aws_access_keys:
          $ref: '#/components/schemas/AWSAccessKeys'
          title: AWS Access Keys
          description: Required details for AWS access keys authentication.
      type: object
      required:
        - bucket_name
        - region
        - auth_method
        - aws_access_keys
      title: AWS Access Keys
      unevaluatedProperties: false
    AzureServiceSharedAccessSignature:
      properties:
        shared_access_signature_token:
          type: string
          title: Storage Account SAS Token
      additionalProperties: false
      type: object
      required:
        - shared_access_signature_token
    PublicKeyAuth:
      properties:
        public_key:
          type: string
          title: Public key
          description: This is the PKCS8 public key generated for keypair authentication.
      additionalProperties: false
      type: object
      required:
        - public_key
    GCSSourceOptionsGCPServiceAccountRole:
      properties:
        bucket_name:
          type: string
          title: GCS bucket name
        region:
          type: string
          title: Region
        auth_method:
          const: gcp_service_account_role
        gcp_service_account_role:
          $ref: '#/components/schemas/GCPServiceAccountRole'
          title: GCP Service Account
          description: Required details if authenticating using a GCP service account role.
      type: object
      required:
        - bucket_name
        - region
        - auth_method
        - gcp_service_account_role
      title: GCP Service Account
      unevaluatedProperties: false
    GCSSourceOptionsFederatedGCPServiceAccountRole:
      properties:
        bucket_name:
          type: string
          title: GCS bucket name
        region:
          type: string
          title: Region
        auth_method:
          const: federated_gcp_service_account_role
        federated_gcp_service_account_role:
          $ref: '#/components/schemas/FederatedGCPServiceAccountRole'
          title: Federation
          description: Required details if authenticating using a GCP service account role.
      type: object
      required:
        - bucket_name
        - region
        - auth_method
        - federated_gcp_service_account_role
      title: Federation
      unevaluatedProperties: false
    GCSSourceOptionsGCSHMACKeys:
      properties:
        bucket_name:
          type: string
          title: GCS bucket name
        region:
          type: string
          title: Region
        auth_method:
          const: gcs_hmac_keys
        gcs_hmac_keys:
          $ref: '#/components/schemas/GCSAccessKeys'
          title: GCS HMAC Keys
          description: Required details if authenticating using GCS HMAC keys.
      type: object
      required:
        - bucket_name
        - region
        - auth_method
        - gcs_hmac_keys
      title: GCS HMAC Keys
      unevaluatedProperties: false
    GCSSourceOptionsGCPServiceAccountKey:
      properties:
        bucket_name:
          type: string
          title: GCS bucket name
        region:
          type: string
          title: Region
        auth_method:
          const: gcp_service_account_key
        gcp_service_account_key:
          $ref: '#/components/schemas/GCPSourceServiceAccountKey'
          title: Direct Access
          description: Required details if authenticating using a GCP service account key.
      type: object
      required:
        - bucket_name
        - region
        - auth_method
        - gcp_service_account_key
      title: Direct Access
      unevaluatedProperties: false
    AWSAccessKeys:
      properties:
        access_id:
          type: string
          title: Bucket access ID
        secret_key:
          type: string
          title: Bucket secret key
      additionalProperties: false
      type: object
      required:
        - access_id
        - secret_key
    SnowflakeSourceOptionsPublicKeyAuth:
      properties:
        host:
          type: string
          pattern: .*\.snowflakecomputing.com$
          title: Account host
          description: Host address of the Snowflake account.
          default: account.us-central1.gcp.snowflakecomputing.com
        port:
          type: integer
          exclusiveMinimum: 0
          title: Port
          default: 443
        database:
          type: string
          title: Database
          description: Name of the database.
        username:
          type: string
          title: Username
        auth_method:
          const: public_key_auth
        public_key_auth:
          $ref: '#/components/schemas/PublicKeyAuth'
          title: Key Pair Authentication
          description: Required details for public key authentication.
      type: object
      required:
        - host
        - port
        - database
        - username
        - auth_method
        - public_key_auth
      title: Key Pair Authentication
      unevaluatedProperties: false
    DeltaSharingSourceOptionsBearerToken:
      properties:
        host:
          type: string
          title: Host
          description: Host address of the Delta Sharing server.
        port:
          type: integer
          exclusiveMinimum: 0
          title: Port
          default: 443
        auth_method:
          const: bearer_token
        bearer_token:
          $ref: '#/components/schemas/BearerTokenAuth'
          title: Bearer Token
          description: Required details for bearer token authentication.
      type: object
      required:
        - host
        - port
        - auth_method
        - bearer_token
      title: Bearer Token
      unevaluatedProperties: false
    DeltaSharingSourceOptionsOAuth2:
      properties:
        host:
          type: string
          title: Host
          description: Host address of the Delta Sharing server.
        port:
          type: integer
          exclusiveMinimum: 0
          title: Port
          default: 443
        auth_method:
          const: oauth2
        oauth2:
          $ref: '#/components/schemas/OAuthAuth'
          title: OAuth2
          description: Required details for OAuth2 authentication.
      type: object
      required:
        - host
        - port
        - auth_method
        - oauth2
      title: OAuth2
      unevaluatedProperties: false
    SSHTunnelResource:
      properties:
        ssh_tunnel_host:
          type: string
        ssh_tunnel_port:
          type: integer
        ssh_tunnel_username:
          type: string
        ssh_public_key:
          type: string
      additionalProperties: false
      type: object
    AWSIAMRoleResource:
      properties:
        aws_iam_role:
          type: string
      additionalProperties: false
      type: object
      required:
        - aws_iam_role
    RedshiftAccessKeysResource:
      properties:
        access_id:
          type: string
      additionalProperties: false
      type: object
      required:
        - access_id
    BigQuerySourceResourceGCPServiceAccountRole:
      properties:
        project_id:
          type: string
        region:
          type: string
        auth_method:
          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
      unevaluatedProperties: false
    BigQuerySourceResourceFederatedGCPServiceAccountRole:
      properties:
        project_id:
          type: string
        region:
          type: string
        auth_method:
          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
      unevaluatedProperties: false
    BigQuerySourceResourceGCPServiceAccountKey:
      properties:
        project_id:
          type: string
        region:
          type: string
        auth_method:
          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
      unevaluatedProperties: false
    AWSAccessKeysResource:
      properties:
        access_key_id:
          type: string
      additionalProperties: false
      type: object
      required:
        - access_key_id
    GCPServiceAccountRoleResource:
      properties:
        service_account_email:
          type: string
      additionalProperties: false
      type: object
      required:
        - service_account_email
    FederatedGCPServiceAccountRoleResource:
      properties:
        service_account_email:
          type: string
      additionalProperties: false
      type: object
      required:
        - service_account_email
    GCSAccessKeysResource:
      properties:
        access_id:
          type: string
      additionalProperties: false
      type: object
      required:
        - access_id
    GCPServiceAccountKeyResource:
      properties:
        service_account_email:
          type: string
      additionalProperties: false
      type: object
      required:
        - service_account_email
    PublicKeyAuthResource:
      properties:
        public_key:
          type: string
      additionalProperties: false
      type: object
      required:
        - public_key
    RedshiftAccessKeys:
      properties:
        password:
          type: string
          title: Password
        access_id:
          type: string
          title: Bucket access ID
        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
          default: arn:aws:iam::123456789012:role/service-role/role-name
      additionalProperties: false
      type: object
      required:
        - aws_iam_role_arn
    GCPServiceAccountRole:
      properties:
        service_account_email:
          type: string
          pattern: ^.*gserviceaccount.com$
          format: email
          title: Service account email
          default: service-account-name@project-id.iam.gserviceaccount.com
      additionalProperties: false
      type: object
      required:
        - service_account_email
    FederatedGCPServiceAccountRole:
      properties:
        service_account_email:
          type: string
          pattern: ^.*gserviceaccount.com$
          format: email
          title: Service account email
          default: 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
    GCPSourceServiceAccountKey:
      properties:
        service_account_email:
          type: string
          pattern: ^.*gserviceaccount.com$
          format: email
          title: Source service account email
          default: service-account-name@project-id.iam.gserviceaccount.com
        service_account_key:
          title: JSON Token
          description: >-
            The credentials (JSON) that will be used to extract data from your
            BigQuery database. Create a service account just for this use.
      additionalProperties: false
      type: object
      required:
        - service_account_email
        - service_account_key
    GCSAccessKeys:
      properties:
        access_key:
          type: string
          title: Bucket access ID
          description: The access key to use for authentication.
        secret:
          type: string
          title: Bucket secret key
          description: The secret to use for authentication.
      additionalProperties: false
      type: object
      required:
        - access_key
        - secret
    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
        client_secret:
          type: string
          title: Client Secret
      additionalProperties: false
      type: object
      required:
        - client_id
        - client_secret
    GcpExternalAccountMetadata:
      properties:
        type:
          type: string
        audience:
          type: string
        subject_token_type:
          type: string
        service_account_impersonation_url:
          type: string
        token_url:
          type: string
        credential_source:
          $ref: '#/components/schemas/CredentialSource'
      type: object
      required:
        - type
        - audience
        - subject_token_type
        - service_account_impersonation_url
        - token_url
        - credential_source
    CredentialSource:
      properties:
        environment_id:
          type: string
        region_url:
          type: string
        url:
          type: string
        regional_cred_verification_url:
          type: string
      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

````